diff --git a/packages/google-cloud-dialogflow-cx/README.md b/packages/google-cloud-dialogflow-cx/README.md index 03fc92c4c1b..459e9695da7 100644 --- a/packages/google-cloud-dialogflow-cx/README.md +++ b/packages/google-cloud-dialogflow-cx/README.md @@ -89,6 +89,11 @@ Samples are in the [`samples/`][homepage_samples] directory. Each sample's `READ | lookup environment history | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/environments.lookup_environment_history.js) | | run continuous test | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/environments.run_continuous_test.js) | | update environment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/environments.update_environment.js) | +| create example | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/examples.create_example.js) | +| delete example | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/examples.delete_example.js) | +| get example | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/examples.get_example.js) | +| list examples | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/examples.list_examples.js) | +| update example | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/examples.update_example.js) | | create experiment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/experiments.create_experiment.js) | | delete experiment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/experiments.delete_experiment.js) | | get experiment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/experiments.get_experiment.js) | @@ -123,6 +128,18 @@ Samples are in the [`samples/`][homepage_samples] directory. Each sample's `READ | get page | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/pages.get_page.js) | | list pages | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/pages.list_pages.js) | | update page | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/pages.update_page.js) | +| create playbook | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/playbooks.create_playbook.js) | +| create playbook version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/playbooks.create_playbook_version.js) | +| delete playbook | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/playbooks.delete_playbook.js) | +| delete playbook version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/playbooks.delete_playbook_version.js) | +| export playbook | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/playbooks.export_playbook.js) | +| get playbook | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/playbooks.get_playbook.js) | +| get playbook version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/playbooks.get_playbook_version.js) | +| import playbook | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/playbooks.import_playbook.js) | +| list playbook versions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/playbooks.list_playbook_versions.js) | +| list playbooks | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/playbooks.list_playbooks.js) | +| restore playbook version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/playbooks.restore_playbook_version.js) | +| update playbook | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/playbooks.update_playbook.js) | | create security settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/security_settings_service.create_security_settings.js) | | delete security settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/security_settings_service.delete_security_settings.js) | | get security settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/security_settings_service.get_security_settings.js) | @@ -152,6 +169,16 @@ Samples are in the [`samples/`][homepage_samples] directory. Each sample's `READ | list test cases | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/test_cases.list_test_cases.js) | | run test case | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/test_cases.run_test_case.js) | | update test case | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/test_cases.update_test_case.js) | +| create tool | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/tools.create_tool.js) | +| create tool version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/tools.create_tool_version.js) | +| delete tool | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/tools.delete_tool.js) | +| delete tool version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/tools.delete_tool_version.js) | +| get tool | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/tools.get_tool.js) | +| get tool version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/tools.get_tool_version.js) | +| list tool versions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/tools.list_tool_versions.js) | +| list tools | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/tools.list_tools.js) | +| restore tool version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/tools.restore_tool_version.js) | +| update tool | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/tools.update_tool.js) | | create transition route group | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/transition_route_groups.create_transition_route_group.js) | | delete transition route group | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/transition_route_groups.delete_transition_route_group.js) | | get transition route group | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/transition_route_groups.get_transition_route_group.js) | diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/advanced_settings.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/advanced_settings.proto index 91ce1aacbf3..0d8e5dff8cc 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/advanced_settings.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/advanced_settings.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 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/agent.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/agent.proto index 686de252afa..0dc2abe4960 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 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -345,14 +345,31 @@ message Agent { // Speech recognition related settings. SpeechToTextSettings speech_to_text_settings = 13; - // Immutable. Name of the start flow in this agent. A start flow will be - // automatically created when the agent is created, and can only be deleted by - // deleting the agent. Format: - // `projects//locations//agents//flows/`. - string start_flow = 16 [ - (google.api.field_behavior) = IMMUTABLE, - (google.api.resource_reference) = { type: "dialogflow.googleapis.com/Flow" } - ]; + // The resource to start the conversations with for the agent. + oneof session_entry_resource { + // Name of the start flow in this agent. A start flow will be automatically + // created when the agent is created, and can only be deleted by deleting + // the agent. + // Format: + // `projects//locations//agents//flows/`. + // Currently only the default start flow with id + // "00000000-0000-0000-0000-000000000000" is allowed. + string start_flow = 16 [(google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Flow" + }]; + + // Name of the start playbook in this agent. A start playbook will be + // automatically created when the agent is created, and can only be deleted + // by deleting the agent. + // Format: + // `projects//locations//agents//playbooks/`. + // Currently only the + // default playbook with id + // "00000000-0000-0000-0000-000000000000" is allowed. + string start_playbook = 39 [(google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Playbook" + }]; + } // Name of the // [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings] 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 6b7add8f93b..c29a088c304 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 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -42,6 +42,7 @@ enum AudioEncoding { AUDIO_ENCODING_UNSPECIFIED = 0; // Uncompressed 16-bit signed little-endian samples (Linear PCM). + // LINT: LEGACY_NAMES AUDIO_ENCODING_LINEAR_16 = 1; // [`FLAC`](https://xiph.org/flac/documentation.html) (Free Lossless Audio @@ -310,12 +311,14 @@ enum OutputAudioEncoding { // Uncompressed 16-bit signed little-endian samples (Linear PCM). // Audio content returned as LINEAR16 also contains a WAV header. + // LINT: LEGACY_NAMES OUTPUT_AUDIO_ENCODING_LINEAR_16 = 1; // MP3 audio at 32kbps. OUTPUT_AUDIO_ENCODING_MP3 = 2; // MP3 audio at 64kbps. + // LINT: LEGACY_NAMES OUTPUT_AUDIO_ENCODING_MP3_64_KBPS = 4; // Opus encoded audio wrapped in an ogg container. The result will be a diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/changelog.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/changelog.proto index c4bd12eaed5..f5c186b9f68 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/changelog.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/changelog.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 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/code_block.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/code_block.proto new file mode 100644 index 00000000000..e6eeb36a96a --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/code_block.proto @@ -0,0 +1,32 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.dialogflow.cx.v3; + +import "google/api/field_behavior.proto"; + +option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3"; +option go_package = "cloud.google.com/go/dialogflow/cx/apiv3/cxpb;cxpb"; +option java_multiple_files = true; +option java_outer_classname = "CodeBlockProto"; +option java_package = "com.google.cloud.dialogflow.cx.v3"; +option objc_class_prefix = "DF"; + +// Represents a code block. +message CodeBlock { + // Optional. Source code of the block in Python. + string code = 1 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/data_store_connection.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/data_store_connection.proto index 3abe98aee15..727fdc6b682 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/data_store_connection.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/data_store_connection.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,6 +17,7 @@ syntax = "proto3"; package google.cloud.dialogflow.cx.v3; import "google/api/field_behavior.proto"; +import "google/protobuf/struct.proto"; option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3"; option go_package = "cloud.google.com/go/dialogflow/cx/apiv3/cxpb;cxpb"; @@ -89,6 +90,9 @@ message DataStoreConnectionSignals { // Text included in the prompt. string text = 3; + + // Metadata associated with the document. + google.protobuf.Struct metadata = 5; } // Diagnostic info related to the answer generation model call. diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/deployment.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/deployment.proto index 0e93779603b..5893d5782fc 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/deployment.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/deployment.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 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/entity_type.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/entity_type.proto index 33f7b003559..676737b9520 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 2025 Google LLC +// Copyright 2026 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/environment.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/environment.proto index ec167872b04..61e45323653 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 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -200,11 +200,13 @@ message Environment { // Configuration for the version. message VersionConfig { - // Required. Both flow and playbook versions are supported. + // Required. Flow, playbook and tool versions are supported. // Format for flow version: // projects//locations//agents//flows//versions/. // Format for playbook version: // projects//locations//agents//playbooks//versions/. + // Format for tool version: + // projects//locations//agents//tools//versions/. string version = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/example.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/example.proto new file mode 100644 index 00000000000..9c8467a586e --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/example.proto @@ -0,0 +1,237 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.dialogflow.cx.v3; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/dialogflow/cx/v3/trace.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3"; +option go_package = "cloud.google.com/go/dialogflow/cx/apiv3/cxpb;cxpb"; +option java_multiple_files = true; +option java_outer_classname = "ExampleProto"; +option java_package = "com.google.cloud.dialogflow.cx.v3"; +option objc_class_prefix = "DF"; + +// Service for managing [Examples][google.cloud.dialogflow.cx.v3.Example]. +service Examples { + option (google.api.default_host) = "dialogflow.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/dialogflow"; + + // Creates an example in the specified playbook. + rpc CreateExample(CreateExampleRequest) returns (Example) { + option (google.api.http) = { + post: "/v3/{parent=projects/*/locations/*/agents/*/playbooks/*}/examples" + body: "example" + }; + option (google.api.method_signature) = "parent,example"; + } + + // Deletes the specified example. + rpc DeleteExample(DeleteExampleRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v3/{name=projects/*/locations/*/agents/*/playbooks/*/examples/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Returns a list of examples in the specified playbook. + rpc ListExamples(ListExamplesRequest) returns (ListExamplesResponse) { + option (google.api.http) = { + get: "/v3/{parent=projects/*/locations/*/agents/*/playbooks/*}/examples" + }; + option (google.api.method_signature) = "parent"; + } + + // Retrieves the specified example. + rpc GetExample(GetExampleRequest) returns (Example) { + option (google.api.http) = { + get: "/v3/{name=projects/*/locations/*/agents/*/playbooks/*/examples/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Update the specified example. + rpc UpdateExample(UpdateExampleRequest) returns (Example) { + option (google.api.http) = { + patch: "/v3/{example.name=projects/*/locations/*/agents/*/playbooks/*/examples/*}" + body: "example" + }; + option (google.api.method_signature) = "example,update_mask"; + } +} + +// The request message for +// [Examples.CreateExample][google.cloud.dialogflow.cx.v3.Examples.CreateExample]. +message CreateExampleRequest { + // Required. The playbook to create an example for. + // Format: + // `projects//locations//agents//playbooks/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Example" + } + ]; + + // Required. The example to create. + Example example = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// The request message for +// [Examples.DeleteExample][google.cloud.dialogflow.cx.v3.Examples.DeleteExample]. +message DeleteExampleRequest { + // Required. The name of the example to delete. + // Format: + // `projects//locations//agents//playbooks//examples/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Example" + } + ]; +} + +// The request message for +// [Examples.ListExamples][google.cloud.dialogflow.cx.v3.Examples.ListExamples]. +message ListExamplesRequest { + // Required. The playbook to list the examples from. + // Format: + // `projects//locations//agents//playbooks/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Example" + } + ]; + + // Optional. The maximum number of items to return in a single page. By + // default 100 and at most 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The [next_page_token][ListExampleResponse.next_page_token] value + // returned from a previous list request. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The language to list examples for. + // If not specified, list all examples under the playbook. + // Note: languages must be enabled in the agent before they can be used. + string language_code = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response message for +// [Examples.ListExamples][google.cloud.dialogflow.cx.v3.Examples.ListExamples]. +message ListExamplesResponse { + // The list of examples. There will be a maximum number of items returned + // based on the + // [page_size][google.cloud.dialogflow.cx.v3.ListExamplesRequest.page_size] + // field in the request. + repeated Example examples = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; +} + +// The request message for +// [Examples.GetExample][google.cloud.dialogflow.cx.v3.Examples.GetExample]. +message GetExampleRequest { + // Required. The name of the example. + // Format: + // `projects//locations//agents//playbooks//examples/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Example" + } + ]; +} + +// The request message for +// [Examples.UpdateExample][google.cloud.dialogflow.cx.v3.Examples.UpdateExample]. +message UpdateExampleRequest { + // Required. The example to update. + Example example = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The mask to control which fields get updated. If the mask is not + // present, all fields will be updated. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Example represents a sample execution of the playbook in the conversation. +// +// An example consists of a list of ordered actions performed by end user +// or Dialogflow agent according the playbook instructions to fulfill the task. +message Example { + option (google.api.resource) = { + type: "dialogflow.googleapis.com/Example" + pattern: "projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}/examples/{example}" + plural: "examples" + singular: "example" + }; + + // The unique identifier of the playbook example. + // Format: + // `projects//locations//agents//playbooks//examples/`. + string name = 1; + + // Optional. The input to the playbook in the example. + PlaybookInput playbook_input = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The output of the playbook in the example. + PlaybookOutput playbook_output = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The ordered list of actions performed by the end user and the + // Dialogflow agent. + repeated Action actions = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The display name of the example. + string display_name = 6 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The high level concise description of the example. The max number + // of characters is 200. + string description = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Estimated number of tokes current example takes when sent to + // the LLM. + int64 token_count = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The timestamp of initial example creation. + google.protobuf.Timestamp create_time = 10 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Last time the example was updated. + google.protobuf.Timestamp update_time = 11 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Example's output state. + OutputState conversation_state = 12 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The language code of the example. + // If not specified, the agent's default language is used. + // Note: languages must be enabled in the agent before they can be used. + // Note: example's language code is not currently used in dialogflow agents. + string language_code = 13 [(google.api.field_behavior) = OPTIONAL]; +} 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 4eed26bc1fc..87b45ad9c98 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 2025 Google LLC +// Copyright 2026 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 e65bab6e391..c49afdc619c 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 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -23,6 +23,7 @@ import "google/api/resource.proto"; import "google/cloud/dialogflow/cx/v3/advanced_settings.proto"; import "google/cloud/dialogflow/cx/v3/import_strategy.proto"; import "google/cloud/dialogflow/cx/v3/page.proto"; +import "google/cloud/dialogflow/cx/v3/parameter_definition.proto"; import "google/cloud/dialogflow/cx/v3/validation_message.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/empty.proto"; @@ -350,6 +351,14 @@ message Flow { KnowledgeConnectorSettings knowledge_connector_settings = 18 [(google.api.field_behavior) = OPTIONAL]; + // Optional. Defined structured input parameters for this flow. + repeated ParameterDefinition input_parameter_definitions = 26 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Defined structured output parameters for this flow. + repeated ParameterDefinition output_parameter_definitions = 27 + [(google.api.field_behavior) = OPTIONAL]; + // Optional. Multi-lingual agent settings for this flow. MultiLanguageSettings multi_language_settings = 28 [(google.api.field_behavior) = OPTIONAL]; 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 2635a3ca703..6b29e1bca45 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 2025 Google LLC +// Copyright 2026 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/gcs.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/gcs.proto index 98e903e0056..096e8c888c2 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/gcs.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/gcs.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 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/generative_settings.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/generative_settings.proto index 923cfc3d3c3..fa0d740193b 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/generative_settings.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/generative_settings.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -103,4 +103,16 @@ message GenerativeSettings { // Language for this settings. string language_code = 4; + + // LLM model settings. + LlmModelSettings llm_model_settings = 8; +} + +// Settings for LLM models. +message LlmModelSettings { + // The selected LLM model. + string model = 1; + + // The custom prompt to use. + string prompt_text = 2; } diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/generator.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/generator.proto index 105cc37b59b..d491055b73e 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/generator.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/generator.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -20,6 +20,7 @@ import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; +import "google/cloud/dialogflow/cx/v3/generative_settings.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; @@ -148,6 +149,9 @@ message Generator { repeated Placeholder placeholders = 5 [(google.api.field_behavior) = OPTIONAL]; + // The LLM model settings. + LlmModelSettings llm_model_settings = 9; + // Parameters passed to the LLM to configure its behavior. ModelParameter model_parameter = 8; } diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/import_strategy.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/import_strategy.proto index 8828b9e682d..a16daf0abc0 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/import_strategy.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/import_strategy.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 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/inline.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/inline.proto index fd1073b9260..e641aeda0e6 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/inline.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/inline.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 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 5050672ab65..3fa8505106c 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 2025 Google LLC +// Copyright 2026 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/page.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/page.proto index 33e2715b52a..f9717826645 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 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -349,6 +349,13 @@ message EventHandler { string target_flow = 3 [(google.api.resource_reference) = { type: "dialogflow.googleapis.com/Flow" }]; + + // The target playbook to transition to. + // Format: + // `projects//locations//agents//playbooks/`. + string target_playbook = 7 [(google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Playbook" + }]; } } diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/parameter_definition.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/parameter_definition.proto new file mode 100644 index 00000000000..03839000be1 --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/parameter_definition.proto @@ -0,0 +1,119 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.dialogflow.cx.v3; + +import "google/api/field_behavior.proto"; + +option go_package = "cloud.google.com/go/dialogflow/cx/apiv3/cxpb;cxpb"; +option java_multiple_files = true; +option java_outer_classname = "ParameterDefinitionProto"; +option java_package = "com.google.cloud.dialogflow.cx.v3"; + +// Defines the properties of a parameter. +// Used to define parameters used in the agent and the +// input / output parameters for each fulfillment. +message ParameterDefinition { + // Parameter types are used for validation. + // These types are consistent with + // [google.protobuf.Value][google.protobuf.Value]. + enum ParameterType { + // Not specified. No validation will be performed. + PARAMETER_TYPE_UNSPECIFIED = 0; + + // Represents any string value. + STRING = 1; + + // Represents any number value. + NUMBER = 2; + + // Represents a boolean value. + BOOLEAN = 3; + + // Represents a null value. + NULL = 4; + + // Represents any object value. + OBJECT = 5; + + // Represents a repeated value. + LIST = 6; + } + + // Required. Name of parameter. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Type of parameter. + ParameterType type = 2 [deprecated = true]; + + // Optional. Type schema of parameter. + TypeSchema type_schema = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Human-readable description of the parameter. Limited to 300 characters. + string description = 3; +} + +// Encapsulates different type schema variations: either a reference to an +// a schema that's already defined by a tool, or an inline definition. +message TypeSchema { + // A reference to the schema of an existing tool. + message SchemaReference { + // The tool that contains this schema definition. + // Format: + // `projects//locations//agents//tools/`. + string tool = 1; + + // The name of the schema. + string schema = 2; + } + + // The encapsulated schema. + oneof schema { + // Set if this is an inline schema definition. + InlineSchema inline_schema = 1; + + // Set if this is a schema reference. + SchemaReference schema_reference = 2; + } +} + +// A type schema object that's specified inline. +message InlineSchema { + // Data type of the schema. + DataType type = 1; + + // Schema of the elements if this is an ARRAY type. + TypeSchema items = 2; +} + +// Defines data types that are supported for inlined schemas. These types are +// consistent with [google.protobuf.Value][google.protobuf.Value]. +enum DataType { + // Not specified. + DATA_TYPE_UNSPECIFIED = 0; + + // Represents any string value. + STRING = 1; + + // Represents any number value. + NUMBER = 2; + + // Represents a boolean value. + BOOLEAN = 3; + + // Represents a repeated value. + ARRAY = 6; +} diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/playbook.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/playbook.proto new file mode 100644 index 00000000000..fe8f373e79b --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/playbook.proto @@ -0,0 +1,706 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.dialogflow.cx.v3; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/dialogflow/cx/v3/code_block.proto"; +import "google/cloud/dialogflow/cx/v3/example.proto"; +import "google/cloud/dialogflow/cx/v3/fulfillment.proto"; +import "google/cloud/dialogflow/cx/v3/generative_settings.proto"; +import "google/cloud/dialogflow/cx/v3/import_strategy.proto"; +import "google/cloud/dialogflow/cx/v3/parameter_definition.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3"; +option go_package = "cloud.google.com/go/dialogflow/cx/apiv3/cxpb;cxpb"; +option java_multiple_files = true; +option java_outer_classname = "PlaybookProto"; +option java_package = "com.google.cloud.dialogflow.cx.v3"; +option objc_class_prefix = "DF"; + +// Service for managing [Playbooks][google.cloud.dialogflow.cx.v3.Playbook]. +service Playbooks { + option (google.api.default_host) = "dialogflow.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/dialogflow"; + + // Creates a playbook in a specified agent. + rpc CreatePlaybook(CreatePlaybookRequest) returns (Playbook) { + option (google.api.http) = { + post: "/v3/{parent=projects/*/locations/*/agents/*}/playbooks" + body: "playbook" + }; + option (google.api.method_signature) = "parent,playbook"; + } + + // Deletes a specified playbook. + rpc DeletePlaybook(DeletePlaybookRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v3/{name=projects/*/locations/*/agents/*/playbooks/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Returns a list of playbooks in the specified agent. + rpc ListPlaybooks(ListPlaybooksRequest) returns (ListPlaybooksResponse) { + option (google.api.http) = { + get: "/v3/{parent=projects/*/locations/*/agents/*}/playbooks" + }; + option (google.api.method_signature) = "parent"; + } + + // Retrieves the specified Playbook. + rpc GetPlaybook(GetPlaybookRequest) returns (Playbook) { + option (google.api.http) = { + get: "/v3/{name=projects/*/locations/*/agents/*/playbooks/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Exports the specified playbook to a binary file. + // + // Note that resources (e.g. examples, tools) that the playbook + // references will also be exported. + rpc ExportPlaybook(ExportPlaybookRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v3/{name=projects/*/locations/*/agents/*/playbooks/*}:export" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "ExportPlaybookResponse" + metadata_type: "google.protobuf.Struct" + }; + } + + // Imports the specified playbook to the specified agent from a binary file. + rpc ImportPlaybook(ImportPlaybookRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v3/{parent=projects/*/locations/*/agents/*}/playbooks:import" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "ImportPlaybookResponse" + metadata_type: "google.protobuf.Struct" + }; + } + + // Updates the specified Playbook. + rpc UpdatePlaybook(UpdatePlaybookRequest) returns (Playbook) { + option (google.api.http) = { + patch: "/v3/{playbook.name=projects/*/locations/*/agents/*/playbooks/*}" + body: "playbook" + }; + option (google.api.method_signature) = "playbook,update_mask"; + } + + // Creates a version for the specified Playbook. + rpc CreatePlaybookVersion(CreatePlaybookVersionRequest) + returns (PlaybookVersion) { + option (google.api.http) = { + post: "/v3/{parent=projects/*/locations/*/agents/*/playbooks/*}/versions" + body: "playbook_version" + }; + option (google.api.method_signature) = "parent,playbook_version"; + } + + // Retrieves the specified version of the Playbook. + rpc GetPlaybookVersion(GetPlaybookVersionRequest) returns (PlaybookVersion) { + option (google.api.http) = { + get: "/v3/{name=projects/*/locations/*/agents/*/playbooks/*/versions/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Retrieves the specified version of the Playbook and stores it as the + // current playbook draft, returning the playbook with resources updated. + rpc RestorePlaybookVersion(RestorePlaybookVersionRequest) + returns (RestorePlaybookVersionResponse) { + option (google.api.http) = { + post: "/v3/{name=projects/*/locations/*/agents/*/playbooks/*/versions/*}:restore" + body: "*" + }; + option (google.api.method_signature) = "name"; + } + + // Lists versions for the specified Playbook. + rpc ListPlaybookVersions(ListPlaybookVersionsRequest) + returns (ListPlaybookVersionsResponse) { + option (google.api.http) = { + get: "/v3/{parent=projects/*/locations/*/agents/*/playbooks/*}/versions" + }; + option (google.api.method_signature) = "parent"; + } + + // Deletes the specified version of the Playbook. + rpc DeletePlaybookVersion(DeletePlaybookVersionRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v3/{name=projects/*/locations/*/agents/*/playbooks/*/versions/*}" + }; + option (google.api.method_signature) = "name"; + } +} + +// The request message for +// [Playbooks.CreatePlaybook][google.cloud.dialogflow.cx.v3.Playbooks.CreatePlaybook]. +message CreatePlaybookRequest { + // Required. The agent to create a playbook for. + // Format: `projects//locations//agents/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Playbook" + } + ]; + + // Required. The playbook to create. + Playbook playbook = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// The request message for +// [Playbooks.DeletePlaybook][google.cloud.dialogflow.cx.v3.Playbooks.DeletePlaybook]. +message DeletePlaybookRequest { + // Required. The name of the playbook to delete. + // Format: + // `projects//locations//agents//playbooks/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Playbook" + } + ]; +} + +// The request message for +// [Playbooks.ListPlaybooks][google.cloud.dialogflow.cx.v3.Playbooks.ListPlaybooks]. +message ListPlaybooksRequest { + // Required. The agent to list playbooks from. + // Format: `projects//locations//agents/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Playbook" + } + ]; + + // The maximum number of items to return in a single page. By default 100 and + // at most 1000. + int32 page_size = 2; + + // The next_page_token value returned from a previous list request. + string page_token = 3; +} + +// The response message for +// [Playbooks.ListPlaybooks][google.cloud.dialogflow.cx.v3.Playbooks.ListPlaybooks]. +message ListPlaybooksResponse { + // The list of playbooks. There will be a maximum number of items returned + // based on the page_size field in the request. + repeated Playbook playbooks = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; +} + +// The request message for +// [Playbooks.GetPlaybook][google.cloud.dialogflow.cx.v3.Playbooks.GetPlaybook]. +message GetPlaybookRequest { + // Required. The name of the playbook. + // Format: + // `projects//locations//agents//playbooks/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Playbook" + } + ]; +} + +// The request message for +// [Playbooks.UpdatePlaybook][google.cloud.dialogflow.cx.v3.Playbooks.UpdatePlaybook]. +message UpdatePlaybookRequest { + // Required. The playbook to update. + Playbook playbook = 1 [(google.api.field_behavior) = REQUIRED]; + + // The mask to control which fields get updated. If the mask is not present, + // all fields will be updated. + google.protobuf.FieldMask update_mask = 2; +} + +// Playbook is the basic building block to instruct the LLM how to execute a +// certain task. +// +// A playbook consists of a goal to accomplish, an optional list of step by step +// instructions (the step instruction may refers to name of the custom or +// default plugin tools to use) to perform the task, +// a list of contextual input data to be passed in at the beginning of the +// invoked, and a list of output parameters to store the playbook result. +message Playbook { + option (google.api.resource) = { + type: "dialogflow.googleapis.com/Playbook" + pattern: "projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}" + }; + + // Message of single step execution. + message Step { + // Instruction on how to execute current step. + oneof instruction { + // Step instruction in text format. + string text = 1; + } + + // Sub-processing needed to execute the current step. + repeated Step steps = 2; + } + + // Message of the Instruction of the playbook. + message Instruction { + // General guidelines for the playbook. These are unstructured instructions + // that are not directly part of the goal, e.g. "Always be polite". It's + // valid for this text to be long and used instead of steps altogether. + string guidelines = 1; + + // Ordered list of step by step execution instructions to accomplish + // target goal. + repeated Step steps = 2; + } + + // Type of the playbook. + enum PlaybookType { + // Unspecified type. Default to TASK. + PLAYBOOK_TYPE_UNSPECIFIED = 0; + + // Task playbook. + TASK = 1; + + // Routine playbook. + ROUTINE = 3; + } + + // The unique identifier of the playbook. + // Format: + // `projects//locations//agents//playbooks/`. + string name = 1; + + // Required. The human-readable name of the playbook, unique within an agent. + string display_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. High level description of the goal the playbook intend to + // accomplish. A goal should be concise since it's visible to other playbooks + // that may reference this playbook. + string goal = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Defined structured input parameters for this playbook. + repeated ParameterDefinition input_parameter_definitions = 5 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Defined structured output parameters for this playbook. + repeated ParameterDefinition output_parameter_definitions = 6 + [(google.api.field_behavior) = OPTIONAL]; + + // Instruction to accomplish target goal. + Instruction instruction = 17; + + // Output only. Estimated number of tokes current playbook takes when sent to + // the LLM. + int64 token_count = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The timestamp of initial playbook creation. + google.protobuf.Timestamp create_time = 9 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Last time the playbook version was updated. + google.protobuf.Timestamp update_time = 10 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The resource name of other playbooks referenced by the current + // playbook in the instructions. + repeated string referenced_playbooks = 11 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Playbook" + } + ]; + + // Output only. The resource name of flows referenced by the current playbook + // in the instructions. + repeated string referenced_flows = 12 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { type: "dialogflow.googleapis.com/Flow" } + ]; + + // Optional. The resource name of tools referenced by the current playbook in + // the instructions. If not provided explicitly, they are will + // be implied using the tool being referenced in goal and steps. + repeated string referenced_tools = 13 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { type: "dialogflow.googleapis.com/Tool" } + ]; + + // Optional. Output only. Names of inline actions scoped to this playbook. + // These actions are in addition to those belonging to referenced tools, child + // playbooks, and flows, e.g. actions that are defined in the playbook's code + // block. + repeated string inline_actions = 22 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.field_behavior) = OUTPUT_ONLY + ]; + + // Optional. The playbook's scoped code block, which may implement handlers + // and actions. + CodeBlock code_block = 21 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Llm model settings for the playbook. + LlmModelSettings llm_model_settings = 14 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A list of registered handlers to execuate based on the specified + // triggers. + repeated Handler handlers = 16 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Type of the playbook. + PlaybookType playbook_type = 19 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request message for +// [Playbooks.CreatePlaybookVersion][google.cloud.dialogflow.cx.v3.Playbooks.CreatePlaybookVersion]. +message CreatePlaybookVersionRequest { + // Required. The playbook to create a version for. + // Format: + // `projects//locations//agents//playbooks/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/PlaybookVersion" + } + ]; + + // Required. The playbook version to create. + PlaybookVersion playbook_version = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Playbook version is a snapshot of the playbook at certain timestamp. +message PlaybookVersion { + option (google.api.resource) = { + type: "dialogflow.googleapis.com/PlaybookVersion" + pattern: "projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}/versions/{version}" + plural: "playbookVersions" + singular: "playbookVersion" + }; + + // The unique identifier of the playbook version. + // Format: + // `projects//locations//agents//playbooks//versions/`. + string name = 1; + + // Optional. The description of the playbook version. + string description = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Snapshot of the playbook when the playbook version is created. + Playbook playbook = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Snapshot of the examples belonging to the playbook when the + // playbook version is created. + repeated Example examples = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Last time the playbook version was created or modified. + google.protobuf.Timestamp update_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The request message for +// [Playbooks.GetPlaybookVersion][google.cloud.dialogflow.cx.v3.Playbooks.GetPlaybookVersion]. +message GetPlaybookVersionRequest { + // Required. The name of the playbook version. + // Format: + // `projects//locations//agents//playbooks//versions/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/PlaybookVersion" + } + ]; +} + +// The request message for +// [Playbooks.RestorePlaybookVersion][google.cloud.dialogflow.cx.v3.Playbooks.RestorePlaybookVersion]. +message RestorePlaybookVersionRequest { + // Required. The name of the playbook version. + // Format: + // `projects//locations//agents//playbooks//versions/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/PlaybookVersion" + } + ]; +} + +// The response message for +// [Playbooks.RestorePlaybookVersion][google.cloud.dialogflow.cx.v3.Playbooks.RestorePlaybookVersion]. +message RestorePlaybookVersionResponse { + // The updated playbook. + Playbook playbook = 2; +} + +// The request message for +// [Playbooks.ListPlaybookVersions][google.cloud.dialogflow.cx.v3.Playbooks.ListPlaybookVersions]. +message ListPlaybookVersionsRequest { + // Required. The playbook to list versions for. + // Format: + // `projects//locations//agents//playbooks/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/PlaybookVersion" + } + ]; + + // Optional. The maximum number of items to return in a single page. By + // default 100 and at most 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The next_page_token value returned from a previous list request. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response message for +// [Playbooks.ListPlaybookVersions][google.cloud.dialogflow.cx.v3.Playbooks.ListPlaybookVersions]. +message ListPlaybookVersionsResponse { + // The list of playbook version. There will be a maximum number of items + // returned based on the page_size field in the request. + repeated PlaybookVersion playbook_versions = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; +} + +// The request message for +// [Playbooks.DeletePlaybookVersion][google.cloud.dialogflow.cx.v3.Playbooks.DeletePlaybookVersion]. +message DeletePlaybookVersionRequest { + // Required. The name of the playbook version to delete. + // Format: + // `projects//locations//agents//playbooks//versions/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/PlaybookVersion" + } + ]; +} + +// The request message for +// [Playbooks.ExportPlaybook][google.cloud.dialogflow.cx.v3.Playbooks.ExportPlaybook]. +message ExportPlaybookRequest { + // Data format of the exported playbook. + enum DataFormat { + // Unspecified format. + DATA_FORMAT_UNSPECIFIED = 0; + + // Flow content will be exported as raw bytes. + BLOB = 1; + + // Flow content will be exported in JSON format. + JSON = 2; + } + + // Required. The name of the playbook to export. + // Format: + // `projects//locations//agents//playbooks/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Playbook" + } + ]; + + // Optional. The [Google Cloud + // Storage](https://cloud.google.com/storage/docs/) URI to export the playbook + // to. The format of this URI must be `gs:///`. If + // left unspecified, the serialized playbook is returned inline. + // + // Dialogflow performs a write operation for the Cloud Storage object + // on the caller's behalf, so your request authentication must + // have write permissions for the object. For more information, see + // [Dialogflow access + // control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). + string playbook_uri = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The data format of the exported agent. If not specified, `BLOB` + // is assumed. + DataFormat data_format = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request message for +// [Playbooks.ImportPlaybook][google.cloud.dialogflow.cx.v3.Playbooks.ImportPlaybook]. +message ImportPlaybookRequest { + // Required. The agent to import the playbook into. + // Format: `projects//locations//agents/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Playbook" + } + ]; + + // Required. The playbook to import. + // The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI + // to import playbook from. The format of this URI must be + // `gs:///`. + // + // Dialogflow performs a read operation for the Cloud Storage object + // on the caller's behalf, so your request authentication must + // have read permissions for the object. For more information, see + oneof playbook { + // [Dialogflow access + // control] + // (https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). + string playbook_uri = 2; + + // Uncompressed raw byte content for playbook. + bytes playbook_content = 3; + } + + // Optional. Specifies the import strategy used when resolving resource + // conflicts. + PlaybookImportStrategy import_strategy = 4 + [(google.api.field_behavior) = OPTIONAL]; +} + +// The playbook import strategy used for resource conflict resolution associated +// with an +// [ImportPlaybookRequest][google.cloud.dialogflow.cx.v3.ImportPlaybookRequest]. +message PlaybookImportStrategy { + // Optional. Specifies the import strategy used when resolving conflicts with + // the main playbook. If not specified, 'CREATE_NEW' is assumed. + ImportStrategy main_playbook_import_strategy = 4 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies the import strategy used when resolving referenced + // playbook/flow conflicts. If not specified, 'CREATE_NEW' is assumed. + ImportStrategy nested_resource_import_strategy = 5 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies the import strategy used when resolving tool conflicts. + // If not specified, 'CREATE_NEW' is assumed. This will be applied after the + // main playbook and nested resource import strategies, meaning if the + // playbook that references the tool is skipped, the tool will also be + // skipped. + ImportStrategy tool_import_strategy = 6 + [(google.api.field_behavior) = OPTIONAL]; +} + +// The response message for +// [Playbooks.ImportPlaybook][google.cloud.dialogflow.cx.v3.Playbooks.ImportPlaybook]. +message ImportPlaybookResponse { + // Conflicting resources detected during the import process. Only filled when + // [REPORT_CONFLICTS][ImportPlaybookResponse.REPORT_CONFLICTS] is set in the + // request and there are conflicts in the display names. + message ConflictingResources { + // Display name of conflicting main playbook. + string main_playbook_display_name = 1; + + // Display names of conflicting nested playbooks. + repeated string nested_playbook_display_names = 2; + + // Display names of conflicting tools. + repeated string tool_display_names = 3; + } + + // The unique identifier of the new playbook. + // Format: + // `projects//locations//agents//playbooks/`. + string playbook = 1 [(google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Playbook" + }]; + + // Info which resources have conflicts when + // [REPORT_CONFLICTS][ImportPlaybookResponse.REPORT_CONFLICTS] import strategy + // is set for all resources in ImportPlaybookRequest. + ConflictingResources conflicting_resources = 2; +} + +// The response message for +// [Playbooks.ExportPlaybook][google.cloud.dialogflow.cx.v3.Playbooks.ExportPlaybook]. +message ExportPlaybookResponse { + // The exported playbook. + oneof playbook { + // The URI to a file containing the exported playbook. This field is + // populated only if `playbook_uri` is specified in + // [ExportPlaybookRequest][google.cloud.dialogflow.cx.v3.ExportPlaybookRequest]. + string playbook_uri = 1; + + // Uncompressed raw byte content for playbook. + bytes playbook_content = 2; + } +} + +// Handler can be used to define custom logic to be executed based on the +// user-specified triggers. +message Handler { + // A handler that is triggered by the specified + // [event][google.cloud.dialogflow.cx.v3.Handler.EventHandler.event]. + message EventHandler { + // Required. The name of the event that triggers this handler. + string event = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The condition that must be satisfied to trigger this handler. + string condition = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The fulfillment to call when the event occurs. + Fulfillment fulfillment = 2 [(google.api.field_behavior) = REQUIRED]; + } + + // A handler that is triggered on the specific + // [lifecycle_stage][google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler.lifecycle_stage] + // of the playbook execution. + message LifecycleHandler { + // Required. The name of the lifecycle stage that triggers this handler. + // Supported values: + // * `playbook-start` + // * `pre-action-selection` + // * `pre-action-execution` + string lifecycle_stage = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The condition that must be satisfied to trigger this handler. + string condition = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The fulfillment to call when this handler is triggered. + Fulfillment fulfillment = 3 [(google.api.field_behavior) = REQUIRED]; + } + + // Specifies the type of handler to invoke. + oneof handler { + // A handler triggered by event. + EventHandler event_handler = 1; + + // A handler triggered during specific lifecycle of the playbook execution. + LifecycleHandler lifecycle_handler = 3; + } +} 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 766da97b6ef..776be9f43a0 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 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,6 +17,7 @@ syntax = "proto3"; package google.cloud.dialogflow.cx.v3; import "google/api/field_behavior.proto"; +import "google/cloud/dialogflow/cx/v3/tool_call.proto"; import "google/protobuf/struct.proto"; option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3"; @@ -256,6 +257,10 @@ message ResponseMessage { // Represents info card for knowledge answers, to be better rendered in // Dialogflow Messenger. KnowledgeInfoCard knowledge_info_card = 20; + + // Returns the definition of a tool call that should be executed by the + // client. + ToolCall tool_call = 22; } // Response type. diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/safety_settings.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/safety_settings.proto index 3381b2a3d95..34ca5de0990 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/safety_settings.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/safety_settings.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -37,6 +37,97 @@ message SafetySettings { string language_code = 2 [(google.api.field_behavior) = REQUIRED]; } + // Strategy for matching phrases. + enum PhraseMatchStrategy { + // Unspecified, defaults to PARTIAL_MATCH. + PHRASE_MATCH_STRATEGY_UNSPECIFIED = 0; + + // Text that contains the phrase as a substring will be matched, e.g. "foo" + // will match "afoobar". + PARTIAL_MATCH = 1; + + // Text that contains the tokenized words of the phrase will be matched, + // e.g. "foo" will match "a foo bar" and "foo bar", but not "foobar". + WORD_MATCH = 2; + } + + // Settings for Responsible AI. + message RaiSettings { + // Sensitivity level for RAI categories. + enum SafetyFilterLevel { + // Unspecified -- uses default sensitivity levels. + SAFETY_FILTER_LEVEL_UNSPECIFIED = 0; + + // Block no text -- effectively disables the category. + BLOCK_NONE = 1; + + // Block a few suspicious texts. + BLOCK_FEW = 2; + + // Block some suspicious texts. + BLOCK_SOME = 3; + + // Block most suspicious texts. + BLOCK_MOST = 4; + } + + // RAI categories to configure. + enum SafetyCategory { + // Unspecified. + SAFETY_CATEGORY_UNSPECIFIED = 0; + + // Dangerous content. + DANGEROUS_CONTENT = 1; + + // Hate speech. + HATE_SPEECH = 2; + + // Harassment. + HARASSMENT = 3; + + // Sexually explicit content. + SEXUALLY_EXPLICIT_CONTENT = 4; + } + + // Configuration of the sensitivity level for blocking an RAI category. + message CategoryFilter { + // RAI category to configure. + SafetyCategory category = 1; + + // Blocking sensitivity level to configure for the RAI category. + SafetyFilterLevel filter_level = 2; + } + + // Optional. RAI blocking configurations. + repeated CategoryFilter category_filters = 3 + [(google.api.field_behavior) = OPTIONAL]; + } + + // Settings for prompt security checks. + message PromptSecuritySettings { + // Optional. Enable prompt security checks. + bool enable_prompt_security = 1 [(google.api.field_behavior) = OPTIONAL]; + } + + // Optional. Default phrase match strategy for banned phrases. + PhraseMatchStrategy default_banned_phrase_match_strategy = 4 + [(google.api.field_behavior) = OPTIONAL]; + // Banned phrases for generated text. repeated Phrase banned_phrases = 1; + + // Optional. Settings for Responsible AI checks. + RaiSettings rai_settings = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Immutable. Default RAI settings to be annotated on the agent, so + // that users will be able to restore their RAI configurations to the default + // settings. Read-only field for the API proto only. + RaiSettings default_rai_settings = 3 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Optional. Settings for prompt security checks. + PromptSecuritySettings prompt_security_settings = 8 + [(google.api.field_behavior) = OPTIONAL]; } 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 3d1d0e08bc4..f322265e637 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 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -264,6 +264,9 @@ message SecuritySettings { string gcs_bucket = 1; // Filename pattern for exported audio. + // {conversation} and {timestamp} are placeholders that will be replaced + // with the conversation ID and epoch micros of the conversation. + // For example, "{conversation}/recording_{timestamp}.mulaw". string audio_export_pattern = 2; // Enable audio redaction if it is true. 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 44e33da28f0..37dbb8ab353 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 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -24,10 +24,12 @@ import "google/cloud/dialogflow/cx/v3/advanced_settings.proto"; import "google/cloud/dialogflow/cx/v3/audio_config.proto"; import "google/cloud/dialogflow/cx/v3/data_store_connection.proto"; import "google/cloud/dialogflow/cx/v3/flow.proto"; +import "google/cloud/dialogflow/cx/v3/generative_settings.proto"; 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_entity_type.proto"; +import "google/cloud/dialogflow/cx/v3/tool_call.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/struct.proto"; @@ -246,6 +248,12 @@ message DetectIntentRequest { // Instructs the speech synthesizer how to generate the output audio. OutputAudioConfig output_audio_config = 4; + + // Optional. Specifies which fields in the + // [QueryResult][google.cloud.dialogflow.cx.v3.QueryResult] to return. If not + // set, the default is DETECT_INTENT_RESPONSE_VIEW_FULL. + DetectIntentResponseView response_view = 9 + [(google.api.field_behavior) = OPTIONAL]; } // The message returned from the DetectIntent method. @@ -369,6 +377,12 @@ message StreamingDetectIntentRequest { // If true, `StreamingDetectIntentResponse.debugging_info` will get populated. bool enable_debugging_info = 8; + + // Optional. Specifies which fields in the + // [QueryResult][google.cloud.dialogflow.cx.v3.QueryResult] to return. If not + // set, the default is DETECT_INTENT_RESPONSE_VIEW_FULL. + DetectIntentResponseView response_view = 16 + [(google.api.field_behavior) = OPTIONAL]; } // Cloud conversation info for easier debugging. @@ -633,6 +647,14 @@ message QueryParameters { // use parameter value. google.protobuf.Struct parameters = 5; + // Scope for the parameters. If not specified, parameters will be treated as + // session parameters. Parameters with custom scope will not be put into + // [session parameters][google.cloud.dialogflow.cx.v3.SessionInfo.parameters]. + // + // You can reference the parameters with custom scope in the agent with the + // following format: $parameter-scope.params.parameter-id. + string parameter_scope = 12; + // The unique identifier of the [page][google.cloud.dialogflow.cx.v3.Page] to // override the [current page][QueryResult.current_page] in the session. // Format: @@ -679,6 +701,24 @@ message QueryParameters { type: "dialogflow.googleapis.com/Version" }]; + // Optional. The unique identifier of the + // [playbook][google.cloud.dialogflow.cx.v3.Playbook] to start or continue the + // session with. If `current_playbook` is specified, the previous state of the + // session will be ignored by Dialogflow. + // + // Format: + // `projects//locations//agents//playbooks/`. + string current_playbook = 19 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Playbook" + } + ]; + + // Optional. Use the specified LLM model settings for processing the request. + LlmModelSettings llm_model_settings = 21 + [(google.api.field_behavior) = OPTIONAL]; + // The channel which this query is for. // // If specified, only the @@ -943,6 +983,9 @@ message QueryInput { // The DTMF event to be handled. DtmfInput dtmf = 7; + + // The results of a tool executed by the client. + ToolCallResult tool_call_result = 11; } // Required. The language of the input. See [Language @@ -1010,18 +1053,6 @@ message QueryResult { // to drive complex logic. repeated ResponseMessage response_messages = 4; - // The list of webhook ids in the order of call sequence. - repeated string webhook_ids = 25; - - // The list of webhook display names in the order of call sequence. - repeated string webhook_display_names = 26; - - // The list of webhook latencies in the order of call sequence. - repeated google.protobuf.Duration webhook_latencies = 27; - - // The list of webhook tags in the order of call sequence. - repeated string webhook_tags = 29; - // The list of webhook call status in the order of call sequence. repeated google.rpc.Status webhook_statuses = 13; @@ -1186,7 +1217,8 @@ message Match { // The query was matched to a Knowledge Connector answer. KNOWLEDGE_CONNECTOR = 8; - // The query was handled by a [`Playbook`][Playbook]. + // The query was handled by a + // [`Playbook`][google.cloud.dialogflow.cx.v3.Playbook]. PLAYBOOK = 9; } @@ -1353,3 +1385,23 @@ message SentimentAnalysisResult { // magnitude of sentiment, regardless of score (positive or negative). float magnitude = 2; } + +// The response view specifies which fields in the +// [QueryResult][google.cloud.dialogflow.cx.v3.QueryResult] to return. +enum DetectIntentResponseView { + // Not specified. `DETECT_INTENT_RESPONSE_VIEW_DEFAULT` will be used. + DETECT_INTENT_RESPONSE_VIEW_UNSPECIFIED = 0; + + // Full response view includes all fields. + DETECT_INTENT_RESPONSE_VIEW_FULL = 1; + + // Basic response view omits the following fields: + // - + // [QueryResult.diagnostic_info][google.cloud.dialogflow.cx.v3.QueryResult.diagnostic_info] + DETECT_INTENT_RESPONSE_VIEW_BASIC = 2; + + // Default response view omits the following fields: + // - + // [QueryResult.trace_blocks][google.cloud.dialogflow.cx.v3.QueryResult.trace_blocks] + DETECT_INTENT_RESPONSE_VIEW_DEFAULT = 3; +} 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 e76d841bf83..1dd4b057f69 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 2025 Google LLC +// Copyright 2026 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 89de21acef2..e445e090a73 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 2025 Google LLC +// Copyright 2026 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/tool.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/tool.proto new file mode 100644 index 00000000000..1a66b277f8e --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/tool.proto @@ -0,0 +1,686 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.dialogflow.cx.v3; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/dialogflow/cx/v3/data_store_connection.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3"; +option go_package = "cloud.google.com/go/dialogflow/cx/apiv3/cxpb;cxpb"; +option java_multiple_files = true; +option java_outer_classname = "ToolProto"; +option java_package = "com.google.cloud.dialogflow.cx.v3"; +option objc_class_prefix = "DF"; + +// Service for managing [Tools][google.cloud.dialogflow.cx.v3.Tool]. +service Tools { + option (google.api.default_host) = "dialogflow.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/dialogflow"; + + // Creates a [Tool][google.cloud.dialogflow.cx.v3.Tool] in the specified + // agent. + rpc CreateTool(CreateToolRequest) returns (Tool) { + option (google.api.http) = { + post: "/v3/{parent=projects/*/locations/*/agents/*}/tools" + body: "tool" + }; + option (google.api.method_signature) = "parent,tool"; + } + + // Returns a list of [Tools][google.cloud.dialogflow.cx.v3.Tool] in the + // specified agent. + rpc ListTools(ListToolsRequest) returns (ListToolsResponse) { + option (google.api.http) = { + get: "/v3/{parent=projects/*/locations/*/agents/*}/tools" + }; + option (google.api.method_signature) = "parent"; + } + + // Retrieves the specified [Tool][google.cloud.dialogflow.cx.v3.Tool]. + rpc GetTool(GetToolRequest) returns (Tool) { + option (google.api.http) = { + get: "/v3/{name=projects/*/locations/*/agents/*/tools/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Update the specified [Tool][google.cloud.dialogflow.cx.v3.Tool]. + rpc UpdateTool(UpdateToolRequest) returns (Tool) { + option (google.api.http) = { + patch: "/v3/{tool.name=projects/*/locations/*/agents/*/tools/*}" + body: "tool" + }; + option (google.api.method_signature) = "tool,update_mask"; + } + + // Deletes a specified [Tool][google.cloud.dialogflow.cx.v3.Tool]. + rpc DeleteTool(DeleteToolRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v3/{name=projects/*/locations/*/agents/*/tools/*}" + }; + option (google.api.method_signature) = "name"; + } + + // List versions of the specified [Tool][google.cloud.dialogflow.cx.v3.Tool]. + rpc ListToolVersions(ListToolVersionsRequest) + returns (ListToolVersionsResponse) { + option (google.api.http) = { + get: "/v3/{parent=projects/*/locations/*/agents/*/tools/*}/versions" + }; + option (google.api.method_signature) = "parent"; + } + + // Creates a version for the specified + // [Tool][google.cloud.dialogflow.cx.v3.Tool]. + rpc CreateToolVersion(CreateToolVersionRequest) returns (ToolVersion) { + option (google.api.http) = { + post: "/v3/{parent=projects/*/locations/*/agents/*/tools/*}/versions" + body: "tool_version" + }; + option (google.api.method_signature) = "parent,tool_version"; + } + + // Retrieves the specified version of the + // [Tool][google.cloud.dialogflow.cx.v3.Tool]. + rpc GetToolVersion(GetToolVersionRequest) returns (ToolVersion) { + option (google.api.http) = { + get: "/v3/{name=projects/*/locations/*/agents/*/tools/*/versions/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Deletes the specified version of the + // [Tool][google.cloud.dialogflow.cx.v3.Tool]. + rpc DeleteToolVersion(DeleteToolVersionRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v3/{name=projects/*/locations/*/agents/*/tools/*/versions/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Retrieves the specified version of the Tool and stores it as the + // current tool draft, returning the tool with resources updated. + rpc RestoreToolVersion(RestoreToolVersionRequest) + returns (RestoreToolVersionResponse) { + option (google.api.http) = { + post: "/v3/{name=projects/*/locations/*/agents/*/tools/*/versions/*}:restore" + body: "*" + }; + option (google.api.method_signature) = "name"; + } +} + +// The request message for +// [Tools.CreateTool][google.cloud.dialogflow.cx.v3.Tools.CreateTool]. +message CreateToolRequest { + // Required. The agent to create a Tool for. + // Format: `projects//locations//agents/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Tool" + } + ]; + + // Required. The Tool to be created. + Tool tool = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// The request message for +// [Tools.ListTools][google.cloud.dialogflow.cx.v3.Tools.ListTools]. +message ListToolsRequest { + // Required. The agent to list the Tools from. + // Format: `projects//locations//agents/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Tool" + } + ]; + + // The maximum number of items to return in a single page. By default 100 and + // at most 1000. + int32 page_size = 2; + + // The next_page_token value returned from a previous list request. + string page_token = 3; +} + +// The response message for +// [Tools.ListTools][google.cloud.dialogflow.cx.v3.Tools.ListTools]. +message ListToolsResponse { + // The list of Tools. There will be a maximum number of items returned + // based on the page_size field in the request. + repeated Tool tools = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; +} + +// The request message for +// [Tools.GetTool][google.cloud.dialogflow.cx.v3.Tools.GetTool]. +message GetToolRequest { + // Required. The name of the Tool. + // Format: + // `projects//locations//agents//tools/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "dialogflow.googleapis.com/Tool" } + ]; +} + +// The request message for +// [Tools.UpdateTool][google.cloud.dialogflow.cx.v3.Tools.UpdateTool]. +message UpdateToolRequest { + // Required. The Tool to be updated. + Tool tool = 1 [(google.api.field_behavior) = REQUIRED]; + + // The mask to control which fields get updated. If the mask is not present, + // all fields will be updated. + google.protobuf.FieldMask update_mask = 2; +} + +// The request message for +// [Tools.DeleteTool][google.cloud.dialogflow.cx.v3.Tools.DeleteTool]. +message DeleteToolRequest { + // Required. The name of the Tool to be deleted. + // Format: + // `projects//locations//agents//tools/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "dialogflow.googleapis.com/Tool" } + ]; + + // This field has no effect for Tools not being used. + // For Tools that are used: + // + // * If `force` is set to false, an error will be returned with message + // indicating the referenced resources. + // * If `force` is set to true, Dialogflow will remove the tool, as well + // as any references to the tool. + bool force = 2; +} + +// A tool provides a list of actions which are available to the +// [Playbook][google.cloud.dialogflow.cx.v3.Playbook] to attain its goal. A Tool +// consists of a description of the tool's usage and a specification of the tool +// which contains the schema and authentication information. +message Tool { + option (google.api.resource) = { + type: "dialogflow.googleapis.com/Tool" + pattern: "projects/{project}/locations/{location}/agents/{agent}/tools/{tool}" + }; + + // An OpenAPI tool is a way to provide the Tool specifications in the Open API + // schema format. + message OpenApiTool { + // Schema representation. + oneof schema { + // Required. The OpenAPI schema specified as a text. + string text_schema = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // Optional. Authentication information required by the API. + Authentication authentication = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. TLS configuration for the HTTPS verification. + TLSConfig tls_config = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Service Directory configuration. + ServiceDirectoryConfig service_directory_config = 4 + [(google.api.field_behavior) = OPTIONAL]; + } + + // A DataStoreTool is a way to provide specifications needed to search a + // list of data stores. + message DataStoreTool { + // A FallbackPrompt is a way to provide specifications for the Data Store + // fallback prompt when generating responses. + message FallbackPrompt {} + + // Required. List of data stores to search. + repeated DataStoreConnection data_store_connections = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. Fallback prompt configurations to use. + FallbackPrompt fallback_prompt = 3 [(google.api.field_behavior) = REQUIRED]; + } + + // A Function tool describes the functions to be invoked on the client side. + message FunctionTool { + // Optional. The JSON schema is encapsulated in a + // [google.protobuf.Struct][google.protobuf.Struct] to describe the input of + // the function. This input is a JSON object that contains the function's + // parameters as properties of the object. + google.protobuf.Struct input_schema = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The JSON schema is encapsulated in a + // [google.protobuf.Struct][google.protobuf.Struct] to describe the output + // of the function. This output is a JSON object that contains the + // function's parameters as properties of the object. + google.protobuf.Struct output_schema = 2 + [(google.api.field_behavior) = OPTIONAL]; + } + + // Authentication information required for API calls + message Authentication { + // Config for authentication with API key. + message ApiKeyConfig { + // Required. The parameter name or the header name of the API key. + // E.g., If the API request is "https://example.com/act?X-Api-Key=", "X-Api-Key" would be the parameter name. + string key_name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The API key. If the `secret_version_for_api_key` field is + // set, this field will be ignored. + string api_key = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The name of the SecretManager secret version resource storing + // the API key. If this field is set, the `api_key` field will be ignored. + // Format: `projects/{project}/secrets/{secret}/versions/{version}` + string secret_version_for_api_key = 4 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "secretmanager.googleapis.com/SecretVersion" + } + ]; + + // Required. Key location in the request. + RequestLocation request_location = 3 + [(google.api.field_behavior) = REQUIRED]; + } + + // The location of the API key in the request. + enum RequestLocation { + // Default value. This value is unused. + REQUEST_LOCATION_UNSPECIFIED = 0; + + // Represents the key in http header. + HEADER = 1; + + // Represents the key in query string. + QUERY_STRING = 2; + } + + // Config for authentication with OAuth. + message OAuthConfig { + // OAuth grant types. Only [client credential + // grant](https://oauth.net/2/grant-types/client-credentials) is + // supported. + enum OauthGrantType { + // Default value. This value is unused. + OAUTH_GRANT_TYPE_UNSPECIFIED = 0; + + // Represents the [client credential + // flow](https://oauth.net/2/grant-types/client-credentials). + CLIENT_CREDENTIAL = 1; + } + + // Required. OAuth grant types. + OauthGrantType oauth_grant_type = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The client ID from the OAuth provider. + string client_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The client secret from the OAuth provider. If the + // `secret_version_for_client_secret` field is set, this field will be + // ignored. + string client_secret = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The name of the SecretManager secret version resource storing + // the client secret. If this field is set, the `client_secret` field will + // be ignored. Format: + // `projects/{project}/secrets/{secret}/versions/{version}` + string secret_version_for_client_secret = 6 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "secretmanager.googleapis.com/SecretVersion" + } + ]; + + // Required. The token endpoint in the OAuth provider to exchange for an + // access token. + string token_endpoint = 4 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The OAuth scopes to grant. + repeated string scopes = 5 [(google.api.field_behavior) = OPTIONAL]; + } + + // Config for auth using [Diglogflow service + // agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). + message ServiceAgentAuthConfig { + // Indicate the auth token type generated from the [Diglogflow service + // agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). + enum ServiceAgentAuth { + // Service agent auth type unspecified. Default to ID_TOKEN. + SERVICE_AGENT_AUTH_UNSPECIFIED = 0; + + // Use [ID + // token](https://cloud.google.com/docs/authentication/token-types#id) + // generated from service agent. This can be used to access Cloud + // Function and Cloud Run after you grant Invoker role to + // `service-@gcp-sa-dialogflow.iam.gserviceaccount.com`. + ID_TOKEN = 1; + + // Use [access + // token](https://cloud.google.com/docs/authentication/token-types#access) + // generated from service agent. This can be used to access other Google + // Cloud APIs after you grant required roles to + // `service-@gcp-sa-dialogflow.iam.gserviceaccount.com`. + ACCESS_TOKEN = 2; + } + + // Optional. Indicate the auth token type generated from the [Diglogflow + // service + // agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). + // The generated token is sent in the Authorization header. + ServiceAgentAuth service_agent_auth = 1 + [(google.api.field_behavior) = OPTIONAL]; + } + + // Config for authentication using bearer token. + message BearerTokenConfig { + // Optional. The text token appended to the text `Bearer` to the request + // Authorization header. + // [Session parameters + // reference](https://cloud.google.com/dialogflow/cx/docs/concept/parameter#session-ref) + // can be used to pass the token dynamically, e.g. + // `$session.params.parameter-id`. + string token = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The name of the SecretManager secret version resource storing + // the Bearer token. If this field is set, the `token` field will be + // ignored. Format: + // `projects/{project}/secrets/{secret}/versions/{version}` + string secret_version_for_token = 2 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "secretmanager.googleapis.com/SecretVersion" + } + ]; + } + + // Configuration for authentication using a service account. + message ServiceAccountAuthConfig { + // Required. The email address of the service account used to authenticate + // the tool call. Dialogflow uses this service account to exchange an + // access token and the access token is then sent in the `Authorization` + // header of the tool request. + // + // The service account must have the + // `roles/iam.serviceAccountTokenCreator` role granted to the + // [Dialogflow service + // agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). + string service_account = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // The auth configuration. + oneof auth_config { + // Config for API key auth. + ApiKeyConfig api_key_config = 1; + + // Config for OAuth. + OAuthConfig oauth_config = 2; + + // Config for [Diglogflow service + // agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent) + // auth. + ServiceAgentAuthConfig service_agent_auth_config = 3; + + // Config for bearer token auth. + BearerTokenConfig bearer_token_config = 4; + + // Configuration for service account authentication. + ServiceAccountAuthConfig service_account_auth_config = 5; + } + } + + // The TLS configuration. + message TLSConfig { + // The CA certificate. + message CACert { + // Required. The name of the allowed custom CA certificates. This + // can be used to disambiguate the custom CA certificates. + string display_name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The allowed custom CA certificates (in DER format) for + // HTTPS verification. This overrides the default SSL trust store. If this + // is empty or unspecified, Dialogflow will use Google's default trust + // store to verify certificates. N.B. Make sure the HTTPS server + // certificates are signed with "subject alt name". For instance a + // certificate can be self-signed using the following command: + // + // ``` + // openssl x509 -req -days 200 -in example.com.csr \ + // -signkey example.com.key \ + // -out example.com.crt \ + // -extfile <(printf "\nsubjectAltName='DNS:www.example.com'") + // ``` + bytes cert = 2 [(google.api.field_behavior) = REQUIRED]; + } + + // Required. Specifies a list of allowed custom CA certificates for HTTPS + // verification. + repeated CACert ca_certs = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // Configuration for tools using Service Directory. + message ServiceDirectoryConfig { + // Required. The name of [Service + // Directory](https://cloud.google.com/service-directory) service. + // Format: + // `projects//locations//namespaces//services/`. + // `LocationID` of the service directory must be the same as the location + // of the agent. + string service = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "servicedirectory.googleapis.com/Service" + } + ]; + } + + // Represents the type of the tool. + enum ToolType { + // Default value. This value is unused. + TOOL_TYPE_UNSPECIFIED = 0; + + // Customer provided tool. + CUSTOMIZED_TOOL = 1; + + // First party built-in tool created by Dialogflow which cannot be modified. + BUILTIN_TOOL = 2; + } + + // The unique identifier of the Tool. + // Format: + // `projects//locations//agents//tools/`. + string name = 1; + + // Required. The human-readable name of the Tool, unique within an agent. + string display_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. High level description of the Tool and its usage. + string description = 3 [(google.api.field_behavior) = REQUIRED]; + + // Specification of the Tool. + oneof specification { + // OpenAPI specification of the Tool. + OpenApiTool open_api_spec = 4; + + // Data store search tool specification. + DataStoreTool data_store_spec = 8; + + // Client side executed function specification. + FunctionTool function_spec = 13; + } + + // Output only. The tool type. + ToolType tool_type = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The request message for +// [Tools.ListToolVersions][google.cloud.dialogflow.cx.v3.Tools.ListToolVersions]. +message ListToolVersionsRequest { + // Required. The parent of the tool versions. + // Format: + // `projects//locations//agents//tools/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/ToolVersion" + } + ]; + + // Optional. The maximum number of items to return in a single page. By + // default 100 and at most 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The next_page_token value returned from a previous list request. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response message for +// [Tools.ListToolVersions][google.cloud.dialogflow.cx.v3.Tools.ListToolVersions]. +message ListToolVersionsResponse { + // The list of tool versions. There will be a maximum number of items + // returned based on the page_size field in the request. + repeated ToolVersion tool_versions = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; +} + +// The request message for +// [Tools.CreateToolVersion][google.cloud.dialogflow.cx.v3.Tools.CreateToolVersion]. +// The request message for +// [Tools.CreateToolVersion][google.cloud.dialogflow.cx.v3.Tools.CreateToolVersion]. +message CreateToolVersionRequest { + // Required. The tool to create a version for. + // Format: + // `projects//locations//agents//tools/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/ToolVersion" + } + ]; + + // Required. The tool version to create. + ToolVersion tool_version = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// The request message for +// [Tools.GetToolVersion][google.cloud.dialogflow.cx.v3.Tools.GetToolVersion]. +message GetToolVersionRequest { + // Required. The name of the tool version. + // Format: + // `projects//locations//agents//tools//versions/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/ToolVersion" + } + ]; +} + +// The request message for +// [Tools.DeleteToolVersion][google.cloud.dialogflow.cx.v3.Tools.DeleteToolVersion]. +message DeleteToolVersionRequest { + // Required. The name of the tool version to delete. + // Format: + // `projects//locations//agents//tools//versions/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/ToolVersion" + } + ]; + + // Optional. This field has no effect for Tools not being used. + // For Tools that are used: + // + // * If `force` is set to false, an error will be returned with message + // indicating the referenced resources. + // * If `force` is set to true, Dialogflow will remove the tool, as well + // as any references to the tool. + bool force = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request message for +// [Tools.RestoreToolVersion][google.cloud.dialogflow.cx.v3.Tools.RestoreToolVersion]. +message RestoreToolVersionRequest { + // Required. The name of the tool version. + // Format: + // `projects//locations//agents//tools//versions/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/ToolVersion" + } + ]; +} + +// The response message for +// [Tools.RestoreToolVersion][google.cloud.dialogflow.cx.v3.Tools.RestoreToolVersion]. +message RestoreToolVersionResponse { + // The updated tool. + Tool tool = 2; +} + +// Tool version is a snapshot of the tool at certain timestamp. +message ToolVersion { + option (google.api.resource) = { + type: "dialogflow.googleapis.com/ToolVersion" + pattern: "projects/{project}/locations/{location}/agents/{agent}/tools/{tool}/versions/{version}" + plural: "toolVersions" + singular: "toolVersion" + }; + + // Identifier. The unique identifier of the tool version. + // Format: + // `projects//locations//agents//tools//versions/`. + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Required. The display name of the tool version. + string display_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Snapshot of the tool to be associated with this version. + Tool tool = 3 [(google.api.field_behavior) = REQUIRED]; + + // Output only. Last time the tool version was created or modified. + google.protobuf.Timestamp create_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Last time the tool version was created or modified. + google.protobuf.Timestamp update_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/tool_call.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/tool_call.proto new file mode 100644 index 00000000000..c2773853f76 --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/tool_call.proto @@ -0,0 +1,76 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.dialogflow.cx.v3; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/struct.proto"; + +option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3"; +option go_package = "cloud.google.com/go/dialogflow/cx/apiv3/cxpb;cxpb"; +option java_multiple_files = true; +option java_outer_classname = "ToolCallProto"; +option java_package = "com.google.cloud.dialogflow.cx.v3"; +option objc_class_prefix = "DF"; +option ruby_package = "Google::Cloud::Dialogflow::CX::V3"; + +// Represents a call of a specific tool's action with the specified inputs. +message ToolCall { + // Required. The [tool][google.cloud.dialogflow.cx.v3.Tool] associated with + // this call. Format: + // `projects//locations//agents//tools/`. + string tool = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "dialogflow.googleapis.com/Tool" } + ]; + + // Required. The name of the tool's action associated with this call. + string action = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The action's input parameters. + google.protobuf.Struct input_parameters = 3 + [(google.api.field_behavior) = OPTIONAL]; +} + +// The result of calling a tool's action that has been executed by the client. +message ToolCallResult { + // An error produced by the tool call. + message Error { + // Optional. The error message of the function. + string message = 1 [(google.api.field_behavior) = OPTIONAL]; + } + + // Required. The [tool][google.cloud.dialogflow.cx.v3.Tool] associated with + // this call. Format: + // `projects//locations//agents//tools/`. + string tool = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "dialogflow.googleapis.com/Tool" } + ]; + + // Required. The name of the tool's action associated with this call. + string action = 2 [(google.api.field_behavior) = REQUIRED]; + + // The tool call's result. + oneof result { + // The tool call's error. + Error error = 3; + + // The tool call's output parameters. + google.protobuf.Struct output_parameters = 4; + } +} diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/trace.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/trace.proto new file mode 100644 index 00000000000..797f9b2e85a --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/trace.proto @@ -0,0 +1,209 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.dialogflow.cx.v3; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/struct.proto"; + +option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3"; +option go_package = "cloud.google.com/go/dialogflow/cx/apiv3/cxpb;cxpb"; +option java_multiple_files = true; +option java_outer_classname = "TraceProto"; +option java_package = "com.google.cloud.dialogflow.cx.v3"; +option objc_class_prefix = "DF"; +option ruby_package = "Google::Cloud::Dialogflow::CX::V3"; + +// Input of the playbook. +message PlaybookInput { + // Optional. Summary string of the preceding conversation for the child + // playbook invocation. + string preceding_conversation_summary = 1 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Output of the playbook. +message PlaybookOutput { + // Optional. Summary string of the execution result of the child playbook. + string execution_summary = 1 [(google.api.field_behavior) = OPTIONAL]; +} + +// Action performed by end user or Dialogflow agent in the conversation. +message Action { + // Action details. + oneof action { + // Optional. Agent obtained a message from the customer. + UserUtterance user_utterance = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Action performed by the agent as a message. + AgentUtterance agent_utterance = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Action performed on behalf of the agent by calling a plugin + // tool. + ToolUse tool_use = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Action performed on behalf of the agent by invoking a child + // playbook. + PlaybookInvocation playbook_invocation = 4 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Action performed on behalf of the agent by invoking a CX flow. + FlowInvocation flow_invocation = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Action performed on behalf of the agent by transitioning to a + // target playbook. + PlaybookTransition playbook_transition = 12 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Action performed on behalf of the agent by transitioning to a + // target CX flow. + FlowTransition flow_transition = 13 + [(google.api.field_behavior) = OPTIONAL]; + } +} + +// UserUtterance represents one message sent by the customer. +message UserUtterance { + // Required. Message content in text. + string text = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// AgentUtterance represents one message sent by the agent. +message AgentUtterance { + // Required. Message content in text. + string text = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Stores metadata of the invocation of an action supported by a tool. +message ToolUse { + // Required. The [tool][google.cloud.dialogflow.cx.v3.Tool] that should be + // used. Format: + // `projects//locations//agents//tools/`. + string tool = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "dialogflow.googleapis.com/Tool" } + ]; + + // Output only. The display name of the tool. + string display_name = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Name of the action to be called during the tool use. + string action = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A list of input parameters for the action. + google.protobuf.Struct input_action_parameters = 5 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A list of output parameters generated by the action. + google.protobuf.Struct output_action_parameters = 6 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Stores metadata of the invocation of a child playbook. +message PlaybookInvocation { + // Required. The unique identifier of the playbook. + // Format: + // `projects//locations//agents//playbooks/`. + string playbook = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Playbook" + } + ]; + + // Output only. The display name of the playbook. + string display_name = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Input of the child playbook invocation. + PlaybookInput playbook_input = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Output of the child playbook invocation. + PlaybookOutput playbook_output = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Playbook invocation's output state. + OutputState playbook_state = 4 [(google.api.field_behavior) = REQUIRED]; +} + +// Stores metadata of the invocation of a CX flow. +message FlowInvocation { + // Required. The unique identifier of the flow. + // Format: + // `projects//locations//agents//flows/`. + string flow = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "dialogflow.googleapis.com/Flow" } + ]; + + // Output only. The display name of the flow. + string display_name = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Flow invocation's output state. + OutputState flow_state = 4 [(google.api.field_behavior) = REQUIRED]; +} + +// Stores metadata of the transition to another target playbook. Playbook +// transition actions exit the caller playbook and enter the target playbook. +message PlaybookTransition { + // Required. The unique identifier of the playbook. + // Format: + // `projects//locations//agents//playbooks/`. + string playbook = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Playbook" + } + ]; + + // Output only. The display name of the playbook. + string display_name = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Stores metadata of the transition to a target CX flow. Flow transition +// actions exit the caller playbook and enter the child flow. +message FlowTransition { + // Required. The unique identifier of the flow. + // Format: + // `projects//locations//agents/`. + string flow = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "dialogflow.googleapis.com/Flow" } + ]; + + // Output only. The display name of the flow. + string display_name = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Output state. +enum OutputState { + // Unspecified output. + OUTPUT_STATE_UNSPECIFIED = 0; + + // Succeeded. + OUTPUT_STATE_OK = 1; + + // Cancelled. + OUTPUT_STATE_CANCELLED = 2; + + // Failed. + OUTPUT_STATE_FAILED = 3; + + // Escalated. + OUTPUT_STATE_ESCALATED = 4; + + // Pending. + OUTPUT_STATE_PENDING = 5; +} 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 98763bfbcfe..40523f9132d 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 2025 Google LLC +// Copyright 2026 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/validation_message.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/validation_message.proto index 11840cf6358..cd81683a32d 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 2025 Google LLC +// Copyright 2026 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 d9a23dd67f1..c79f4ecd359 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 2025 Google LLC +// Copyright 2026 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 d14e9ceb5a3..099436a64c0 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 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -100,6 +100,19 @@ message Webhook { // Represents configuration for a generic web service. message GenericWebService { + // Represents the value of an HTTP header stored in a SecretManager secret + // version. + message SecretVersionHeaderValue { + // Required. The SecretManager secret version resource storing the header + // value. Format: `projects/{project}/secrets/{secret}/versions/{version}` + string secret_version = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "secretmanager.googleapis.com/SecretVersion" + } + ]; + } + // Represents configuration of OAuth client credential flow for 3rd party // API authentication. message OAuthConfig { @@ -109,6 +122,17 @@ message Webhook { // Optional. The client secret provided by the 3rd party platform. string client_secret = 2 [(google.api.field_behavior) = OPTIONAL]; + // Optional. The name of the SecretManager secret version resource storing + // the client secret. If this field is set, the `client_secret` field will + // be ignored. Format: + // `projects/{project}/secrets/{secret}/versions/{version}` + string secret_version_for_client_secret = 5 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "secretmanager.googleapis.com/SecretVersion" + } + ]; + // Required. The token endpoint provided by the 3rd party platform to // exchange an access token. string token_endpoint = 3 [(google.api.field_behavior) = REQUIRED]; @@ -141,6 +165,20 @@ message Webhook { ACCESS_TOKEN = 3; } + // Configuration for authentication using a service account. + message ServiceAccountAuthConfig { + // Required. The email address of the service account used to authenticate + // the webhook call. Dialogflow uses this service account to exchange an + // access token and the access token is then sent in the `Authorization` + // header of the webhook request. + // + // The service account must have the + // `roles/iam.serviceAccountTokenCreator` role granted to the + // [Dialogflow service + // agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). + string service_account = 1 [(google.api.field_behavior) = REQUIRED]; + } + // Represents the type of webhook configuration. enum WebhookType { // Default value. This value is unused. @@ -190,9 +228,28 @@ message Webhook { // The password for HTTP Basic authentication. string password = 3 [deprecated = true]; + // Optional. The SecretManager secret version resource storing the + // username:password pair for HTTP Basic authentication. Format: + // `projects/{project}/secrets/{secret}/versions/{version}` + string secret_version_for_username_password = 19 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "secretmanager.googleapis.com/SecretVersion" + } + ]; + // The HTTP request headers to send together with webhook requests. map request_headers = 4; + // Optional. The HTTP request headers to send together with webhook + // requests. Header values are stored in SecretManager secret versions. + // + // When the same header name is specified in both `request_headers` and + // `secret_versions_for_request_headers`, the value in + // `secret_versions_for_request_headers` will be used. + map secret_versions_for_request_headers = + 20 [(google.api.field_behavior) = OPTIONAL]; + // Optional. Specifies a list of allowed custom CA certificates (in DER // format) for HTTPS verification. This overrides the default SSL trust // store. If this is empty or unspecified, Dialogflow will use Google's @@ -220,6 +277,10 @@ message Webhook { ServiceAgentAuth service_agent_auth = 12 [(google.api.field_behavior) = OPTIONAL]; + // Optional. Configuration for service account authentication. + ServiceAccountAuthConfig service_account_auth_config = 18 + [(google.api.field_behavior) = OPTIONAL]; + // Optional. Type of the webhook. WebhookType webhook_type = 6 [(google.api.field_behavior) = OPTIONAL]; diff --git a/packages/google-cloud-dialogflow-cx/protos/protos.d.ts b/packages/google-cloud-dialogflow-cx/protos/protos.d.ts index 70f10741006..8a0c7eeb713 100644 --- a/packages/google-cloud-dialogflow-cx/protos/protos.d.ts +++ b/packages/google-cloud-dialogflow-cx/protos/protos.d.ts @@ -971,6 +971,9 @@ export namespace google { /** Agent startFlow */ startFlow?: (string|null); + /** Agent startPlaybook */ + startPlaybook?: (string|null); + /** Agent securitySettings */ securitySettings?: (string|null); @@ -1048,7 +1051,10 @@ export namespace google { public speechToTextSettings?: (google.cloud.dialogflow.cx.v3.ISpeechToTextSettings|null); /** Agent startFlow. */ - public startFlow: string; + public startFlow?: (string|null); + + /** Agent startPlaybook. */ + public startPlaybook?: (string|null); /** Agent securitySettings. */ public securitySettings: string; @@ -1092,6 +1098,9 @@ export namespace google { /** Agent satisfiesPzi. */ public satisfiesPzi?: (boolean|null); + /** Agent sessionEntryResource. */ + public sessionEntryResource?: ("startFlow"|"startPlaybook"); + /** * Creates a new Agent instance using the specified properties. * @param [properties] Properties to set @@ -4730,6 +4739,12 @@ export namespace google { /** Flow knowledgeConnectorSettings */ knowledgeConnectorSettings?: (google.cloud.dialogflow.cx.v3.IKnowledgeConnectorSettings|null); + /** Flow inputParameterDefinitions */ + inputParameterDefinitions?: (google.cloud.dialogflow.cx.v3.IParameterDefinition[]|null); + + /** Flow outputParameterDefinitions */ + outputParameterDefinitions?: (google.cloud.dialogflow.cx.v3.IParameterDefinition[]|null); + /** Flow multiLanguageSettings */ multiLanguageSettings?: (google.cloud.dialogflow.cx.v3.Flow.IMultiLanguageSettings|null); @@ -4773,6 +4788,12 @@ export namespace google { /** Flow knowledgeConnectorSettings. */ public knowledgeConnectorSettings?: (google.cloud.dialogflow.cx.v3.IKnowledgeConnectorSettings|null); + /** Flow inputParameterDefinitions. */ + public inputParameterDefinitions: google.cloud.dialogflow.cx.v3.IParameterDefinition[]; + + /** Flow outputParameterDefinitions. */ + public outputParameterDefinitions: google.cloud.dialogflow.cx.v3.IParameterDefinition[]; + /** Flow multiLanguageSettings. */ public multiLanguageSettings?: (google.cloud.dialogflow.cx.v3.Flow.IMultiLanguageSettings|null); @@ -7212,6 +7233,9 @@ export namespace google { /** EventHandler targetFlow */ targetFlow?: (string|null); + + /** EventHandler targetPlaybook */ + targetPlaybook?: (string|null); } /** Represents an EventHandler. */ @@ -7238,8 +7262,11 @@ export namespace google { /** EventHandler targetFlow. */ public targetFlow?: (string|null); + /** EventHandler targetPlaybook. */ + public targetPlaybook?: (string|null); + /** EventHandler target. */ - public target?: ("targetPage"|"targetFlow"); + public target?: ("targetPage"|"targetFlow"|"targetPlaybook"); /** * Creates a new EventHandler instance using the specified properties. @@ -8605,6 +8632,9 @@ export namespace google { /** SearchSnippet text */ text?: (string|null); + + /** SearchSnippet metadata */ + metadata?: (google.protobuf.IStruct|null); } /** Represents a SearchSnippet. */ @@ -8625,6 +8655,9 @@ export namespace google { /** SearchSnippet text. */ public text: string; + /** SearchSnippet metadata. */ + public metadata?: (google.protobuf.IStruct|null); + /** * Creates a new SearchSnippet instance using the specified properties. * @param [properties] Properties to set @@ -9981,6 +10014,9 @@ export namespace google { /** ResponseMessage knowledgeInfoCard */ knowledgeInfoCard?: (google.cloud.dialogflow.cx.v3.ResponseMessage.IKnowledgeInfoCard|null); + /** ResponseMessage toolCall */ + toolCall?: (google.cloud.dialogflow.cx.v3.IToolCall|null); + /** ResponseMessage responseType */ responseType?: (google.cloud.dialogflow.cx.v3.ResponseMessage.ResponseType|keyof typeof google.cloud.dialogflow.cx.v3.ResponseMessage.ResponseType|null); @@ -10027,6 +10063,9 @@ export namespace google { /** ResponseMessage knowledgeInfoCard. */ public knowledgeInfoCard?: (google.cloud.dialogflow.cx.v3.ResponseMessage.IKnowledgeInfoCard|null); + /** ResponseMessage toolCall. */ + public toolCall?: (google.cloud.dialogflow.cx.v3.IToolCall|null); + /** ResponseMessage responseType. */ public responseType: (google.cloud.dialogflow.cx.v3.ResponseMessage.ResponseType|keyof typeof google.cloud.dialogflow.cx.v3.ResponseMessage.ResponseType); @@ -10034,7 +10073,7 @@ export namespace google { public channel: string; /** ResponseMessage message. */ - public message?: ("text"|"payload"|"conversationSuccess"|"outputAudioText"|"liveAgentHandoff"|"endInteraction"|"playAudio"|"mixedAudio"|"telephonyTransferCall"|"knowledgeInfoCard"); + public message?: ("text"|"payload"|"conversationSuccess"|"outputAudioText"|"liveAgentHandoff"|"endInteraction"|"playAudio"|"mixedAudio"|"telephonyTransferCall"|"knowledgeInfoCard"|"toolCall"); /** * Creates a new ResponseMessage instance using the specified properties. @@ -11131,1749 +11170,2160 @@ export namespace google { } } - /** Properties of a ValidationMessage. */ - interface IValidationMessage { + /** Properties of a ToolCall. */ + interface IToolCall { - /** ValidationMessage resourceType */ - resourceType?: (google.cloud.dialogflow.cx.v3.ValidationMessage.ResourceType|keyof typeof google.cloud.dialogflow.cx.v3.ValidationMessage.ResourceType|null); + /** ToolCall tool */ + tool?: (string|null); - /** ValidationMessage resources */ - resources?: (string[]|null); + /** ToolCall action */ + action?: (string|null); - /** ValidationMessage resourceNames */ - resourceNames?: (google.cloud.dialogflow.cx.v3.IResourceName[]|null); + /** ToolCall inputParameters */ + inputParameters?: (google.protobuf.IStruct|null); + } - /** ValidationMessage severity */ - severity?: (google.cloud.dialogflow.cx.v3.ValidationMessage.Severity|keyof typeof google.cloud.dialogflow.cx.v3.ValidationMessage.Severity|null); + /** Represents a ToolCall. */ + class ToolCall implements IToolCall { - /** ValidationMessage detail */ - detail?: (string|null); + /** + * Constructs a new ToolCall. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.IToolCall); + + /** ToolCall tool. */ + public tool: string; + + /** ToolCall action. */ + public action: string; + + /** ToolCall inputParameters. */ + public inputParameters?: (google.protobuf.IStruct|null); + + /** + * Creates a new ToolCall instance using the specified properties. + * @param [properties] Properties to set + * @returns ToolCall instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.IToolCall): google.cloud.dialogflow.cx.v3.ToolCall; + + /** + * Encodes the specified ToolCall message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ToolCall.verify|verify} messages. + * @param message ToolCall message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.IToolCall, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ToolCall message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ToolCall.verify|verify} messages. + * @param message ToolCall message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IToolCall, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ToolCall message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ToolCall + * @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.ToolCall; + + /** + * Decodes a ToolCall message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ToolCall + * @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.ToolCall; + + /** + * Verifies a ToolCall 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 ToolCall message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ToolCall + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ToolCall; + + /** + * Creates a plain object from a ToolCall message. Also converts values to other types if specified. + * @param message ToolCall + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.ToolCall, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ToolCall to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ToolCall + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Represents a ValidationMessage. */ - class ValidationMessage implements IValidationMessage { + /** Properties of a ToolCallResult. */ + interface IToolCallResult { + + /** ToolCallResult tool */ + tool?: (string|null); + + /** ToolCallResult action */ + action?: (string|null); + + /** ToolCallResult error */ + error?: (google.cloud.dialogflow.cx.v3.ToolCallResult.IError|null); + + /** ToolCallResult outputParameters */ + outputParameters?: (google.protobuf.IStruct|null); + } + + /** Represents a ToolCallResult. */ + class ToolCallResult implements IToolCallResult { /** - * Constructs a new ValidationMessage. + * Constructs a new ToolCallResult. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IValidationMessage); + constructor(properties?: google.cloud.dialogflow.cx.v3.IToolCallResult); - /** ValidationMessage resourceType. */ - public resourceType: (google.cloud.dialogflow.cx.v3.ValidationMessage.ResourceType|keyof typeof google.cloud.dialogflow.cx.v3.ValidationMessage.ResourceType); + /** ToolCallResult tool. */ + public tool: string; - /** ValidationMessage resources. */ - public resources: string[]; + /** ToolCallResult action. */ + public action: string; - /** ValidationMessage resourceNames. */ - public resourceNames: google.cloud.dialogflow.cx.v3.IResourceName[]; + /** ToolCallResult error. */ + public error?: (google.cloud.dialogflow.cx.v3.ToolCallResult.IError|null); - /** ValidationMessage severity. */ - public severity: (google.cloud.dialogflow.cx.v3.ValidationMessage.Severity|keyof typeof google.cloud.dialogflow.cx.v3.ValidationMessage.Severity); + /** ToolCallResult outputParameters. */ + public outputParameters?: (google.protobuf.IStruct|null); - /** ValidationMessage detail. */ - public detail: string; + /** ToolCallResult result. */ + public result?: ("error"|"outputParameters"); /** - * Creates a new ValidationMessage instance using the specified properties. + * Creates a new ToolCallResult instance using the specified properties. * @param [properties] Properties to set - * @returns ValidationMessage instance + * @returns ToolCallResult instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IValidationMessage): google.cloud.dialogflow.cx.v3.ValidationMessage; + public static create(properties?: google.cloud.dialogflow.cx.v3.IToolCallResult): google.cloud.dialogflow.cx.v3.ToolCallResult; /** - * Encodes the specified ValidationMessage message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ValidationMessage.verify|verify} messages. - * @param message ValidationMessage message or plain object to encode + * Encodes the specified ToolCallResult message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ToolCallResult.verify|verify} messages. + * @param message ToolCallResult message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IValidationMessage, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IToolCallResult, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ValidationMessage message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ValidationMessage.verify|verify} messages. - * @param message ValidationMessage message or plain object to encode + * Encodes the specified ToolCallResult message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ToolCallResult.verify|verify} messages. + * @param message ToolCallResult message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IValidationMessage, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IToolCallResult, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ValidationMessage message from the specified reader or buffer. + * Decodes a ToolCallResult message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ValidationMessage + * @returns ToolCallResult * @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.ValidationMessage; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.ToolCallResult; /** - * Decodes a ValidationMessage message from the specified reader or buffer, length delimited. + * Decodes a ToolCallResult message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ValidationMessage + * @returns ToolCallResult * @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.ValidationMessage; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.ToolCallResult; /** - * Verifies a ValidationMessage message. + * Verifies a ToolCallResult 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 ValidationMessage message from a plain object. Also converts values to their respective internal types. + * Creates a ToolCallResult message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ValidationMessage + * @returns ToolCallResult */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ValidationMessage; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ToolCallResult; /** - * Creates a plain object from a ValidationMessage message. Also converts values to other types if specified. - * @param message ValidationMessage + * Creates a plain object from a ToolCallResult message. Also converts values to other types if specified. + * @param message ToolCallResult * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.ValidationMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.ToolCallResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ValidationMessage to JSON. + * Converts this ToolCallResult to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ValidationMessage + * Gets the default type url for ToolCallResult * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace ValidationMessage { + namespace ToolCallResult { - /** ResourceType enum. */ - enum ResourceType { - RESOURCE_TYPE_UNSPECIFIED = 0, - AGENT = 1, - INTENT = 2, - INTENT_TRAINING_PHRASE = 8, - INTENT_PARAMETER = 9, - INTENTS = 10, - INTENT_TRAINING_PHRASES = 11, - ENTITY_TYPE = 3, - ENTITY_TYPES = 12, - WEBHOOK = 4, - FLOW = 5, - PAGE = 6, - PAGES = 13, - TRANSITION_ROUTE_GROUP = 7, - AGENT_TRANSITION_ROUTE_GROUP = 14 + /** Properties of an Error. */ + interface IError { + + /** Error message */ + message?: (string|null); } - /** Severity enum. */ - enum Severity { - SEVERITY_UNSPECIFIED = 0, - INFO = 1, - WARNING = 2, - ERROR = 3 + /** Represents an Error. */ + class Error implements IError { + + /** + * Constructs a new Error. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.ToolCallResult.IError); + + /** Error message. */ + public message: string; + + /** + * Creates a new Error instance using the specified properties. + * @param [properties] Properties to set + * @returns Error instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.ToolCallResult.IError): google.cloud.dialogflow.cx.v3.ToolCallResult.Error; + + /** + * Encodes the specified Error message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ToolCallResult.Error.verify|verify} messages. + * @param message Error message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.ToolCallResult.IError, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Error message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ToolCallResult.Error.verify|verify} messages. + * @param message Error message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ToolCallResult.IError, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Error message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Error + * @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.ToolCallResult.Error; + + /** + * Decodes an Error message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Error + * @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.ToolCallResult.Error; + + /** + * Verifies an Error 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 Error message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Error + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ToolCallResult.Error; + + /** + * Creates a plain object from an Error message. Also converts values to other types if specified. + * @param message Error + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.ToolCallResult.Error, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Error to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Error + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } - /** Properties of a ResourceName. */ - interface IResourceName { + /** Properties of a ParameterDefinition. */ + interface IParameterDefinition { - /** ResourceName name */ + /** ParameterDefinition name */ name?: (string|null); - /** ResourceName displayName */ - displayName?: (string|null); + /** ParameterDefinition type */ + type?: (google.cloud.dialogflow.cx.v3.ParameterDefinition.ParameterType|keyof typeof google.cloud.dialogflow.cx.v3.ParameterDefinition.ParameterType|null); + + /** ParameterDefinition typeSchema */ + typeSchema?: (google.cloud.dialogflow.cx.v3.ITypeSchema|null); + + /** ParameterDefinition description */ + description?: (string|null); } - /** Represents a ResourceName. */ - class ResourceName implements IResourceName { + /** Represents a ParameterDefinition. */ + class ParameterDefinition implements IParameterDefinition { /** - * Constructs a new ResourceName. + * Constructs a new ParameterDefinition. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IResourceName); + constructor(properties?: google.cloud.dialogflow.cx.v3.IParameterDefinition); - /** ResourceName name. */ + /** ParameterDefinition name. */ public name: string; - /** ResourceName displayName. */ - public displayName: string; + /** ParameterDefinition type. */ + public type: (google.cloud.dialogflow.cx.v3.ParameterDefinition.ParameterType|keyof typeof google.cloud.dialogflow.cx.v3.ParameterDefinition.ParameterType); + + /** ParameterDefinition typeSchema. */ + public typeSchema?: (google.cloud.dialogflow.cx.v3.ITypeSchema|null); + + /** ParameterDefinition description. */ + public description: string; /** - * Creates a new ResourceName instance using the specified properties. + * Creates a new ParameterDefinition instance using the specified properties. * @param [properties] Properties to set - * @returns ResourceName instance + * @returns ParameterDefinition instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IResourceName): google.cloud.dialogflow.cx.v3.ResourceName; + public static create(properties?: google.cloud.dialogflow.cx.v3.IParameterDefinition): google.cloud.dialogflow.cx.v3.ParameterDefinition; /** - * Encodes the specified ResourceName message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ResourceName.verify|verify} messages. - * @param message ResourceName message or plain object to encode + * Encodes the specified ParameterDefinition message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ParameterDefinition.verify|verify} messages. + * @param message ParameterDefinition message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IResourceName, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IParameterDefinition, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ResourceName message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ResourceName.verify|verify} messages. - * @param message ResourceName message or plain object to encode + * Encodes the specified ParameterDefinition message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ParameterDefinition.verify|verify} messages. + * @param message ParameterDefinition message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IResourceName, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IParameterDefinition, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ResourceName message from the specified reader or buffer. + * Decodes a ParameterDefinition message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ResourceName + * @returns ParameterDefinition * @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.ResourceName; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.ParameterDefinition; /** - * Decodes a ResourceName message from the specified reader or buffer, length delimited. + * Decodes a ParameterDefinition message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ResourceName + * @returns ParameterDefinition * @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.ResourceName; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.ParameterDefinition; /** - * Verifies a ResourceName message. + * Verifies a ParameterDefinition 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 ResourceName message from a plain object. Also converts values to their respective internal types. + * Creates a ParameterDefinition message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ResourceName + * @returns ParameterDefinition */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ResourceName; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ParameterDefinition; /** - * Creates a plain object from a ResourceName message. Also converts values to other types if specified. - * @param message ResourceName + * Creates a plain object from a ParameterDefinition message. Also converts values to other types if specified. + * @param message ParameterDefinition * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.ResourceName, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.ParameterDefinition, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ResourceName to JSON. + * Converts this ParameterDefinition to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ResourceName + * Gets the default type url for ParameterDefinition * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GenerativeSettings. */ - interface IGenerativeSettings { - - /** GenerativeSettings name */ - name?: (string|null); + namespace ParameterDefinition { - /** GenerativeSettings fallbackSettings */ - fallbackSettings?: (google.cloud.dialogflow.cx.v3.GenerativeSettings.IFallbackSettings|null); + /** ParameterType enum. */ + enum ParameterType { + PARAMETER_TYPE_UNSPECIFIED = 0, + STRING = 1, + NUMBER = 2, + BOOLEAN = 3, + NULL = 4, + OBJECT = 5, + LIST = 6 + } + } - /** GenerativeSettings generativeSafetySettings */ - generativeSafetySettings?: (google.cloud.dialogflow.cx.v3.ISafetySettings|null); + /** Properties of a TypeSchema. */ + interface ITypeSchema { - /** GenerativeSettings knowledgeConnectorSettings */ - knowledgeConnectorSettings?: (google.cloud.dialogflow.cx.v3.GenerativeSettings.IKnowledgeConnectorSettings|null); + /** TypeSchema inlineSchema */ + inlineSchema?: (google.cloud.dialogflow.cx.v3.IInlineSchema|null); - /** GenerativeSettings languageCode */ - languageCode?: (string|null); + /** TypeSchema schemaReference */ + schemaReference?: (google.cloud.dialogflow.cx.v3.TypeSchema.ISchemaReference|null); } - /** Represents a GenerativeSettings. */ - class GenerativeSettings implements IGenerativeSettings { + /** Represents a TypeSchema. */ + class TypeSchema implements ITypeSchema { /** - * Constructs a new GenerativeSettings. + * Constructs a new TypeSchema. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IGenerativeSettings); - - /** GenerativeSettings name. */ - public name: string; - - /** GenerativeSettings fallbackSettings. */ - public fallbackSettings?: (google.cloud.dialogflow.cx.v3.GenerativeSettings.IFallbackSettings|null); + constructor(properties?: google.cloud.dialogflow.cx.v3.ITypeSchema); - /** GenerativeSettings generativeSafetySettings. */ - public generativeSafetySettings?: (google.cloud.dialogflow.cx.v3.ISafetySettings|null); + /** TypeSchema inlineSchema. */ + public inlineSchema?: (google.cloud.dialogflow.cx.v3.IInlineSchema|null); - /** GenerativeSettings knowledgeConnectorSettings. */ - public knowledgeConnectorSettings?: (google.cloud.dialogflow.cx.v3.GenerativeSettings.IKnowledgeConnectorSettings|null); + /** TypeSchema schemaReference. */ + public schemaReference?: (google.cloud.dialogflow.cx.v3.TypeSchema.ISchemaReference|null); - /** GenerativeSettings languageCode. */ - public languageCode: string; + /** TypeSchema schema. */ + public schema?: ("inlineSchema"|"schemaReference"); /** - * Creates a new GenerativeSettings instance using the specified properties. + * Creates a new TypeSchema instance using the specified properties. * @param [properties] Properties to set - * @returns GenerativeSettings instance + * @returns TypeSchema instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IGenerativeSettings): google.cloud.dialogflow.cx.v3.GenerativeSettings; + public static create(properties?: google.cloud.dialogflow.cx.v3.ITypeSchema): google.cloud.dialogflow.cx.v3.TypeSchema; /** - * Encodes the specified GenerativeSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GenerativeSettings.verify|verify} messages. - * @param message GenerativeSettings message or plain object to encode + * Encodes the specified TypeSchema message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TypeSchema.verify|verify} messages. + * @param message TypeSchema message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IGenerativeSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.ITypeSchema, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GenerativeSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GenerativeSettings.verify|verify} messages. - * @param message GenerativeSettings message or plain object to encode + * Encodes the specified TypeSchema message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TypeSchema.verify|verify} messages. + * @param message TypeSchema message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IGenerativeSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ITypeSchema, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GenerativeSettings message from the specified reader or buffer. + * Decodes a TypeSchema message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GenerativeSettings + * @returns TypeSchema * @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.GenerativeSettings; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.TypeSchema; /** - * Decodes a GenerativeSettings message from the specified reader or buffer, length delimited. + * Decodes a TypeSchema message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GenerativeSettings + * @returns TypeSchema * @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.GenerativeSettings; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.TypeSchema; /** - * Verifies a GenerativeSettings message. + * Verifies a TypeSchema 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 GenerativeSettings message from a plain object. Also converts values to their respective internal types. + * Creates a TypeSchema message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GenerativeSettings + * @returns TypeSchema */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.GenerativeSettings; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.TypeSchema; /** - * Creates a plain object from a GenerativeSettings message. Also converts values to other types if specified. - * @param message GenerativeSettings + * Creates a plain object from a TypeSchema message. Also converts values to other types if specified. + * @param message TypeSchema * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.GenerativeSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.TypeSchema, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GenerativeSettings to JSON. + * Converts this TypeSchema to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GenerativeSettings + * Gets the default type url for TypeSchema * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace GenerativeSettings { + namespace TypeSchema { - /** Properties of a FallbackSettings. */ - interface IFallbackSettings { + /** Properties of a SchemaReference. */ + interface ISchemaReference { - /** FallbackSettings selectedPrompt */ - selectedPrompt?: (string|null); + /** SchemaReference tool */ + tool?: (string|null); - /** FallbackSettings promptTemplates */ - promptTemplates?: (google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.IPromptTemplate[]|null); + /** SchemaReference schema */ + schema?: (string|null); } - /** Represents a FallbackSettings. */ - class FallbackSettings implements IFallbackSettings { + /** Represents a SchemaReference. */ + class SchemaReference implements ISchemaReference { /** - * Constructs a new FallbackSettings. + * Constructs a new SchemaReference. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.GenerativeSettings.IFallbackSettings); + constructor(properties?: google.cloud.dialogflow.cx.v3.TypeSchema.ISchemaReference); - /** FallbackSettings selectedPrompt. */ - public selectedPrompt: string; + /** SchemaReference tool. */ + public tool: string; - /** FallbackSettings promptTemplates. */ - public promptTemplates: google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.IPromptTemplate[]; + /** SchemaReference schema. */ + public schema: string; /** - * Creates a new FallbackSettings instance using the specified properties. + * Creates a new SchemaReference instance using the specified properties. * @param [properties] Properties to set - * @returns FallbackSettings instance + * @returns SchemaReference instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.GenerativeSettings.IFallbackSettings): google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings; + public static create(properties?: google.cloud.dialogflow.cx.v3.TypeSchema.ISchemaReference): google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference; /** - * Encodes the specified FallbackSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.verify|verify} messages. - * @param message FallbackSettings message or plain object to encode + * Encodes the specified SchemaReference message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference.verify|verify} messages. + * @param message SchemaReference message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.GenerativeSettings.IFallbackSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.TypeSchema.ISchemaReference, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified FallbackSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.verify|verify} messages. - * @param message FallbackSettings message or plain object to encode + * Encodes the specified SchemaReference message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference.verify|verify} messages. + * @param message SchemaReference message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.GenerativeSettings.IFallbackSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.TypeSchema.ISchemaReference, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FallbackSettings message from the specified reader or buffer. + * Decodes a SchemaReference message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns FallbackSettings + * @returns SchemaReference * @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.GenerativeSettings.FallbackSettings; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference; /** - * Decodes a FallbackSettings message from the specified reader or buffer, length delimited. + * Decodes a SchemaReference message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FallbackSettings + * @returns SchemaReference * @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.GenerativeSettings.FallbackSettings; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference; /** - * Verifies a FallbackSettings message. + * Verifies a SchemaReference 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 FallbackSettings message from a plain object. Also converts values to their respective internal types. + * Creates a SchemaReference message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FallbackSettings + * @returns SchemaReference */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference; /** - * Creates a plain object from a FallbackSettings message. Also converts values to other types if specified. - * @param message FallbackSettings + * Creates a plain object from a SchemaReference message. Also converts values to other types if specified. + * @param message SchemaReference * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FallbackSettings to JSON. + * Converts this SchemaReference to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for FallbackSettings + * Gets the default type url for SchemaReference * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } + } - namespace FallbackSettings { - - /** Properties of a PromptTemplate. */ - interface IPromptTemplate { + /** Properties of an InlineSchema. */ + interface IInlineSchema { - /** PromptTemplate displayName */ - displayName?: (string|null); + /** InlineSchema type */ + type?: (google.cloud.dialogflow.cx.v3.DataType|keyof typeof google.cloud.dialogflow.cx.v3.DataType|null); - /** PromptTemplate promptText */ - promptText?: (string|null); + /** InlineSchema items */ + items?: (google.cloud.dialogflow.cx.v3.ITypeSchema|null); + } - /** PromptTemplate frozen */ - frozen?: (boolean|null); - } + /** Represents an InlineSchema. */ + class InlineSchema implements IInlineSchema { - /** Represents a PromptTemplate. */ - class PromptTemplate implements IPromptTemplate { + /** + * Constructs a new InlineSchema. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.IInlineSchema); - /** - * Constructs a new PromptTemplate. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.IPromptTemplate); + /** InlineSchema type. */ + public type: (google.cloud.dialogflow.cx.v3.DataType|keyof typeof google.cloud.dialogflow.cx.v3.DataType); - /** PromptTemplate displayName. */ - public displayName: string; + /** InlineSchema items. */ + public items?: (google.cloud.dialogflow.cx.v3.ITypeSchema|null); - /** PromptTemplate promptText. */ - public promptText: string; + /** + * Creates a new InlineSchema instance using the specified properties. + * @param [properties] Properties to set + * @returns InlineSchema instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.IInlineSchema): google.cloud.dialogflow.cx.v3.InlineSchema; - /** PromptTemplate frozen. */ - public frozen: boolean; + /** + * Encodes the specified InlineSchema message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.InlineSchema.verify|verify} messages. + * @param message InlineSchema message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.IInlineSchema, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a new PromptTemplate instance using the specified properties. - * @param [properties] Properties to set - * @returns PromptTemplate instance - */ - public static create(properties?: google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.IPromptTemplate): google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate; + /** + * Encodes the specified InlineSchema message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.InlineSchema.verify|verify} messages. + * @param message InlineSchema message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IInlineSchema, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified PromptTemplate message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate.verify|verify} messages. - * @param message PromptTemplate message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.IPromptTemplate, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes an InlineSchema message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InlineSchema + * @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.InlineSchema; - /** - * Encodes the specified PromptTemplate message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate.verify|verify} messages. - * @param message PromptTemplate message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.IPromptTemplate, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes an InlineSchema message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InlineSchema + * @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.InlineSchema; - /** - * Decodes a PromptTemplate message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PromptTemplate - * @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.GenerativeSettings.FallbackSettings.PromptTemplate; + /** + * Verifies an InlineSchema 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); - /** - * Decodes a PromptTemplate message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PromptTemplate - * @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.GenerativeSettings.FallbackSettings.PromptTemplate; + /** + * Creates an InlineSchema message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InlineSchema + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.InlineSchema; - /** - * Verifies a PromptTemplate 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 plain object from an InlineSchema message. Also converts values to other types if specified. + * @param message InlineSchema + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.InlineSchema, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a PromptTemplate message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PromptTemplate - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate; + /** + * Converts this InlineSchema to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Creates a plain object from a PromptTemplate message. Also converts values to other types if specified. - * @param message PromptTemplate - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Gets the default type url for InlineSchema + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Converts this PromptTemplate to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** DataType enum. */ + enum DataType { + DATA_TYPE_UNSPECIFIED = 0, + STRING = 1, + NUMBER = 2, + BOOLEAN = 3, + ARRAY = 6 + } - /** - * Gets the default type url for PromptTemplate - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } + /** Properties of a ValidationMessage. */ + interface IValidationMessage { - /** Properties of a KnowledgeConnectorSettings. */ - interface IKnowledgeConnectorSettings { + /** ValidationMessage resourceType */ + resourceType?: (google.cloud.dialogflow.cx.v3.ValidationMessage.ResourceType|keyof typeof google.cloud.dialogflow.cx.v3.ValidationMessage.ResourceType|null); - /** KnowledgeConnectorSettings business */ - business?: (string|null); + /** ValidationMessage resources */ + resources?: (string[]|null); - /** KnowledgeConnectorSettings agent */ - agent?: (string|null); + /** ValidationMessage resourceNames */ + resourceNames?: (google.cloud.dialogflow.cx.v3.IResourceName[]|null); - /** KnowledgeConnectorSettings agentIdentity */ - agentIdentity?: (string|null); + /** ValidationMessage severity */ + severity?: (google.cloud.dialogflow.cx.v3.ValidationMessage.Severity|keyof typeof google.cloud.dialogflow.cx.v3.ValidationMessage.Severity|null); - /** KnowledgeConnectorSettings businessDescription */ - businessDescription?: (string|null); + /** ValidationMessage detail */ + detail?: (string|null); + } - /** KnowledgeConnectorSettings agentScope */ - agentScope?: (string|null); + /** Represents a ValidationMessage. */ + class ValidationMessage implements IValidationMessage { - /** KnowledgeConnectorSettings disableDataStoreFallback */ - disableDataStoreFallback?: (boolean|null); - } + /** + * Constructs a new ValidationMessage. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.IValidationMessage); - /** Represents a KnowledgeConnectorSettings. */ - class KnowledgeConnectorSettings implements IKnowledgeConnectorSettings { + /** ValidationMessage resourceType. */ + public resourceType: (google.cloud.dialogflow.cx.v3.ValidationMessage.ResourceType|keyof typeof google.cloud.dialogflow.cx.v3.ValidationMessage.ResourceType); - /** - * Constructs a new KnowledgeConnectorSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3.GenerativeSettings.IKnowledgeConnectorSettings); + /** ValidationMessage resources. */ + public resources: string[]; - /** KnowledgeConnectorSettings business. */ - public business: string; + /** ValidationMessage resourceNames. */ + public resourceNames: google.cloud.dialogflow.cx.v3.IResourceName[]; - /** KnowledgeConnectorSettings agent. */ - public agent: string; + /** ValidationMessage severity. */ + public severity: (google.cloud.dialogflow.cx.v3.ValidationMessage.Severity|keyof typeof google.cloud.dialogflow.cx.v3.ValidationMessage.Severity); - /** KnowledgeConnectorSettings agentIdentity. */ - public agentIdentity: string; + /** ValidationMessage detail. */ + public detail: string; - /** KnowledgeConnectorSettings businessDescription. */ - public businessDescription: string; + /** + * Creates a new ValidationMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns ValidationMessage instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.IValidationMessage): google.cloud.dialogflow.cx.v3.ValidationMessage; - /** KnowledgeConnectorSettings agentScope. */ - public agentScope: string; + /** + * Encodes the specified ValidationMessage message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ValidationMessage.verify|verify} messages. + * @param message ValidationMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.IValidationMessage, writer?: $protobuf.Writer): $protobuf.Writer; - /** KnowledgeConnectorSettings disableDataStoreFallback. */ - public disableDataStoreFallback: boolean; + /** + * Encodes the specified ValidationMessage message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ValidationMessage.verify|verify} messages. + * @param message ValidationMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IValidationMessage, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a new KnowledgeConnectorSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns KnowledgeConnectorSettings instance - */ - public static create(properties?: google.cloud.dialogflow.cx.v3.GenerativeSettings.IKnowledgeConnectorSettings): google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings; + /** + * Decodes a ValidationMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ValidationMessage + * @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.ValidationMessage; - /** - * Encodes the specified KnowledgeConnectorSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings.verify|verify} messages. - * @param message KnowledgeConnectorSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.cx.v3.GenerativeSettings.IKnowledgeConnectorSettings, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes a ValidationMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ValidationMessage + * @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.ValidationMessage; - /** - * Encodes the specified KnowledgeConnectorSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings.verify|verify} messages. - * @param message KnowledgeConnectorSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.GenerativeSettings.IKnowledgeConnectorSettings, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Verifies a ValidationMessage 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); - /** - * Decodes a KnowledgeConnectorSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns KnowledgeConnectorSettings - * @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.GenerativeSettings.KnowledgeConnectorSettings; + /** + * Creates a ValidationMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ValidationMessage + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ValidationMessage; - /** - * Decodes a KnowledgeConnectorSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns KnowledgeConnectorSettings - * @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.GenerativeSettings.KnowledgeConnectorSettings; + /** + * Creates a plain object from a ValidationMessage message. Also converts values to other types if specified. + * @param message ValidationMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.ValidationMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Verifies a KnowledgeConnectorSettings 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); + /** + * Converts this ValidationMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Creates a KnowledgeConnectorSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns KnowledgeConnectorSettings - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings; + /** + * Gets the default type url for ValidationMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Creates a plain object from a KnowledgeConnectorSettings message. Also converts values to other types if specified. - * @param message KnowledgeConnectorSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + namespace ValidationMessage { - /** - * Converts this KnowledgeConnectorSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** ResourceType enum. */ + enum ResourceType { + RESOURCE_TYPE_UNSPECIFIED = 0, + AGENT = 1, + INTENT = 2, + INTENT_TRAINING_PHRASE = 8, + INTENT_PARAMETER = 9, + INTENTS = 10, + INTENT_TRAINING_PHRASES = 11, + ENTITY_TYPE = 3, + ENTITY_TYPES = 12, + WEBHOOK = 4, + FLOW = 5, + PAGE = 6, + PAGES = 13, + TRANSITION_ROUTE_GROUP = 7, + AGENT_TRANSITION_ROUTE_GROUP = 14 + } - /** - * Gets the default type url for KnowledgeConnectorSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; + /** Severity enum. */ + enum Severity { + SEVERITY_UNSPECIFIED = 0, + INFO = 1, + WARNING = 2, + ERROR = 3 } } - /** Properties of a SafetySettings. */ - interface ISafetySettings { + /** Properties of a ResourceName. */ + interface IResourceName { - /** SafetySettings bannedPhrases */ - bannedPhrases?: (google.cloud.dialogflow.cx.v3.SafetySettings.IPhrase[]|null); + /** ResourceName name */ + name?: (string|null); + + /** ResourceName displayName */ + displayName?: (string|null); } - /** Represents a SafetySettings. */ - class SafetySettings implements ISafetySettings { + /** Represents a ResourceName. */ + class ResourceName implements IResourceName { /** - * Constructs a new SafetySettings. + * Constructs a new ResourceName. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.ISafetySettings); + constructor(properties?: google.cloud.dialogflow.cx.v3.IResourceName); - /** SafetySettings bannedPhrases. */ - public bannedPhrases: google.cloud.dialogflow.cx.v3.SafetySettings.IPhrase[]; + /** ResourceName name. */ + public name: string; + + /** ResourceName displayName. */ + public displayName: string; /** - * Creates a new SafetySettings instance using the specified properties. + * Creates a new ResourceName instance using the specified properties. * @param [properties] Properties to set - * @returns SafetySettings instance + * @returns ResourceName instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.ISafetySettings): google.cloud.dialogflow.cx.v3.SafetySettings; + public static create(properties?: google.cloud.dialogflow.cx.v3.IResourceName): google.cloud.dialogflow.cx.v3.ResourceName; /** - * Encodes the specified SafetySettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SafetySettings.verify|verify} messages. - * @param message SafetySettings message or plain object to encode + * Encodes the specified ResourceName message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ResourceName.verify|verify} messages. + * @param message ResourceName message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.ISafetySettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IResourceName, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SafetySettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SafetySettings.verify|verify} messages. - * @param message SafetySettings message or plain object to encode + * Encodes the specified ResourceName message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ResourceName.verify|verify} messages. + * @param message ResourceName message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ISafetySettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IResourceName, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SafetySettings message from the specified reader or buffer. + * Decodes a ResourceName message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SafetySettings + * @returns ResourceName * @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.SafetySettings; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.ResourceName; /** - * Decodes a SafetySettings message from the specified reader or buffer, length delimited. + * Decodes a ResourceName message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SafetySettings + * @returns ResourceName * @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.SafetySettings; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.ResourceName; /** - * Verifies a SafetySettings message. + * Verifies a ResourceName 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 SafetySettings message from a plain object. Also converts values to their respective internal types. + * Creates a ResourceName message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SafetySettings + * @returns ResourceName */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.SafetySettings; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ResourceName; /** - * Creates a plain object from a SafetySettings message. Also converts values to other types if specified. - * @param message SafetySettings + * Creates a plain object from a ResourceName message. Also converts values to other types if specified. + * @param message ResourceName * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.SafetySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.ResourceName, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SafetySettings to JSON. + * Converts this ResourceName to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for SafetySettings + * Gets the default type url for ResourceName * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace SafetySettings { + /** Properties of a GenerativeSettings. */ + interface IGenerativeSettings { - /** Properties of a Phrase. */ - interface IPhrase { + /** GenerativeSettings name */ + name?: (string|null); - /** Phrase text */ - text?: (string|null); + /** GenerativeSettings fallbackSettings */ + fallbackSettings?: (google.cloud.dialogflow.cx.v3.GenerativeSettings.IFallbackSettings|null); - /** Phrase languageCode */ - languageCode?: (string|null); + /** GenerativeSettings generativeSafetySettings */ + generativeSafetySettings?: (google.cloud.dialogflow.cx.v3.ISafetySettings|null); + + /** GenerativeSettings knowledgeConnectorSettings */ + knowledgeConnectorSettings?: (google.cloud.dialogflow.cx.v3.GenerativeSettings.IKnowledgeConnectorSettings|null); + + /** GenerativeSettings languageCode */ + languageCode?: (string|null); + + /** GenerativeSettings llmModelSettings */ + llmModelSettings?: (google.cloud.dialogflow.cx.v3.ILlmModelSettings|null); + } + + /** Represents a GenerativeSettings. */ + class GenerativeSettings implements IGenerativeSettings { + + /** + * Constructs a new GenerativeSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.IGenerativeSettings); + + /** GenerativeSettings name. */ + public name: string; + + /** GenerativeSettings fallbackSettings. */ + public fallbackSettings?: (google.cloud.dialogflow.cx.v3.GenerativeSettings.IFallbackSettings|null); + + /** GenerativeSettings generativeSafetySettings. */ + public generativeSafetySettings?: (google.cloud.dialogflow.cx.v3.ISafetySettings|null); + + /** GenerativeSettings knowledgeConnectorSettings. */ + public knowledgeConnectorSettings?: (google.cloud.dialogflow.cx.v3.GenerativeSettings.IKnowledgeConnectorSettings|null); + + /** GenerativeSettings languageCode. */ + public languageCode: string; + + /** GenerativeSettings llmModelSettings. */ + public llmModelSettings?: (google.cloud.dialogflow.cx.v3.ILlmModelSettings|null); + + /** + * Creates a new GenerativeSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns GenerativeSettings instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.IGenerativeSettings): google.cloud.dialogflow.cx.v3.GenerativeSettings; + + /** + * Encodes the specified GenerativeSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GenerativeSettings.verify|verify} messages. + * @param message GenerativeSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.IGenerativeSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GenerativeSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GenerativeSettings.verify|verify} messages. + * @param message GenerativeSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IGenerativeSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GenerativeSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GenerativeSettings + * @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.GenerativeSettings; + + /** + * Decodes a GenerativeSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GenerativeSettings + * @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.GenerativeSettings; + + /** + * Verifies a GenerativeSettings 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 GenerativeSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GenerativeSettings + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.GenerativeSettings; + + /** + * Creates a plain object from a GenerativeSettings message. Also converts values to other types if specified. + * @param message GenerativeSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.GenerativeSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GenerativeSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GenerativeSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace GenerativeSettings { + + /** Properties of a FallbackSettings. */ + interface IFallbackSettings { + + /** FallbackSettings selectedPrompt */ + selectedPrompt?: (string|null); + + /** FallbackSettings promptTemplates */ + promptTemplates?: (google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.IPromptTemplate[]|null); } - /** Represents a Phrase. */ - class Phrase implements IPhrase { + /** Represents a FallbackSettings. */ + class FallbackSettings implements IFallbackSettings { /** - * Constructs a new Phrase. + * Constructs a new FallbackSettings. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.SafetySettings.IPhrase); + constructor(properties?: google.cloud.dialogflow.cx.v3.GenerativeSettings.IFallbackSettings); - /** Phrase text. */ - public text: string; + /** FallbackSettings selectedPrompt. */ + public selectedPrompt: string; - /** Phrase languageCode. */ - public languageCode: string; + /** FallbackSettings promptTemplates. */ + public promptTemplates: google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.IPromptTemplate[]; /** - * Creates a new Phrase instance using the specified properties. + * Creates a new FallbackSettings instance using the specified properties. * @param [properties] Properties to set - * @returns Phrase instance + * @returns FallbackSettings instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.SafetySettings.IPhrase): google.cloud.dialogflow.cx.v3.SafetySettings.Phrase; + public static create(properties?: google.cloud.dialogflow.cx.v3.GenerativeSettings.IFallbackSettings): google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings; /** - * Encodes the specified Phrase message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SafetySettings.Phrase.verify|verify} messages. - * @param message Phrase message or plain object to encode + * Encodes the specified FallbackSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.verify|verify} messages. + * @param message FallbackSettings message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.SafetySettings.IPhrase, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.GenerativeSettings.IFallbackSettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Phrase message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SafetySettings.Phrase.verify|verify} messages. - * @param message Phrase message or plain object to encode + * Encodes the specified FallbackSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.verify|verify} messages. + * @param message FallbackSettings message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.SafetySettings.IPhrase, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.GenerativeSettings.IFallbackSettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Phrase message from the specified reader or buffer. + * Decodes a FallbackSettings message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Phrase + * @returns FallbackSettings * @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.SafetySettings.Phrase; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings; /** - * Decodes a Phrase message from the specified reader or buffer, length delimited. + * Decodes a FallbackSettings message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Phrase + * @returns FallbackSettings * @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.SafetySettings.Phrase; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings; /** - * Verifies a Phrase message. + * Verifies a FallbackSettings 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 Phrase message from a plain object. Also converts values to their respective internal types. + * Creates a FallbackSettings message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Phrase + * @returns FallbackSettings */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.SafetySettings.Phrase; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings; /** - * Creates a plain object from a Phrase message. Also converts values to other types if specified. - * @param message Phrase + * Creates a plain object from a FallbackSettings message. Also converts values to other types if specified. + * @param message FallbackSettings * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.SafetySettings.Phrase, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Phrase to JSON. + * Converts this FallbackSettings to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Phrase + * Gets the default type url for FallbackSettings * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - } - - /** Represents a Changelogs */ - class Changelogs extends $protobuf.rpc.Service { - - /** - * Constructs a new Changelogs service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); - /** - * Creates new Changelogs service using the specified rpc implementation. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - * @returns RPC service. Useful where requests and/or responses are streamed. - */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Changelogs; + namespace FallbackSettings { - /** - * Calls ListChangelogs. - * @param request ListChangelogsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListChangelogsResponse - */ - public listChangelogs(request: google.cloud.dialogflow.cx.v3.IListChangelogsRequest, callback: google.cloud.dialogflow.cx.v3.Changelogs.ListChangelogsCallback): void; + /** Properties of a PromptTemplate. */ + interface IPromptTemplate { - /** - * Calls ListChangelogs. - * @param request ListChangelogsRequest message or plain object - * @returns Promise - */ - public listChangelogs(request: google.cloud.dialogflow.cx.v3.IListChangelogsRequest): Promise; + /** PromptTemplate displayName */ + displayName?: (string|null); - /** - * Calls GetChangelog. - * @param request GetChangelogRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Changelog - */ - public getChangelog(request: google.cloud.dialogflow.cx.v3.IGetChangelogRequest, callback: google.cloud.dialogflow.cx.v3.Changelogs.GetChangelogCallback): void; + /** PromptTemplate promptText */ + promptText?: (string|null); - /** - * Calls GetChangelog. - * @param request GetChangelogRequest message or plain object - * @returns Promise - */ - public getChangelog(request: google.cloud.dialogflow.cx.v3.IGetChangelogRequest): Promise; - } + /** PromptTemplate frozen */ + frozen?: (boolean|null); + } - namespace Changelogs { + /** Represents a PromptTemplate. */ + class PromptTemplate implements IPromptTemplate { - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Changelogs|listChangelogs}. - * @param error Error, if any - * @param [response] ListChangelogsResponse - */ - type ListChangelogsCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.ListChangelogsResponse) => void; + /** + * Constructs a new PromptTemplate. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.IPromptTemplate); - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Changelogs|getChangelog}. - * @param error Error, if any - * @param [response] Changelog - */ - type GetChangelogCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.Changelog) => void; - } + /** PromptTemplate displayName. */ + public displayName: string; - /** Properties of a ListChangelogsRequest. */ - interface IListChangelogsRequest { + /** PromptTemplate promptText. */ + public promptText: string; - /** ListChangelogsRequest parent */ - parent?: (string|null); + /** PromptTemplate frozen. */ + public frozen: boolean; - /** ListChangelogsRequest filter */ - filter?: (string|null); + /** + * Creates a new PromptTemplate instance using the specified properties. + * @param [properties] Properties to set + * @returns PromptTemplate instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.IPromptTemplate): google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate; - /** ListChangelogsRequest pageSize */ - pageSize?: (number|null); + /** + * Encodes the specified PromptTemplate message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate.verify|verify} messages. + * @param message PromptTemplate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.IPromptTemplate, writer?: $protobuf.Writer): $protobuf.Writer; - /** ListChangelogsRequest pageToken */ - pageToken?: (string|null); - } + /** + * Encodes the specified PromptTemplate message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate.verify|verify} messages. + * @param message PromptTemplate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.IPromptTemplate, writer?: $protobuf.Writer): $protobuf.Writer; - /** Represents a ListChangelogsRequest. */ - class ListChangelogsRequest implements IListChangelogsRequest { + /** + * Decodes a PromptTemplate message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PromptTemplate + * @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.GenerativeSettings.FallbackSettings.PromptTemplate; - /** - * Constructs a new ListChangelogsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IListChangelogsRequest); + /** + * Decodes a PromptTemplate message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PromptTemplate + * @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.GenerativeSettings.FallbackSettings.PromptTemplate; - /** ListChangelogsRequest parent. */ - public parent: string; + /** + * Verifies a PromptTemplate 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); - /** ListChangelogsRequest filter. */ - public filter: string; + /** + * Creates a PromptTemplate message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PromptTemplate + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate; - /** ListChangelogsRequest pageSize. */ - public pageSize: number; + /** + * Creates a plain object from a PromptTemplate message. Also converts values to other types if specified. + * @param message PromptTemplate + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** ListChangelogsRequest pageToken. */ - public pageToken: string; + /** + * Converts this PromptTemplate to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Creates a new ListChangelogsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListChangelogsRequest instance - */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IListChangelogsRequest): google.cloud.dialogflow.cx.v3.ListChangelogsRequest; + /** + * Gets the default type url for PromptTemplate + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } - /** - * Encodes the specified ListChangelogsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListChangelogsRequest.verify|verify} messages. - * @param message ListChangelogsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.cx.v3.IListChangelogsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** Properties of a KnowledgeConnectorSettings. */ + interface IKnowledgeConnectorSettings { - /** - * Encodes the specified ListChangelogsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListChangelogsRequest.verify|verify} messages. - * @param message ListChangelogsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IListChangelogsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** KnowledgeConnectorSettings business */ + business?: (string|null); - /** - * Decodes a ListChangelogsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListChangelogsRequest - * @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.ListChangelogsRequest; + /** KnowledgeConnectorSettings agent */ + agent?: (string|null); - /** - * Decodes a ListChangelogsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListChangelogsRequest - * @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.ListChangelogsRequest; + /** KnowledgeConnectorSettings agentIdentity */ + agentIdentity?: (string|null); - /** - * Verifies a ListChangelogsRequest 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); + /** KnowledgeConnectorSettings businessDescription */ + businessDescription?: (string|null); - /** - * Creates a ListChangelogsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListChangelogsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ListChangelogsRequest; + /** KnowledgeConnectorSettings agentScope */ + agentScope?: (string|null); - /** - * Creates a plain object from a ListChangelogsRequest message. Also converts values to other types if specified. - * @param message ListChangelogsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.cx.v3.ListChangelogsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** KnowledgeConnectorSettings disableDataStoreFallback */ + disableDataStoreFallback?: (boolean|null); + } - /** - * Converts this ListChangelogsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** Represents a KnowledgeConnectorSettings. */ + class KnowledgeConnectorSettings implements IKnowledgeConnectorSettings { - /** - * Gets the default type url for ListChangelogsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Constructs a new KnowledgeConnectorSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.GenerativeSettings.IKnowledgeConnectorSettings); - /** Properties of a ListChangelogsResponse. */ - interface IListChangelogsResponse { + /** KnowledgeConnectorSettings business. */ + public business: string; - /** ListChangelogsResponse changelogs */ - changelogs?: (google.cloud.dialogflow.cx.v3.IChangelog[]|null); + /** KnowledgeConnectorSettings agent. */ + public agent: string; - /** ListChangelogsResponse nextPageToken */ - nextPageToken?: (string|null); - } + /** KnowledgeConnectorSettings agentIdentity. */ + public agentIdentity: string; - /** Represents a ListChangelogsResponse. */ - class ListChangelogsResponse implements IListChangelogsResponse { + /** KnowledgeConnectorSettings businessDescription. */ + public businessDescription: string; - /** - * Constructs a new ListChangelogsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IListChangelogsResponse); + /** KnowledgeConnectorSettings agentScope. */ + public agentScope: string; - /** ListChangelogsResponse changelogs. */ - public changelogs: google.cloud.dialogflow.cx.v3.IChangelog[]; + /** KnowledgeConnectorSettings disableDataStoreFallback. */ + public disableDataStoreFallback: boolean; - /** ListChangelogsResponse nextPageToken. */ - public nextPageToken: string; + /** + * Creates a new KnowledgeConnectorSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns KnowledgeConnectorSettings instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.GenerativeSettings.IKnowledgeConnectorSettings): google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings; - /** - * Creates a new ListChangelogsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListChangelogsResponse instance - */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IListChangelogsResponse): google.cloud.dialogflow.cx.v3.ListChangelogsResponse; - - /** - * Encodes the specified ListChangelogsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListChangelogsResponse.verify|verify} messages. - * @param message ListChangelogsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.cx.v3.IListChangelogsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified KnowledgeConnectorSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings.verify|verify} messages. + * @param message KnowledgeConnectorSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.GenerativeSettings.IKnowledgeConnectorSettings, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified ListChangelogsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListChangelogsResponse.verify|verify} messages. - * @param message ListChangelogsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IListChangelogsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified KnowledgeConnectorSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings.verify|verify} messages. + * @param message KnowledgeConnectorSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.GenerativeSettings.IKnowledgeConnectorSettings, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a ListChangelogsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListChangelogsResponse - * @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.ListChangelogsResponse; + /** + * Decodes a KnowledgeConnectorSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns KnowledgeConnectorSettings + * @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.GenerativeSettings.KnowledgeConnectorSettings; - /** - * Decodes a ListChangelogsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListChangelogsResponse - * @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.ListChangelogsResponse; + /** + * Decodes a KnowledgeConnectorSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns KnowledgeConnectorSettings + * @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.GenerativeSettings.KnowledgeConnectorSettings; - /** - * Verifies a ListChangelogsResponse 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); + /** + * Verifies a KnowledgeConnectorSettings 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 ListChangelogsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListChangelogsResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ListChangelogsResponse; + /** + * Creates a KnowledgeConnectorSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns KnowledgeConnectorSettings + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings; - /** - * Creates a plain object from a ListChangelogsResponse message. Also converts values to other types if specified. - * @param message ListChangelogsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.cx.v3.ListChangelogsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a plain object from a KnowledgeConnectorSettings message. Also converts values to other types if specified. + * @param message KnowledgeConnectorSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this ListChangelogsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Converts this KnowledgeConnectorSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Gets the default type url for ListChangelogsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; + /** + * Gets the default type url for KnowledgeConnectorSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } - /** Properties of a GetChangelogRequest. */ - interface IGetChangelogRequest { + /** Properties of a LlmModelSettings. */ + interface ILlmModelSettings { - /** GetChangelogRequest name */ - name?: (string|null); + /** LlmModelSettings model */ + model?: (string|null); + + /** LlmModelSettings promptText */ + promptText?: (string|null); } - /** Represents a GetChangelogRequest. */ - class GetChangelogRequest implements IGetChangelogRequest { + /** Represents a LlmModelSettings. */ + class LlmModelSettings implements ILlmModelSettings { /** - * Constructs a new GetChangelogRequest. + * Constructs a new LlmModelSettings. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IGetChangelogRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3.ILlmModelSettings); - /** GetChangelogRequest name. */ - public name: string; + /** LlmModelSettings model. */ + public model: string; + + /** LlmModelSettings promptText. */ + public promptText: string; /** - * Creates a new GetChangelogRequest instance using the specified properties. + * Creates a new LlmModelSettings instance using the specified properties. * @param [properties] Properties to set - * @returns GetChangelogRequest instance + * @returns LlmModelSettings instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IGetChangelogRequest): google.cloud.dialogflow.cx.v3.GetChangelogRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3.ILlmModelSettings): google.cloud.dialogflow.cx.v3.LlmModelSettings; /** - * Encodes the specified GetChangelogRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetChangelogRequest.verify|verify} messages. - * @param message GetChangelogRequest message or plain object to encode + * Encodes the specified LlmModelSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.LlmModelSettings.verify|verify} messages. + * @param message LlmModelSettings message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IGetChangelogRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.ILlmModelSettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetChangelogRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetChangelogRequest.verify|verify} messages. - * @param message GetChangelogRequest message or plain object to encode + * Encodes the specified LlmModelSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.LlmModelSettings.verify|verify} messages. + * @param message LlmModelSettings message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IGetChangelogRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ILlmModelSettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetChangelogRequest message from the specified reader or buffer. + * Decodes a LlmModelSettings message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetChangelogRequest + * @returns LlmModelSettings * @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.GetChangelogRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.LlmModelSettings; /** - * Decodes a GetChangelogRequest message from the specified reader or buffer, length delimited. + * Decodes a LlmModelSettings message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetChangelogRequest + * @returns LlmModelSettings * @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.GetChangelogRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.LlmModelSettings; /** - * Verifies a GetChangelogRequest message. + * Verifies a LlmModelSettings 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 GetChangelogRequest message from a plain object. Also converts values to their respective internal types. + * Creates a LlmModelSettings message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetChangelogRequest + * @returns LlmModelSettings */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.GetChangelogRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.LlmModelSettings; /** - * Creates a plain object from a GetChangelogRequest message. Also converts values to other types if specified. - * @param message GetChangelogRequest + * Creates a plain object from a LlmModelSettings message. Also converts values to other types if specified. + * @param message LlmModelSettings * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.GetChangelogRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.LlmModelSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetChangelogRequest to JSON. + * Converts this LlmModelSettings to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GetChangelogRequest + * Gets the default type url for LlmModelSettings * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a Changelog. */ - interface IChangelog { - - /** Changelog name */ - name?: (string|null); - - /** Changelog userEmail */ - userEmail?: (string|null); - - /** Changelog displayName */ - displayName?: (string|null); + /** Properties of a SafetySettings. */ + interface ISafetySettings { - /** Changelog action */ - action?: (string|null); + /** SafetySettings defaultBannedPhraseMatchStrategy */ + defaultBannedPhraseMatchStrategy?: (google.cloud.dialogflow.cx.v3.SafetySettings.PhraseMatchStrategy|keyof typeof google.cloud.dialogflow.cx.v3.SafetySettings.PhraseMatchStrategy|null); - /** Changelog type */ - type?: (string|null); + /** SafetySettings bannedPhrases */ + bannedPhrases?: (google.cloud.dialogflow.cx.v3.SafetySettings.IPhrase[]|null); - /** Changelog resource */ - resource?: (string|null); + /** SafetySettings raiSettings */ + raiSettings?: (google.cloud.dialogflow.cx.v3.SafetySettings.IRaiSettings|null); - /** Changelog createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** SafetySettings defaultRaiSettings */ + defaultRaiSettings?: (google.cloud.dialogflow.cx.v3.SafetySettings.IRaiSettings|null); - /** Changelog languageCode */ - languageCode?: (string|null); + /** SafetySettings promptSecuritySettings */ + promptSecuritySettings?: (google.cloud.dialogflow.cx.v3.SafetySettings.IPromptSecuritySettings|null); } - /** Represents a Changelog. */ - class Changelog implements IChangelog { + /** Represents a SafetySettings. */ + class SafetySettings implements ISafetySettings { /** - * Constructs a new Changelog. + * Constructs a new SafetySettings. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IChangelog); - - /** Changelog name. */ - public name: string; - - /** Changelog userEmail. */ - public userEmail: string; - - /** Changelog displayName. */ - public displayName: string; + constructor(properties?: google.cloud.dialogflow.cx.v3.ISafetySettings); - /** Changelog action. */ - public action: string; + /** SafetySettings defaultBannedPhraseMatchStrategy. */ + public defaultBannedPhraseMatchStrategy: (google.cloud.dialogflow.cx.v3.SafetySettings.PhraseMatchStrategy|keyof typeof google.cloud.dialogflow.cx.v3.SafetySettings.PhraseMatchStrategy); - /** Changelog type. */ - public type: string; + /** SafetySettings bannedPhrases. */ + public bannedPhrases: google.cloud.dialogflow.cx.v3.SafetySettings.IPhrase[]; - /** Changelog resource. */ - public resource: string; + /** SafetySettings raiSettings. */ + public raiSettings?: (google.cloud.dialogflow.cx.v3.SafetySettings.IRaiSettings|null); - /** Changelog createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + /** SafetySettings defaultRaiSettings. */ + public defaultRaiSettings?: (google.cloud.dialogflow.cx.v3.SafetySettings.IRaiSettings|null); - /** Changelog languageCode. */ - public languageCode: string; + /** SafetySettings promptSecuritySettings. */ + public promptSecuritySettings?: (google.cloud.dialogflow.cx.v3.SafetySettings.IPromptSecuritySettings|null); /** - * Creates a new Changelog instance using the specified properties. + * Creates a new SafetySettings instance using the specified properties. * @param [properties] Properties to set - * @returns Changelog instance + * @returns SafetySettings instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IChangelog): google.cloud.dialogflow.cx.v3.Changelog; + public static create(properties?: google.cloud.dialogflow.cx.v3.ISafetySettings): google.cloud.dialogflow.cx.v3.SafetySettings; /** - * Encodes the specified Changelog message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Changelog.verify|verify} messages. - * @param message Changelog message or plain object to encode + * Encodes the specified SafetySettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SafetySettings.verify|verify} messages. + * @param message SafetySettings message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IChangelog, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.ISafetySettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Changelog message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Changelog.verify|verify} messages. - * @param message Changelog message or plain object to encode + * Encodes the specified SafetySettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SafetySettings.verify|verify} messages. + * @param message SafetySettings message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IChangelog, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ISafetySettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Changelog message from the specified reader or buffer. + * Decodes a SafetySettings message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Changelog + * @returns SafetySettings * @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.Changelog; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.SafetySettings; /** - * Decodes a Changelog message from the specified reader or buffer, length delimited. + * Decodes a SafetySettings message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Changelog + * @returns SafetySettings * @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.Changelog; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.SafetySettings; /** - * Verifies a Changelog message. + * Verifies a SafetySettings 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 Changelog message from a plain object. Also converts values to their respective internal types. + * Creates a SafetySettings message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Changelog + * @returns SafetySettings */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Changelog; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.SafetySettings; /** - * Creates a plain object from a Changelog message. Also converts values to other types if specified. - * @param message Changelog + * Creates a plain object from a SafetySettings message. Also converts values to other types if specified. + * @param message SafetySettings * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.Changelog, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.SafetySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Changelog to JSON. + * Converts this SafetySettings to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Changelog + * Gets the default type url for SafetySettings * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Represents a Deployments */ - class Deployments extends $protobuf.rpc.Service { - - /** - * Constructs a new Deployments service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + namespace SafetySettings { - /** - * Creates new Deployments service using the specified rpc implementation. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - * @returns RPC service. Useful where requests and/or responses are streamed. - */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Deployments; + /** Properties of a Phrase. */ + interface IPhrase { - /** - * Calls ListDeployments. - * @param request ListDeploymentsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListDeploymentsResponse - */ - public listDeployments(request: google.cloud.dialogflow.cx.v3.IListDeploymentsRequest, callback: google.cloud.dialogflow.cx.v3.Deployments.ListDeploymentsCallback): void; + /** Phrase text */ + text?: (string|null); - /** - * Calls ListDeployments. - * @param request ListDeploymentsRequest message or plain object - * @returns Promise - */ - public listDeployments(request: google.cloud.dialogflow.cx.v3.IListDeploymentsRequest): Promise; + /** Phrase languageCode */ + languageCode?: (string|null); + } - /** - * Calls GetDeployment. - * @param request GetDeploymentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Deployment - */ - public getDeployment(request: google.cloud.dialogflow.cx.v3.IGetDeploymentRequest, callback: google.cloud.dialogflow.cx.v3.Deployments.GetDeploymentCallback): void; + /** Represents a Phrase. */ + class Phrase implements IPhrase { - /** - * Calls GetDeployment. - * @param request GetDeploymentRequest message or plain object - * @returns Promise - */ - public getDeployment(request: google.cloud.dialogflow.cx.v3.IGetDeploymentRequest): Promise; - } + /** + * Constructs a new Phrase. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.SafetySettings.IPhrase); - namespace Deployments { + /** Phrase text. */ + public text: string; - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Deployments|listDeployments}. - * @param error Error, if any - * @param [response] ListDeploymentsResponse - */ - type ListDeploymentsCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.ListDeploymentsResponse) => void; + /** Phrase languageCode. */ + public languageCode: string; - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Deployments|getDeployment}. - * @param error Error, if any - * @param [response] Deployment - */ - type GetDeploymentCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.Deployment) => void; - } + /** + * Creates a new Phrase instance using the specified properties. + * @param [properties] Properties to set + * @returns Phrase instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.SafetySettings.IPhrase): google.cloud.dialogflow.cx.v3.SafetySettings.Phrase; - /** Properties of a Deployment. */ - interface IDeployment { + /** + * Encodes the specified Phrase message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SafetySettings.Phrase.verify|verify} messages. + * @param message Phrase message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.SafetySettings.IPhrase, writer?: $protobuf.Writer): $protobuf.Writer; - /** Deployment name */ - name?: (string|null); + /** + * Encodes the specified Phrase message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SafetySettings.Phrase.verify|verify} messages. + * @param message Phrase message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.SafetySettings.IPhrase, writer?: $protobuf.Writer): $protobuf.Writer; - /** Deployment flowVersion */ - flowVersion?: (string|null); + /** + * Decodes a Phrase message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Phrase + * @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.SafetySettings.Phrase; - /** Deployment state */ - state?: (google.cloud.dialogflow.cx.v3.Deployment.State|keyof typeof google.cloud.dialogflow.cx.v3.Deployment.State|null); + /** + * Decodes a Phrase message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Phrase + * @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.SafetySettings.Phrase; - /** Deployment result */ - result?: (google.cloud.dialogflow.cx.v3.Deployment.IResult|null); + /** + * Verifies a Phrase 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); - /** Deployment startTime */ - startTime?: (google.protobuf.ITimestamp|null); + /** + * Creates a Phrase message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Phrase + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.SafetySettings.Phrase; - /** Deployment endTime */ - endTime?: (google.protobuf.ITimestamp|null); - } + /** + * Creates a plain object from a Phrase message. Also converts values to other types if specified. + * @param message Phrase + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.SafetySettings.Phrase, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Represents a Deployment. */ - class Deployment implements IDeployment { + /** + * Converts this Phrase to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Constructs a new Deployment. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IDeployment); + /** + * Gets the default type url for Phrase + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** Deployment name. */ - public name: string; + /** PhraseMatchStrategy enum. */ + enum PhraseMatchStrategy { + PHRASE_MATCH_STRATEGY_UNSPECIFIED = 0, + PARTIAL_MATCH = 1, + WORD_MATCH = 2 + } - /** Deployment flowVersion. */ - public flowVersion: string; + /** Properties of a RaiSettings. */ + interface IRaiSettings { - /** Deployment state. */ - public state: (google.cloud.dialogflow.cx.v3.Deployment.State|keyof typeof google.cloud.dialogflow.cx.v3.Deployment.State); + /** RaiSettings categoryFilters */ + categoryFilters?: (google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.ICategoryFilter[]|null); + } - /** Deployment result. */ - public result?: (google.cloud.dialogflow.cx.v3.Deployment.IResult|null); + /** Represents a RaiSettings. */ + class RaiSettings implements IRaiSettings { - /** Deployment startTime. */ - public startTime?: (google.protobuf.ITimestamp|null); + /** + * Constructs a new RaiSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.SafetySettings.IRaiSettings); - /** Deployment endTime. */ - public endTime?: (google.protobuf.ITimestamp|null); + /** RaiSettings categoryFilters. */ + public categoryFilters: google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.ICategoryFilter[]; - /** - * Creates a new Deployment instance using the specified properties. - * @param [properties] Properties to set - * @returns Deployment instance - */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IDeployment): google.cloud.dialogflow.cx.v3.Deployment; + /** + * Creates a new RaiSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns RaiSettings instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.SafetySettings.IRaiSettings): google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings; - /** - * Encodes the specified Deployment message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Deployment.verify|verify} messages. - * @param message Deployment message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.cx.v3.IDeployment, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified RaiSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.verify|verify} messages. + * @param message RaiSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.SafetySettings.IRaiSettings, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified Deployment message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Deployment.verify|verify} messages. - * @param message Deployment message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IDeployment, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified RaiSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.verify|verify} messages. + * @param message RaiSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.SafetySettings.IRaiSettings, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a Deployment message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Deployment - * @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.Deployment; + /** + * Decodes a RaiSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RaiSettings + * @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.SafetySettings.RaiSettings; - /** - * Decodes a Deployment message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Deployment - * @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.Deployment; + /** + * Decodes a RaiSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RaiSettings + * @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.SafetySettings.RaiSettings; - /** - * Verifies a Deployment 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); + /** + * Verifies a RaiSettings 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 Deployment message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Deployment - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Deployment; + /** + * Creates a RaiSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RaiSettings + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings; - /** - * Creates a plain object from a Deployment message. Also converts values to other types if specified. - * @param message Deployment - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.cx.v3.Deployment, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a plain object from a RaiSettings message. Also converts values to other types if specified. + * @param message RaiSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this Deployment to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Converts this RaiSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Gets the default type url for Deployment - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Gets the default type url for RaiSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - namespace Deployment { + namespace RaiSettings { - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - RUNNING = 1, - SUCCEEDED = 2, - FAILED = 3 - } + /** SafetyFilterLevel enum. */ + enum SafetyFilterLevel { + SAFETY_FILTER_LEVEL_UNSPECIFIED = 0, + BLOCK_NONE = 1, + BLOCK_FEW = 2, + BLOCK_SOME = 3, + BLOCK_MOST = 4 + } - /** Properties of a Result. */ - interface IResult { + /** SafetyCategory enum. */ + enum SafetyCategory { + SAFETY_CATEGORY_UNSPECIFIED = 0, + DANGEROUS_CONTENT = 1, + HATE_SPEECH = 2, + HARASSMENT = 3, + SEXUALLY_EXPLICIT_CONTENT = 4 + } - /** Result deploymentTestResults */ - deploymentTestResults?: (string[]|null); + /** Properties of a CategoryFilter. */ + interface ICategoryFilter { - /** Result experiment */ - experiment?: (string|null); + /** CategoryFilter category */ + category?: (google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.SafetyCategory|keyof typeof google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.SafetyCategory|null); + + /** CategoryFilter filterLevel */ + filterLevel?: (google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.SafetyFilterLevel|keyof typeof google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.SafetyFilterLevel|null); + } + + /** Represents a CategoryFilter. */ + class CategoryFilter implements ICategoryFilter { + + /** + * Constructs a new CategoryFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.ICategoryFilter); + + /** CategoryFilter category. */ + public category: (google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.SafetyCategory|keyof typeof google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.SafetyCategory); + + /** CategoryFilter filterLevel. */ + public filterLevel: (google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.SafetyFilterLevel|keyof typeof google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.SafetyFilterLevel); + + /** + * Creates a new CategoryFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns CategoryFilter instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.ICategoryFilter): google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter; + + /** + * Encodes the specified CategoryFilter message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter.verify|verify} messages. + * @param message CategoryFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.ICategoryFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CategoryFilter message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter.verify|verify} messages. + * @param message CategoryFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.ICategoryFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CategoryFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CategoryFilter + * @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.SafetySettings.RaiSettings.CategoryFilter; + + /** + * Decodes a CategoryFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CategoryFilter + * @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.SafetySettings.RaiSettings.CategoryFilter; + + /** + * Verifies a CategoryFilter 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 CategoryFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CategoryFilter + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter; + + /** + * Creates a plain object from a CategoryFilter message. Also converts values to other types if specified. + * @param message CategoryFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CategoryFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CategoryFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } - /** Represents a Result. */ - class Result implements IResult { + /** Properties of a PromptSecuritySettings. */ + interface IPromptSecuritySettings { + + /** PromptSecuritySettings enablePromptSecurity */ + enablePromptSecurity?: (boolean|null); + } + + /** Represents a PromptSecuritySettings. */ + class PromptSecuritySettings implements IPromptSecuritySettings { /** - * Constructs a new Result. + * Constructs a new PromptSecuritySettings. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.Deployment.IResult); - - /** Result deploymentTestResults. */ - public deploymentTestResults: string[]; + constructor(properties?: google.cloud.dialogflow.cx.v3.SafetySettings.IPromptSecuritySettings); - /** Result experiment. */ - public experiment: string; + /** PromptSecuritySettings enablePromptSecurity. */ + public enablePromptSecurity: boolean; /** - * Creates a new Result instance using the specified properties. + * Creates a new PromptSecuritySettings instance using the specified properties. * @param [properties] Properties to set - * @returns Result instance + * @returns PromptSecuritySettings instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.Deployment.IResult): google.cloud.dialogflow.cx.v3.Deployment.Result; + public static create(properties?: google.cloud.dialogflow.cx.v3.SafetySettings.IPromptSecuritySettings): google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings; /** - * Encodes the specified Result message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Deployment.Result.verify|verify} messages. - * @param message Result message or plain object to encode + * Encodes the specified PromptSecuritySettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings.verify|verify} messages. + * @param message PromptSecuritySettings message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.Deployment.IResult, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.SafetySettings.IPromptSecuritySettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Result message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Deployment.Result.verify|verify} messages. - * @param message Result message or plain object to encode + * Encodes the specified PromptSecuritySettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings.verify|verify} messages. + * @param message PromptSecuritySettings message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.Deployment.IResult, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.SafetySettings.IPromptSecuritySettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Result message from the specified reader or buffer. + * Decodes a PromptSecuritySettings message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Result + * @returns PromptSecuritySettings * @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.Deployment.Result; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings; /** - * Decodes a Result message from the specified reader or buffer, length delimited. + * Decodes a PromptSecuritySettings message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Result + * @returns PromptSecuritySettings * @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.Deployment.Result; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings; /** - * Verifies a Result message. + * Verifies a PromptSecuritySettings 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 Result message from a plain object. Also converts values to their respective internal types. + * Creates a PromptSecuritySettings message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Result + * @returns PromptSecuritySettings */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Deployment.Result; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings; /** - * Creates a plain object from a Result message. Also converts values to other types if specified. - * @param message Result + * Creates a plain object from a PromptSecuritySettings message. Also converts values to other types if specified. + * @param message PromptSecuritySettings * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.Deployment.Result, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Result to JSON. + * Converts this PromptSecuritySettings to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Result + * Gets the default type url for PromptSecuritySettings * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ @@ -12881,835 +13331,923 @@ export namespace google { } } - /** Properties of a ListDeploymentsRequest. */ - interface IListDeploymentsRequest { + /** Represents a Changelogs */ + class Changelogs extends $protobuf.rpc.Service { - /** ListDeploymentsRequest parent */ + /** + * Constructs a new Changelogs service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new Changelogs service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Changelogs; + + /** + * Calls ListChangelogs. + * @param request ListChangelogsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListChangelogsResponse + */ + public listChangelogs(request: google.cloud.dialogflow.cx.v3.IListChangelogsRequest, callback: google.cloud.dialogflow.cx.v3.Changelogs.ListChangelogsCallback): void; + + /** + * Calls ListChangelogs. + * @param request ListChangelogsRequest message or plain object + * @returns Promise + */ + public listChangelogs(request: google.cloud.dialogflow.cx.v3.IListChangelogsRequest): Promise; + + /** + * Calls GetChangelog. + * @param request GetChangelogRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Changelog + */ + public getChangelog(request: google.cloud.dialogflow.cx.v3.IGetChangelogRequest, callback: google.cloud.dialogflow.cx.v3.Changelogs.GetChangelogCallback): void; + + /** + * Calls GetChangelog. + * @param request GetChangelogRequest message or plain object + * @returns Promise + */ + public getChangelog(request: google.cloud.dialogflow.cx.v3.IGetChangelogRequest): Promise; + } + + namespace Changelogs { + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Changelogs|listChangelogs}. + * @param error Error, if any + * @param [response] ListChangelogsResponse + */ + type ListChangelogsCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.ListChangelogsResponse) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Changelogs|getChangelog}. + * @param error Error, if any + * @param [response] Changelog + */ + type GetChangelogCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.Changelog) => void; + } + + /** Properties of a ListChangelogsRequest. */ + interface IListChangelogsRequest { + + /** ListChangelogsRequest parent */ parent?: (string|null); - /** ListDeploymentsRequest pageSize */ + /** ListChangelogsRequest filter */ + filter?: (string|null); + + /** ListChangelogsRequest pageSize */ pageSize?: (number|null); - /** ListDeploymentsRequest pageToken */ + /** ListChangelogsRequest pageToken */ pageToken?: (string|null); } - /** Represents a ListDeploymentsRequest. */ - class ListDeploymentsRequest implements IListDeploymentsRequest { + /** Represents a ListChangelogsRequest. */ + class ListChangelogsRequest implements IListChangelogsRequest { /** - * Constructs a new ListDeploymentsRequest. + * Constructs a new ListChangelogsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IListDeploymentsRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3.IListChangelogsRequest); - /** ListDeploymentsRequest parent. */ + /** ListChangelogsRequest parent. */ public parent: string; - /** ListDeploymentsRequest pageSize. */ + /** ListChangelogsRequest filter. */ + public filter: string; + + /** ListChangelogsRequest pageSize. */ public pageSize: number; - /** ListDeploymentsRequest pageToken. */ + /** ListChangelogsRequest pageToken. */ public pageToken: string; /** - * Creates a new ListDeploymentsRequest instance using the specified properties. + * Creates a new ListChangelogsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListDeploymentsRequest instance + * @returns ListChangelogsRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IListDeploymentsRequest): google.cloud.dialogflow.cx.v3.ListDeploymentsRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3.IListChangelogsRequest): google.cloud.dialogflow.cx.v3.ListChangelogsRequest; /** - * Encodes the specified ListDeploymentsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListDeploymentsRequest.verify|verify} messages. - * @param message ListDeploymentsRequest message or plain object to encode + * Encodes the specified ListChangelogsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListChangelogsRequest.verify|verify} messages. + * @param message ListChangelogsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IListDeploymentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IListChangelogsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListDeploymentsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListDeploymentsRequest.verify|verify} messages. - * @param message ListDeploymentsRequest message or plain object to encode + * Encodes the specified ListChangelogsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListChangelogsRequest.verify|verify} messages. + * @param message ListChangelogsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IListDeploymentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IListChangelogsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListDeploymentsRequest message from the specified reader or buffer. + * Decodes a ListChangelogsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListDeploymentsRequest + * @returns ListChangelogsRequest * @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.ListDeploymentsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.ListChangelogsRequest; /** - * Decodes a ListDeploymentsRequest message from the specified reader or buffer, length delimited. + * Decodes a ListChangelogsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListDeploymentsRequest + * @returns ListChangelogsRequest * @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.ListDeploymentsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.ListChangelogsRequest; /** - * Verifies a ListDeploymentsRequest message. + * Verifies a ListChangelogsRequest 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 ListDeploymentsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListChangelogsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListDeploymentsRequest + * @returns ListChangelogsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ListDeploymentsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ListChangelogsRequest; /** - * Creates a plain object from a ListDeploymentsRequest message. Also converts values to other types if specified. - * @param message ListDeploymentsRequest + * Creates a plain object from a ListChangelogsRequest message. Also converts values to other types if specified. + * @param message ListChangelogsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.ListDeploymentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.ListChangelogsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListDeploymentsRequest to JSON. + * Converts this ListChangelogsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListDeploymentsRequest + * Gets the default type url for ListChangelogsRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListDeploymentsResponse. */ - interface IListDeploymentsResponse { + /** Properties of a ListChangelogsResponse. */ + interface IListChangelogsResponse { - /** ListDeploymentsResponse deployments */ - deployments?: (google.cloud.dialogflow.cx.v3.IDeployment[]|null); + /** ListChangelogsResponse changelogs */ + changelogs?: (google.cloud.dialogflow.cx.v3.IChangelog[]|null); - /** ListDeploymentsResponse nextPageToken */ + /** ListChangelogsResponse nextPageToken */ nextPageToken?: (string|null); } - /** Represents a ListDeploymentsResponse. */ - class ListDeploymentsResponse implements IListDeploymentsResponse { + /** Represents a ListChangelogsResponse. */ + class ListChangelogsResponse implements IListChangelogsResponse { /** - * Constructs a new ListDeploymentsResponse. + * Constructs a new ListChangelogsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IListDeploymentsResponse); + constructor(properties?: google.cloud.dialogflow.cx.v3.IListChangelogsResponse); - /** ListDeploymentsResponse deployments. */ - public deployments: google.cloud.dialogflow.cx.v3.IDeployment[]; + /** ListChangelogsResponse changelogs. */ + public changelogs: google.cloud.dialogflow.cx.v3.IChangelog[]; - /** ListDeploymentsResponse nextPageToken. */ + /** ListChangelogsResponse nextPageToken. */ public nextPageToken: string; /** - * Creates a new ListDeploymentsResponse instance using the specified properties. + * Creates a new ListChangelogsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ListDeploymentsResponse instance + * @returns ListChangelogsResponse instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IListDeploymentsResponse): google.cloud.dialogflow.cx.v3.ListDeploymentsResponse; + public static create(properties?: google.cloud.dialogflow.cx.v3.IListChangelogsResponse): google.cloud.dialogflow.cx.v3.ListChangelogsResponse; /** - * Encodes the specified ListDeploymentsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListDeploymentsResponse.verify|verify} messages. - * @param message ListDeploymentsResponse message or plain object to encode + * Encodes the specified ListChangelogsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListChangelogsResponse.verify|verify} messages. + * @param message ListChangelogsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IListDeploymentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IListChangelogsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListDeploymentsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListDeploymentsResponse.verify|verify} messages. - * @param message ListDeploymentsResponse message or plain object to encode + * Encodes the specified ListChangelogsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListChangelogsResponse.verify|verify} messages. + * @param message ListChangelogsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IListDeploymentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IListChangelogsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListDeploymentsResponse message from the specified reader or buffer. + * Decodes a ListChangelogsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListDeploymentsResponse + * @returns ListChangelogsResponse * @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.ListDeploymentsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.ListChangelogsResponse; /** - * Decodes a ListDeploymentsResponse message from the specified reader or buffer, length delimited. + * Decodes a ListChangelogsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListDeploymentsResponse + * @returns ListChangelogsResponse * @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.ListDeploymentsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.ListChangelogsResponse; /** - * Verifies a ListDeploymentsResponse message. + * Verifies a ListChangelogsResponse 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 ListDeploymentsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListChangelogsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListDeploymentsResponse + * @returns ListChangelogsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ListDeploymentsResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ListChangelogsResponse; /** - * Creates a plain object from a ListDeploymentsResponse message. Also converts values to other types if specified. - * @param message ListDeploymentsResponse + * Creates a plain object from a ListChangelogsResponse message. Also converts values to other types if specified. + * @param message ListChangelogsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.ListDeploymentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.ListChangelogsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListDeploymentsResponse to JSON. + * Converts this ListChangelogsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListDeploymentsResponse + * Gets the default type url for ListChangelogsResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GetDeploymentRequest. */ - interface IGetDeploymentRequest { + /** Properties of a GetChangelogRequest. */ + interface IGetChangelogRequest { - /** GetDeploymentRequest name */ + /** GetChangelogRequest name */ name?: (string|null); } - /** Represents a GetDeploymentRequest. */ - class GetDeploymentRequest implements IGetDeploymentRequest { + /** Represents a GetChangelogRequest. */ + class GetChangelogRequest implements IGetChangelogRequest { /** - * Constructs a new GetDeploymentRequest. + * Constructs a new GetChangelogRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IGetDeploymentRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3.IGetChangelogRequest); - /** GetDeploymentRequest name. */ + /** GetChangelogRequest name. */ public name: string; /** - * Creates a new GetDeploymentRequest instance using the specified properties. + * Creates a new GetChangelogRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetDeploymentRequest instance + * @returns GetChangelogRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IGetDeploymentRequest): google.cloud.dialogflow.cx.v3.GetDeploymentRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3.IGetChangelogRequest): google.cloud.dialogflow.cx.v3.GetChangelogRequest; /** - * Encodes the specified GetDeploymentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetDeploymentRequest.verify|verify} messages. - * @param message GetDeploymentRequest message or plain object to encode + * Encodes the specified GetChangelogRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetChangelogRequest.verify|verify} messages. + * @param message GetChangelogRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IGetDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IGetChangelogRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetDeploymentRequest.verify|verify} messages. - * @param message GetDeploymentRequest message or plain object to encode + * Encodes the specified GetChangelogRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetChangelogRequest.verify|verify} messages. + * @param message GetChangelogRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IGetDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IGetChangelogRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetDeploymentRequest message from the specified reader or buffer. + * Decodes a GetChangelogRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetDeploymentRequest + * @returns GetChangelogRequest * @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.GetDeploymentRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.GetChangelogRequest; /** - * Decodes a GetDeploymentRequest message from the specified reader or buffer, length delimited. + * Decodes a GetChangelogRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetDeploymentRequest + * @returns GetChangelogRequest * @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.GetDeploymentRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.GetChangelogRequest; /** - * Verifies a GetDeploymentRequest message. + * Verifies a GetChangelogRequest 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 GetDeploymentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetChangelogRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetDeploymentRequest + * @returns GetChangelogRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.GetDeploymentRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.GetChangelogRequest; /** - * Creates a plain object from a GetDeploymentRequest message. Also converts values to other types if specified. - * @param message GetDeploymentRequest + * Creates a plain object from a GetChangelogRequest message. Also converts values to other types if specified. + * @param message GetChangelogRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.GetDeploymentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.GetChangelogRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetDeploymentRequest to JSON. + * Converts this GetChangelogRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GetDeploymentRequest + * Gets the default type url for GetChangelogRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Represents an EntityTypes */ - class EntityTypes extends $protobuf.rpc.Service { + /** Properties of a Changelog. */ + interface IChangelog { + + /** Changelog name */ + name?: (string|null); + + /** Changelog userEmail */ + userEmail?: (string|null); + + /** Changelog displayName */ + displayName?: (string|null); + + /** Changelog action */ + action?: (string|null); + + /** Changelog type */ + type?: (string|null); + + /** Changelog resource */ + resource?: (string|null); + + /** Changelog createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Changelog languageCode */ + languageCode?: (string|null); + } + + /** Represents a Changelog. */ + class Changelog implements IChangelog { /** - * Constructs a new EntityTypes service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited + * Constructs a new Changelog. + * @param [properties] Properties to set */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + constructor(properties?: google.cloud.dialogflow.cx.v3.IChangelog); + + /** Changelog name. */ + public name: string; + + /** Changelog userEmail. */ + public userEmail: string; + + /** Changelog displayName. */ + public displayName: string; + + /** Changelog action. */ + public action: string; + + /** Changelog type. */ + public type: string; + + /** Changelog resource. */ + public resource: string; + + /** Changelog createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Changelog languageCode. */ + public languageCode: string; /** - * Creates new EntityTypes service using the specified rpc implementation. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - * @returns RPC service. Useful where requests and/or responses are streamed. + * Creates a new Changelog instance using the specified properties. + * @param [properties] Properties to set + * @returns Changelog instance */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): EntityTypes; + public static create(properties?: google.cloud.dialogflow.cx.v3.IChangelog): google.cloud.dialogflow.cx.v3.Changelog; /** - * Calls GetEntityType. - * @param request GetEntityTypeRequest message or plain object - * @param callback Node-style callback called with the error, if any, and EntityType + * Encodes the specified Changelog message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Changelog.verify|verify} messages. + * @param message Changelog message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public getEntityType(request: google.cloud.dialogflow.cx.v3.IGetEntityTypeRequest, callback: google.cloud.dialogflow.cx.v3.EntityTypes.GetEntityTypeCallback): void; + public static encode(message: google.cloud.dialogflow.cx.v3.IChangelog, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls GetEntityType. - * @param request GetEntityTypeRequest message or plain object - * @returns Promise + * Encodes the specified Changelog message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Changelog.verify|verify} messages. + * @param message Changelog message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public getEntityType(request: google.cloud.dialogflow.cx.v3.IGetEntityTypeRequest): Promise; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IChangelog, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls CreateEntityType. - * @param request CreateEntityTypeRequest message or plain object - * @param callback Node-style callback called with the error, if any, and EntityType + * Decodes a Changelog message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Changelog + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public createEntityType(request: google.cloud.dialogflow.cx.v3.ICreateEntityTypeRequest, callback: google.cloud.dialogflow.cx.v3.EntityTypes.CreateEntityTypeCallback): void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.Changelog; /** - * Calls CreateEntityType. - * @param request CreateEntityTypeRequest message or plain object - * @returns Promise + * Decodes a Changelog message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Changelog + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public createEntityType(request: google.cloud.dialogflow.cx.v3.ICreateEntityTypeRequest): Promise; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.Changelog; /** - * Calls UpdateEntityType. - * @param request UpdateEntityTypeRequest message or plain object - * @param callback Node-style callback called with the error, if any, and EntityType + * Verifies a Changelog message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public updateEntityType(request: google.cloud.dialogflow.cx.v3.IUpdateEntityTypeRequest, callback: google.cloud.dialogflow.cx.v3.EntityTypes.UpdateEntityTypeCallback): void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls UpdateEntityType. - * @param request UpdateEntityTypeRequest message or plain object - * @returns Promise + * Creates a Changelog message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Changelog */ - public updateEntityType(request: google.cloud.dialogflow.cx.v3.IUpdateEntityTypeRequest): Promise; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Changelog; /** - * Calls DeleteEntityType. - * @param request DeleteEntityTypeRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty + * Creates a plain object from a Changelog message. Also converts values to other types if specified. + * @param message Changelog + * @param [options] Conversion options + * @returns Plain object */ - public deleteEntityType(request: google.cloud.dialogflow.cx.v3.IDeleteEntityTypeRequest, callback: google.cloud.dialogflow.cx.v3.EntityTypes.DeleteEntityTypeCallback): void; + public static toObject(message: google.cloud.dialogflow.cx.v3.Changelog, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls DeleteEntityType. - * @param request DeleteEntityTypeRequest message or plain object - * @returns Promise + * Converts this Changelog to JSON. + * @returns JSON object */ - public deleteEntityType(request: google.cloud.dialogflow.cx.v3.IDeleteEntityTypeRequest): Promise; + public toJSON(): { [k: string]: any }; /** - * Calls ListEntityTypes. - * @param request ListEntityTypesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListEntityTypesResponse + * Gets the default type url for Changelog + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url */ - public listEntityTypes(request: google.cloud.dialogflow.cx.v3.IListEntityTypesRequest, callback: google.cloud.dialogflow.cx.v3.EntityTypes.ListEntityTypesCallback): void; + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CodeBlock. */ + interface ICodeBlock { + + /** CodeBlock code */ + code?: (string|null); + } + + /** Represents a CodeBlock. */ + class CodeBlock implements ICodeBlock { /** - * Calls ListEntityTypes. - * @param request ListEntityTypesRequest message or plain object - * @returns Promise + * Constructs a new CodeBlock. + * @param [properties] Properties to set */ - public listEntityTypes(request: google.cloud.dialogflow.cx.v3.IListEntityTypesRequest): Promise; + constructor(properties?: google.cloud.dialogflow.cx.v3.ICodeBlock); + + /** CodeBlock code. */ + public code: string; /** - * Calls ExportEntityTypes. - * @param request ExportEntityTypesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Creates a new CodeBlock instance using the specified properties. + * @param [properties] Properties to set + * @returns CodeBlock instance */ - public exportEntityTypes(request: google.cloud.dialogflow.cx.v3.IExportEntityTypesRequest, callback: google.cloud.dialogflow.cx.v3.EntityTypes.ExportEntityTypesCallback): void; + public static create(properties?: google.cloud.dialogflow.cx.v3.ICodeBlock): google.cloud.dialogflow.cx.v3.CodeBlock; /** - * Calls ExportEntityTypes. - * @param request ExportEntityTypesRequest message or plain object - * @returns Promise + * Encodes the specified CodeBlock message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CodeBlock.verify|verify} messages. + * @param message CodeBlock message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public exportEntityTypes(request: google.cloud.dialogflow.cx.v3.IExportEntityTypesRequest): Promise; + public static encode(message: google.cloud.dialogflow.cx.v3.ICodeBlock, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls ImportEntityTypes. - * @param request ImportEntityTypesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Encodes the specified CodeBlock message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CodeBlock.verify|verify} messages. + * @param message CodeBlock message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public importEntityTypes(request: google.cloud.dialogflow.cx.v3.IImportEntityTypesRequest, callback: google.cloud.dialogflow.cx.v3.EntityTypes.ImportEntityTypesCallback): void; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ICodeBlock, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls ImportEntityTypes. - * @param request ImportEntityTypesRequest message or plain object - * @returns Promise + * Decodes a CodeBlock message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CodeBlock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public importEntityTypes(request: google.cloud.dialogflow.cx.v3.IImportEntityTypesRequest): Promise; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.CodeBlock; + + /** + * Decodes a CodeBlock message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CodeBlock + * @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.CodeBlock; + + /** + * Verifies a CodeBlock 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 CodeBlock message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CodeBlock + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.CodeBlock; + + /** + * Creates a plain object from a CodeBlock message. Also converts values to other types if specified. + * @param message CodeBlock + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.CodeBlock, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CodeBlock to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CodeBlock + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace EntityTypes { + /** Represents a Deployments */ + class Deployments extends $protobuf.rpc.Service { /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.EntityTypes|getEntityType}. - * @param error Error, if any - * @param [response] EntityType + * Constructs a new Deployments service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited */ - type GetEntityTypeCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.EntityType) => void; + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.EntityTypes|createEntityType}. - * @param error Error, if any - * @param [response] EntityType + * Creates new Deployments service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. */ - type CreateEntityTypeCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.EntityType) => void; + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Deployments; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.EntityTypes|updateEntityType}. - * @param error Error, if any - * @param [response] EntityType + * Calls ListDeployments. + * @param request ListDeploymentsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListDeploymentsResponse */ - type UpdateEntityTypeCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.EntityType) => void; + public listDeployments(request: google.cloud.dialogflow.cx.v3.IListDeploymentsRequest, callback: google.cloud.dialogflow.cx.v3.Deployments.ListDeploymentsCallback): void; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.EntityTypes|deleteEntityType}. - * @param error Error, if any - * @param [response] Empty + * Calls ListDeployments. + * @param request ListDeploymentsRequest message or plain object + * @returns Promise */ - type DeleteEntityTypeCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + public listDeployments(request: google.cloud.dialogflow.cx.v3.IListDeploymentsRequest): Promise; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.EntityTypes|listEntityTypes}. - * @param error Error, if any - * @param [response] ListEntityTypesResponse + * Calls GetDeployment. + * @param request GetDeploymentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Deployment */ - type ListEntityTypesCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.ListEntityTypesResponse) => void; + public getDeployment(request: google.cloud.dialogflow.cx.v3.IGetDeploymentRequest, callback: google.cloud.dialogflow.cx.v3.Deployments.GetDeploymentCallback): void; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.EntityTypes|exportEntityTypes}. + * Calls GetDeployment. + * @param request GetDeploymentRequest message or plain object + * @returns Promise + */ + public getDeployment(request: google.cloud.dialogflow.cx.v3.IGetDeploymentRequest): Promise; + } + + namespace Deployments { + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Deployments|listDeployments}. * @param error Error, if any - * @param [response] Operation + * @param [response] ListDeploymentsResponse */ - type ExportEntityTypesCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + type ListDeploymentsCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.ListDeploymentsResponse) => void; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.EntityTypes|importEntityTypes}. + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Deployments|getDeployment}. * @param error Error, if any - * @param [response] Operation + * @param [response] Deployment */ - type ImportEntityTypesCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + type GetDeploymentCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.Deployment) => void; } - /** Properties of an EntityType. */ - interface IEntityType { + /** Properties of a Deployment. */ + interface IDeployment { - /** EntityType name */ + /** Deployment name */ name?: (string|null); - /** EntityType displayName */ - displayName?: (string|null); - - /** EntityType kind */ - kind?: (google.cloud.dialogflow.cx.v3.EntityType.Kind|keyof typeof google.cloud.dialogflow.cx.v3.EntityType.Kind|null); - - /** EntityType autoExpansionMode */ - autoExpansionMode?: (google.cloud.dialogflow.cx.v3.EntityType.AutoExpansionMode|keyof typeof google.cloud.dialogflow.cx.v3.EntityType.AutoExpansionMode|null); + /** Deployment flowVersion */ + flowVersion?: (string|null); - /** EntityType entities */ - entities?: (google.cloud.dialogflow.cx.v3.EntityType.IEntity[]|null); + /** Deployment state */ + state?: (google.cloud.dialogflow.cx.v3.Deployment.State|keyof typeof google.cloud.dialogflow.cx.v3.Deployment.State|null); - /** EntityType excludedPhrases */ - excludedPhrases?: (google.cloud.dialogflow.cx.v3.EntityType.IExcludedPhrase[]|null); + /** Deployment result */ + result?: (google.cloud.dialogflow.cx.v3.Deployment.IResult|null); - /** EntityType enableFuzzyExtraction */ - enableFuzzyExtraction?: (boolean|null); + /** Deployment startTime */ + startTime?: (google.protobuf.ITimestamp|null); - /** EntityType redact */ - redact?: (boolean|null); + /** Deployment endTime */ + endTime?: (google.protobuf.ITimestamp|null); } - /** Represents an EntityType. */ - class EntityType implements IEntityType { + /** Represents a Deployment. */ + class Deployment implements IDeployment { /** - * Constructs a new EntityType. + * Constructs a new Deployment. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IEntityType); + constructor(properties?: google.cloud.dialogflow.cx.v3.IDeployment); - /** EntityType name. */ + /** Deployment name. */ public name: string; - /** EntityType displayName. */ - public displayName: string; - - /** EntityType kind. */ - public kind: (google.cloud.dialogflow.cx.v3.EntityType.Kind|keyof typeof google.cloud.dialogflow.cx.v3.EntityType.Kind); - - /** EntityType autoExpansionMode. */ - public autoExpansionMode: (google.cloud.dialogflow.cx.v3.EntityType.AutoExpansionMode|keyof typeof google.cloud.dialogflow.cx.v3.EntityType.AutoExpansionMode); + /** Deployment flowVersion. */ + public flowVersion: string; - /** EntityType entities. */ - public entities: google.cloud.dialogflow.cx.v3.EntityType.IEntity[]; + /** Deployment state. */ + public state: (google.cloud.dialogflow.cx.v3.Deployment.State|keyof typeof google.cloud.dialogflow.cx.v3.Deployment.State); - /** EntityType excludedPhrases. */ - public excludedPhrases: google.cloud.dialogflow.cx.v3.EntityType.IExcludedPhrase[]; + /** Deployment result. */ + public result?: (google.cloud.dialogflow.cx.v3.Deployment.IResult|null); - /** EntityType enableFuzzyExtraction. */ - public enableFuzzyExtraction: boolean; + /** Deployment startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); - /** EntityType redact. */ - public redact: boolean; + /** Deployment endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); /** - * Creates a new EntityType instance using the specified properties. + * Creates a new Deployment instance using the specified properties. * @param [properties] Properties to set - * @returns EntityType instance + * @returns Deployment instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IEntityType): google.cloud.dialogflow.cx.v3.EntityType; + public static create(properties?: google.cloud.dialogflow.cx.v3.IDeployment): google.cloud.dialogflow.cx.v3.Deployment; /** - * Encodes the specified EntityType message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.EntityType.verify|verify} messages. - * @param message EntityType message or plain object to encode + * Encodes the specified Deployment message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Deployment.verify|verify} messages. + * @param message Deployment message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IEntityType, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IDeployment, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified EntityType message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.EntityType.verify|verify} messages. - * @param message EntityType message or plain object to encode + * Encodes the specified Deployment message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Deployment.verify|verify} messages. + * @param message Deployment message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IEntityType, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IDeployment, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an EntityType message from the specified reader or buffer. + * Decodes a Deployment message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns EntityType + * @returns Deployment * @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.EntityType; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.Deployment; /** - * Decodes an EntityType message from the specified reader or buffer, length delimited. + * Decodes a Deployment message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns EntityType + * @returns Deployment * @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.EntityType; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.Deployment; /** - * Verifies an EntityType message. + * Verifies a Deployment 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 EntityType message from a plain object. Also converts values to their respective internal types. + * Creates a Deployment message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns EntityType + * @returns Deployment */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.EntityType; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Deployment; /** - * Creates a plain object from an EntityType message. Also converts values to other types if specified. - * @param message EntityType + * Creates a plain object from a Deployment message. Also converts values to other types if specified. + * @param message Deployment * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.EntityType, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.Deployment, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this EntityType to JSON. + * Converts this Deployment to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for EntityType + * Gets the default type url for Deployment * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace EntityType { + namespace Deployment { - /** Kind enum. */ - enum Kind { - KIND_UNSPECIFIED = 0, - KIND_MAP = 1, - KIND_LIST = 2, - KIND_REGEXP = 3 + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + RUNNING = 1, + SUCCEEDED = 2, + FAILED = 3 } - /** AutoExpansionMode enum. */ - enum AutoExpansionMode { - AUTO_EXPANSION_MODE_UNSPECIFIED = 0, - AUTO_EXPANSION_MODE_DEFAULT = 1 - } + /** Properties of a Result. */ + interface IResult { - /** Properties of an Entity. */ - interface IEntity { - - /** Entity value */ - value?: (string|null); + /** Result deploymentTestResults */ + deploymentTestResults?: (string[]|null); - /** Entity synonyms */ - synonyms?: (string[]|null); + /** Result experiment */ + experiment?: (string|null); } - /** Represents an Entity. */ - class Entity implements IEntity { - - /** - * Constructs a new Entity. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3.EntityType.IEntity); - - /** Entity value. */ - public value: string; - - /** Entity synonyms. */ - public synonyms: string[]; + /** Represents a Result. */ + class Result implements IResult { /** - * Creates a new Entity instance using the specified properties. + * Constructs a new Result. * @param [properties] Properties to set - * @returns Entity instance - */ - public static create(properties?: google.cloud.dialogflow.cx.v3.EntityType.IEntity): google.cloud.dialogflow.cx.v3.EntityType.Entity; - - /** - * Encodes the specified Entity message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.EntityType.Entity.verify|verify} messages. - * @param message Entity message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.cx.v3.EntityType.IEntity, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Entity message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.EntityType.Entity.verify|verify} messages. - * @param message Entity message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.EntityType.IEntity, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Entity message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Entity - * @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.EntityType.Entity; - - /** - * Decodes an Entity message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Entity - * @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.EntityType.Entity; - - /** - * Verifies an Entity 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 Entity message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Entity - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.EntityType.Entity; - - /** - * Creates a plain object from an Entity message. Also converts values to other types if specified. - * @param message Entity - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.cx.v3.EntityType.Entity, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Entity to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Entity - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ExcludedPhrase. */ - interface IExcludedPhrase { - - /** ExcludedPhrase value */ - value?: (string|null); - } - - /** Represents an ExcludedPhrase. */ - class ExcludedPhrase implements IExcludedPhrase { + constructor(properties?: google.cloud.dialogflow.cx.v3.Deployment.IResult); - /** - * Constructs a new ExcludedPhrase. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3.EntityType.IExcludedPhrase); + /** Result deploymentTestResults. */ + public deploymentTestResults: string[]; - /** ExcludedPhrase value. */ - public value: string; + /** Result experiment. */ + public experiment: string; /** - * Creates a new ExcludedPhrase instance using the specified properties. + * Creates a new Result instance using the specified properties. * @param [properties] Properties to set - * @returns ExcludedPhrase instance + * @returns Result instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.EntityType.IExcludedPhrase): google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase; + public static create(properties?: google.cloud.dialogflow.cx.v3.Deployment.IResult): google.cloud.dialogflow.cx.v3.Deployment.Result; /** - * Encodes the specified ExcludedPhrase message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase.verify|verify} messages. - * @param message ExcludedPhrase message or plain object to encode + * Encodes the specified Result message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Deployment.Result.verify|verify} messages. + * @param message Result message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.EntityType.IExcludedPhrase, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.Deployment.IResult, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ExcludedPhrase message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase.verify|verify} messages. - * @param message ExcludedPhrase message or plain object to encode + * Encodes the specified Result message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Deployment.Result.verify|verify} messages. + * @param message Result message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.EntityType.IExcludedPhrase, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.Deployment.IResult, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ExcludedPhrase message from the specified reader or buffer. + * Decodes a Result message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ExcludedPhrase + * @returns Result * @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.EntityType.ExcludedPhrase; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.Deployment.Result; /** - * Decodes an ExcludedPhrase message from the specified reader or buffer, length delimited. + * Decodes a Result message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ExcludedPhrase + * @returns Result * @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.EntityType.ExcludedPhrase; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.Deployment.Result; /** - * Verifies an ExcludedPhrase message. + * Verifies a Result 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 ExcludedPhrase message from a plain object. Also converts values to their respective internal types. + * Creates a Result message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ExcludedPhrase + * @returns Result */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Deployment.Result; /** - * Creates a plain object from an ExcludedPhrase message. Also converts values to other types if specified. - * @param message ExcludedPhrase + * Creates a plain object from a Result message. Also converts values to other types if specified. + * @param message Result * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.Deployment.Result, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ExcludedPhrase to JSON. + * Converts this Result to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ExcludedPhrase + * Gets the default type url for Result * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ @@ -13717,682 +14255,835 @@ export namespace google { } } - /** Properties of an ExportEntityTypesRequest. */ - interface IExportEntityTypesRequest { + /** Properties of a ListDeploymentsRequest. */ + interface IListDeploymentsRequest { - /** ExportEntityTypesRequest parent */ + /** ListDeploymentsRequest parent */ parent?: (string|null); - /** ExportEntityTypesRequest entityTypes */ - entityTypes?: (string[]|null); - - /** ExportEntityTypesRequest entityTypesUri */ - entityTypesUri?: (string|null); - - /** ExportEntityTypesRequest entityTypesContentInline */ - entityTypesContentInline?: (boolean|null); - - /** ExportEntityTypesRequest dataFormat */ - dataFormat?: (google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest.DataFormat|keyof typeof google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest.DataFormat|null); + /** ListDeploymentsRequest pageSize */ + pageSize?: (number|null); - /** ExportEntityTypesRequest languageCode */ - languageCode?: (string|null); + /** ListDeploymentsRequest pageToken */ + pageToken?: (string|null); } - /** Represents an ExportEntityTypesRequest. */ - class ExportEntityTypesRequest implements IExportEntityTypesRequest { + /** Represents a ListDeploymentsRequest. */ + class ListDeploymentsRequest implements IListDeploymentsRequest { /** - * Constructs a new ExportEntityTypesRequest. + * Constructs a new ListDeploymentsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IExportEntityTypesRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3.IListDeploymentsRequest); - /** ExportEntityTypesRequest parent. */ + /** ListDeploymentsRequest parent. */ public parent: string; - /** ExportEntityTypesRequest entityTypes. */ - public entityTypes: string[]; - - /** ExportEntityTypesRequest entityTypesUri. */ - public entityTypesUri?: (string|null); - - /** ExportEntityTypesRequest entityTypesContentInline. */ - public entityTypesContentInline?: (boolean|null); - - /** ExportEntityTypesRequest dataFormat. */ - public dataFormat: (google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest.DataFormat|keyof typeof google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest.DataFormat); - - /** ExportEntityTypesRequest languageCode. */ - public languageCode: string; + /** ListDeploymentsRequest pageSize. */ + public pageSize: number; - /** ExportEntityTypesRequest destination. */ - public destination?: ("entityTypesUri"|"entityTypesContentInline"); + /** ListDeploymentsRequest pageToken. */ + public pageToken: string; /** - * Creates a new ExportEntityTypesRequest instance using the specified properties. + * Creates a new ListDeploymentsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ExportEntityTypesRequest instance + * @returns ListDeploymentsRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IExportEntityTypesRequest): google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3.IListDeploymentsRequest): google.cloud.dialogflow.cx.v3.ListDeploymentsRequest; /** - * Encodes the specified ExportEntityTypesRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest.verify|verify} messages. - * @param message ExportEntityTypesRequest message or plain object to encode + * Encodes the specified ListDeploymentsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListDeploymentsRequest.verify|verify} messages. + * @param message ListDeploymentsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IExportEntityTypesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IListDeploymentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ExportEntityTypesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest.verify|verify} messages. - * @param message ExportEntityTypesRequest message or plain object to encode + * Encodes the specified ListDeploymentsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListDeploymentsRequest.verify|verify} messages. + * @param message ListDeploymentsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IExportEntityTypesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IListDeploymentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ExportEntityTypesRequest message from the specified reader or buffer. + * Decodes a ListDeploymentsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ExportEntityTypesRequest + * @returns ListDeploymentsRequest * @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.ExportEntityTypesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.ListDeploymentsRequest; /** - * Decodes an ExportEntityTypesRequest message from the specified reader or buffer, length delimited. + * Decodes a ListDeploymentsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ExportEntityTypesRequest + * @returns ListDeploymentsRequest * @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.ExportEntityTypesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.ListDeploymentsRequest; /** - * Verifies an ExportEntityTypesRequest message. + * Verifies a ListDeploymentsRequest 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 ExportEntityTypesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListDeploymentsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ExportEntityTypesRequest + * @returns ListDeploymentsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ListDeploymentsRequest; /** - * Creates a plain object from an ExportEntityTypesRequest message. Also converts values to other types if specified. - * @param message ExportEntityTypesRequest + * Creates a plain object from a ListDeploymentsRequest message. Also converts values to other types if specified. + * @param message ListDeploymentsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.ListDeploymentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ExportEntityTypesRequest to JSON. + * Converts this ListDeploymentsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ExportEntityTypesRequest + * Gets the default type url for ListDeploymentsRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace ExportEntityTypesRequest { - - /** DataFormat enum. */ - enum DataFormat { - DATA_FORMAT_UNSPECIFIED = 0, - BLOB = 1, - JSON_PACKAGE = 5 - } - } - - /** Properties of an ExportEntityTypesResponse. */ - interface IExportEntityTypesResponse { + /** Properties of a ListDeploymentsResponse. */ + interface IListDeploymentsResponse { - /** ExportEntityTypesResponse entityTypesUri */ - entityTypesUri?: (string|null); + /** ListDeploymentsResponse deployments */ + deployments?: (google.cloud.dialogflow.cx.v3.IDeployment[]|null); - /** ExportEntityTypesResponse entityTypesContent */ - entityTypesContent?: (google.cloud.dialogflow.cx.v3.IInlineDestination|null); + /** ListDeploymentsResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents an ExportEntityTypesResponse. */ - class ExportEntityTypesResponse implements IExportEntityTypesResponse { + /** Represents a ListDeploymentsResponse. */ + class ListDeploymentsResponse implements IListDeploymentsResponse { /** - * Constructs a new ExportEntityTypesResponse. + * Constructs a new ListDeploymentsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IExportEntityTypesResponse); - - /** ExportEntityTypesResponse entityTypesUri. */ - public entityTypesUri?: (string|null); + constructor(properties?: google.cloud.dialogflow.cx.v3.IListDeploymentsResponse); - /** ExportEntityTypesResponse entityTypesContent. */ - public entityTypesContent?: (google.cloud.dialogflow.cx.v3.IInlineDestination|null); + /** ListDeploymentsResponse deployments. */ + public deployments: google.cloud.dialogflow.cx.v3.IDeployment[]; - /** ExportEntityTypesResponse exportedEntityTypes. */ - public exportedEntityTypes?: ("entityTypesUri"|"entityTypesContent"); + /** ListDeploymentsResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new ExportEntityTypesResponse instance using the specified properties. + * Creates a new ListDeploymentsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ExportEntityTypesResponse instance + * @returns ListDeploymentsResponse instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IExportEntityTypesResponse): google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse; + public static create(properties?: google.cloud.dialogflow.cx.v3.IListDeploymentsResponse): google.cloud.dialogflow.cx.v3.ListDeploymentsResponse; /** - * Encodes the specified ExportEntityTypesResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse.verify|verify} messages. - * @param message ExportEntityTypesResponse message or plain object to encode + * Encodes the specified ListDeploymentsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListDeploymentsResponse.verify|verify} messages. + * @param message ListDeploymentsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IExportEntityTypesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IListDeploymentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ExportEntityTypesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse.verify|verify} messages. - * @param message ExportEntityTypesResponse message or plain object to encode + * Encodes the specified ListDeploymentsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListDeploymentsResponse.verify|verify} messages. + * @param message ListDeploymentsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IExportEntityTypesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IListDeploymentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ExportEntityTypesResponse message from the specified reader or buffer. + * Decodes a ListDeploymentsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ExportEntityTypesResponse + * @returns ListDeploymentsResponse * @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.ExportEntityTypesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.ListDeploymentsResponse; /** - * Decodes an ExportEntityTypesResponse message from the specified reader or buffer, length delimited. + * Decodes a ListDeploymentsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ExportEntityTypesResponse + * @returns ListDeploymentsResponse * @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.ExportEntityTypesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.ListDeploymentsResponse; /** - * Verifies an ExportEntityTypesResponse message. + * Verifies a ListDeploymentsResponse 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 ExportEntityTypesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListDeploymentsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ExportEntityTypesResponse + * @returns ListDeploymentsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ListDeploymentsResponse; /** - * Creates a plain object from an ExportEntityTypesResponse message. Also converts values to other types if specified. - * @param message ExportEntityTypesResponse + * Creates a plain object from a ListDeploymentsResponse message. Also converts values to other types if specified. + * @param message ListDeploymentsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.ListDeploymentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ExportEntityTypesResponse to JSON. + * Converts this ListDeploymentsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ExportEntityTypesResponse + * Gets the default type url for ListDeploymentsResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an ExportEntityTypesMetadata. */ - interface IExportEntityTypesMetadata { + /** Properties of a GetDeploymentRequest. */ + interface IGetDeploymentRequest { + + /** GetDeploymentRequest name */ + name?: (string|null); } - /** Represents an ExportEntityTypesMetadata. */ - class ExportEntityTypesMetadata implements IExportEntityTypesMetadata { + /** Represents a GetDeploymentRequest. */ + class GetDeploymentRequest implements IGetDeploymentRequest { /** - * Constructs a new ExportEntityTypesMetadata. + * Constructs a new GetDeploymentRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IExportEntityTypesMetadata); + constructor(properties?: google.cloud.dialogflow.cx.v3.IGetDeploymentRequest); + + /** GetDeploymentRequest name. */ + public name: string; /** - * Creates a new ExportEntityTypesMetadata instance using the specified properties. + * Creates a new GetDeploymentRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ExportEntityTypesMetadata instance + * @returns GetDeploymentRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IExportEntityTypesMetadata): google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata; + public static create(properties?: google.cloud.dialogflow.cx.v3.IGetDeploymentRequest): google.cloud.dialogflow.cx.v3.GetDeploymentRequest; /** - * Encodes the specified ExportEntityTypesMetadata message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata.verify|verify} messages. - * @param message ExportEntityTypesMetadata message or plain object to encode + * Encodes the specified GetDeploymentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetDeploymentRequest.verify|verify} messages. + * @param message GetDeploymentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IExportEntityTypesMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IGetDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ExportEntityTypesMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata.verify|verify} messages. - * @param message ExportEntityTypesMetadata message or plain object to encode + * Encodes the specified GetDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetDeploymentRequest.verify|verify} messages. + * @param message GetDeploymentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IExportEntityTypesMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IGetDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ExportEntityTypesMetadata message from the specified reader or buffer. + * Decodes a GetDeploymentRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ExportEntityTypesMetadata + * @returns GetDeploymentRequest * @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.ExportEntityTypesMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.GetDeploymentRequest; /** - * Decodes an ExportEntityTypesMetadata message from the specified reader or buffer, length delimited. + * Decodes a GetDeploymentRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ExportEntityTypesMetadata + * @returns GetDeploymentRequest * @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.ExportEntityTypesMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.GetDeploymentRequest; /** - * Verifies an ExportEntityTypesMetadata message. + * Verifies a GetDeploymentRequest 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 ExportEntityTypesMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a GetDeploymentRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ExportEntityTypesMetadata + * @returns GetDeploymentRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.GetDeploymentRequest; /** - * Creates a plain object from an ExportEntityTypesMetadata message. Also converts values to other types if specified. - * @param message ExportEntityTypesMetadata + * Creates a plain object from a GetDeploymentRequest message. Also converts values to other types if specified. + * @param message GetDeploymentRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.GetDeploymentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ExportEntityTypesMetadata to JSON. + * Converts this GetDeploymentRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ExportEntityTypesMetadata + * Gets the default type url for GetDeploymentRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an ImportEntityTypesRequest. */ - interface IImportEntityTypesRequest { - - /** ImportEntityTypesRequest parent */ - parent?: (string|null); - - /** ImportEntityTypesRequest entityTypesUri */ - entityTypesUri?: (string|null); - - /** ImportEntityTypesRequest entityTypesContent */ - entityTypesContent?: (google.cloud.dialogflow.cx.v3.IInlineSource|null); - - /** ImportEntityTypesRequest mergeOption */ - mergeOption?: (google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.MergeOption|keyof typeof google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.MergeOption|null); - - /** ImportEntityTypesRequest targetEntityType */ - targetEntityType?: (string|null); - } - - /** Represents an ImportEntityTypesRequest. */ - class ImportEntityTypesRequest implements IImportEntityTypesRequest { + /** Represents an EntityTypes */ + class EntityTypes extends $protobuf.rpc.Service { /** - * Constructs a new ImportEntityTypesRequest. - * @param [properties] Properties to set + * Constructs a new EntityTypes service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IImportEntityTypesRequest); - - /** ImportEntityTypesRequest parent. */ - public parent: string; - - /** ImportEntityTypesRequest entityTypesUri. */ - public entityTypesUri?: (string|null); - - /** ImportEntityTypesRequest entityTypesContent. */ - public entityTypesContent?: (google.cloud.dialogflow.cx.v3.IInlineSource|null); - - /** ImportEntityTypesRequest mergeOption. */ - public mergeOption: (google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.MergeOption|keyof typeof google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.MergeOption); - - /** ImportEntityTypesRequest targetEntityType. */ - public targetEntityType: string; - - /** ImportEntityTypesRequest entityTypes. */ - public entityTypes?: ("entityTypesUri"|"entityTypesContent"); + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); /** - * Creates a new ImportEntityTypesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ImportEntityTypesRequest instance + * Creates new EntityTypes service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IImportEntityTypesRequest): google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest; + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): EntityTypes; /** - * Encodes the specified ImportEntityTypesRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.verify|verify} messages. - * @param message ImportEntityTypesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls GetEntityType. + * @param request GetEntityTypeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and EntityType */ - public static encode(message: google.cloud.dialogflow.cx.v3.IImportEntityTypesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public getEntityType(request: google.cloud.dialogflow.cx.v3.IGetEntityTypeRequest, callback: google.cloud.dialogflow.cx.v3.EntityTypes.GetEntityTypeCallback): void; /** - * Encodes the specified ImportEntityTypesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.verify|verify} messages. - * @param message ImportEntityTypesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls GetEntityType. + * @param request GetEntityTypeRequest message or plain object + * @returns Promise */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IImportEntityTypesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public getEntityType(request: google.cloud.dialogflow.cx.v3.IGetEntityTypeRequest): Promise; /** - * Decodes an ImportEntityTypesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ImportEntityTypesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls CreateEntityType. + * @param request CreateEntityTypeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and EntityType */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest; + public createEntityType(request: google.cloud.dialogflow.cx.v3.ICreateEntityTypeRequest, callback: google.cloud.dialogflow.cx.v3.EntityTypes.CreateEntityTypeCallback): void; /** - * Decodes an ImportEntityTypesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ImportEntityTypesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls CreateEntityType. + * @param request CreateEntityTypeRequest message or plain object + * @returns Promise */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest; + public createEntityType(request: google.cloud.dialogflow.cx.v3.ICreateEntityTypeRequest): Promise; /** - * Verifies an ImportEntityTypesRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls UpdateEntityType. + * @param request UpdateEntityTypeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and EntityType */ - public static verify(message: { [k: string]: any }): (string|null); + public updateEntityType(request: google.cloud.dialogflow.cx.v3.IUpdateEntityTypeRequest, callback: google.cloud.dialogflow.cx.v3.EntityTypes.UpdateEntityTypeCallback): void; /** - * Creates an ImportEntityTypesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ImportEntityTypesRequest + * Calls UpdateEntityType. + * @param request UpdateEntityTypeRequest message or plain object + * @returns Promise */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest; + public updateEntityType(request: google.cloud.dialogflow.cx.v3.IUpdateEntityTypeRequest): Promise; /** - * Creates a plain object from an ImportEntityTypesRequest message. Also converts values to other types if specified. - * @param message ImportEntityTypesRequest - * @param [options] Conversion options - * @returns Plain object + * Calls DeleteEntityType. + * @param request DeleteEntityTypeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty */ - public static toObject(message: google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public deleteEntityType(request: google.cloud.dialogflow.cx.v3.IDeleteEntityTypeRequest, callback: google.cloud.dialogflow.cx.v3.EntityTypes.DeleteEntityTypeCallback): void; /** - * Converts this ImportEntityTypesRequest to JSON. - * @returns JSON object + * Calls DeleteEntityType. + * @param request DeleteEntityTypeRequest message or plain object + * @returns Promise */ - public toJSON(): { [k: string]: any }; + public deleteEntityType(request: google.cloud.dialogflow.cx.v3.IDeleteEntityTypeRequest): Promise; /** - * Gets the default type url for ImportEntityTypesRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url + * Calls ListEntityTypes. + * @param request ListEntityTypesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListEntityTypesResponse */ - public static getTypeUrl(typeUrlPrefix?: string): string; + public listEntityTypes(request: google.cloud.dialogflow.cx.v3.IListEntityTypesRequest, callback: google.cloud.dialogflow.cx.v3.EntityTypes.ListEntityTypesCallback): void; + + /** + * Calls ListEntityTypes. + * @param request ListEntityTypesRequest message or plain object + * @returns Promise + */ + public listEntityTypes(request: google.cloud.dialogflow.cx.v3.IListEntityTypesRequest): Promise; + + /** + * Calls ExportEntityTypes. + * @param request ExportEntityTypesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public exportEntityTypes(request: google.cloud.dialogflow.cx.v3.IExportEntityTypesRequest, callback: google.cloud.dialogflow.cx.v3.EntityTypes.ExportEntityTypesCallback): void; + + /** + * Calls ExportEntityTypes. + * @param request ExportEntityTypesRequest message or plain object + * @returns Promise + */ + public exportEntityTypes(request: google.cloud.dialogflow.cx.v3.IExportEntityTypesRequest): Promise; + + /** + * Calls ImportEntityTypes. + * @param request ImportEntityTypesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public importEntityTypes(request: google.cloud.dialogflow.cx.v3.IImportEntityTypesRequest, callback: google.cloud.dialogflow.cx.v3.EntityTypes.ImportEntityTypesCallback): void; + + /** + * Calls ImportEntityTypes. + * @param request ImportEntityTypesRequest message or plain object + * @returns Promise + */ + public importEntityTypes(request: google.cloud.dialogflow.cx.v3.IImportEntityTypesRequest): Promise; } - namespace ImportEntityTypesRequest { + namespace EntityTypes { - /** MergeOption enum. */ - enum MergeOption { - MERGE_OPTION_UNSPECIFIED = 0, - REPLACE = 1, - MERGE = 2, - RENAME = 3, - REPORT_CONFLICT = 4, - KEEP = 5 - } + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.EntityTypes|getEntityType}. + * @param error Error, if any + * @param [response] EntityType + */ + type GetEntityTypeCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.EntityType) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.EntityTypes|createEntityType}. + * @param error Error, if any + * @param [response] EntityType + */ + type CreateEntityTypeCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.EntityType) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.EntityTypes|updateEntityType}. + * @param error Error, if any + * @param [response] EntityType + */ + type UpdateEntityTypeCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.EntityType) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.EntityTypes|deleteEntityType}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteEntityTypeCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.EntityTypes|listEntityTypes}. + * @param error Error, if any + * @param [response] ListEntityTypesResponse + */ + type ListEntityTypesCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.ListEntityTypesResponse) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.EntityTypes|exportEntityTypes}. + * @param error Error, if any + * @param [response] Operation + */ + type ExportEntityTypesCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.EntityTypes|importEntityTypes}. + * @param error Error, if any + * @param [response] Operation + */ + type ImportEntityTypesCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; } - /** Properties of an ImportEntityTypesResponse. */ - interface IImportEntityTypesResponse { + /** Properties of an EntityType. */ + interface IEntityType { - /** ImportEntityTypesResponse entityTypes */ - entityTypes?: (string[]|null); + /** EntityType name */ + name?: (string|null); - /** ImportEntityTypesResponse conflictingResources */ - conflictingResources?: (google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.IConflictingResources|null); + /** EntityType displayName */ + displayName?: (string|null); + + /** EntityType kind */ + kind?: (google.cloud.dialogflow.cx.v3.EntityType.Kind|keyof typeof google.cloud.dialogflow.cx.v3.EntityType.Kind|null); + + /** EntityType autoExpansionMode */ + autoExpansionMode?: (google.cloud.dialogflow.cx.v3.EntityType.AutoExpansionMode|keyof typeof google.cloud.dialogflow.cx.v3.EntityType.AutoExpansionMode|null); + + /** EntityType entities */ + entities?: (google.cloud.dialogflow.cx.v3.EntityType.IEntity[]|null); + + /** EntityType excludedPhrases */ + excludedPhrases?: (google.cloud.dialogflow.cx.v3.EntityType.IExcludedPhrase[]|null); + + /** EntityType enableFuzzyExtraction */ + enableFuzzyExtraction?: (boolean|null); + + /** EntityType redact */ + redact?: (boolean|null); } - /** Represents an ImportEntityTypesResponse. */ - class ImportEntityTypesResponse implements IImportEntityTypesResponse { + /** Represents an EntityType. */ + class EntityType implements IEntityType { /** - * Constructs a new ImportEntityTypesResponse. + * Constructs a new EntityType. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IImportEntityTypesResponse); + constructor(properties?: google.cloud.dialogflow.cx.v3.IEntityType); - /** ImportEntityTypesResponse entityTypes. */ - public entityTypes: string[]; + /** EntityType name. */ + public name: string; - /** ImportEntityTypesResponse conflictingResources. */ - public conflictingResources?: (google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.IConflictingResources|null); + /** EntityType displayName. */ + public displayName: string; + + /** EntityType kind. */ + public kind: (google.cloud.dialogflow.cx.v3.EntityType.Kind|keyof typeof google.cloud.dialogflow.cx.v3.EntityType.Kind); + + /** EntityType autoExpansionMode. */ + public autoExpansionMode: (google.cloud.dialogflow.cx.v3.EntityType.AutoExpansionMode|keyof typeof google.cloud.dialogflow.cx.v3.EntityType.AutoExpansionMode); + + /** EntityType entities. */ + public entities: google.cloud.dialogflow.cx.v3.EntityType.IEntity[]; + + /** EntityType excludedPhrases. */ + public excludedPhrases: google.cloud.dialogflow.cx.v3.EntityType.IExcludedPhrase[]; + + /** EntityType enableFuzzyExtraction. */ + public enableFuzzyExtraction: boolean; + + /** EntityType redact. */ + public redact: boolean; /** - * Creates a new ImportEntityTypesResponse instance using the specified properties. + * Creates a new EntityType instance using the specified properties. * @param [properties] Properties to set - * @returns ImportEntityTypesResponse instance + * @returns EntityType instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IImportEntityTypesResponse): google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse; + public static create(properties?: google.cloud.dialogflow.cx.v3.IEntityType): google.cloud.dialogflow.cx.v3.EntityType; /** - * Encodes the specified ImportEntityTypesResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.verify|verify} messages. - * @param message ImportEntityTypesResponse message or plain object to encode + * Encodes the specified EntityType message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.EntityType.verify|verify} messages. + * @param message EntityType message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IImportEntityTypesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IEntityType, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ImportEntityTypesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.verify|verify} messages. - * @param message ImportEntityTypesResponse message or plain object to encode + * Encodes the specified EntityType message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.EntityType.verify|verify} messages. + * @param message EntityType message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IImportEntityTypesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IEntityType, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ImportEntityTypesResponse message from the specified reader or buffer. + * Decodes an EntityType message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ImportEntityTypesResponse + * @returns EntityType * @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.ImportEntityTypesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.EntityType; /** - * Decodes an ImportEntityTypesResponse message from the specified reader or buffer, length delimited. + * Decodes an EntityType message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ImportEntityTypesResponse + * @returns EntityType * @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.ImportEntityTypesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.EntityType; /** - * Verifies an ImportEntityTypesResponse message. + * Verifies an EntityType 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 ImportEntityTypesResponse message from a plain object. Also converts values to their respective internal types. + * Creates an EntityType message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ImportEntityTypesResponse + * @returns EntityType */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.EntityType; /** - * Creates a plain object from an ImportEntityTypesResponse message. Also converts values to other types if specified. - * @param message ImportEntityTypesResponse + * Creates a plain object from an EntityType message. Also converts values to other types if specified. + * @param message EntityType * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.EntityType, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ImportEntityTypesResponse to JSON. + * Converts this EntityType to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ImportEntityTypesResponse + * Gets the default type url for EntityType * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace ImportEntityTypesResponse { + namespace EntityType { - /** Properties of a ConflictingResources. */ - interface IConflictingResources { + /** Kind enum. */ + enum Kind { + KIND_UNSPECIFIED = 0, + KIND_MAP = 1, + KIND_LIST = 2, + KIND_REGEXP = 3 + } - /** ConflictingResources entityTypeDisplayNames */ - entityTypeDisplayNames?: (string[]|null); + /** AutoExpansionMode enum. */ + enum AutoExpansionMode { + AUTO_EXPANSION_MODE_UNSPECIFIED = 0, + AUTO_EXPANSION_MODE_DEFAULT = 1 + } - /** ConflictingResources entityDisplayNames */ - entityDisplayNames?: (string[]|null); + /** Properties of an Entity. */ + interface IEntity { + + /** Entity value */ + value?: (string|null); + + /** Entity synonyms */ + synonyms?: (string[]|null); } - /** Represents a ConflictingResources. */ - class ConflictingResources implements IConflictingResources { + /** Represents an Entity. */ + class Entity implements IEntity { /** - * Constructs a new ConflictingResources. + * Constructs a new Entity. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.IConflictingResources); + constructor(properties?: google.cloud.dialogflow.cx.v3.EntityType.IEntity); - /** ConflictingResources entityTypeDisplayNames. */ - public entityTypeDisplayNames: string[]; + /** Entity value. */ + public value: string; - /** ConflictingResources entityDisplayNames. */ - public entityDisplayNames: string[]; + /** Entity synonyms. */ + public synonyms: string[]; /** - * Creates a new ConflictingResources instance using the specified properties. + * Creates a new Entity instance using the specified properties. * @param [properties] Properties to set - * @returns ConflictingResources instance + * @returns Entity instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.IConflictingResources): google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources; + public static create(properties?: google.cloud.dialogflow.cx.v3.EntityType.IEntity): google.cloud.dialogflow.cx.v3.EntityType.Entity; /** - * Encodes the specified ConflictingResources message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources.verify|verify} messages. - * @param message ConflictingResources message or plain object to encode + * Encodes the specified Entity message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.EntityType.Entity.verify|verify} messages. + * @param message Entity message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.IConflictingResources, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.EntityType.IEntity, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ConflictingResources message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources.verify|verify} messages. - * @param message ConflictingResources message or plain object to encode + * Encodes the specified Entity message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.EntityType.Entity.verify|verify} messages. + * @param message Entity message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.IConflictingResources, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.EntityType.IEntity, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ConflictingResources message from the specified reader or buffer. + * Decodes an Entity message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ConflictingResources + * @returns Entity * @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.ImportEntityTypesResponse.ConflictingResources; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.EntityType.Entity; /** - * Decodes a ConflictingResources message from the specified reader or buffer, length delimited. + * Decodes an Entity message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ConflictingResources + * @returns Entity * @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.ImportEntityTypesResponse.ConflictingResources; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.EntityType.Entity; /** - * Verifies a ConflictingResources message. + * Verifies an Entity 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 ConflictingResources message from a plain object. Also converts values to their respective internal types. + * Creates an Entity message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ConflictingResources + * @returns Entity */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.EntityType.Entity; /** - * Creates a plain object from a ConflictingResources message. Also converts values to other types if specified. - * @param message ConflictingResources + * Creates a plain object from an Entity message. Also converts values to other types if specified. + * @param message Entity * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.EntityType.Entity, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ConflictingResources to JSON. + * Converts this Entity to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ConflictingResources + * Gets the default type url for Entity + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ExcludedPhrase. */ + interface IExcludedPhrase { + + /** ExcludedPhrase value */ + value?: (string|null); + } + + /** Represents an ExcludedPhrase. */ + class ExcludedPhrase implements IExcludedPhrase { + + /** + * Constructs a new ExcludedPhrase. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.EntityType.IExcludedPhrase); + + /** ExcludedPhrase value. */ + public value: string; + + /** + * Creates a new ExcludedPhrase instance using the specified properties. + * @param [properties] Properties to set + * @returns ExcludedPhrase instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.EntityType.IExcludedPhrase): google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase; + + /** + * Encodes the specified ExcludedPhrase message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase.verify|verify} messages. + * @param message ExcludedPhrase message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.EntityType.IExcludedPhrase, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExcludedPhrase message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase.verify|verify} messages. + * @param message ExcludedPhrase message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.EntityType.IExcludedPhrase, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExcludedPhrase message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExcludedPhrase + * @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.EntityType.ExcludedPhrase; + + /** + * Decodes an ExcludedPhrase message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExcludedPhrase + * @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.EntityType.ExcludedPhrase; + + /** + * Verifies an ExcludedPhrase 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 ExcludedPhrase message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExcludedPhrase + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase; + + /** + * Creates a plain object from an ExcludedPhrase message. Also converts values to other types if specified. + * @param message ExcludedPhrase + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExcludedPhrase to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExcludedPhrase * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ @@ -14400,1036 +15091,1719 @@ export namespace google { } } - /** Properties of an ImportEntityTypesMetadata. */ - interface IImportEntityTypesMetadata { + /** Properties of an ExportEntityTypesRequest. */ + interface IExportEntityTypesRequest { + + /** ExportEntityTypesRequest parent */ + parent?: (string|null); + + /** ExportEntityTypesRequest entityTypes */ + entityTypes?: (string[]|null); + + /** ExportEntityTypesRequest entityTypesUri */ + entityTypesUri?: (string|null); + + /** ExportEntityTypesRequest entityTypesContentInline */ + entityTypesContentInline?: (boolean|null); + + /** ExportEntityTypesRequest dataFormat */ + dataFormat?: (google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest.DataFormat|keyof typeof google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest.DataFormat|null); + + /** ExportEntityTypesRequest languageCode */ + languageCode?: (string|null); } - /** Represents an ImportEntityTypesMetadata. */ - class ImportEntityTypesMetadata implements IImportEntityTypesMetadata { + /** Represents an ExportEntityTypesRequest. */ + class ExportEntityTypesRequest implements IExportEntityTypesRequest { /** - * Constructs a new ImportEntityTypesMetadata. + * Constructs a new ExportEntityTypesRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IImportEntityTypesMetadata); + constructor(properties?: google.cloud.dialogflow.cx.v3.IExportEntityTypesRequest); + + /** ExportEntityTypesRequest parent. */ + public parent: string; + + /** ExportEntityTypesRequest entityTypes. */ + public entityTypes: string[]; + + /** ExportEntityTypesRequest entityTypesUri. */ + public entityTypesUri?: (string|null); + + /** ExportEntityTypesRequest entityTypesContentInline. */ + public entityTypesContentInline?: (boolean|null); + + /** ExportEntityTypesRequest dataFormat. */ + public dataFormat: (google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest.DataFormat|keyof typeof google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest.DataFormat); + + /** ExportEntityTypesRequest languageCode. */ + public languageCode: string; + + /** ExportEntityTypesRequest destination. */ + public destination?: ("entityTypesUri"|"entityTypesContentInline"); /** - * Creates a new ImportEntityTypesMetadata instance using the specified properties. + * Creates a new ExportEntityTypesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ImportEntityTypesMetadata instance + * @returns ExportEntityTypesRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IImportEntityTypesMetadata): google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata; + public static create(properties?: google.cloud.dialogflow.cx.v3.IExportEntityTypesRequest): google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest; /** - * Encodes the specified ImportEntityTypesMetadata message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata.verify|verify} messages. - * @param message ImportEntityTypesMetadata message or plain object to encode + * Encodes the specified ExportEntityTypesRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest.verify|verify} messages. + * @param message ExportEntityTypesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IImportEntityTypesMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IExportEntityTypesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ImportEntityTypesMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata.verify|verify} messages. - * @param message ImportEntityTypesMetadata message or plain object to encode + * Encodes the specified ExportEntityTypesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest.verify|verify} messages. + * @param message ExportEntityTypesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IImportEntityTypesMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IExportEntityTypesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ImportEntityTypesMetadata message from the specified reader or buffer. + * Decodes an ExportEntityTypesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ImportEntityTypesMetadata + * @returns ExportEntityTypesRequest * @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.ImportEntityTypesMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest; /** - * Decodes an ImportEntityTypesMetadata message from the specified reader or buffer, length delimited. + * Decodes an ExportEntityTypesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ImportEntityTypesMetadata + * @returns ExportEntityTypesRequest * @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.ImportEntityTypesMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest; /** - * Verifies an ImportEntityTypesMetadata message. + * Verifies an ExportEntityTypesRequest 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 ImportEntityTypesMetadata message from a plain object. Also converts values to their respective internal types. + * Creates an ExportEntityTypesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ImportEntityTypesMetadata + * @returns ExportEntityTypesRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest; /** - * Creates a plain object from an ImportEntityTypesMetadata message. Also converts values to other types if specified. - * @param message ImportEntityTypesMetadata + * Creates a plain object from an ExportEntityTypesRequest message. Also converts values to other types if specified. + * @param message ExportEntityTypesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ImportEntityTypesMetadata to JSON. + * Converts this ExportEntityTypesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ImportEntityTypesMetadata + * Gets the default type url for ExportEntityTypesRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListEntityTypesRequest. */ - interface IListEntityTypesRequest { + namespace ExportEntityTypesRequest { - /** ListEntityTypesRequest parent */ - parent?: (string|null); + /** DataFormat enum. */ + enum DataFormat { + DATA_FORMAT_UNSPECIFIED = 0, + BLOB = 1, + JSON_PACKAGE = 5 + } + } - /** ListEntityTypesRequest languageCode */ - languageCode?: (string|null); + /** Properties of an ExportEntityTypesResponse. */ + interface IExportEntityTypesResponse { - /** ListEntityTypesRequest pageSize */ - pageSize?: (number|null); + /** ExportEntityTypesResponse entityTypesUri */ + entityTypesUri?: (string|null); - /** ListEntityTypesRequest pageToken */ - pageToken?: (string|null); + /** ExportEntityTypesResponse entityTypesContent */ + entityTypesContent?: (google.cloud.dialogflow.cx.v3.IInlineDestination|null); } - /** Represents a ListEntityTypesRequest. */ - class ListEntityTypesRequest implements IListEntityTypesRequest { + /** Represents an ExportEntityTypesResponse. */ + class ExportEntityTypesResponse implements IExportEntityTypesResponse { /** - * Constructs a new ListEntityTypesRequest. + * Constructs a new ExportEntityTypesResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IListEntityTypesRequest); - - /** ListEntityTypesRequest parent. */ - public parent: string; + constructor(properties?: google.cloud.dialogflow.cx.v3.IExportEntityTypesResponse); - /** ListEntityTypesRequest languageCode. */ - public languageCode: string; + /** ExportEntityTypesResponse entityTypesUri. */ + public entityTypesUri?: (string|null); - /** ListEntityTypesRequest pageSize. */ - public pageSize: number; + /** ExportEntityTypesResponse entityTypesContent. */ + public entityTypesContent?: (google.cloud.dialogflow.cx.v3.IInlineDestination|null); - /** ListEntityTypesRequest pageToken. */ - public pageToken: string; + /** ExportEntityTypesResponse exportedEntityTypes. */ + public exportedEntityTypes?: ("entityTypesUri"|"entityTypesContent"); /** - * Creates a new ListEntityTypesRequest instance using the specified properties. + * Creates a new ExportEntityTypesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ListEntityTypesRequest instance + * @returns ExportEntityTypesResponse instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IListEntityTypesRequest): google.cloud.dialogflow.cx.v3.ListEntityTypesRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3.IExportEntityTypesResponse): google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse; /** - * Encodes the specified ListEntityTypesRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListEntityTypesRequest.verify|verify} messages. - * @param message ListEntityTypesRequest message or plain object to encode + * Encodes the specified ExportEntityTypesResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse.verify|verify} messages. + * @param message ExportEntityTypesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IListEntityTypesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IExportEntityTypesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListEntityTypesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListEntityTypesRequest.verify|verify} messages. - * @param message ListEntityTypesRequest message or plain object to encode + * Encodes the specified ExportEntityTypesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse.verify|verify} messages. + * @param message ExportEntityTypesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IListEntityTypesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IExportEntityTypesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListEntityTypesRequest message from the specified reader or buffer. + * Decodes an ExportEntityTypesResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListEntityTypesRequest + * @returns ExportEntityTypesResponse * @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.ListEntityTypesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse; /** - * Decodes a ListEntityTypesRequest message from the specified reader or buffer, length delimited. + * Decodes an ExportEntityTypesResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListEntityTypesRequest + * @returns ExportEntityTypesResponse * @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.ListEntityTypesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse; /** - * Verifies a ListEntityTypesRequest message. + * Verifies an ExportEntityTypesResponse 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 ListEntityTypesRequest message from a plain object. Also converts values to their respective internal types. + * Creates an ExportEntityTypesResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListEntityTypesRequest + * @returns ExportEntityTypesResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ListEntityTypesRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse; /** - * Creates a plain object from a ListEntityTypesRequest message. Also converts values to other types if specified. - * @param message ListEntityTypesRequest + * Creates a plain object from an ExportEntityTypesResponse message. Also converts values to other types if specified. + * @param message ExportEntityTypesResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.ListEntityTypesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListEntityTypesRequest to JSON. + * Converts this ExportEntityTypesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListEntityTypesRequest + * Gets the default type url for ExportEntityTypesResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListEntityTypesResponse. */ - interface IListEntityTypesResponse { - - /** ListEntityTypesResponse entityTypes */ - entityTypes?: (google.cloud.dialogflow.cx.v3.IEntityType[]|null); - - /** ListEntityTypesResponse nextPageToken */ - nextPageToken?: (string|null); + /** Properties of an ExportEntityTypesMetadata. */ + interface IExportEntityTypesMetadata { } - /** Represents a ListEntityTypesResponse. */ - class ListEntityTypesResponse implements IListEntityTypesResponse { + /** Represents an ExportEntityTypesMetadata. */ + class ExportEntityTypesMetadata implements IExportEntityTypesMetadata { /** - * Constructs a new ListEntityTypesResponse. + * Constructs a new ExportEntityTypesMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IListEntityTypesResponse); - - /** ListEntityTypesResponse entityTypes. */ - public entityTypes: google.cloud.dialogflow.cx.v3.IEntityType[]; - - /** ListEntityTypesResponse nextPageToken. */ - public nextPageToken: string; + constructor(properties?: google.cloud.dialogflow.cx.v3.IExportEntityTypesMetadata); /** - * Creates a new ListEntityTypesResponse instance using the specified properties. + * Creates a new ExportEntityTypesMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns ListEntityTypesResponse instance + * @returns ExportEntityTypesMetadata instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IListEntityTypesResponse): google.cloud.dialogflow.cx.v3.ListEntityTypesResponse; + public static create(properties?: google.cloud.dialogflow.cx.v3.IExportEntityTypesMetadata): google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata; /** - * Encodes the specified ListEntityTypesResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListEntityTypesResponse.verify|verify} messages. - * @param message ListEntityTypesResponse message or plain object to encode + * Encodes the specified ExportEntityTypesMetadata message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata.verify|verify} messages. + * @param message ExportEntityTypesMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IListEntityTypesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IExportEntityTypesMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListEntityTypesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListEntityTypesResponse.verify|verify} messages. - * @param message ListEntityTypesResponse message or plain object to encode + * Encodes the specified ExportEntityTypesMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata.verify|verify} messages. + * @param message ExportEntityTypesMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IListEntityTypesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IExportEntityTypesMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListEntityTypesResponse message from the specified reader or buffer. + * Decodes an ExportEntityTypesMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListEntityTypesResponse + * @returns ExportEntityTypesMetadata * @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.ListEntityTypesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata; /** - * Decodes a ListEntityTypesResponse message from the specified reader or buffer, length delimited. + * Decodes an ExportEntityTypesMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListEntityTypesResponse + * @returns ExportEntityTypesMetadata * @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.ListEntityTypesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata; /** - * Verifies a ListEntityTypesResponse message. + * Verifies an ExportEntityTypesMetadata 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 ListEntityTypesResponse message from a plain object. Also converts values to their respective internal types. + * Creates an ExportEntityTypesMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListEntityTypesResponse + * @returns ExportEntityTypesMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ListEntityTypesResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata; /** - * Creates a plain object from a ListEntityTypesResponse message. Also converts values to other types if specified. - * @param message ListEntityTypesResponse + * Creates a plain object from an ExportEntityTypesMetadata message. Also converts values to other types if specified. + * @param message ExportEntityTypesMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.ListEntityTypesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListEntityTypesResponse to JSON. + * Converts this ExportEntityTypesMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListEntityTypesResponse + * Gets the default type url for ExportEntityTypesMetadata * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GetEntityTypeRequest. */ - interface IGetEntityTypeRequest { + /** Properties of an ImportEntityTypesRequest. */ + interface IImportEntityTypesRequest { - /** GetEntityTypeRequest name */ - name?: (string|null); + /** ImportEntityTypesRequest parent */ + parent?: (string|null); - /** GetEntityTypeRequest languageCode */ - languageCode?: (string|null); + /** ImportEntityTypesRequest entityTypesUri */ + entityTypesUri?: (string|null); + + /** ImportEntityTypesRequest entityTypesContent */ + entityTypesContent?: (google.cloud.dialogflow.cx.v3.IInlineSource|null); + + /** ImportEntityTypesRequest mergeOption */ + mergeOption?: (google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.MergeOption|keyof typeof google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.MergeOption|null); + + /** ImportEntityTypesRequest targetEntityType */ + targetEntityType?: (string|null); } - /** Represents a GetEntityTypeRequest. */ - class GetEntityTypeRequest implements IGetEntityTypeRequest { + /** Represents an ImportEntityTypesRequest. */ + class ImportEntityTypesRequest implements IImportEntityTypesRequest { /** - * Constructs a new GetEntityTypeRequest. + * Constructs a new ImportEntityTypesRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IGetEntityTypeRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3.IImportEntityTypesRequest); - /** GetEntityTypeRequest name. */ - public name: string; + /** ImportEntityTypesRequest parent. */ + public parent: string; - /** GetEntityTypeRequest languageCode. */ - public languageCode: string; + /** ImportEntityTypesRequest entityTypesUri. */ + public entityTypesUri?: (string|null); + + /** ImportEntityTypesRequest entityTypesContent. */ + public entityTypesContent?: (google.cloud.dialogflow.cx.v3.IInlineSource|null); + + /** ImportEntityTypesRequest mergeOption. */ + public mergeOption: (google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.MergeOption|keyof typeof google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.MergeOption); + + /** ImportEntityTypesRequest targetEntityType. */ + public targetEntityType: string; + + /** ImportEntityTypesRequest entityTypes. */ + public entityTypes?: ("entityTypesUri"|"entityTypesContent"); /** - * Creates a new GetEntityTypeRequest instance using the specified properties. + * Creates a new ImportEntityTypesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetEntityTypeRequest instance + * @returns ImportEntityTypesRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IGetEntityTypeRequest): google.cloud.dialogflow.cx.v3.GetEntityTypeRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3.IImportEntityTypesRequest): google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest; /** - * Encodes the specified GetEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetEntityTypeRequest.verify|verify} messages. - * @param message GetEntityTypeRequest message or plain object to encode + * Encodes the specified ImportEntityTypesRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.verify|verify} messages. + * @param message ImportEntityTypesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IGetEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IImportEntityTypesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetEntityTypeRequest.verify|verify} messages. - * @param message GetEntityTypeRequest message or plain object to encode + * Encodes the specified ImportEntityTypesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.verify|verify} messages. + * @param message ImportEntityTypesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IGetEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IImportEntityTypesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetEntityTypeRequest message from the specified reader or buffer. + * Decodes an ImportEntityTypesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetEntityTypeRequest + * @returns ImportEntityTypesRequest * @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.GetEntityTypeRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest; /** - * Decodes a GetEntityTypeRequest message from the specified reader or buffer, length delimited. + * Decodes an ImportEntityTypesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetEntityTypeRequest + * @returns ImportEntityTypesRequest * @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.GetEntityTypeRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest; /** - * Verifies a GetEntityTypeRequest message. + * Verifies an ImportEntityTypesRequest 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 GetEntityTypeRequest message from a plain object. Also converts values to their respective internal types. + * Creates an ImportEntityTypesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetEntityTypeRequest + * @returns ImportEntityTypesRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.GetEntityTypeRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest; /** - * Creates a plain object from a GetEntityTypeRequest message. Also converts values to other types if specified. - * @param message GetEntityTypeRequest + * Creates a plain object from an ImportEntityTypesRequest message. Also converts values to other types if specified. + * @param message ImportEntityTypesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.GetEntityTypeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetEntityTypeRequest to JSON. + * Converts this ImportEntityTypesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GetEntityTypeRequest + * Gets the default type url for ImportEntityTypesRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CreateEntityTypeRequest. */ - interface ICreateEntityTypeRequest { + namespace ImportEntityTypesRequest { - /** CreateEntityTypeRequest parent */ - parent?: (string|null); + /** MergeOption enum. */ + enum MergeOption { + MERGE_OPTION_UNSPECIFIED = 0, + REPLACE = 1, + MERGE = 2, + RENAME = 3, + REPORT_CONFLICT = 4, + KEEP = 5 + } + } - /** CreateEntityTypeRequest entityType */ - entityType?: (google.cloud.dialogflow.cx.v3.IEntityType|null); + /** Properties of an ImportEntityTypesResponse. */ + interface IImportEntityTypesResponse { - /** CreateEntityTypeRequest languageCode */ - languageCode?: (string|null); + /** ImportEntityTypesResponse entityTypes */ + entityTypes?: (string[]|null); + + /** ImportEntityTypesResponse conflictingResources */ + conflictingResources?: (google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.IConflictingResources|null); } - /** Represents a CreateEntityTypeRequest. */ - class CreateEntityTypeRequest implements ICreateEntityTypeRequest { + /** Represents an ImportEntityTypesResponse. */ + class ImportEntityTypesResponse implements IImportEntityTypesResponse { /** - * Constructs a new CreateEntityTypeRequest. + * Constructs a new ImportEntityTypesResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.ICreateEntityTypeRequest); - - /** CreateEntityTypeRequest parent. */ - public parent: string; + constructor(properties?: google.cloud.dialogflow.cx.v3.IImportEntityTypesResponse); - /** CreateEntityTypeRequest entityType. */ - public entityType?: (google.cloud.dialogflow.cx.v3.IEntityType|null); + /** ImportEntityTypesResponse entityTypes. */ + public entityTypes: string[]; - /** CreateEntityTypeRequest languageCode. */ - public languageCode: string; + /** ImportEntityTypesResponse conflictingResources. */ + public conflictingResources?: (google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.IConflictingResources|null); /** - * Creates a new CreateEntityTypeRequest instance using the specified properties. + * Creates a new ImportEntityTypesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns CreateEntityTypeRequest instance + * @returns ImportEntityTypesResponse instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.ICreateEntityTypeRequest): google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3.IImportEntityTypesResponse): google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse; /** - * Encodes the specified CreateEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest.verify|verify} messages. - * @param message CreateEntityTypeRequest message or plain object to encode + * Encodes the specified ImportEntityTypesResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.verify|verify} messages. + * @param message ImportEntityTypesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.ICreateEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IImportEntityTypesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest.verify|verify} messages. - * @param message CreateEntityTypeRequest message or plain object to encode + * Encodes the specified ImportEntityTypesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.verify|verify} messages. + * @param message ImportEntityTypesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ICreateEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IImportEntityTypesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateEntityTypeRequest message from the specified reader or buffer. + * Decodes an ImportEntityTypesResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateEntityTypeRequest + * @returns ImportEntityTypesResponse * @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.CreateEntityTypeRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse; /** - * Decodes a CreateEntityTypeRequest message from the specified reader or buffer, length delimited. + * Decodes an ImportEntityTypesResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateEntityTypeRequest + * @returns ImportEntityTypesResponse * @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.CreateEntityTypeRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse; /** - * Verifies a CreateEntityTypeRequest message. + * Verifies an ImportEntityTypesResponse 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 CreateEntityTypeRequest message from a plain object. Also converts values to their respective internal types. + * Creates an ImportEntityTypesResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateEntityTypeRequest + * @returns ImportEntityTypesResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse; /** - * Creates a plain object from a CreateEntityTypeRequest message. Also converts values to other types if specified. - * @param message CreateEntityTypeRequest + * Creates a plain object from an ImportEntityTypesResponse message. Also converts values to other types if specified. + * @param message ImportEntityTypesResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateEntityTypeRequest to JSON. + * Converts this ImportEntityTypesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CreateEntityTypeRequest + * Gets the default type url for ImportEntityTypesResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an UpdateEntityTypeRequest. */ - interface IUpdateEntityTypeRequest { + namespace ImportEntityTypesResponse { - /** UpdateEntityTypeRequest entityType */ - entityType?: (google.cloud.dialogflow.cx.v3.IEntityType|null); + /** Properties of a ConflictingResources. */ + interface IConflictingResources { - /** UpdateEntityTypeRequest languageCode */ - languageCode?: (string|null); + /** ConflictingResources entityTypeDisplayNames */ + entityTypeDisplayNames?: (string[]|null); - /** UpdateEntityTypeRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - } + /** ConflictingResources entityDisplayNames */ + entityDisplayNames?: (string[]|null); + } - /** Represents an UpdateEntityTypeRequest. */ - class UpdateEntityTypeRequest implements IUpdateEntityTypeRequest { + /** Represents a ConflictingResources. */ + class ConflictingResources implements IConflictingResources { - /** - * Constructs a new UpdateEntityTypeRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IUpdateEntityTypeRequest); + /** + * Constructs a new ConflictingResources. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.IConflictingResources); - /** UpdateEntityTypeRequest entityType. */ - public entityType?: (google.cloud.dialogflow.cx.v3.IEntityType|null); + /** ConflictingResources entityTypeDisplayNames. */ + public entityTypeDisplayNames: string[]; - /** UpdateEntityTypeRequest languageCode. */ - public languageCode: string; + /** ConflictingResources entityDisplayNames. */ + public entityDisplayNames: string[]; - /** UpdateEntityTypeRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** + * Creates a new ConflictingResources instance using the specified properties. + * @param [properties] Properties to set + * @returns ConflictingResources instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.IConflictingResources): google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources; - /** - * Creates a new UpdateEntityTypeRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateEntityTypeRequest instance - */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IUpdateEntityTypeRequest): google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest; + /** + * Encodes the specified ConflictingResources message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources.verify|verify} messages. + * @param message ConflictingResources message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.IConflictingResources, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified UpdateEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest.verify|verify} messages. - * @param message UpdateEntityTypeRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.cx.v3.IUpdateEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified ConflictingResources message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources.verify|verify} messages. + * @param message ConflictingResources message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.IConflictingResources, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified UpdateEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest.verify|verify} messages. - * @param message UpdateEntityTypeRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IUpdateEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes a ConflictingResources message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConflictingResources + * @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.ImportEntityTypesResponse.ConflictingResources; - /** - * Decodes an UpdateEntityTypeRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateEntityTypeRequest - * @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.UpdateEntityTypeRequest; + /** + * Decodes a ConflictingResources message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConflictingResources + * @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.ImportEntityTypesResponse.ConflictingResources; - /** - * Decodes an UpdateEntityTypeRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateEntityTypeRequest - * @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.UpdateEntityTypeRequest; + /** + * Verifies a ConflictingResources 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 ConflictingResources message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConflictingResources + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources; + + /** + * Creates a plain object from a ConflictingResources message. Also converts values to other types if specified. + * @param message ConflictingResources + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConflictingResources to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ConflictingResources + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an ImportEntityTypesMetadata. */ + interface IImportEntityTypesMetadata { + } + + /** Represents an ImportEntityTypesMetadata. */ + class ImportEntityTypesMetadata implements IImportEntityTypesMetadata { /** - * Verifies an UpdateEntityTypeRequest message. + * Constructs a new ImportEntityTypesMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.IImportEntityTypesMetadata); + + /** + * Creates a new ImportEntityTypesMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns ImportEntityTypesMetadata instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.IImportEntityTypesMetadata): google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata; + + /** + * Encodes the specified ImportEntityTypesMetadata message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata.verify|verify} messages. + * @param message ImportEntityTypesMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.IImportEntityTypesMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ImportEntityTypesMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata.verify|verify} messages. + * @param message ImportEntityTypesMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IImportEntityTypesMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ImportEntityTypesMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ImportEntityTypesMetadata + * @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.ImportEntityTypesMetadata; + + /** + * Decodes an ImportEntityTypesMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ImportEntityTypesMetadata + * @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.ImportEntityTypesMetadata; + + /** + * Verifies an ImportEntityTypesMetadata 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 UpdateEntityTypeRequest message from a plain object. Also converts values to their respective internal types. + * Creates an ImportEntityTypesMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateEntityTypeRequest + * @returns ImportEntityTypesMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata; /** - * Creates a plain object from an UpdateEntityTypeRequest message. Also converts values to other types if specified. - * @param message UpdateEntityTypeRequest + * Creates a plain object from an ImportEntityTypesMetadata message. Also converts values to other types if specified. + * @param message ImportEntityTypesMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateEntityTypeRequest to JSON. + * Converts this ImportEntityTypesMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for UpdateEntityTypeRequest + * Gets the default type url for ImportEntityTypesMetadata * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a DeleteEntityTypeRequest. */ - interface IDeleteEntityTypeRequest { + /** Properties of a ListEntityTypesRequest. */ + interface IListEntityTypesRequest { - /** DeleteEntityTypeRequest name */ - name?: (string|null); + /** ListEntityTypesRequest parent */ + parent?: (string|null); - /** DeleteEntityTypeRequest force */ - force?: (boolean|null); + /** ListEntityTypesRequest languageCode */ + languageCode?: (string|null); + + /** ListEntityTypesRequest pageSize */ + pageSize?: (number|null); + + /** ListEntityTypesRequest pageToken */ + pageToken?: (string|null); } - /** Represents a DeleteEntityTypeRequest. */ - class DeleteEntityTypeRequest implements IDeleteEntityTypeRequest { + /** Represents a ListEntityTypesRequest. */ + class ListEntityTypesRequest implements IListEntityTypesRequest { /** - * Constructs a new DeleteEntityTypeRequest. + * Constructs a new ListEntityTypesRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IDeleteEntityTypeRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3.IListEntityTypesRequest); - /** DeleteEntityTypeRequest name. */ - public name: string; + /** ListEntityTypesRequest parent. */ + public parent: string; - /** DeleteEntityTypeRequest force. */ - public force: boolean; + /** ListEntityTypesRequest languageCode. */ + public languageCode: string; + + /** ListEntityTypesRequest pageSize. */ + public pageSize: number; + + /** ListEntityTypesRequest pageToken. */ + public pageToken: string; /** - * Creates a new DeleteEntityTypeRequest instance using the specified properties. + * Creates a new ListEntityTypesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteEntityTypeRequest instance + * @returns ListEntityTypesRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IDeleteEntityTypeRequest): google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3.IListEntityTypesRequest): google.cloud.dialogflow.cx.v3.ListEntityTypesRequest; /** - * Encodes the specified DeleteEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest.verify|verify} messages. - * @param message DeleteEntityTypeRequest message or plain object to encode + * Encodes the specified ListEntityTypesRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListEntityTypesRequest.verify|verify} messages. + * @param message ListEntityTypesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IDeleteEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IListEntityTypesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest.verify|verify} messages. - * @param message DeleteEntityTypeRequest message or plain object to encode + * Encodes the specified ListEntityTypesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListEntityTypesRequest.verify|verify} messages. + * @param message ListEntityTypesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IDeleteEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IListEntityTypesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteEntityTypeRequest message from the specified reader or buffer. + * Decodes a ListEntityTypesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteEntityTypeRequest + * @returns ListEntityTypesRequest * @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.DeleteEntityTypeRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.ListEntityTypesRequest; /** - * Decodes a DeleteEntityTypeRequest message from the specified reader or buffer, length delimited. + * Decodes a ListEntityTypesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteEntityTypeRequest + * @returns ListEntityTypesRequest * @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.DeleteEntityTypeRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.ListEntityTypesRequest; /** - * Verifies a DeleteEntityTypeRequest message. + * Verifies a ListEntityTypesRequest 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 DeleteEntityTypeRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListEntityTypesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteEntityTypeRequest + * @returns ListEntityTypesRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ListEntityTypesRequest; /** - * Creates a plain object from a DeleteEntityTypeRequest message. Also converts values to other types if specified. - * @param message DeleteEntityTypeRequest + * Creates a plain object from a ListEntityTypesRequest message. Also converts values to other types if specified. + * @param message ListEntityTypesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.ListEntityTypesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteEntityTypeRequest to JSON. + * Converts this ListEntityTypesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DeleteEntityTypeRequest + * Gets the default type url for ListEntityTypesRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an InlineDestination. */ - interface IInlineDestination { + /** Properties of a ListEntityTypesResponse. */ + interface IListEntityTypesResponse { - /** InlineDestination content */ - content?: (Uint8Array|Buffer|string|null); + /** ListEntityTypesResponse entityTypes */ + entityTypes?: (google.cloud.dialogflow.cx.v3.IEntityType[]|null); + + /** ListEntityTypesResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents an InlineDestination. */ - class InlineDestination implements IInlineDestination { + /** Represents a ListEntityTypesResponse. */ + class ListEntityTypesResponse implements IListEntityTypesResponse { /** - * Constructs a new InlineDestination. + * Constructs a new ListEntityTypesResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IInlineDestination); + constructor(properties?: google.cloud.dialogflow.cx.v3.IListEntityTypesResponse); - /** InlineDestination content. */ - public content: (Uint8Array|Buffer|string); + /** ListEntityTypesResponse entityTypes. */ + public entityTypes: google.cloud.dialogflow.cx.v3.IEntityType[]; + + /** ListEntityTypesResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new InlineDestination instance using the specified properties. + * Creates a new ListEntityTypesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns InlineDestination instance + * @returns ListEntityTypesResponse instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IInlineDestination): google.cloud.dialogflow.cx.v3.InlineDestination; + public static create(properties?: google.cloud.dialogflow.cx.v3.IListEntityTypesResponse): google.cloud.dialogflow.cx.v3.ListEntityTypesResponse; /** - * Encodes the specified InlineDestination message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.InlineDestination.verify|verify} messages. - * @param message InlineDestination message or plain object to encode + * Encodes the specified ListEntityTypesResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListEntityTypesResponse.verify|verify} messages. + * @param message ListEntityTypesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IInlineDestination, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IListEntityTypesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified InlineDestination message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.InlineDestination.verify|verify} messages. - * @param message InlineDestination message or plain object to encode + * Encodes the specified ListEntityTypesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListEntityTypesResponse.verify|verify} messages. + * @param message ListEntityTypesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IInlineDestination, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IListEntityTypesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an InlineDestination message from the specified reader or buffer. + * Decodes a ListEntityTypesResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns InlineDestination + * @returns ListEntityTypesResponse * @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.InlineDestination; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.ListEntityTypesResponse; /** - * Decodes an InlineDestination message from the specified reader or buffer, length delimited. + * Decodes a ListEntityTypesResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns InlineDestination + * @returns ListEntityTypesResponse * @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.InlineDestination; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.ListEntityTypesResponse; /** - * Verifies an InlineDestination message. + * Verifies a ListEntityTypesResponse 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 InlineDestination message from a plain object. Also converts values to their respective internal types. + * Creates a ListEntityTypesResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns InlineDestination + * @returns ListEntityTypesResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.InlineDestination; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ListEntityTypesResponse; /** - * Creates a plain object from an InlineDestination message. Also converts values to other types if specified. - * @param message InlineDestination + * Creates a plain object from a ListEntityTypesResponse message. Also converts values to other types if specified. + * @param message ListEntityTypesResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.InlineDestination, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.ListEntityTypesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this InlineDestination to JSON. + * Converts this ListEntityTypesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for InlineDestination + * Gets the default type url for ListEntityTypesResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an InlineSource. */ - interface IInlineSource { + /** Properties of a GetEntityTypeRequest. */ + interface IGetEntityTypeRequest { - /** InlineSource content */ - content?: (Uint8Array|Buffer|string|null); + /** GetEntityTypeRequest name */ + name?: (string|null); + + /** GetEntityTypeRequest languageCode */ + languageCode?: (string|null); } - /** Represents an InlineSource. */ - class InlineSource implements IInlineSource { + /** Represents a GetEntityTypeRequest. */ + class GetEntityTypeRequest implements IGetEntityTypeRequest { /** - * Constructs a new InlineSource. + * Constructs a new GetEntityTypeRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IInlineSource); + constructor(properties?: google.cloud.dialogflow.cx.v3.IGetEntityTypeRequest); - /** InlineSource content. */ - public content: (Uint8Array|Buffer|string); + /** GetEntityTypeRequest name. */ + public name: string; + + /** GetEntityTypeRequest languageCode. */ + public languageCode: string; /** - * Creates a new InlineSource instance using the specified properties. + * Creates a new GetEntityTypeRequest instance using the specified properties. * @param [properties] Properties to set - * @returns InlineSource instance + * @returns GetEntityTypeRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IInlineSource): google.cloud.dialogflow.cx.v3.InlineSource; + public static create(properties?: google.cloud.dialogflow.cx.v3.IGetEntityTypeRequest): google.cloud.dialogflow.cx.v3.GetEntityTypeRequest; /** - * Encodes the specified InlineSource message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.InlineSource.verify|verify} messages. - * @param message InlineSource message or plain object to encode + * Encodes the specified GetEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetEntityTypeRequest.verify|verify} messages. + * @param message GetEntityTypeRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IInlineSource, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IGetEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified InlineSource message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.InlineSource.verify|verify} messages. - * @param message InlineSource message or plain object to encode + * Encodes the specified GetEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetEntityTypeRequest.verify|verify} messages. + * @param message GetEntityTypeRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IInlineSource, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IGetEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an InlineSource message from the specified reader or buffer. + * Decodes a GetEntityTypeRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns InlineSource + * @returns GetEntityTypeRequest * @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.InlineSource; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.GetEntityTypeRequest; /** - * Decodes an InlineSource message from the specified reader or buffer, length delimited. + * Decodes a GetEntityTypeRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns InlineSource + * @returns GetEntityTypeRequest * @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.InlineSource; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.GetEntityTypeRequest; /** - * Verifies an InlineSource message. + * Verifies a GetEntityTypeRequest 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 InlineSource message from a plain object. Also converts values to their respective internal types. + * Creates a GetEntityTypeRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns InlineSource + * @returns GetEntityTypeRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.InlineSource; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.GetEntityTypeRequest; /** - * Creates a plain object from an InlineSource message. Also converts values to other types if specified. - * @param message InlineSource + * Creates a plain object from a GetEntityTypeRequest message. Also converts values to other types if specified. + * @param message GetEntityTypeRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.InlineSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.GetEntityTypeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this InlineSource to JSON. + * Converts this GetEntityTypeRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for InlineSource + * Gets the default type url for GetEntityTypeRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Represents an Environments */ - class Environments extends $protobuf.rpc.Service { + /** Properties of a CreateEntityTypeRequest. */ + interface ICreateEntityTypeRequest { + + /** CreateEntityTypeRequest parent */ + parent?: (string|null); + + /** CreateEntityTypeRequest entityType */ + entityType?: (google.cloud.dialogflow.cx.v3.IEntityType|null); + + /** CreateEntityTypeRequest languageCode */ + languageCode?: (string|null); + } + + /** Represents a CreateEntityTypeRequest. */ + class CreateEntityTypeRequest implements ICreateEntityTypeRequest { /** - * Constructs a new Environments service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited + * Constructs a new CreateEntityTypeRequest. + * @param [properties] Properties to set */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + constructor(properties?: google.cloud.dialogflow.cx.v3.ICreateEntityTypeRequest); + + /** CreateEntityTypeRequest parent. */ + public parent: string; + + /** CreateEntityTypeRequest entityType. */ + public entityType?: (google.cloud.dialogflow.cx.v3.IEntityType|null); + + /** CreateEntityTypeRequest languageCode. */ + public languageCode: string; /** - * Creates new Environments service using the specified rpc implementation. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - * @returns RPC service. Useful where requests and/or responses are streamed. + * Creates a new CreateEntityTypeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateEntityTypeRequest instance */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Environments; + public static create(properties?: google.cloud.dialogflow.cx.v3.ICreateEntityTypeRequest): google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest; /** - * Calls ListEnvironments. - * @param request ListEnvironmentsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListEnvironmentsResponse + * Encodes the specified CreateEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest.verify|verify} messages. + * @param message CreateEntityTypeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public listEnvironments(request: google.cloud.dialogflow.cx.v3.IListEnvironmentsRequest, callback: google.cloud.dialogflow.cx.v3.Environments.ListEnvironmentsCallback): void; + public static encode(message: google.cloud.dialogflow.cx.v3.ICreateEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls ListEnvironments. - * @param request ListEnvironmentsRequest message or plain object - * @returns Promise + * Encodes the specified CreateEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest.verify|verify} messages. + * @param message CreateEntityTypeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public listEnvironments(request: google.cloud.dialogflow.cx.v3.IListEnvironmentsRequest): Promise; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ICreateEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls GetEnvironment. - * @param request GetEnvironmentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Environment + * Decodes a CreateEntityTypeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateEntityTypeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public getEnvironment(request: google.cloud.dialogflow.cx.v3.IGetEnvironmentRequest, callback: google.cloud.dialogflow.cx.v3.Environments.GetEnvironmentCallback): void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest; /** - * Calls GetEnvironment. - * @param request GetEnvironmentRequest message or plain object - * @returns Promise + * Decodes a CreateEntityTypeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateEntityTypeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public getEnvironment(request: google.cloud.dialogflow.cx.v3.IGetEnvironmentRequest): Promise; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest; /** - * Calls CreateEnvironment. - * @param request CreateEnvironmentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Verifies a CreateEntityTypeRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public createEnvironment(request: google.cloud.dialogflow.cx.v3.ICreateEnvironmentRequest, callback: google.cloud.dialogflow.cx.v3.Environments.CreateEnvironmentCallback): void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls CreateEnvironment. - * @param request CreateEnvironmentRequest message or plain object - * @returns Promise + * Creates a CreateEntityTypeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateEntityTypeRequest */ - public createEnvironment(request: google.cloud.dialogflow.cx.v3.ICreateEnvironmentRequest): Promise; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest; /** - * Calls UpdateEnvironment. - * @param request UpdateEnvironmentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Creates a plain object from a CreateEntityTypeRequest message. Also converts values to other types if specified. + * @param message CreateEntityTypeRequest + * @param [options] Conversion options + * @returns Plain object */ - public updateEnvironment(request: google.cloud.dialogflow.cx.v3.IUpdateEnvironmentRequest, callback: google.cloud.dialogflow.cx.v3.Environments.UpdateEnvironmentCallback): void; + public static toObject(message: google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls UpdateEnvironment. - * @param request UpdateEnvironmentRequest message or plain object - * @returns Promise + * Converts this CreateEntityTypeRequest to JSON. + * @returns JSON object */ - public updateEnvironment(request: google.cloud.dialogflow.cx.v3.IUpdateEnvironmentRequest): Promise; + public toJSON(): { [k: string]: any }; /** - * Calls DeleteEnvironment. - * @param request DeleteEnvironmentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty + * Gets the default type url for CreateEntityTypeRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url */ - public deleteEnvironment(request: google.cloud.dialogflow.cx.v3.IDeleteEnvironmentRequest, callback: google.cloud.dialogflow.cx.v3.Environments.DeleteEnvironmentCallback): void; + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateEntityTypeRequest. */ + interface IUpdateEntityTypeRequest { + + /** UpdateEntityTypeRequest entityType */ + entityType?: (google.cloud.dialogflow.cx.v3.IEntityType|null); + + /** UpdateEntityTypeRequest languageCode */ + languageCode?: (string|null); + + /** UpdateEntityTypeRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateEntityTypeRequest. */ + class UpdateEntityTypeRequest implements IUpdateEntityTypeRequest { /** - * Calls DeleteEnvironment. - * @param request DeleteEnvironmentRequest message or plain object - * @returns Promise + * Constructs a new UpdateEntityTypeRequest. + * @param [properties] Properties to set */ - public deleteEnvironment(request: google.cloud.dialogflow.cx.v3.IDeleteEnvironmentRequest): Promise; + constructor(properties?: google.cloud.dialogflow.cx.v3.IUpdateEntityTypeRequest); + + /** UpdateEntityTypeRequest entityType. */ + public entityType?: (google.cloud.dialogflow.cx.v3.IEntityType|null); + + /** UpdateEntityTypeRequest languageCode. */ + public languageCode: string; + + /** UpdateEntityTypeRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); /** - * Calls LookupEnvironmentHistory. - * @param request LookupEnvironmentHistoryRequest message or plain object - * @param callback Node-style callback called with the error, if any, and LookupEnvironmentHistoryResponse + * Creates a new UpdateEntityTypeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateEntityTypeRequest instance */ - public lookupEnvironmentHistory(request: google.cloud.dialogflow.cx.v3.ILookupEnvironmentHistoryRequest, callback: google.cloud.dialogflow.cx.v3.Environments.LookupEnvironmentHistoryCallback): void; + public static create(properties?: google.cloud.dialogflow.cx.v3.IUpdateEntityTypeRequest): google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest; /** - * Calls LookupEnvironmentHistory. - * @param request LookupEnvironmentHistoryRequest message or plain object - * @returns Promise + * Encodes the specified UpdateEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest.verify|verify} messages. + * @param message UpdateEntityTypeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public lookupEnvironmentHistory(request: google.cloud.dialogflow.cx.v3.ILookupEnvironmentHistoryRequest): Promise; + public static encode(message: google.cloud.dialogflow.cx.v3.IUpdateEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest.verify|verify} messages. + * @param message UpdateEntityTypeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IUpdateEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateEntityTypeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateEntityTypeRequest + * @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.UpdateEntityTypeRequest; + + /** + * Decodes an UpdateEntityTypeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateEntityTypeRequest + * @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.UpdateEntityTypeRequest; + + /** + * Verifies an UpdateEntityTypeRequest 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 UpdateEntityTypeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateEntityTypeRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest; + + /** + * Creates a plain object from an UpdateEntityTypeRequest message. Also converts values to other types if specified. + * @param message UpdateEntityTypeRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateEntityTypeRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateEntityTypeRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteEntityTypeRequest. */ + interface IDeleteEntityTypeRequest { + + /** DeleteEntityTypeRequest name */ + name?: (string|null); + + /** DeleteEntityTypeRequest force */ + force?: (boolean|null); + } + + /** Represents a DeleteEntityTypeRequest. */ + class DeleteEntityTypeRequest implements IDeleteEntityTypeRequest { + + /** + * Constructs a new DeleteEntityTypeRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.IDeleteEntityTypeRequest); + + /** DeleteEntityTypeRequest name. */ + public name: string; + + /** DeleteEntityTypeRequest force. */ + public force: boolean; + + /** + * Creates a new DeleteEntityTypeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteEntityTypeRequest instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.IDeleteEntityTypeRequest): google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest; + + /** + * Encodes the specified DeleteEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest.verify|verify} messages. + * @param message DeleteEntityTypeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.IDeleteEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest.verify|verify} messages. + * @param message DeleteEntityTypeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IDeleteEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteEntityTypeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteEntityTypeRequest + * @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.DeleteEntityTypeRequest; + + /** + * Decodes a DeleteEntityTypeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteEntityTypeRequest + * @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.DeleteEntityTypeRequest; + + /** + * Verifies a DeleteEntityTypeRequest 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 DeleteEntityTypeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteEntityTypeRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest; + + /** + * Creates a plain object from a DeleteEntityTypeRequest message. Also converts values to other types if specified. + * @param message DeleteEntityTypeRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteEntityTypeRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteEntityTypeRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an InlineDestination. */ + interface IInlineDestination { + + /** InlineDestination content */ + content?: (Uint8Array|Buffer|string|null); + } + + /** Represents an InlineDestination. */ + class InlineDestination implements IInlineDestination { + + /** + * Constructs a new InlineDestination. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.IInlineDestination); + + /** InlineDestination content. */ + public content: (Uint8Array|Buffer|string); + + /** + * Creates a new InlineDestination instance using the specified properties. + * @param [properties] Properties to set + * @returns InlineDestination instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.IInlineDestination): google.cloud.dialogflow.cx.v3.InlineDestination; + + /** + * Encodes the specified InlineDestination message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.InlineDestination.verify|verify} messages. + * @param message InlineDestination message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.IInlineDestination, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InlineDestination message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.InlineDestination.verify|verify} messages. + * @param message InlineDestination message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IInlineDestination, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InlineDestination message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InlineDestination + * @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.InlineDestination; + + /** + * Decodes an InlineDestination message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InlineDestination + * @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.InlineDestination; + + /** + * Verifies an InlineDestination 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 InlineDestination message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InlineDestination + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.InlineDestination; + + /** + * Creates a plain object from an InlineDestination message. Also converts values to other types if specified. + * @param message InlineDestination + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.InlineDestination, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InlineDestination to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InlineDestination + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an InlineSource. */ + interface IInlineSource { + + /** InlineSource content */ + content?: (Uint8Array|Buffer|string|null); + } + + /** Represents an InlineSource. */ + class InlineSource implements IInlineSource { + + /** + * Constructs a new InlineSource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.IInlineSource); + + /** InlineSource content. */ + public content: (Uint8Array|Buffer|string); + + /** + * Creates a new InlineSource instance using the specified properties. + * @param [properties] Properties to set + * @returns InlineSource instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.IInlineSource): google.cloud.dialogflow.cx.v3.InlineSource; + + /** + * Encodes the specified InlineSource message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.InlineSource.verify|verify} messages. + * @param message InlineSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.IInlineSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InlineSource message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.InlineSource.verify|verify} messages. + * @param message InlineSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IInlineSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InlineSource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InlineSource + * @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.InlineSource; + + /** + * Decodes an InlineSource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InlineSource + * @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.InlineSource; + + /** + * Verifies an InlineSource 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 InlineSource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InlineSource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.InlineSource; + + /** + * Creates a plain object from an InlineSource message. Also converts values to other types if specified. + * @param message InlineSource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.InlineSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InlineSource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InlineSource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Represents an Environments */ + class Environments extends $protobuf.rpc.Service { + + /** + * Constructs a new Environments service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new Environments service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Environments; + + /** + * Calls ListEnvironments. + * @param request ListEnvironmentsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListEnvironmentsResponse + */ + public listEnvironments(request: google.cloud.dialogflow.cx.v3.IListEnvironmentsRequest, callback: google.cloud.dialogflow.cx.v3.Environments.ListEnvironmentsCallback): void; + + /** + * Calls ListEnvironments. + * @param request ListEnvironmentsRequest message or plain object + * @returns Promise + */ + public listEnvironments(request: google.cloud.dialogflow.cx.v3.IListEnvironmentsRequest): Promise; + + /** + * Calls GetEnvironment. + * @param request GetEnvironmentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Environment + */ + public getEnvironment(request: google.cloud.dialogflow.cx.v3.IGetEnvironmentRequest, callback: google.cloud.dialogflow.cx.v3.Environments.GetEnvironmentCallback): void; + + /** + * Calls GetEnvironment. + * @param request GetEnvironmentRequest message or plain object + * @returns Promise + */ + public getEnvironment(request: google.cloud.dialogflow.cx.v3.IGetEnvironmentRequest): Promise; + + /** + * Calls CreateEnvironment. + * @param request CreateEnvironmentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createEnvironment(request: google.cloud.dialogflow.cx.v3.ICreateEnvironmentRequest, callback: google.cloud.dialogflow.cx.v3.Environments.CreateEnvironmentCallback): void; + + /** + * Calls CreateEnvironment. + * @param request CreateEnvironmentRequest message or plain object + * @returns Promise + */ + public createEnvironment(request: google.cloud.dialogflow.cx.v3.ICreateEnvironmentRequest): Promise; + + /** + * Calls UpdateEnvironment. + * @param request UpdateEnvironmentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateEnvironment(request: google.cloud.dialogflow.cx.v3.IUpdateEnvironmentRequest, callback: google.cloud.dialogflow.cx.v3.Environments.UpdateEnvironmentCallback): void; + + /** + * Calls UpdateEnvironment. + * @param request UpdateEnvironmentRequest message or plain object + * @returns Promise + */ + public updateEnvironment(request: google.cloud.dialogflow.cx.v3.IUpdateEnvironmentRequest): Promise; + + /** + * Calls DeleteEnvironment. + * @param request DeleteEnvironmentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteEnvironment(request: google.cloud.dialogflow.cx.v3.IDeleteEnvironmentRequest, callback: google.cloud.dialogflow.cx.v3.Environments.DeleteEnvironmentCallback): void; + + /** + * Calls DeleteEnvironment. + * @param request DeleteEnvironmentRequest message or plain object + * @returns Promise + */ + public deleteEnvironment(request: google.cloud.dialogflow.cx.v3.IDeleteEnvironmentRequest): Promise; + + /** + * Calls LookupEnvironmentHistory. + * @param request LookupEnvironmentHistoryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LookupEnvironmentHistoryResponse + */ + public lookupEnvironmentHistory(request: google.cloud.dialogflow.cx.v3.ILookupEnvironmentHistoryRequest, callback: google.cloud.dialogflow.cx.v3.Environments.LookupEnvironmentHistoryCallback): void; + + /** + * Calls LookupEnvironmentHistory. + * @param request LookupEnvironmentHistoryRequest message or plain object + * @returns Promise + */ + public lookupEnvironmentHistory(request: google.cloud.dialogflow.cx.v3.ILookupEnvironmentHistoryRequest): Promise; /** * Calls RunContinuousTest. @@ -24903,6 +26277,9 @@ export namespace google { /** DetectIntentRequest outputAudioConfig */ outputAudioConfig?: (google.cloud.dialogflow.cx.v3.IOutputAudioConfig|null); + + /** DetectIntentRequest responseView */ + responseView?: (google.cloud.dialogflow.cx.v3.DetectIntentResponseView|keyof typeof google.cloud.dialogflow.cx.v3.DetectIntentResponseView|null); } /** Represents a DetectIntentRequest. */ @@ -24926,6 +26303,9 @@ export namespace google { /** DetectIntentRequest outputAudioConfig. */ public outputAudioConfig?: (google.cloud.dialogflow.cx.v3.IOutputAudioConfig|null); + /** DetectIntentRequest responseView. */ + public responseView: (google.cloud.dialogflow.cx.v3.DetectIntentResponseView|keyof typeof google.cloud.dialogflow.cx.v3.DetectIntentResponseView); + /** * Creates a new DetectIntentRequest instance using the specified properties. * @param [properties] Properties to set @@ -25161,6 +26541,9 @@ export namespace google { /** StreamingDetectIntentRequest enableDebuggingInfo */ enableDebuggingInfo?: (boolean|null); + + /** StreamingDetectIntentRequest responseView */ + responseView?: (google.cloud.dialogflow.cx.v3.DetectIntentResponseView|keyof typeof google.cloud.dialogflow.cx.v3.DetectIntentResponseView|null); } /** Represents a StreamingDetectIntentRequest. */ @@ -25190,6 +26573,9 @@ export namespace google { /** StreamingDetectIntentRequest enableDebuggingInfo. */ public enableDebuggingInfo: boolean; + /** StreamingDetectIntentRequest responseView. */ + public responseView: (google.cloud.dialogflow.cx.v3.DetectIntentResponseView|keyof typeof google.cloud.dialogflow.cx.v3.DetectIntentResponseView); + /** * Creates a new StreamingDetectIntentRequest instance using the specified properties. * @param [properties] Properties to set @@ -25746,6 +27132,9 @@ export namespace google { /** QueryParameters parameters */ parameters?: (google.protobuf.IStruct|null); + /** QueryParameters parameterScope */ + parameterScope?: (string|null); + /** QueryParameters currentPage */ currentPage?: (string|null); @@ -25761,6 +27150,12 @@ export namespace google { /** QueryParameters flowVersions */ flowVersions?: (string[]|null); + /** QueryParameters currentPlaybook */ + currentPlaybook?: (string|null); + + /** QueryParameters llmModelSettings */ + llmModelSettings?: (google.cloud.dialogflow.cx.v3.ILlmModelSettings|null); + /** QueryParameters channel */ channel?: (string|null); @@ -25801,6 +27196,9 @@ export namespace google { /** QueryParameters parameters. */ public parameters?: (google.protobuf.IStruct|null); + /** QueryParameters parameterScope. */ + public parameterScope: string; + /** QueryParameters currentPage. */ public currentPage: string; @@ -25816,6 +27214,12 @@ export namespace google { /** QueryParameters flowVersions. */ public flowVersions: string[]; + /** QueryParameters currentPlaybook. */ + public currentPlaybook: string; + + /** QueryParameters llmModelSettings. */ + public llmModelSettings?: (google.cloud.dialogflow.cx.v3.ILlmModelSettings|null); + /** QueryParameters channel. */ public channel: string; @@ -26682,6 +28086,9 @@ export namespace google { /** QueryInput dtmf */ dtmf?: (google.cloud.dialogflow.cx.v3.IDtmfInput|null); + /** QueryInput toolCallResult */ + toolCallResult?: (google.cloud.dialogflow.cx.v3.IToolCallResult|null); + /** QueryInput languageCode */ languageCode?: (string|null); } @@ -26710,11 +28117,14 @@ export namespace google { /** QueryInput dtmf. */ public dtmf?: (google.cloud.dialogflow.cx.v3.IDtmfInput|null); + /** QueryInput toolCallResult. */ + public toolCallResult?: (google.cloud.dialogflow.cx.v3.IToolCallResult|null); + /** QueryInput languageCode. */ public languageCode: string; /** QueryInput input. */ - public input?: ("text"|"intent"|"audio"|"event"|"dtmf"); + public input?: ("text"|"intent"|"audio"|"event"|"dtmf"|"toolCallResult"); /** * Creates a new QueryInput instance using the specified properties. @@ -26821,18 +28231,6 @@ export namespace google { /** QueryResult responseMessages */ responseMessages?: (google.cloud.dialogflow.cx.v3.IResponseMessage[]|null); - /** QueryResult webhookIds */ - webhookIds?: (string[]|null); - - /** QueryResult webhookDisplayNames */ - webhookDisplayNames?: (string[]|null); - - /** QueryResult webhookLatencies */ - webhookLatencies?: (google.protobuf.IDuration[]|null); - - /** QueryResult webhookTags */ - webhookTags?: (string[]|null); - /** QueryResult webhookStatuses */ webhookStatuses?: (google.rpc.IStatus[]|null); @@ -26903,18 +28301,6 @@ export namespace google { /** QueryResult responseMessages. */ public responseMessages: google.cloud.dialogflow.cx.v3.IResponseMessage[]; - /** QueryResult webhookIds. */ - public webhookIds: string[]; - - /** QueryResult webhookDisplayNames. */ - public webhookDisplayNames: string[]; - - /** QueryResult webhookLatencies. */ - public webhookLatencies: google.protobuf.IDuration[]; - - /** QueryResult webhookTags. */ - public webhookTags: string[]; - /** QueryResult webhookStatuses. */ public webhookStatuses: google.rpc.IStatus[]; @@ -28244,6 +29630,14 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** DetectIntentResponseView enum. */ + enum DetectIntentResponseView { + DETECT_INTENT_RESPONSE_VIEW_UNSPECIFIED = 0, + DETECT_INTENT_RESPONSE_VIEW_FULL = 1, + DETECT_INTENT_RESPONSE_VIEW_BASIC = 2, + DETECT_INTENT_RESPONSE_VIEW_DEFAULT = 3 + } + /** Represents a SessionEntityTypes */ class SessionEntityTypes extends $protobuf.rpc.Service { @@ -30257,9 +31651,15 @@ export namespace google { /** GenericWebService password */ password?: (string|null); + /** GenericWebService secretVersionForUsernamePassword */ + secretVersionForUsernamePassword?: (string|null); + /** GenericWebService requestHeaders */ requestHeaders?: ({ [k: string]: string }|null); + /** GenericWebService secretVersionsForRequestHeaders */ + secretVersionsForRequestHeaders?: ({ [k: string]: google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ISecretVersionHeaderValue }|null); + /** GenericWebService allowedCaCerts */ allowedCaCerts?: (Uint8Array[]|null); @@ -30269,6 +31669,9 @@ export namespace google { /** GenericWebService serviceAgentAuth */ serviceAgentAuth?: (google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAgentAuth|keyof typeof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAgentAuth|null); + /** GenericWebService serviceAccountAuthConfig */ + serviceAccountAuthConfig?: (google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.IServiceAccountAuthConfig|null); + /** GenericWebService webhookType */ webhookType?: (google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.WebhookType|keyof typeof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.WebhookType|null); @@ -30300,9 +31703,15 @@ export namespace google { /** GenericWebService password. */ public password: string; + /** GenericWebService secretVersionForUsernamePassword. */ + public secretVersionForUsernamePassword: string; + /** GenericWebService requestHeaders. */ public requestHeaders: { [k: string]: string }; + /** GenericWebService secretVersionsForRequestHeaders. */ + public secretVersionsForRequestHeaders: { [k: string]: google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ISecretVersionHeaderValue }; + /** GenericWebService allowedCaCerts. */ public allowedCaCerts: Uint8Array[]; @@ -30312,6 +31721,9 @@ export namespace google { /** GenericWebService serviceAgentAuth. */ public serviceAgentAuth: (google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAgentAuth|keyof typeof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAgentAuth); + /** GenericWebService serviceAccountAuthConfig. */ + public serviceAccountAuthConfig?: (google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.IServiceAccountAuthConfig|null); + /** GenericWebService webhookType. */ public webhookType: (google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.WebhookType|keyof typeof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.WebhookType); @@ -30404,6 +31816,103 @@ export namespace google { namespace GenericWebService { + /** Properties of a SecretVersionHeaderValue. */ + interface ISecretVersionHeaderValue { + + /** SecretVersionHeaderValue secretVersion */ + secretVersion?: (string|null); + } + + /** Represents a SecretVersionHeaderValue. */ + class SecretVersionHeaderValue implements ISecretVersionHeaderValue { + + /** + * Constructs a new SecretVersionHeaderValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ISecretVersionHeaderValue); + + /** SecretVersionHeaderValue secretVersion. */ + public secretVersion: string; + + /** + * Creates a new SecretVersionHeaderValue instance using the specified properties. + * @param [properties] Properties to set + * @returns SecretVersionHeaderValue instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ISecretVersionHeaderValue): google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue; + + /** + * Encodes the specified SecretVersionHeaderValue message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue.verify|verify} messages. + * @param message SecretVersionHeaderValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ISecretVersionHeaderValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SecretVersionHeaderValue message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue.verify|verify} messages. + * @param message SecretVersionHeaderValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ISecretVersionHeaderValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SecretVersionHeaderValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SecretVersionHeaderValue + * @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.Webhook.GenericWebService.SecretVersionHeaderValue; + + /** + * Decodes a SecretVersionHeaderValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SecretVersionHeaderValue + * @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.Webhook.GenericWebService.SecretVersionHeaderValue; + + /** + * Verifies a SecretVersionHeaderValue 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 SecretVersionHeaderValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SecretVersionHeaderValue + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue; + + /** + * Creates a plain object from a SecretVersionHeaderValue message. Also converts values to other types if specified. + * @param message SecretVersionHeaderValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SecretVersionHeaderValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SecretVersionHeaderValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a OAuthConfig. */ interface IOAuthConfig { @@ -30413,6 +31922,9 @@ export namespace google { /** OAuthConfig clientSecret */ clientSecret?: (string|null); + /** OAuthConfig secretVersionForClientSecret */ + secretVersionForClientSecret?: (string|null); + /** OAuthConfig tokenEndpoint */ tokenEndpoint?: (string|null); @@ -30435,6 +31947,9 @@ export namespace google { /** OAuthConfig clientSecret. */ public clientSecret: string; + /** OAuthConfig secretVersionForClientSecret. */ + public secretVersionForClientSecret: string; + /** OAuthConfig tokenEndpoint. */ public tokenEndpoint: string; @@ -30527,6 +32042,103 @@ export namespace google { ACCESS_TOKEN = 3 } + /** Properties of a ServiceAccountAuthConfig. */ + interface IServiceAccountAuthConfig { + + /** ServiceAccountAuthConfig serviceAccount */ + serviceAccount?: (string|null); + } + + /** Represents a ServiceAccountAuthConfig. */ + class ServiceAccountAuthConfig implements IServiceAccountAuthConfig { + + /** + * Constructs a new ServiceAccountAuthConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.IServiceAccountAuthConfig); + + /** ServiceAccountAuthConfig serviceAccount. */ + public serviceAccount: string; + + /** + * Creates a new ServiceAccountAuthConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceAccountAuthConfig instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.IServiceAccountAuthConfig): google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig; + + /** + * Encodes the specified ServiceAccountAuthConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig.verify|verify} messages. + * @param message ServiceAccountAuthConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.IServiceAccountAuthConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceAccountAuthConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig.verify|verify} messages. + * @param message ServiceAccountAuthConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.IServiceAccountAuthConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceAccountAuthConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceAccountAuthConfig + * @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.Webhook.GenericWebService.ServiceAccountAuthConfig; + + /** + * Decodes a ServiceAccountAuthConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceAccountAuthConfig + * @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.Webhook.GenericWebService.ServiceAccountAuthConfig; + + /** + * Verifies a ServiceAccountAuthConfig 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 ServiceAccountAuthConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceAccountAuthConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig; + + /** + * Creates a plain object from a ServiceAccountAuthConfig message. Also converts values to other types if specified. + * @param message ServiceAccountAuthConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceAccountAuthConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceAccountAuthConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** WebhookType enum. */ enum WebhookType { WEBHOOK_TYPE_UNSPECIFIED = 0, @@ -32679,11 +34291,11 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Represents an Experiments */ - class Experiments extends $protobuf.rpc.Service { + /** Represents an Examples */ + class Examples extends $protobuf.rpc.Service { /** - * Constructs a new Experiments service. + * Constructs a new Examples service. * @param rpcImpl RPC implementation * @param [requestDelimited=false] Whether requests are length-delimited * @param [responseDelimited=false] Whether responses are length-delimited @@ -32691,4754 +34303,13111 @@ export namespace google { constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); /** - * Creates new Experiments service using the specified rpc implementation. + * Creates new Examples service using the specified rpc implementation. * @param rpcImpl RPC implementation * @param [requestDelimited=false] Whether requests are length-delimited * @param [responseDelimited=false] Whether responses are length-delimited * @returns RPC service. Useful where requests and/or responses are streamed. */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Experiments; - - /** - * Calls ListExperiments. - * @param request ListExperimentsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListExperimentsResponse - */ - public listExperiments(request: google.cloud.dialogflow.cx.v3.IListExperimentsRequest, callback: google.cloud.dialogflow.cx.v3.Experiments.ListExperimentsCallback): void; - - /** - * Calls ListExperiments. - * @param request ListExperimentsRequest message or plain object - * @returns Promise - */ - public listExperiments(request: google.cloud.dialogflow.cx.v3.IListExperimentsRequest): Promise; - - /** - * Calls GetExperiment. - * @param request GetExperimentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Experiment - */ - public getExperiment(request: google.cloud.dialogflow.cx.v3.IGetExperimentRequest, callback: google.cloud.dialogflow.cx.v3.Experiments.GetExperimentCallback): void; - - /** - * Calls GetExperiment. - * @param request GetExperimentRequest message or plain object - * @returns Promise - */ - public getExperiment(request: google.cloud.dialogflow.cx.v3.IGetExperimentRequest): Promise; + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Examples; /** - * Calls CreateExperiment. - * @param request CreateExperimentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Experiment + * Calls CreateExample. + * @param request CreateExampleRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Example */ - public createExperiment(request: google.cloud.dialogflow.cx.v3.ICreateExperimentRequest, callback: google.cloud.dialogflow.cx.v3.Experiments.CreateExperimentCallback): void; + public createExample(request: google.cloud.dialogflow.cx.v3.ICreateExampleRequest, callback: google.cloud.dialogflow.cx.v3.Examples.CreateExampleCallback): void; /** - * Calls CreateExperiment. - * @param request CreateExperimentRequest message or plain object + * Calls CreateExample. + * @param request CreateExampleRequest message or plain object * @returns Promise */ - public createExperiment(request: google.cloud.dialogflow.cx.v3.ICreateExperimentRequest): Promise; + public createExample(request: google.cloud.dialogflow.cx.v3.ICreateExampleRequest): Promise; /** - * Calls UpdateExperiment. - * @param request UpdateExperimentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Experiment + * Calls DeleteExample. + * @param request DeleteExampleRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty */ - public updateExperiment(request: google.cloud.dialogflow.cx.v3.IUpdateExperimentRequest, callback: google.cloud.dialogflow.cx.v3.Experiments.UpdateExperimentCallback): void; + public deleteExample(request: google.cloud.dialogflow.cx.v3.IDeleteExampleRequest, callback: google.cloud.dialogflow.cx.v3.Examples.DeleteExampleCallback): void; /** - * Calls UpdateExperiment. - * @param request UpdateExperimentRequest message or plain object + * Calls DeleteExample. + * @param request DeleteExampleRequest message or plain object * @returns Promise */ - public updateExperiment(request: google.cloud.dialogflow.cx.v3.IUpdateExperimentRequest): Promise; + public deleteExample(request: google.cloud.dialogflow.cx.v3.IDeleteExampleRequest): Promise; /** - * Calls DeleteExperiment. - * @param request DeleteExperimentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty + * Calls ListExamples. + * @param request ListExamplesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListExamplesResponse */ - public deleteExperiment(request: google.cloud.dialogflow.cx.v3.IDeleteExperimentRequest, callback: google.cloud.dialogflow.cx.v3.Experiments.DeleteExperimentCallback): void; + public listExamples(request: google.cloud.dialogflow.cx.v3.IListExamplesRequest, callback: google.cloud.dialogflow.cx.v3.Examples.ListExamplesCallback): void; /** - * Calls DeleteExperiment. - * @param request DeleteExperimentRequest message or plain object + * Calls ListExamples. + * @param request ListExamplesRequest message or plain object * @returns Promise */ - public deleteExperiment(request: google.cloud.dialogflow.cx.v3.IDeleteExperimentRequest): Promise; + public listExamples(request: google.cloud.dialogflow.cx.v3.IListExamplesRequest): Promise; /** - * Calls StartExperiment. - * @param request StartExperimentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Experiment + * Calls GetExample. + * @param request GetExampleRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Example */ - public startExperiment(request: google.cloud.dialogflow.cx.v3.IStartExperimentRequest, callback: google.cloud.dialogflow.cx.v3.Experiments.StartExperimentCallback): void; + public getExample(request: google.cloud.dialogflow.cx.v3.IGetExampleRequest, callback: google.cloud.dialogflow.cx.v3.Examples.GetExampleCallback): void; /** - * Calls StartExperiment. - * @param request StartExperimentRequest message or plain object + * Calls GetExample. + * @param request GetExampleRequest message or plain object * @returns Promise */ - public startExperiment(request: google.cloud.dialogflow.cx.v3.IStartExperimentRequest): Promise; + public getExample(request: google.cloud.dialogflow.cx.v3.IGetExampleRequest): Promise; /** - * Calls StopExperiment. - * @param request StopExperimentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Experiment + * Calls UpdateExample. + * @param request UpdateExampleRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Example */ - public stopExperiment(request: google.cloud.dialogflow.cx.v3.IStopExperimentRequest, callback: google.cloud.dialogflow.cx.v3.Experiments.StopExperimentCallback): void; + public updateExample(request: google.cloud.dialogflow.cx.v3.IUpdateExampleRequest, callback: google.cloud.dialogflow.cx.v3.Examples.UpdateExampleCallback): void; /** - * Calls StopExperiment. - * @param request StopExperimentRequest message or plain object + * Calls UpdateExample. + * @param request UpdateExampleRequest message or plain object * @returns Promise */ - public stopExperiment(request: google.cloud.dialogflow.cx.v3.IStopExperimentRequest): Promise; + public updateExample(request: google.cloud.dialogflow.cx.v3.IUpdateExampleRequest): Promise; } - namespace Experiments { - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Experiments|listExperiments}. - * @param error Error, if any - * @param [response] ListExperimentsResponse - */ - type ListExperimentsCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.ListExperimentsResponse) => void; - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Experiments|getExperiment}. - * @param error Error, if any - * @param [response] Experiment - */ - type GetExperimentCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.Experiment) => void; + namespace Examples { /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Experiments|createExperiment}. + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Examples|createExample}. * @param error Error, if any - * @param [response] Experiment + * @param [response] Example */ - type CreateExperimentCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.Experiment) => void; + type CreateExampleCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.Example) => void; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Experiments|updateExperiment}. + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Examples|deleteExample}. * @param error Error, if any - * @param [response] Experiment + * @param [response] Empty */ - type UpdateExperimentCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.Experiment) => void; + type DeleteExampleCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Experiments|deleteExperiment}. + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Examples|listExamples}. * @param error Error, if any - * @param [response] Empty + * @param [response] ListExamplesResponse */ - type DeleteExperimentCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + type ListExamplesCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.ListExamplesResponse) => void; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Experiments|startExperiment}. + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Examples|getExample}. * @param error Error, if any - * @param [response] Experiment + * @param [response] Example */ - type StartExperimentCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.Experiment) => void; + type GetExampleCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.Example) => void; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Experiments|stopExperiment}. + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Examples|updateExample}. * @param error Error, if any - * @param [response] Experiment + * @param [response] Example */ - type StopExperimentCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.Experiment) => void; + type UpdateExampleCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.Example) => void; } - /** Properties of an Experiment. */ - interface IExperiment { - - /** Experiment name */ - name?: (string|null); - - /** Experiment displayName */ - displayName?: (string|null); - - /** Experiment description */ - description?: (string|null); - - /** Experiment state */ - state?: (google.cloud.dialogflow.cx.v3.Experiment.State|keyof typeof google.cloud.dialogflow.cx.v3.Experiment.State|null); - - /** Experiment definition */ - definition?: (google.cloud.dialogflow.cx.v3.Experiment.IDefinition|null); - - /** Experiment rolloutConfig */ - rolloutConfig?: (google.cloud.dialogflow.cx.v3.IRolloutConfig|null); - - /** Experiment rolloutState */ - rolloutState?: (google.cloud.dialogflow.cx.v3.IRolloutState|null); - - /** Experiment rolloutFailureReason */ - rolloutFailureReason?: (string|null); - - /** Experiment result */ - result?: (google.cloud.dialogflow.cx.v3.Experiment.IResult|null); - - /** Experiment createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** Experiment startTime */ - startTime?: (google.protobuf.ITimestamp|null); - - /** Experiment endTime */ - endTime?: (google.protobuf.ITimestamp|null); - - /** Experiment lastUpdateTime */ - lastUpdateTime?: (google.protobuf.ITimestamp|null); + /** Properties of a CreateExampleRequest. */ + interface ICreateExampleRequest { - /** Experiment experimentLength */ - experimentLength?: (google.protobuf.IDuration|null); + /** CreateExampleRequest parent */ + parent?: (string|null); - /** Experiment variantsHistory */ - variantsHistory?: (google.cloud.dialogflow.cx.v3.IVariantsHistory[]|null); + /** CreateExampleRequest example */ + example?: (google.cloud.dialogflow.cx.v3.IExample|null); } - /** Represents an Experiment. */ - class Experiment implements IExperiment { + /** Represents a CreateExampleRequest. */ + class CreateExampleRequest implements ICreateExampleRequest { /** - * Constructs a new Experiment. + * Constructs a new CreateExampleRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IExperiment); - - /** Experiment name. */ - public name: string; + constructor(properties?: google.cloud.dialogflow.cx.v3.ICreateExampleRequest); - /** Experiment displayName. */ - public displayName: string; - - /** Experiment description. */ - public description: string; - - /** Experiment state. */ - public state: (google.cloud.dialogflow.cx.v3.Experiment.State|keyof typeof google.cloud.dialogflow.cx.v3.Experiment.State); - - /** Experiment definition. */ - public definition?: (google.cloud.dialogflow.cx.v3.Experiment.IDefinition|null); - - /** Experiment rolloutConfig. */ - public rolloutConfig?: (google.cloud.dialogflow.cx.v3.IRolloutConfig|null); - - /** Experiment rolloutState. */ - public rolloutState?: (google.cloud.dialogflow.cx.v3.IRolloutState|null); - - /** Experiment rolloutFailureReason. */ - public rolloutFailureReason: string; - - /** Experiment result. */ - public result?: (google.cloud.dialogflow.cx.v3.Experiment.IResult|null); - - /** Experiment createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** Experiment startTime. */ - public startTime?: (google.protobuf.ITimestamp|null); - - /** Experiment endTime. */ - public endTime?: (google.protobuf.ITimestamp|null); - - /** Experiment lastUpdateTime. */ - public lastUpdateTime?: (google.protobuf.ITimestamp|null); - - /** Experiment experimentLength. */ - public experimentLength?: (google.protobuf.IDuration|null); + /** CreateExampleRequest parent. */ + public parent: string; - /** Experiment variantsHistory. */ - public variantsHistory: google.cloud.dialogflow.cx.v3.IVariantsHistory[]; + /** CreateExampleRequest example. */ + public example?: (google.cloud.dialogflow.cx.v3.IExample|null); /** - * Creates a new Experiment instance using the specified properties. + * Creates a new CreateExampleRequest instance using the specified properties. * @param [properties] Properties to set - * @returns Experiment instance + * @returns CreateExampleRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IExperiment): google.cloud.dialogflow.cx.v3.Experiment; + public static create(properties?: google.cloud.dialogflow.cx.v3.ICreateExampleRequest): google.cloud.dialogflow.cx.v3.CreateExampleRequest; /** - * Encodes the specified Experiment message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Experiment.verify|verify} messages. - * @param message Experiment message or plain object to encode + * Encodes the specified CreateExampleRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateExampleRequest.verify|verify} messages. + * @param message CreateExampleRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IExperiment, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.ICreateExampleRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Experiment message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Experiment.verify|verify} messages. - * @param message Experiment message or plain object to encode + * Encodes the specified CreateExampleRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateExampleRequest.verify|verify} messages. + * @param message CreateExampleRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IExperiment, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ICreateExampleRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an Experiment message from the specified reader or buffer. + * Decodes a CreateExampleRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Experiment + * @returns CreateExampleRequest * @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.Experiment; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.CreateExampleRequest; /** - * Decodes an Experiment message from the specified reader or buffer, length delimited. + * Decodes a CreateExampleRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Experiment + * @returns CreateExampleRequest * @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.Experiment; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.CreateExampleRequest; /** - * Verifies an Experiment message. + * Verifies a CreateExampleRequest 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 Experiment message from a plain object. Also converts values to their respective internal types. + * Creates a CreateExampleRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Experiment + * @returns CreateExampleRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Experiment; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.CreateExampleRequest; /** - * Creates a plain object from an Experiment message. Also converts values to other types if specified. - * @param message Experiment + * Creates a plain object from a CreateExampleRequest message. Also converts values to other types if specified. + * @param message CreateExampleRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.Experiment, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.CreateExampleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Experiment to JSON. + * Converts this CreateExampleRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Experiment + * Gets the default type url for CreateExampleRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace Experiment { + /** Properties of a DeleteExampleRequest. */ + interface IDeleteExampleRequest { - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - DRAFT = 1, - RUNNING = 2, - DONE = 3, - ROLLOUT_FAILED = 4 - } + /** DeleteExampleRequest name */ + name?: (string|null); + } - /** Properties of a Definition. */ - interface IDefinition { + /** Represents a DeleteExampleRequest. */ + class DeleteExampleRequest implements IDeleteExampleRequest { - /** Definition condition */ - condition?: (string|null); + /** + * Constructs a new DeleteExampleRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.IDeleteExampleRequest); - /** Definition versionVariants */ - versionVariants?: (google.cloud.dialogflow.cx.v3.IVersionVariants|null); - } + /** DeleteExampleRequest name. */ + public name: string; - /** Represents a Definition. */ - class Definition implements IDefinition { + /** + * Creates a new DeleteExampleRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteExampleRequest instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.IDeleteExampleRequest): google.cloud.dialogflow.cx.v3.DeleteExampleRequest; - /** - * Constructs a new Definition. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3.Experiment.IDefinition); + /** + * Encodes the specified DeleteExampleRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteExampleRequest.verify|verify} messages. + * @param message DeleteExampleRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.IDeleteExampleRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** Definition condition. */ - public condition: string; + /** + * Encodes the specified DeleteExampleRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteExampleRequest.verify|verify} messages. + * @param message DeleteExampleRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IDeleteExampleRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** Definition versionVariants. */ - public versionVariants?: (google.cloud.dialogflow.cx.v3.IVersionVariants|null); + /** + * Decodes a DeleteExampleRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteExampleRequest + * @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.DeleteExampleRequest; - /** Definition variants. */ - public variants?: "versionVariants"; + /** + * Decodes a DeleteExampleRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteExampleRequest + * @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.DeleteExampleRequest; - /** - * Creates a new Definition instance using the specified properties. - * @param [properties] Properties to set - * @returns Definition instance - */ - public static create(properties?: google.cloud.dialogflow.cx.v3.Experiment.IDefinition): google.cloud.dialogflow.cx.v3.Experiment.Definition; + /** + * Verifies a DeleteExampleRequest 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); - /** - * Encodes the specified Definition message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Experiment.Definition.verify|verify} messages. - * @param message Definition message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.cx.v3.Experiment.IDefinition, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a DeleteExampleRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteExampleRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.DeleteExampleRequest; - /** - * Encodes the specified Definition message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Experiment.Definition.verify|verify} messages. - * @param message Definition message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.Experiment.IDefinition, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a plain object from a DeleteExampleRequest message. Also converts values to other types if specified. + * @param message DeleteExampleRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.DeleteExampleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Decodes a Definition message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Definition - * @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.Experiment.Definition; + /** + * Converts this DeleteExampleRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Decodes a Definition message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Definition - * @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.Experiment.Definition; + /** + * Gets the default type url for DeleteExampleRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Verifies a Definition 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); + /** Properties of a ListExamplesRequest. */ + interface IListExamplesRequest { - /** - * Creates a Definition message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Definition - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Experiment.Definition; + /** ListExamplesRequest parent */ + parent?: (string|null); - /** - * Creates a plain object from a Definition message. Also converts values to other types if specified. - * @param message Definition - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.cx.v3.Experiment.Definition, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** ListExamplesRequest pageSize */ + pageSize?: (number|null); - /** - * Converts this Definition to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** ListExamplesRequest pageToken */ + pageToken?: (string|null); - /** - * Gets the default type url for Definition - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** ListExamplesRequest languageCode */ + languageCode?: (string|null); + } - /** Properties of a Result. */ - interface IResult { + /** Represents a ListExamplesRequest. */ + class ListExamplesRequest implements IListExamplesRequest { - /** Result versionMetrics */ - versionMetrics?: (google.cloud.dialogflow.cx.v3.Experiment.Result.IVersionMetrics[]|null); + /** + * Constructs a new ListExamplesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.IListExamplesRequest); - /** Result lastUpdateTime */ - lastUpdateTime?: (google.protobuf.ITimestamp|null); - } + /** ListExamplesRequest parent. */ + public parent: string; - /** Represents a Result. */ - class Result implements IResult { + /** ListExamplesRequest pageSize. */ + public pageSize: number; - /** - * Constructs a new Result. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3.Experiment.IResult); + /** ListExamplesRequest pageToken. */ + public pageToken: string; - /** Result versionMetrics. */ - public versionMetrics: google.cloud.dialogflow.cx.v3.Experiment.Result.IVersionMetrics[]; + /** ListExamplesRequest languageCode. */ + public languageCode: string; - /** Result lastUpdateTime. */ - public lastUpdateTime?: (google.protobuf.ITimestamp|null); + /** + * Creates a new ListExamplesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListExamplesRequest instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.IListExamplesRequest): google.cloud.dialogflow.cx.v3.ListExamplesRequest; - /** - * Creates a new Result instance using the specified properties. - * @param [properties] Properties to set - * @returns Result instance - */ - public static create(properties?: google.cloud.dialogflow.cx.v3.Experiment.IResult): google.cloud.dialogflow.cx.v3.Experiment.Result; + /** + * Encodes the specified ListExamplesRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListExamplesRequest.verify|verify} messages. + * @param message ListExamplesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.IListExamplesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified Result message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Experiment.Result.verify|verify} messages. - * @param message Result message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.cx.v3.Experiment.IResult, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified ListExamplesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListExamplesRequest.verify|verify} messages. + * @param message ListExamplesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IListExamplesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified Result message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Experiment.Result.verify|verify} messages. - * @param message Result message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.Experiment.IResult, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes a ListExamplesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListExamplesRequest + * @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.ListExamplesRequest; - /** - * Decodes a Result message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Result - * @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.Experiment.Result; + /** + * Decodes a ListExamplesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListExamplesRequest + * @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.ListExamplesRequest; - /** - * Decodes a Result message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Result - * @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.Experiment.Result; + /** + * Verifies a ListExamplesRequest 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); - /** - * Verifies a Result 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 ListExamplesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListExamplesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ListExamplesRequest; - /** - * Creates a Result message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Result - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Experiment.Result; + /** + * Creates a plain object from a ListExamplesRequest message. Also converts values to other types if specified. + * @param message ListExamplesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.ListExamplesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a plain object from a Result message. Also converts values to other types if specified. - * @param message Result - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.cx.v3.Experiment.Result, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Converts this ListExamplesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Converts this Result to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Gets the default type url for ListExamplesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Gets the default type url for Result - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** Properties of a ListExamplesResponse. */ + interface IListExamplesResponse { - namespace Result { + /** ListExamplesResponse examples */ + examples?: (google.cloud.dialogflow.cx.v3.IExample[]|null); - /** MetricType enum. */ - enum MetricType { - METRIC_UNSPECIFIED = 0, - CONTAINED_SESSION_NO_CALLBACK_RATE = 1, - LIVE_AGENT_HANDOFF_RATE = 2, - CALLBACK_SESSION_RATE = 3, - ABANDONED_SESSION_RATE = 4, - SESSION_END_RATE = 5 - } + /** ListExamplesResponse nextPageToken */ + nextPageToken?: (string|null); + } - /** CountType enum. */ - enum CountType { - COUNT_TYPE_UNSPECIFIED = 0, - TOTAL_NO_MATCH_COUNT = 1, - TOTAL_TURN_COUNT = 2, - AVERAGE_TURN_COUNT = 3 - } + /** Represents a ListExamplesResponse. */ + class ListExamplesResponse implements IListExamplesResponse { - /** Properties of a ConfidenceInterval. */ - interface IConfidenceInterval { + /** + * Constructs a new ListExamplesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.IListExamplesResponse); - /** ConfidenceInterval confidenceLevel */ - confidenceLevel?: (number|null); + /** ListExamplesResponse examples. */ + public examples: google.cloud.dialogflow.cx.v3.IExample[]; - /** ConfidenceInterval ratio */ - ratio?: (number|null); + /** ListExamplesResponse nextPageToken. */ + public nextPageToken: string; - /** ConfidenceInterval lowerBound */ - lowerBound?: (number|null); + /** + * Creates a new ListExamplesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListExamplesResponse instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.IListExamplesResponse): google.cloud.dialogflow.cx.v3.ListExamplesResponse; - /** ConfidenceInterval upperBound */ - upperBound?: (number|null); - } + /** + * Encodes the specified ListExamplesResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListExamplesResponse.verify|verify} messages. + * @param message ListExamplesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.IListExamplesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** Represents a ConfidenceInterval. */ - class ConfidenceInterval implements IConfidenceInterval { + /** + * Encodes the specified ListExamplesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListExamplesResponse.verify|verify} messages. + * @param message ListExamplesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IListExamplesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Constructs a new ConfidenceInterval. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3.Experiment.Result.IConfidenceInterval); + /** + * Decodes a ListExamplesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListExamplesResponse + * @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.ListExamplesResponse; - /** ConfidenceInterval confidenceLevel. */ - public confidenceLevel: number; + /** + * Decodes a ListExamplesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListExamplesResponse + * @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.ListExamplesResponse; - /** ConfidenceInterval ratio. */ - public ratio: number; + /** + * Verifies a ListExamplesResponse 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); - /** ConfidenceInterval lowerBound. */ - public lowerBound: number; + /** + * Creates a ListExamplesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListExamplesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ListExamplesResponse; - /** ConfidenceInterval upperBound. */ - public upperBound: number; + /** + * Creates a plain object from a ListExamplesResponse message. Also converts values to other types if specified. + * @param message ListExamplesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.ListExamplesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a new ConfidenceInterval instance using the specified properties. - * @param [properties] Properties to set - * @returns ConfidenceInterval instance - */ - public static create(properties?: google.cloud.dialogflow.cx.v3.Experiment.Result.IConfidenceInterval): google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval; + /** + * Converts this ListExamplesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Encodes the specified ConfidenceInterval message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval.verify|verify} messages. - * @param message ConfidenceInterval message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.cx.v3.Experiment.Result.IConfidenceInterval, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Gets the default type url for ListExamplesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Encodes the specified ConfidenceInterval message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval.verify|verify} messages. - * @param message ConfidenceInterval message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.Experiment.Result.IConfidenceInterval, writer?: $protobuf.Writer): $protobuf.Writer; + /** Properties of a GetExampleRequest. */ + interface IGetExampleRequest { - /** - * Decodes a ConfidenceInterval message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ConfidenceInterval - * @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.Experiment.Result.ConfidenceInterval; + /** GetExampleRequest name */ + name?: (string|null); + } - /** - * Decodes a ConfidenceInterval message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ConfidenceInterval - * @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.Experiment.Result.ConfidenceInterval; - - /** - * Verifies a ConfidenceInterval 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 ConfidenceInterval message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ConfidenceInterval - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval; - - /** - * Creates a plain object from a ConfidenceInterval message. Also converts values to other types if specified. - * @param message ConfidenceInterval - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ConfidenceInterval to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ConfidenceInterval - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Metric. */ - interface IMetric { - - /** Metric type */ - type?: (google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType|keyof typeof google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType|null); - - /** Metric countType */ - countType?: (google.cloud.dialogflow.cx.v3.Experiment.Result.CountType|keyof typeof google.cloud.dialogflow.cx.v3.Experiment.Result.CountType|null); - - /** Metric ratio */ - ratio?: (number|null); - - /** Metric count */ - count?: (number|null); - - /** Metric confidenceInterval */ - confidenceInterval?: (google.cloud.dialogflow.cx.v3.Experiment.Result.IConfidenceInterval|null); - } - - /** Represents a Metric. */ - class Metric implements IMetric { - - /** - * Constructs a new Metric. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3.Experiment.Result.IMetric); - - /** Metric type. */ - public type: (google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType|keyof typeof google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType); - - /** Metric countType. */ - public countType: (google.cloud.dialogflow.cx.v3.Experiment.Result.CountType|keyof typeof google.cloud.dialogflow.cx.v3.Experiment.Result.CountType); - - /** Metric ratio. */ - public ratio?: (number|null); - - /** Metric count. */ - public count?: (number|null); - - /** Metric confidenceInterval. */ - public confidenceInterval?: (google.cloud.dialogflow.cx.v3.Experiment.Result.IConfidenceInterval|null); - - /** Metric value. */ - public value?: ("ratio"|"count"); - - /** - * Creates a new Metric instance using the specified properties. - * @param [properties] Properties to set - * @returns Metric instance - */ - public static create(properties?: google.cloud.dialogflow.cx.v3.Experiment.Result.IMetric): google.cloud.dialogflow.cx.v3.Experiment.Result.Metric; - - /** - * Encodes the specified Metric message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Experiment.Result.Metric.verify|verify} messages. - * @param message Metric message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.cx.v3.Experiment.Result.IMetric, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Metric message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Experiment.Result.Metric.verify|verify} messages. - * @param message Metric message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.Experiment.Result.IMetric, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Metric message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Metric - * @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.Experiment.Result.Metric; - - /** - * Decodes a Metric message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Metric - * @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.Experiment.Result.Metric; - - /** - * Verifies a Metric 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 Metric message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Metric - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Experiment.Result.Metric; - - /** - * Creates a plain object from a Metric message. Also converts values to other types if specified. - * @param message Metric - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.cx.v3.Experiment.Result.Metric, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Metric to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Metric - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a VersionMetrics. */ - interface IVersionMetrics { - - /** VersionMetrics version */ - version?: (string|null); - - /** VersionMetrics metrics */ - metrics?: (google.cloud.dialogflow.cx.v3.Experiment.Result.IMetric[]|null); - - /** VersionMetrics sessionCount */ - sessionCount?: (number|null); - } - - /** Represents a VersionMetrics. */ - class VersionMetrics implements IVersionMetrics { - - /** - * Constructs a new VersionMetrics. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3.Experiment.Result.IVersionMetrics); - - /** VersionMetrics version. */ - public version: string; - - /** VersionMetrics metrics. */ - public metrics: google.cloud.dialogflow.cx.v3.Experiment.Result.IMetric[]; - - /** VersionMetrics sessionCount. */ - public sessionCount: number; - - /** - * Creates a new VersionMetrics instance using the specified properties. - * @param [properties] Properties to set - * @returns VersionMetrics instance - */ - public static create(properties?: google.cloud.dialogflow.cx.v3.Experiment.Result.IVersionMetrics): google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics; - - /** - * Encodes the specified VersionMetrics message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics.verify|verify} messages. - * @param message VersionMetrics message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.cx.v3.Experiment.Result.IVersionMetrics, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified VersionMetrics message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics.verify|verify} messages. - * @param message VersionMetrics message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.Experiment.Result.IVersionMetrics, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a VersionMetrics message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns VersionMetrics - * @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.Experiment.Result.VersionMetrics; - - /** - * Decodes a VersionMetrics message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns VersionMetrics - * @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.Experiment.Result.VersionMetrics; - - /** - * Verifies a VersionMetrics 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 VersionMetrics message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns VersionMetrics - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics; - - /** - * Creates a plain object from a VersionMetrics message. Also converts values to other types if specified. - * @param message VersionMetrics - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this VersionMetrics to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for VersionMetrics - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - } - - /** Properties of a VersionVariants. */ - interface IVersionVariants { - - /** VersionVariants variants */ - variants?: (google.cloud.dialogflow.cx.v3.VersionVariants.IVariant[]|null); - } - - /** Represents a VersionVariants. */ - class VersionVariants implements IVersionVariants { + /** Represents a GetExampleRequest. */ + class GetExampleRequest implements IGetExampleRequest { /** - * Constructs a new VersionVariants. + * Constructs a new GetExampleRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IVersionVariants); + constructor(properties?: google.cloud.dialogflow.cx.v3.IGetExampleRequest); - /** VersionVariants variants. */ - public variants: google.cloud.dialogflow.cx.v3.VersionVariants.IVariant[]; + /** GetExampleRequest name. */ + public name: string; /** - * Creates a new VersionVariants instance using the specified properties. + * Creates a new GetExampleRequest instance using the specified properties. * @param [properties] Properties to set - * @returns VersionVariants instance + * @returns GetExampleRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IVersionVariants): google.cloud.dialogflow.cx.v3.VersionVariants; + public static create(properties?: google.cloud.dialogflow.cx.v3.IGetExampleRequest): google.cloud.dialogflow.cx.v3.GetExampleRequest; /** - * Encodes the specified VersionVariants message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.VersionVariants.verify|verify} messages. - * @param message VersionVariants message or plain object to encode + * Encodes the specified GetExampleRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetExampleRequest.verify|verify} messages. + * @param message GetExampleRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IVersionVariants, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IGetExampleRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified VersionVariants message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.VersionVariants.verify|verify} messages. - * @param message VersionVariants message or plain object to encode + * Encodes the specified GetExampleRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetExampleRequest.verify|verify} messages. + * @param message GetExampleRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IVersionVariants, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IGetExampleRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a VersionVariants message from the specified reader or buffer. + * Decodes a GetExampleRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns VersionVariants + * @returns GetExampleRequest * @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.VersionVariants; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.GetExampleRequest; /** - * Decodes a VersionVariants message from the specified reader or buffer, length delimited. + * Decodes a GetExampleRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns VersionVariants + * @returns GetExampleRequest * @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.VersionVariants; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.GetExampleRequest; /** - * Verifies a VersionVariants message. + * Verifies a GetExampleRequest 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 VersionVariants message from a plain object. Also converts values to their respective internal types. + * Creates a GetExampleRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns VersionVariants + * @returns GetExampleRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.VersionVariants; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.GetExampleRequest; /** - * Creates a plain object from a VersionVariants message. Also converts values to other types if specified. - * @param message VersionVariants + * Creates a plain object from a GetExampleRequest message. Also converts values to other types if specified. + * @param message GetExampleRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.VersionVariants, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.GetExampleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this VersionVariants to JSON. + * Converts this GetExampleRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for VersionVariants + * Gets the default type url for GetExampleRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace VersionVariants { - - /** Properties of a Variant. */ - interface IVariant { - - /** Variant version */ - version?: (string|null); - - /** Variant trafficAllocation */ - trafficAllocation?: (number|null); - - /** Variant isControlGroup */ - isControlGroup?: (boolean|null); - } - - /** Represents a Variant. */ - class Variant implements IVariant { - - /** - * Constructs a new Variant. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3.VersionVariants.IVariant); - - /** Variant version. */ - public version: string; - - /** Variant trafficAllocation. */ - public trafficAllocation: number; - - /** Variant isControlGroup. */ - public isControlGroup: boolean; - - /** - * Creates a new Variant instance using the specified properties. - * @param [properties] Properties to set - * @returns Variant instance - */ - public static create(properties?: google.cloud.dialogflow.cx.v3.VersionVariants.IVariant): google.cloud.dialogflow.cx.v3.VersionVariants.Variant; - - /** - * Encodes the specified Variant message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.VersionVariants.Variant.verify|verify} messages. - * @param message Variant message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.cx.v3.VersionVariants.IVariant, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Variant message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.VersionVariants.Variant.verify|verify} messages. - * @param message Variant message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.VersionVariants.IVariant, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Variant message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Variant - * @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.VersionVariants.Variant; - - /** - * Decodes a Variant message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Variant - * @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.VersionVariants.Variant; - - /** - * Verifies a Variant 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 Variant message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Variant - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.VersionVariants.Variant; - - /** - * Creates a plain object from a Variant message. Also converts values to other types if specified. - * @param message Variant - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.cx.v3.VersionVariants.Variant, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Variant to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Variant - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a VariantsHistory. */ - interface IVariantsHistory { + /** Properties of an UpdateExampleRequest. */ + interface IUpdateExampleRequest { - /** VariantsHistory versionVariants */ - versionVariants?: (google.cloud.dialogflow.cx.v3.IVersionVariants|null); + /** UpdateExampleRequest example */ + example?: (google.cloud.dialogflow.cx.v3.IExample|null); - /** VariantsHistory updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); + /** UpdateExampleRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); } - /** Represents a VariantsHistory. */ - class VariantsHistory implements IVariantsHistory { + /** Represents an UpdateExampleRequest. */ + class UpdateExampleRequest implements IUpdateExampleRequest { /** - * Constructs a new VariantsHistory. + * Constructs a new UpdateExampleRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IVariantsHistory); - - /** VariantsHistory versionVariants. */ - public versionVariants?: (google.cloud.dialogflow.cx.v3.IVersionVariants|null); + constructor(properties?: google.cloud.dialogflow.cx.v3.IUpdateExampleRequest); - /** VariantsHistory updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); + /** UpdateExampleRequest example. */ + public example?: (google.cloud.dialogflow.cx.v3.IExample|null); - /** VariantsHistory variants. */ - public variants?: "versionVariants"; + /** UpdateExampleRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); /** - * Creates a new VariantsHistory instance using the specified properties. + * Creates a new UpdateExampleRequest instance using the specified properties. * @param [properties] Properties to set - * @returns VariantsHistory instance + * @returns UpdateExampleRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IVariantsHistory): google.cloud.dialogflow.cx.v3.VariantsHistory; + public static create(properties?: google.cloud.dialogflow.cx.v3.IUpdateExampleRequest): google.cloud.dialogflow.cx.v3.UpdateExampleRequest; /** - * Encodes the specified VariantsHistory message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.VariantsHistory.verify|verify} messages. - * @param message VariantsHistory message or plain object to encode + * Encodes the specified UpdateExampleRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateExampleRequest.verify|verify} messages. + * @param message UpdateExampleRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IVariantsHistory, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IUpdateExampleRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified VariantsHistory message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.VariantsHistory.verify|verify} messages. - * @param message VariantsHistory message or plain object to encode + * Encodes the specified UpdateExampleRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateExampleRequest.verify|verify} messages. + * @param message UpdateExampleRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IVariantsHistory, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IUpdateExampleRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a VariantsHistory message from the specified reader or buffer. + * Decodes an UpdateExampleRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns VariantsHistory + * @returns UpdateExampleRequest * @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.VariantsHistory; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.UpdateExampleRequest; /** - * Decodes a VariantsHistory message from the specified reader or buffer, length delimited. + * Decodes an UpdateExampleRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns VariantsHistory + * @returns UpdateExampleRequest * @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.VariantsHistory; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.UpdateExampleRequest; /** - * Verifies a VariantsHistory message. + * Verifies an UpdateExampleRequest 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 VariantsHistory message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateExampleRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns VariantsHistory + * @returns UpdateExampleRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.VariantsHistory; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.UpdateExampleRequest; /** - * Creates a plain object from a VariantsHistory message. Also converts values to other types if specified. - * @param message VariantsHistory + * Creates a plain object from an UpdateExampleRequest message. Also converts values to other types if specified. + * @param message UpdateExampleRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.VariantsHistory, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.UpdateExampleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this VariantsHistory to JSON. + * Converts this UpdateExampleRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for VariantsHistory + * Gets the default type url for UpdateExampleRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a RolloutConfig. */ - interface IRolloutConfig { + /** Properties of an Example. */ + interface IExample { - /** RolloutConfig rolloutSteps */ - rolloutSteps?: (google.cloud.dialogflow.cx.v3.RolloutConfig.IRolloutStep[]|null); + /** Example name */ + name?: (string|null); - /** RolloutConfig rolloutCondition */ - rolloutCondition?: (string|null); + /** Example playbookInput */ + playbookInput?: (google.cloud.dialogflow.cx.v3.IPlaybookInput|null); - /** RolloutConfig failureCondition */ - failureCondition?: (string|null); + /** Example playbookOutput */ + playbookOutput?: (google.cloud.dialogflow.cx.v3.IPlaybookOutput|null); + + /** Example actions */ + actions?: (google.cloud.dialogflow.cx.v3.IAction[]|null); + + /** Example displayName */ + displayName?: (string|null); + + /** Example description */ + description?: (string|null); + + /** Example tokenCount */ + tokenCount?: (number|Long|string|null); + + /** Example createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Example updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** Example conversationState */ + conversationState?: (google.cloud.dialogflow.cx.v3.OutputState|keyof typeof google.cloud.dialogflow.cx.v3.OutputState|null); + + /** Example languageCode */ + languageCode?: (string|null); } - /** Represents a RolloutConfig. */ - class RolloutConfig implements IRolloutConfig { + /** Represents an Example. */ + class Example implements IExample { /** - * Constructs a new RolloutConfig. + * Constructs a new Example. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IRolloutConfig); + constructor(properties?: google.cloud.dialogflow.cx.v3.IExample); - /** RolloutConfig rolloutSteps. */ - public rolloutSteps: google.cloud.dialogflow.cx.v3.RolloutConfig.IRolloutStep[]; + /** Example name. */ + public name: string; - /** RolloutConfig rolloutCondition. */ - public rolloutCondition: string; + /** Example playbookInput. */ + public playbookInput?: (google.cloud.dialogflow.cx.v3.IPlaybookInput|null); - /** RolloutConfig failureCondition. */ - public failureCondition: string; + /** Example playbookOutput. */ + public playbookOutput?: (google.cloud.dialogflow.cx.v3.IPlaybookOutput|null); + + /** Example actions. */ + public actions: google.cloud.dialogflow.cx.v3.IAction[]; + + /** Example displayName. */ + public displayName: string; + + /** Example description. */ + public description: string; + + /** Example tokenCount. */ + public tokenCount: (number|Long|string); + + /** Example createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Example updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** Example conversationState. */ + public conversationState: (google.cloud.dialogflow.cx.v3.OutputState|keyof typeof google.cloud.dialogflow.cx.v3.OutputState); + + /** Example languageCode. */ + public languageCode: string; /** - * Creates a new RolloutConfig instance using the specified properties. + * Creates a new Example instance using the specified properties. * @param [properties] Properties to set - * @returns RolloutConfig instance + * @returns Example instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IRolloutConfig): google.cloud.dialogflow.cx.v3.RolloutConfig; + public static create(properties?: google.cloud.dialogflow.cx.v3.IExample): google.cloud.dialogflow.cx.v3.Example; /** - * Encodes the specified RolloutConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.RolloutConfig.verify|verify} messages. - * @param message RolloutConfig message or plain object to encode + * Encodes the specified Example message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Example.verify|verify} messages. + * @param message Example message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IRolloutConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IExample, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified RolloutConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.RolloutConfig.verify|verify} messages. - * @param message RolloutConfig message or plain object to encode + * Encodes the specified Example message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Example.verify|verify} messages. + * @param message Example message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IRolloutConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IExample, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RolloutConfig message from the specified reader or buffer. + * Decodes an Example message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns RolloutConfig + * @returns Example * @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.RolloutConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.Example; /** - * Decodes a RolloutConfig message from the specified reader or buffer, length delimited. + * Decodes an Example message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns RolloutConfig + * @returns Example * @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.RolloutConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.Example; /** - * Verifies a RolloutConfig message. + * Verifies an Example 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 RolloutConfig message from a plain object. Also converts values to their respective internal types. + * Creates an Example message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns RolloutConfig + * @returns Example */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.RolloutConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Example; /** - * Creates a plain object from a RolloutConfig message. Also converts values to other types if specified. - * @param message RolloutConfig + * Creates a plain object from an Example message. Also converts values to other types if specified. + * @param message Example * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.RolloutConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.Example, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this RolloutConfig to JSON. + * Converts this Example to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for RolloutConfig + * Gets the default type url for Example * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace RolloutConfig { - - /** Properties of a RolloutStep. */ - interface IRolloutStep { - - /** RolloutStep displayName */ - displayName?: (string|null); - - /** RolloutStep trafficPercent */ - trafficPercent?: (number|null); - - /** RolloutStep minDuration */ - minDuration?: (google.protobuf.IDuration|null); - } - - /** Represents a RolloutStep. */ - class RolloutStep implements IRolloutStep { - - /** - * Constructs a new RolloutStep. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3.RolloutConfig.IRolloutStep); - - /** RolloutStep displayName. */ - public displayName: string; - - /** RolloutStep trafficPercent. */ - public trafficPercent: number; - - /** RolloutStep minDuration. */ - public minDuration?: (google.protobuf.IDuration|null); - - /** - * Creates a new RolloutStep instance using the specified properties. - * @param [properties] Properties to set - * @returns RolloutStep instance - */ - public static create(properties?: google.cloud.dialogflow.cx.v3.RolloutConfig.IRolloutStep): google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep; - - /** - * Encodes the specified RolloutStep message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep.verify|verify} messages. - * @param message RolloutStep message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.cx.v3.RolloutConfig.IRolloutStep, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RolloutStep message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep.verify|verify} messages. - * @param message RolloutStep message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.RolloutConfig.IRolloutStep, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RolloutStep message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RolloutStep - * @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.RolloutConfig.RolloutStep; - - /** - * Decodes a RolloutStep message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RolloutStep - * @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.RolloutConfig.RolloutStep; - - /** - * Verifies a RolloutStep 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 RolloutStep message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RolloutStep - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep; - - /** - * Creates a plain object from a RolloutStep message. Also converts values to other types if specified. - * @param message RolloutStep - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RolloutStep to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RolloutStep - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a RolloutState. */ - interface IRolloutState { - - /** RolloutState step */ - step?: (string|null); - - /** RolloutState stepIndex */ - stepIndex?: (number|null); + /** Properties of a PlaybookInput. */ + interface IPlaybookInput { - /** RolloutState startTime */ - startTime?: (google.protobuf.ITimestamp|null); + /** PlaybookInput precedingConversationSummary */ + precedingConversationSummary?: (string|null); } - /** Represents a RolloutState. */ - class RolloutState implements IRolloutState { + /** Represents a PlaybookInput. */ + class PlaybookInput implements IPlaybookInput { /** - * Constructs a new RolloutState. + * Constructs a new PlaybookInput. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IRolloutState); - - /** RolloutState step. */ - public step: string; - - /** RolloutState stepIndex. */ - public stepIndex: number; + constructor(properties?: google.cloud.dialogflow.cx.v3.IPlaybookInput); - /** RolloutState startTime. */ - public startTime?: (google.protobuf.ITimestamp|null); + /** PlaybookInput precedingConversationSummary. */ + public precedingConversationSummary: string; /** - * Creates a new RolloutState instance using the specified properties. + * Creates a new PlaybookInput instance using the specified properties. * @param [properties] Properties to set - * @returns RolloutState instance + * @returns PlaybookInput instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IRolloutState): google.cloud.dialogflow.cx.v3.RolloutState; + public static create(properties?: google.cloud.dialogflow.cx.v3.IPlaybookInput): google.cloud.dialogflow.cx.v3.PlaybookInput; /** - * Encodes the specified RolloutState message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.RolloutState.verify|verify} messages. - * @param message RolloutState message or plain object to encode + * Encodes the specified PlaybookInput message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.PlaybookInput.verify|verify} messages. + * @param message PlaybookInput message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IRolloutState, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IPlaybookInput, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified RolloutState message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.RolloutState.verify|verify} messages. - * @param message RolloutState message or plain object to encode + * Encodes the specified PlaybookInput message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.PlaybookInput.verify|verify} messages. + * @param message PlaybookInput message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IRolloutState, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IPlaybookInput, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RolloutState message from the specified reader or buffer. + * Decodes a PlaybookInput message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns RolloutState + * @returns PlaybookInput * @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.RolloutState; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.PlaybookInput; /** - * Decodes a RolloutState message from the specified reader or buffer, length delimited. + * Decodes a PlaybookInput message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns RolloutState + * @returns PlaybookInput * @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.RolloutState; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.PlaybookInput; /** - * Verifies a RolloutState message. + * Verifies a PlaybookInput 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 RolloutState message from a plain object. Also converts values to their respective internal types. + * Creates a PlaybookInput message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns RolloutState + * @returns PlaybookInput */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.RolloutState; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.PlaybookInput; /** - * Creates a plain object from a RolloutState message. Also converts values to other types if specified. - * @param message RolloutState + * Creates a plain object from a PlaybookInput message. Also converts values to other types if specified. + * @param message PlaybookInput * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.RolloutState, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.PlaybookInput, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this RolloutState to JSON. + * Converts this PlaybookInput to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for RolloutState + * Gets the default type url for PlaybookInput * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListExperimentsRequest. */ - interface IListExperimentsRequest { - - /** ListExperimentsRequest parent */ - parent?: (string|null); - - /** ListExperimentsRequest pageSize */ - pageSize?: (number|null); + /** Properties of a PlaybookOutput. */ + interface IPlaybookOutput { - /** ListExperimentsRequest pageToken */ - pageToken?: (string|null); + /** PlaybookOutput executionSummary */ + executionSummary?: (string|null); } - /** Represents a ListExperimentsRequest. */ - class ListExperimentsRequest implements IListExperimentsRequest { + /** Represents a PlaybookOutput. */ + class PlaybookOutput implements IPlaybookOutput { /** - * Constructs a new ListExperimentsRequest. + * Constructs a new PlaybookOutput. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IListExperimentsRequest); - - /** ListExperimentsRequest parent. */ - public parent: string; + constructor(properties?: google.cloud.dialogflow.cx.v3.IPlaybookOutput); - /** ListExperimentsRequest pageSize. */ - public pageSize: number; - - /** ListExperimentsRequest pageToken. */ - public pageToken: string; + /** PlaybookOutput executionSummary. */ + public executionSummary: string; /** - * Creates a new ListExperimentsRequest instance using the specified properties. + * Creates a new PlaybookOutput instance using the specified properties. * @param [properties] Properties to set - * @returns ListExperimentsRequest instance + * @returns PlaybookOutput instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IListExperimentsRequest): google.cloud.dialogflow.cx.v3.ListExperimentsRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3.IPlaybookOutput): google.cloud.dialogflow.cx.v3.PlaybookOutput; /** - * Encodes the specified ListExperimentsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListExperimentsRequest.verify|verify} messages. - * @param message ListExperimentsRequest message or plain object to encode + * Encodes the specified PlaybookOutput message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.PlaybookOutput.verify|verify} messages. + * @param message PlaybookOutput message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IListExperimentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IPlaybookOutput, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListExperimentsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListExperimentsRequest.verify|verify} messages. - * @param message ListExperimentsRequest message or plain object to encode + * Encodes the specified PlaybookOutput message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.PlaybookOutput.verify|verify} messages. + * @param message PlaybookOutput message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IListExperimentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IPlaybookOutput, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListExperimentsRequest message from the specified reader or buffer. + * Decodes a PlaybookOutput message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListExperimentsRequest + * @returns PlaybookOutput * @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.ListExperimentsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.PlaybookOutput; /** - * Decodes a ListExperimentsRequest message from the specified reader or buffer, length delimited. + * Decodes a PlaybookOutput message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListExperimentsRequest + * @returns PlaybookOutput * @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.ListExperimentsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.PlaybookOutput; /** - * Verifies a ListExperimentsRequest message. + * Verifies a PlaybookOutput 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 ListExperimentsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a PlaybookOutput message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListExperimentsRequest + * @returns PlaybookOutput */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ListExperimentsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.PlaybookOutput; /** - * Creates a plain object from a ListExperimentsRequest message. Also converts values to other types if specified. - * @param message ListExperimentsRequest + * Creates a plain object from a PlaybookOutput message. Also converts values to other types if specified. + * @param message PlaybookOutput * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.ListExperimentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.PlaybookOutput, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListExperimentsRequest to JSON. + * Converts this PlaybookOutput to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListExperimentsRequest + * Gets the default type url for PlaybookOutput * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListExperimentsResponse. */ - interface IListExperimentsResponse { + /** Properties of an Action. */ + interface IAction { - /** ListExperimentsResponse experiments */ - experiments?: (google.cloud.dialogflow.cx.v3.IExperiment[]|null); + /** Action userUtterance */ + userUtterance?: (google.cloud.dialogflow.cx.v3.IUserUtterance|null); - /** ListExperimentsResponse nextPageToken */ - nextPageToken?: (string|null); + /** Action agentUtterance */ + agentUtterance?: (google.cloud.dialogflow.cx.v3.IAgentUtterance|null); + + /** Action toolUse */ + toolUse?: (google.cloud.dialogflow.cx.v3.IToolUse|null); + + /** Action playbookInvocation */ + playbookInvocation?: (google.cloud.dialogflow.cx.v3.IPlaybookInvocation|null); + + /** Action flowInvocation */ + flowInvocation?: (google.cloud.dialogflow.cx.v3.IFlowInvocation|null); + + /** Action playbookTransition */ + playbookTransition?: (google.cloud.dialogflow.cx.v3.IPlaybookTransition|null); + + /** Action flowTransition */ + flowTransition?: (google.cloud.dialogflow.cx.v3.IFlowTransition|null); } - /** Represents a ListExperimentsResponse. */ - class ListExperimentsResponse implements IListExperimentsResponse { + /** Represents an Action. */ + class Action implements IAction { /** - * Constructs a new ListExperimentsResponse. + * Constructs a new Action. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IListExperimentsResponse); + constructor(properties?: google.cloud.dialogflow.cx.v3.IAction); - /** ListExperimentsResponse experiments. */ - public experiments: google.cloud.dialogflow.cx.v3.IExperiment[]; + /** Action userUtterance. */ + public userUtterance?: (google.cloud.dialogflow.cx.v3.IUserUtterance|null); - /** ListExperimentsResponse nextPageToken. */ - public nextPageToken: string; + /** Action agentUtterance. */ + public agentUtterance?: (google.cloud.dialogflow.cx.v3.IAgentUtterance|null); + + /** Action toolUse. */ + public toolUse?: (google.cloud.dialogflow.cx.v3.IToolUse|null); + + /** Action playbookInvocation. */ + public playbookInvocation?: (google.cloud.dialogflow.cx.v3.IPlaybookInvocation|null); + + /** Action flowInvocation. */ + public flowInvocation?: (google.cloud.dialogflow.cx.v3.IFlowInvocation|null); + + /** Action playbookTransition. */ + public playbookTransition?: (google.cloud.dialogflow.cx.v3.IPlaybookTransition|null); + + /** Action flowTransition. */ + public flowTransition?: (google.cloud.dialogflow.cx.v3.IFlowTransition|null); + + /** Action action. */ + public action?: ("userUtterance"|"agentUtterance"|"toolUse"|"playbookInvocation"|"flowInvocation"|"playbookTransition"|"flowTransition"); /** - * Creates a new ListExperimentsResponse instance using the specified properties. + * Creates a new Action instance using the specified properties. * @param [properties] Properties to set - * @returns ListExperimentsResponse instance + * @returns Action instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IListExperimentsResponse): google.cloud.dialogflow.cx.v3.ListExperimentsResponse; + public static create(properties?: google.cloud.dialogflow.cx.v3.IAction): google.cloud.dialogflow.cx.v3.Action; /** - * Encodes the specified ListExperimentsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListExperimentsResponse.verify|verify} messages. - * @param message ListExperimentsResponse message or plain object to encode + * Encodes the specified Action message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Action.verify|verify} messages. + * @param message Action message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IListExperimentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IAction, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListExperimentsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListExperimentsResponse.verify|verify} messages. - * @param message ListExperimentsResponse message or plain object to encode + * Encodes the specified Action message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Action.verify|verify} messages. + * @param message Action message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IListExperimentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IAction, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListExperimentsResponse message from the specified reader or buffer. + * Decodes an Action message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListExperimentsResponse + * @returns Action * @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.ListExperimentsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.Action; /** - * Decodes a ListExperimentsResponse message from the specified reader or buffer, length delimited. + * Decodes an Action message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListExperimentsResponse + * @returns Action * @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.ListExperimentsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.Action; /** - * Verifies a ListExperimentsResponse message. + * Verifies an Action 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 ListExperimentsResponse message from a plain object. Also converts values to their respective internal types. + * Creates an Action message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListExperimentsResponse + * @returns Action */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ListExperimentsResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Action; /** - * Creates a plain object from a ListExperimentsResponse message. Also converts values to other types if specified. - * @param message ListExperimentsResponse + * Creates a plain object from an Action message. Also converts values to other types if specified. + * @param message Action * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.ListExperimentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.Action, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListExperimentsResponse to JSON. + * Converts this Action to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListExperimentsResponse + * Gets the default type url for Action * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GetExperimentRequest. */ - interface IGetExperimentRequest { + /** Properties of a UserUtterance. */ + interface IUserUtterance { - /** GetExperimentRequest name */ - name?: (string|null); + /** UserUtterance text */ + text?: (string|null); } - /** Represents a GetExperimentRequest. */ - class GetExperimentRequest implements IGetExperimentRequest { + /** Represents a UserUtterance. */ + class UserUtterance implements IUserUtterance { /** - * Constructs a new GetExperimentRequest. + * Constructs a new UserUtterance. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IGetExperimentRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3.IUserUtterance); - /** GetExperimentRequest name. */ - public name: string; + /** UserUtterance text. */ + public text: string; /** - * Creates a new GetExperimentRequest instance using the specified properties. + * Creates a new UserUtterance instance using the specified properties. * @param [properties] Properties to set - * @returns GetExperimentRequest instance + * @returns UserUtterance instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IGetExperimentRequest): google.cloud.dialogflow.cx.v3.GetExperimentRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3.IUserUtterance): google.cloud.dialogflow.cx.v3.UserUtterance; /** - * Encodes the specified GetExperimentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetExperimentRequest.verify|verify} messages. - * @param message GetExperimentRequest message or plain object to encode + * Encodes the specified UserUtterance message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UserUtterance.verify|verify} messages. + * @param message UserUtterance message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IGetExperimentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IUserUtterance, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetExperimentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetExperimentRequest.verify|verify} messages. - * @param message GetExperimentRequest message or plain object to encode + * Encodes the specified UserUtterance message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UserUtterance.verify|verify} messages. + * @param message UserUtterance message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IGetExperimentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IUserUtterance, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetExperimentRequest message from the specified reader or buffer. + * Decodes a UserUtterance message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetExperimentRequest + * @returns UserUtterance * @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.GetExperimentRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.UserUtterance; /** - * Decodes a GetExperimentRequest message from the specified reader or buffer, length delimited. + * Decodes a UserUtterance message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetExperimentRequest + * @returns UserUtterance * @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.GetExperimentRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.UserUtterance; /** - * Verifies a GetExperimentRequest message. + * Verifies a UserUtterance 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 GetExperimentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a UserUtterance message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetExperimentRequest + * @returns UserUtterance */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.GetExperimentRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.UserUtterance; /** - * Creates a plain object from a GetExperimentRequest message. Also converts values to other types if specified. - * @param message GetExperimentRequest + * Creates a plain object from a UserUtterance message. Also converts values to other types if specified. + * @param message UserUtterance * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.GetExperimentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.UserUtterance, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetExperimentRequest to JSON. + * Converts this UserUtterance to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GetExperimentRequest + * Gets the default type url for UserUtterance * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CreateExperimentRequest. */ - interface ICreateExperimentRequest { + /** Properties of an AgentUtterance. */ + interface IAgentUtterance { - /** CreateExperimentRequest parent */ - parent?: (string|null); - - /** CreateExperimentRequest experiment */ - experiment?: (google.cloud.dialogflow.cx.v3.IExperiment|null); + /** AgentUtterance text */ + text?: (string|null); } - /** Represents a CreateExperimentRequest. */ - class CreateExperimentRequest implements ICreateExperimentRequest { + /** Represents an AgentUtterance. */ + class AgentUtterance implements IAgentUtterance { /** - * Constructs a new CreateExperimentRequest. + * Constructs a new AgentUtterance. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.ICreateExperimentRequest); - - /** CreateExperimentRequest parent. */ - public parent: string; + constructor(properties?: google.cloud.dialogflow.cx.v3.IAgentUtterance); - /** CreateExperimentRequest experiment. */ - public experiment?: (google.cloud.dialogflow.cx.v3.IExperiment|null); + /** AgentUtterance text. */ + public text: string; /** - * Creates a new CreateExperimentRequest instance using the specified properties. + * Creates a new AgentUtterance instance using the specified properties. * @param [properties] Properties to set - * @returns CreateExperimentRequest instance + * @returns AgentUtterance instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.ICreateExperimentRequest): google.cloud.dialogflow.cx.v3.CreateExperimentRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3.IAgentUtterance): google.cloud.dialogflow.cx.v3.AgentUtterance; /** - * Encodes the specified CreateExperimentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateExperimentRequest.verify|verify} messages. - * @param message CreateExperimentRequest message or plain object to encode + * Encodes the specified AgentUtterance message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.AgentUtterance.verify|verify} messages. + * @param message AgentUtterance message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.ICreateExperimentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IAgentUtterance, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateExperimentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateExperimentRequest.verify|verify} messages. - * @param message CreateExperimentRequest message or plain object to encode + * Encodes the specified AgentUtterance message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.AgentUtterance.verify|verify} messages. + * @param message AgentUtterance message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ICreateExperimentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IAgentUtterance, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateExperimentRequest message from the specified reader or buffer. + * Decodes an AgentUtterance message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateExperimentRequest + * @returns AgentUtterance * @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.CreateExperimentRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.AgentUtterance; /** - * Decodes a CreateExperimentRequest message from the specified reader or buffer, length delimited. + * Decodes an AgentUtterance message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateExperimentRequest + * @returns AgentUtterance * @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.CreateExperimentRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.AgentUtterance; /** - * Verifies a CreateExperimentRequest message. + * Verifies an AgentUtterance 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 CreateExperimentRequest message from a plain object. Also converts values to their respective internal types. + * Creates an AgentUtterance message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateExperimentRequest + * @returns AgentUtterance */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.CreateExperimentRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.AgentUtterance; /** - * Creates a plain object from a CreateExperimentRequest message. Also converts values to other types if specified. - * @param message CreateExperimentRequest + * Creates a plain object from an AgentUtterance message. Also converts values to other types if specified. + * @param message AgentUtterance * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.CreateExperimentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.AgentUtterance, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateExperimentRequest to JSON. + * Converts this AgentUtterance to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CreateExperimentRequest + * Gets the default type url for AgentUtterance * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an UpdateExperimentRequest. */ - interface IUpdateExperimentRequest { + /** Properties of a ToolUse. */ + interface IToolUse { - /** UpdateExperimentRequest experiment */ - experiment?: (google.cloud.dialogflow.cx.v3.IExperiment|null); + /** ToolUse tool */ + tool?: (string|null); - /** UpdateExperimentRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** ToolUse displayName */ + displayName?: (string|null); + + /** ToolUse action */ + action?: (string|null); + + /** ToolUse inputActionParameters */ + inputActionParameters?: (google.protobuf.IStruct|null); + + /** ToolUse outputActionParameters */ + outputActionParameters?: (google.protobuf.IStruct|null); } - /** Represents an UpdateExperimentRequest. */ - class UpdateExperimentRequest implements IUpdateExperimentRequest { + /** Represents a ToolUse. */ + class ToolUse implements IToolUse { /** - * Constructs a new UpdateExperimentRequest. + * Constructs a new ToolUse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IUpdateExperimentRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3.IToolUse); - /** UpdateExperimentRequest experiment. */ - public experiment?: (google.cloud.dialogflow.cx.v3.IExperiment|null); + /** ToolUse tool. */ + public tool: string; - /** UpdateExperimentRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** ToolUse displayName. */ + public displayName: string; + + /** ToolUse action. */ + public action: string; + + /** ToolUse inputActionParameters. */ + public inputActionParameters?: (google.protobuf.IStruct|null); + + /** ToolUse outputActionParameters. */ + public outputActionParameters?: (google.protobuf.IStruct|null); /** - * Creates a new UpdateExperimentRequest instance using the specified properties. + * Creates a new ToolUse instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateExperimentRequest instance + * @returns ToolUse instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IUpdateExperimentRequest): google.cloud.dialogflow.cx.v3.UpdateExperimentRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3.IToolUse): google.cloud.dialogflow.cx.v3.ToolUse; /** - * Encodes the specified UpdateExperimentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateExperimentRequest.verify|verify} messages. - * @param message UpdateExperimentRequest message or plain object to encode + * Encodes the specified ToolUse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ToolUse.verify|verify} messages. + * @param message ToolUse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IUpdateExperimentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IToolUse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateExperimentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateExperimentRequest.verify|verify} messages. - * @param message UpdateExperimentRequest message or plain object to encode + * Encodes the specified ToolUse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ToolUse.verify|verify} messages. + * @param message ToolUse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IUpdateExperimentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IToolUse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateExperimentRequest message from the specified reader or buffer. + * Decodes a ToolUse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateExperimentRequest + * @returns ToolUse * @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.UpdateExperimentRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.ToolUse; /** - * Decodes an UpdateExperimentRequest message from the specified reader or buffer, length delimited. + * Decodes a ToolUse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateExperimentRequest + * @returns ToolUse * @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.UpdateExperimentRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.ToolUse; /** - * Verifies an UpdateExperimentRequest message. + * Verifies a ToolUse 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 UpdateExperimentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ToolUse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateExperimentRequest + * @returns ToolUse */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.UpdateExperimentRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ToolUse; /** - * Creates a plain object from an UpdateExperimentRequest message. Also converts values to other types if specified. - * @param message UpdateExperimentRequest + * Creates a plain object from a ToolUse message. Also converts values to other types if specified. + * @param message ToolUse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.UpdateExperimentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.ToolUse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateExperimentRequest to JSON. + * Converts this ToolUse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for UpdateExperimentRequest + * Gets the default type url for ToolUse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a DeleteExperimentRequest. */ - interface IDeleteExperimentRequest { + /** Properties of a PlaybookInvocation. */ + interface IPlaybookInvocation { - /** DeleteExperimentRequest name */ - name?: (string|null); + /** PlaybookInvocation playbook */ + playbook?: (string|null); + + /** PlaybookInvocation displayName */ + displayName?: (string|null); + + /** PlaybookInvocation playbookInput */ + playbookInput?: (google.cloud.dialogflow.cx.v3.IPlaybookInput|null); + + /** PlaybookInvocation playbookOutput */ + playbookOutput?: (google.cloud.dialogflow.cx.v3.IPlaybookOutput|null); + + /** PlaybookInvocation playbookState */ + playbookState?: (google.cloud.dialogflow.cx.v3.OutputState|keyof typeof google.cloud.dialogflow.cx.v3.OutputState|null); } - /** Represents a DeleteExperimentRequest. */ - class DeleteExperimentRequest implements IDeleteExperimentRequest { + /** Represents a PlaybookInvocation. */ + class PlaybookInvocation implements IPlaybookInvocation { /** - * Constructs a new DeleteExperimentRequest. + * Constructs a new PlaybookInvocation. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IDeleteExperimentRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3.IPlaybookInvocation); - /** DeleteExperimentRequest name. */ - public name: string; + /** PlaybookInvocation playbook. */ + public playbook: string; + + /** PlaybookInvocation displayName. */ + public displayName: string; + + /** PlaybookInvocation playbookInput. */ + public playbookInput?: (google.cloud.dialogflow.cx.v3.IPlaybookInput|null); + + /** PlaybookInvocation playbookOutput. */ + public playbookOutput?: (google.cloud.dialogflow.cx.v3.IPlaybookOutput|null); + + /** PlaybookInvocation playbookState. */ + public playbookState: (google.cloud.dialogflow.cx.v3.OutputState|keyof typeof google.cloud.dialogflow.cx.v3.OutputState); /** - * Creates a new DeleteExperimentRequest instance using the specified properties. + * Creates a new PlaybookInvocation instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteExperimentRequest instance + * @returns PlaybookInvocation instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IDeleteExperimentRequest): google.cloud.dialogflow.cx.v3.DeleteExperimentRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3.IPlaybookInvocation): google.cloud.dialogflow.cx.v3.PlaybookInvocation; /** - * Encodes the specified DeleteExperimentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteExperimentRequest.verify|verify} messages. - * @param message DeleteExperimentRequest message or plain object to encode + * Encodes the specified PlaybookInvocation message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.PlaybookInvocation.verify|verify} messages. + * @param message PlaybookInvocation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IDeleteExperimentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IPlaybookInvocation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteExperimentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteExperimentRequest.verify|verify} messages. - * @param message DeleteExperimentRequest message or plain object to encode + * Encodes the specified PlaybookInvocation message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.PlaybookInvocation.verify|verify} messages. + * @param message PlaybookInvocation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IDeleteExperimentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IPlaybookInvocation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteExperimentRequest message from the specified reader or buffer. + * Decodes a PlaybookInvocation message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteExperimentRequest + * @returns PlaybookInvocation * @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.DeleteExperimentRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.PlaybookInvocation; /** - * Decodes a DeleteExperimentRequest message from the specified reader or buffer, length delimited. + * Decodes a PlaybookInvocation message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteExperimentRequest + * @returns PlaybookInvocation * @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.DeleteExperimentRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.PlaybookInvocation; /** - * Verifies a DeleteExperimentRequest message. + * Verifies a PlaybookInvocation 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 DeleteExperimentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a PlaybookInvocation message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteExperimentRequest + * @returns PlaybookInvocation */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.DeleteExperimentRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.PlaybookInvocation; /** - * Creates a plain object from a DeleteExperimentRequest message. Also converts values to other types if specified. - * @param message DeleteExperimentRequest + * Creates a plain object from a PlaybookInvocation message. Also converts values to other types if specified. + * @param message PlaybookInvocation * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.DeleteExperimentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.PlaybookInvocation, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteExperimentRequest to JSON. + * Converts this PlaybookInvocation to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DeleteExperimentRequest + * Gets the default type url for PlaybookInvocation * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a StartExperimentRequest. */ - interface IStartExperimentRequest { + /** Properties of a FlowInvocation. */ + interface IFlowInvocation { - /** StartExperimentRequest name */ - name?: (string|null); + /** FlowInvocation flow */ + flow?: (string|null); + + /** FlowInvocation displayName */ + displayName?: (string|null); + + /** FlowInvocation flowState */ + flowState?: (google.cloud.dialogflow.cx.v3.OutputState|keyof typeof google.cloud.dialogflow.cx.v3.OutputState|null); } - /** Represents a StartExperimentRequest. */ - class StartExperimentRequest implements IStartExperimentRequest { + /** Represents a FlowInvocation. */ + class FlowInvocation implements IFlowInvocation { /** - * Constructs a new StartExperimentRequest. + * Constructs a new FlowInvocation. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IStartExperimentRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3.IFlowInvocation); - /** StartExperimentRequest name. */ - public name: string; + /** FlowInvocation flow. */ + public flow: string; + + /** FlowInvocation displayName. */ + public displayName: string; + + /** FlowInvocation flowState. */ + public flowState: (google.cloud.dialogflow.cx.v3.OutputState|keyof typeof google.cloud.dialogflow.cx.v3.OutputState); /** - * Creates a new StartExperimentRequest instance using the specified properties. + * Creates a new FlowInvocation instance using the specified properties. * @param [properties] Properties to set - * @returns StartExperimentRequest instance + * @returns FlowInvocation instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IStartExperimentRequest): google.cloud.dialogflow.cx.v3.StartExperimentRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3.IFlowInvocation): google.cloud.dialogflow.cx.v3.FlowInvocation; /** - * Encodes the specified StartExperimentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.StartExperimentRequest.verify|verify} messages. - * @param message StartExperimentRequest message or plain object to encode + * Encodes the specified FlowInvocation message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.FlowInvocation.verify|verify} messages. + * @param message FlowInvocation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IStartExperimentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IFlowInvocation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified StartExperimentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.StartExperimentRequest.verify|verify} messages. - * @param message StartExperimentRequest message or plain object to encode + * Encodes the specified FlowInvocation message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.FlowInvocation.verify|verify} messages. + * @param message FlowInvocation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IStartExperimentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IFlowInvocation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a StartExperimentRequest message from the specified reader or buffer. + * Decodes a FlowInvocation message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns StartExperimentRequest + * @returns FlowInvocation * @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.StartExperimentRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.FlowInvocation; /** - * Decodes a StartExperimentRequest message from the specified reader or buffer, length delimited. + * Decodes a FlowInvocation message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns StartExperimentRequest + * @returns FlowInvocation * @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.StartExperimentRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.FlowInvocation; /** - * Verifies a StartExperimentRequest message. + * Verifies a FlowInvocation 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 StartExperimentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a FlowInvocation message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns StartExperimentRequest + * @returns FlowInvocation */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.StartExperimentRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.FlowInvocation; /** - * Creates a plain object from a StartExperimentRequest message. Also converts values to other types if specified. - * @param message StartExperimentRequest + * Creates a plain object from a FlowInvocation message. Also converts values to other types if specified. + * @param message FlowInvocation * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.StartExperimentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.FlowInvocation, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this StartExperimentRequest to JSON. + * Converts this FlowInvocation to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for StartExperimentRequest + * Gets the default type url for FlowInvocation * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a StopExperimentRequest. */ - interface IStopExperimentRequest { + /** Properties of a PlaybookTransition. */ + interface IPlaybookTransition { - /** StopExperimentRequest name */ - name?: (string|null); + /** PlaybookTransition playbook */ + playbook?: (string|null); + + /** PlaybookTransition displayName */ + displayName?: (string|null); } - /** Represents a StopExperimentRequest. */ - class StopExperimentRequest implements IStopExperimentRequest { + /** Represents a PlaybookTransition. */ + class PlaybookTransition implements IPlaybookTransition { /** - * Constructs a new StopExperimentRequest. + * Constructs a new PlaybookTransition. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IStopExperimentRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3.IPlaybookTransition); - /** StopExperimentRequest name. */ - public name: string; + /** PlaybookTransition playbook. */ + public playbook: string; + + /** PlaybookTransition displayName. */ + public displayName: string; /** - * Creates a new StopExperimentRequest instance using the specified properties. + * Creates a new PlaybookTransition instance using the specified properties. * @param [properties] Properties to set - * @returns StopExperimentRequest instance + * @returns PlaybookTransition instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IStopExperimentRequest): google.cloud.dialogflow.cx.v3.StopExperimentRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3.IPlaybookTransition): google.cloud.dialogflow.cx.v3.PlaybookTransition; /** - * Encodes the specified StopExperimentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.StopExperimentRequest.verify|verify} messages. - * @param message StopExperimentRequest message or plain object to encode + * Encodes the specified PlaybookTransition message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.PlaybookTransition.verify|verify} messages. + * @param message PlaybookTransition message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IStopExperimentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IPlaybookTransition, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified StopExperimentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.StopExperimentRequest.verify|verify} messages. - * @param message StopExperimentRequest message or plain object to encode + * Encodes the specified PlaybookTransition message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.PlaybookTransition.verify|verify} messages. + * @param message PlaybookTransition message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IStopExperimentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IPlaybookTransition, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a StopExperimentRequest message from the specified reader or buffer. + * Decodes a PlaybookTransition message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns StopExperimentRequest + * @returns PlaybookTransition * @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.StopExperimentRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.PlaybookTransition; /** - * Decodes a StopExperimentRequest message from the specified reader or buffer, length delimited. + * Decodes a PlaybookTransition message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns StopExperimentRequest + * @returns PlaybookTransition * @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.StopExperimentRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.PlaybookTransition; /** - * Verifies a StopExperimentRequest message. + * Verifies a PlaybookTransition 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 StopExperimentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a PlaybookTransition message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns StopExperimentRequest + * @returns PlaybookTransition */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.StopExperimentRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.PlaybookTransition; /** - * Creates a plain object from a StopExperimentRequest message. Also converts values to other types if specified. - * @param message StopExperimentRequest + * Creates a plain object from a PlaybookTransition message. Also converts values to other types if specified. + * @param message PlaybookTransition * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.StopExperimentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.PlaybookTransition, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this StopExperimentRequest to JSON. + * Converts this PlaybookTransition to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for StopExperimentRequest + * Gets the default type url for PlaybookTransition * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Represents a Generators */ - class Generators extends $protobuf.rpc.Service { + /** Properties of a FlowTransition. */ + interface IFlowTransition { - /** - * Constructs a new Generators service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + /** FlowTransition flow */ + flow?: (string|null); + + /** FlowTransition displayName */ + displayName?: (string|null); + } + + /** Represents a FlowTransition. */ + class FlowTransition implements IFlowTransition { /** - * Creates new Generators service using the specified rpc implementation. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - * @returns RPC service. Useful where requests and/or responses are streamed. + * Constructs a new FlowTransition. + * @param [properties] Properties to set */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Generators; + constructor(properties?: google.cloud.dialogflow.cx.v3.IFlowTransition); + + /** FlowTransition flow. */ + public flow: string; + + /** FlowTransition displayName. */ + public displayName: string; /** - * Calls ListGenerators. - * @param request ListGeneratorsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListGeneratorsResponse + * Creates a new FlowTransition instance using the specified properties. + * @param [properties] Properties to set + * @returns FlowTransition instance */ - public listGenerators(request: google.cloud.dialogflow.cx.v3.IListGeneratorsRequest, callback: google.cloud.dialogflow.cx.v3.Generators.ListGeneratorsCallback): void; + public static create(properties?: google.cloud.dialogflow.cx.v3.IFlowTransition): google.cloud.dialogflow.cx.v3.FlowTransition; /** - * Calls ListGenerators. - * @param request ListGeneratorsRequest message or plain object - * @returns Promise + * Encodes the specified FlowTransition message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.FlowTransition.verify|verify} messages. + * @param message FlowTransition message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public listGenerators(request: google.cloud.dialogflow.cx.v3.IListGeneratorsRequest): Promise; + public static encode(message: google.cloud.dialogflow.cx.v3.IFlowTransition, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls GetGenerator. - * @param request GetGeneratorRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Generator + * Encodes the specified FlowTransition message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.FlowTransition.verify|verify} messages. + * @param message FlowTransition message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public getGenerator(request: google.cloud.dialogflow.cx.v3.IGetGeneratorRequest, callback: google.cloud.dialogflow.cx.v3.Generators.GetGeneratorCallback): void; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IFlowTransition, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls GetGenerator. - * @param request GetGeneratorRequest message or plain object - * @returns Promise + * Decodes a FlowTransition message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FlowTransition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public getGenerator(request: google.cloud.dialogflow.cx.v3.IGetGeneratorRequest): Promise; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.FlowTransition; /** - * Calls CreateGenerator. - * @param request CreateGeneratorRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Generator + * Decodes a FlowTransition message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FlowTransition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public createGenerator(request: google.cloud.dialogflow.cx.v3.ICreateGeneratorRequest, callback: google.cloud.dialogflow.cx.v3.Generators.CreateGeneratorCallback): void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.FlowTransition; /** - * Calls CreateGenerator. - * @param request CreateGeneratorRequest message or plain object - * @returns Promise + * Verifies a FlowTransition message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public createGenerator(request: google.cloud.dialogflow.cx.v3.ICreateGeneratorRequest): Promise; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls UpdateGenerator. - * @param request UpdateGeneratorRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Generator + * Creates a FlowTransition message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FlowTransition */ - public updateGenerator(request: google.cloud.dialogflow.cx.v3.IUpdateGeneratorRequest, callback: google.cloud.dialogflow.cx.v3.Generators.UpdateGeneratorCallback): void; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.FlowTransition; /** - * Calls UpdateGenerator. - * @param request UpdateGeneratorRequest message or plain object - * @returns Promise + * Creates a plain object from a FlowTransition message. Also converts values to other types if specified. + * @param message FlowTransition + * @param [options] Conversion options + * @returns Plain object */ - public updateGenerator(request: google.cloud.dialogflow.cx.v3.IUpdateGeneratorRequest): Promise; + public static toObject(message: google.cloud.dialogflow.cx.v3.FlowTransition, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls DeleteGenerator. - * @param request DeleteGeneratorRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty + * Converts this FlowTransition to JSON. + * @returns JSON object */ - public deleteGenerator(request: google.cloud.dialogflow.cx.v3.IDeleteGeneratorRequest, callback: google.cloud.dialogflow.cx.v3.Generators.DeleteGeneratorCallback): void; + public toJSON(): { [k: string]: any }; /** - * Calls DeleteGenerator. - * @param request DeleteGeneratorRequest message or plain object - * @returns Promise + * Gets the default type url for FlowTransition + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url */ - public deleteGenerator(request: google.cloud.dialogflow.cx.v3.IDeleteGeneratorRequest): Promise; + public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace Generators { + /** OutputState enum. */ + enum OutputState { + OUTPUT_STATE_UNSPECIFIED = 0, + OUTPUT_STATE_OK = 1, + OUTPUT_STATE_CANCELLED = 2, + OUTPUT_STATE_FAILED = 3, + OUTPUT_STATE_ESCALATED = 4, + OUTPUT_STATE_PENDING = 5 + } + + /** Represents an Experiments */ + class Experiments extends $protobuf.rpc.Service { /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Generators|listGenerators}. - * @param error Error, if any - * @param [response] ListGeneratorsResponse + * Constructs a new Experiments service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited */ - type ListGeneratorsCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.ListGeneratorsResponse) => void; + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Generators|getGenerator}. - * @param error Error, if any - * @param [response] Generator + * Creates new Experiments service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. */ - type GetGeneratorCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.Generator) => void; + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Experiments; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Generators|createGenerator}. - * @param error Error, if any - * @param [response] Generator + * Calls ListExperiments. + * @param request ListExperimentsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListExperimentsResponse */ - type CreateGeneratorCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.Generator) => void; + public listExperiments(request: google.cloud.dialogflow.cx.v3.IListExperimentsRequest, callback: google.cloud.dialogflow.cx.v3.Experiments.ListExperimentsCallback): void; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Generators|updateGenerator}. - * @param error Error, if any - * @param [response] Generator + * Calls ListExperiments. + * @param request ListExperimentsRequest message or plain object + * @returns Promise */ - type UpdateGeneratorCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.Generator) => void; + public listExperiments(request: google.cloud.dialogflow.cx.v3.IListExperimentsRequest): Promise; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Generators|deleteGenerator}. + * Calls GetExperiment. + * @param request GetExperimentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Experiment + */ + public getExperiment(request: google.cloud.dialogflow.cx.v3.IGetExperimentRequest, callback: google.cloud.dialogflow.cx.v3.Experiments.GetExperimentCallback): void; + + /** + * Calls GetExperiment. + * @param request GetExperimentRequest message or plain object + * @returns Promise + */ + public getExperiment(request: google.cloud.dialogflow.cx.v3.IGetExperimentRequest): Promise; + + /** + * Calls CreateExperiment. + * @param request CreateExperimentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Experiment + */ + public createExperiment(request: google.cloud.dialogflow.cx.v3.ICreateExperimentRequest, callback: google.cloud.dialogflow.cx.v3.Experiments.CreateExperimentCallback): void; + + /** + * Calls CreateExperiment. + * @param request CreateExperimentRequest message or plain object + * @returns Promise + */ + public createExperiment(request: google.cloud.dialogflow.cx.v3.ICreateExperimentRequest): Promise; + + /** + * Calls UpdateExperiment. + * @param request UpdateExperimentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Experiment + */ + public updateExperiment(request: google.cloud.dialogflow.cx.v3.IUpdateExperimentRequest, callback: google.cloud.dialogflow.cx.v3.Experiments.UpdateExperimentCallback): void; + + /** + * Calls UpdateExperiment. + * @param request UpdateExperimentRequest message or plain object + * @returns Promise + */ + public updateExperiment(request: google.cloud.dialogflow.cx.v3.IUpdateExperimentRequest): Promise; + + /** + * Calls DeleteExperiment. + * @param request DeleteExperimentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteExperiment(request: google.cloud.dialogflow.cx.v3.IDeleteExperimentRequest, callback: google.cloud.dialogflow.cx.v3.Experiments.DeleteExperimentCallback): void; + + /** + * Calls DeleteExperiment. + * @param request DeleteExperimentRequest message or plain object + * @returns Promise + */ + public deleteExperiment(request: google.cloud.dialogflow.cx.v3.IDeleteExperimentRequest): Promise; + + /** + * Calls StartExperiment. + * @param request StartExperimentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Experiment + */ + public startExperiment(request: google.cloud.dialogflow.cx.v3.IStartExperimentRequest, callback: google.cloud.dialogflow.cx.v3.Experiments.StartExperimentCallback): void; + + /** + * Calls StartExperiment. + * @param request StartExperimentRequest message or plain object + * @returns Promise + */ + public startExperiment(request: google.cloud.dialogflow.cx.v3.IStartExperimentRequest): Promise; + + /** + * Calls StopExperiment. + * @param request StopExperimentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Experiment + */ + public stopExperiment(request: google.cloud.dialogflow.cx.v3.IStopExperimentRequest, callback: google.cloud.dialogflow.cx.v3.Experiments.StopExperimentCallback): void; + + /** + * Calls StopExperiment. + * @param request StopExperimentRequest message or plain object + * @returns Promise + */ + public stopExperiment(request: google.cloud.dialogflow.cx.v3.IStopExperimentRequest): Promise; + } + + namespace Experiments { + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Experiments|listExperiments}. + * @param error Error, if any + * @param [response] ListExperimentsResponse + */ + type ListExperimentsCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.ListExperimentsResponse) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Experiments|getExperiment}. + * @param error Error, if any + * @param [response] Experiment + */ + type GetExperimentCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.Experiment) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Experiments|createExperiment}. + * @param error Error, if any + * @param [response] Experiment + */ + type CreateExperimentCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.Experiment) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Experiments|updateExperiment}. + * @param error Error, if any + * @param [response] Experiment + */ + type UpdateExperimentCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.Experiment) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Experiments|deleteExperiment}. * @param error Error, if any * @param [response] Empty */ - type DeleteGeneratorCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + type DeleteExperimentCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Experiments|startExperiment}. + * @param error Error, if any + * @param [response] Experiment + */ + type StartExperimentCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.Experiment) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Experiments|stopExperiment}. + * @param error Error, if any + * @param [response] Experiment + */ + type StopExperimentCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.Experiment) => void; } - /** Properties of a Generator. */ - interface IGenerator { + /** Properties of an Experiment. */ + interface IExperiment { - /** Generator name */ + /** Experiment name */ name?: (string|null); - /** Generator displayName */ + /** Experiment displayName */ displayName?: (string|null); - /** Generator promptText */ - promptText?: (google.cloud.dialogflow.cx.v3.IPhrase|null); + /** Experiment description */ + description?: (string|null); - /** Generator placeholders */ - placeholders?: (google.cloud.dialogflow.cx.v3.Generator.IPlaceholder[]|null); + /** Experiment state */ + state?: (google.cloud.dialogflow.cx.v3.Experiment.State|keyof typeof google.cloud.dialogflow.cx.v3.Experiment.State|null); - /** Generator modelParameter */ - modelParameter?: (google.cloud.dialogflow.cx.v3.Generator.IModelParameter|null); + /** Experiment definition */ + definition?: (google.cloud.dialogflow.cx.v3.Experiment.IDefinition|null); + + /** Experiment rolloutConfig */ + rolloutConfig?: (google.cloud.dialogflow.cx.v3.IRolloutConfig|null); + + /** Experiment rolloutState */ + rolloutState?: (google.cloud.dialogflow.cx.v3.IRolloutState|null); + + /** Experiment rolloutFailureReason */ + rolloutFailureReason?: (string|null); + + /** Experiment result */ + result?: (google.cloud.dialogflow.cx.v3.Experiment.IResult|null); + + /** Experiment createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Experiment startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** Experiment endTime */ + endTime?: (google.protobuf.ITimestamp|null); + + /** Experiment lastUpdateTime */ + lastUpdateTime?: (google.protobuf.ITimestamp|null); + + /** Experiment experimentLength */ + experimentLength?: (google.protobuf.IDuration|null); + + /** Experiment variantsHistory */ + variantsHistory?: (google.cloud.dialogflow.cx.v3.IVariantsHistory[]|null); } - /** Represents a Generator. */ - class Generator implements IGenerator { + /** Represents an Experiment. */ + class Experiment implements IExperiment { /** - * Constructs a new Generator. + * Constructs a new Experiment. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IGenerator); + constructor(properties?: google.cloud.dialogflow.cx.v3.IExperiment); - /** Generator name. */ + /** Experiment name. */ public name: string; - /** Generator displayName. */ + /** Experiment displayName. */ public displayName: string; - /** Generator promptText. */ - public promptText?: (google.cloud.dialogflow.cx.v3.IPhrase|null); + /** Experiment description. */ + public description: string; - /** Generator placeholders. */ - public placeholders: google.cloud.dialogflow.cx.v3.Generator.IPlaceholder[]; + /** Experiment state. */ + public state: (google.cloud.dialogflow.cx.v3.Experiment.State|keyof typeof google.cloud.dialogflow.cx.v3.Experiment.State); - /** Generator modelParameter. */ - public modelParameter?: (google.cloud.dialogflow.cx.v3.Generator.IModelParameter|null); + /** Experiment definition. */ + public definition?: (google.cloud.dialogflow.cx.v3.Experiment.IDefinition|null); + + /** Experiment rolloutConfig. */ + public rolloutConfig?: (google.cloud.dialogflow.cx.v3.IRolloutConfig|null); + + /** Experiment rolloutState. */ + public rolloutState?: (google.cloud.dialogflow.cx.v3.IRolloutState|null); + + /** Experiment rolloutFailureReason. */ + public rolloutFailureReason: string; + + /** Experiment result. */ + public result?: (google.cloud.dialogflow.cx.v3.Experiment.IResult|null); + + /** Experiment createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Experiment startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** Experiment endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** Experiment lastUpdateTime. */ + public lastUpdateTime?: (google.protobuf.ITimestamp|null); + + /** Experiment experimentLength. */ + public experimentLength?: (google.protobuf.IDuration|null); + + /** Experiment variantsHistory. */ + public variantsHistory: google.cloud.dialogflow.cx.v3.IVariantsHistory[]; /** - * Creates a new Generator instance using the specified properties. + * Creates a new Experiment instance using the specified properties. * @param [properties] Properties to set - * @returns Generator instance + * @returns Experiment instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IGenerator): google.cloud.dialogflow.cx.v3.Generator; + public static create(properties?: google.cloud.dialogflow.cx.v3.IExperiment): google.cloud.dialogflow.cx.v3.Experiment; /** - * Encodes the specified Generator message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Generator.verify|verify} messages. - * @param message Generator message or plain object to encode + * Encodes the specified Experiment message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Experiment.verify|verify} messages. + * @param message Experiment message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IGenerator, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IExperiment, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Generator message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Generator.verify|verify} messages. - * @param message Generator message or plain object to encode + * Encodes the specified Experiment message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Experiment.verify|verify} messages. + * @param message Experiment message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IGenerator, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IExperiment, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Generator message from the specified reader or buffer. + * Decodes an Experiment message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Generator + * @returns Experiment * @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.Generator; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.Experiment; /** - * Decodes a Generator message from the specified reader or buffer, length delimited. + * Decodes an Experiment message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Generator + * @returns Experiment * @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.Generator; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.Experiment; /** - * Verifies a Generator message. + * Verifies an Experiment 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 Generator message from a plain object. Also converts values to their respective internal types. + * Creates an Experiment message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Generator + * @returns Experiment */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Generator; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Experiment; /** - * Creates a plain object from a Generator message. Also converts values to other types if specified. - * @param message Generator + * Creates a plain object from an Experiment message. Also converts values to other types if specified. + * @param message Experiment * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.Generator, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.Experiment, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Generator to JSON. + * Converts this Experiment to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Generator + * Gets the default type url for Experiment * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace Generator { + namespace Experiment { - /** Properties of a Placeholder. */ - interface IPlaceholder { + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + DRAFT = 1, + RUNNING = 2, + DONE = 3, + ROLLOUT_FAILED = 4 + } - /** Placeholder id */ - id?: (string|null); + /** Properties of a Definition. */ + interface IDefinition { - /** Placeholder name */ - name?: (string|null); + /** Definition condition */ + condition?: (string|null); + + /** Definition versionVariants */ + versionVariants?: (google.cloud.dialogflow.cx.v3.IVersionVariants|null); } - /** Represents a Placeholder. */ - class Placeholder implements IPlaceholder { + /** Represents a Definition. */ + class Definition implements IDefinition { /** - * Constructs a new Placeholder. + * Constructs a new Definition. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.Generator.IPlaceholder); + constructor(properties?: google.cloud.dialogflow.cx.v3.Experiment.IDefinition); - /** Placeholder id. */ - public id: string; + /** Definition condition. */ + public condition: string; - /** Placeholder name. */ - public name: string; + /** Definition versionVariants. */ + public versionVariants?: (google.cloud.dialogflow.cx.v3.IVersionVariants|null); + + /** Definition variants. */ + public variants?: "versionVariants"; /** - * Creates a new Placeholder instance using the specified properties. + * Creates a new Definition instance using the specified properties. * @param [properties] Properties to set - * @returns Placeholder instance + * @returns Definition instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.Generator.IPlaceholder): google.cloud.dialogflow.cx.v3.Generator.Placeholder; + public static create(properties?: google.cloud.dialogflow.cx.v3.Experiment.IDefinition): google.cloud.dialogflow.cx.v3.Experiment.Definition; /** - * Encodes the specified Placeholder message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Generator.Placeholder.verify|verify} messages. - * @param message Placeholder message or plain object to encode + * Encodes the specified Definition message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Experiment.Definition.verify|verify} messages. + * @param message Definition message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.Generator.IPlaceholder, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.Experiment.IDefinition, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Placeholder message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Generator.Placeholder.verify|verify} messages. - * @param message Placeholder message or plain object to encode + * Encodes the specified Definition message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Experiment.Definition.verify|verify} messages. + * @param message Definition message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.Generator.IPlaceholder, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.Experiment.IDefinition, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Placeholder message from the specified reader or buffer. + * Decodes a Definition message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Placeholder + * @returns Definition * @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.Generator.Placeholder; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.Experiment.Definition; /** - * Decodes a Placeholder message from the specified reader or buffer, length delimited. + * Decodes a Definition message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Placeholder + * @returns Definition * @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.Generator.Placeholder; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.Experiment.Definition; /** - * Verifies a Placeholder message. + * Verifies a Definition 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 Placeholder message from a plain object. Also converts values to their respective internal types. + * Creates a Definition message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Placeholder + * @returns Definition */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Generator.Placeholder; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Experiment.Definition; /** - * Creates a plain object from a Placeholder message. Also converts values to other types if specified. - * @param message Placeholder + * Creates a plain object from a Definition message. Also converts values to other types if specified. + * @param message Definition * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.Generator.Placeholder, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.Experiment.Definition, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Placeholder to JSON. + * Converts this Definition to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Placeholder + * Gets the default type url for Definition * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ModelParameter. */ - interface IModelParameter { - - /** ModelParameter temperature */ - temperature?: (number|null); - - /** ModelParameter maxDecodeSteps */ - maxDecodeSteps?: (number|null); + /** Properties of a Result. */ + interface IResult { - /** ModelParameter topP */ - topP?: (number|null); + /** Result versionMetrics */ + versionMetrics?: (google.cloud.dialogflow.cx.v3.Experiment.Result.IVersionMetrics[]|null); - /** ModelParameter topK */ - topK?: (number|null); + /** Result lastUpdateTime */ + lastUpdateTime?: (google.protobuf.ITimestamp|null); } - /** Represents a ModelParameter. */ - class ModelParameter implements IModelParameter { + /** Represents a Result. */ + class Result implements IResult { /** - * Constructs a new ModelParameter. + * Constructs a new Result. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.Generator.IModelParameter); - - /** ModelParameter temperature. */ - public temperature?: (number|null); - - /** ModelParameter maxDecodeSteps. */ - public maxDecodeSteps?: (number|null); + constructor(properties?: google.cloud.dialogflow.cx.v3.Experiment.IResult); - /** ModelParameter topP. */ - public topP?: (number|null); + /** Result versionMetrics. */ + public versionMetrics: google.cloud.dialogflow.cx.v3.Experiment.Result.IVersionMetrics[]; - /** ModelParameter topK. */ - public topK?: (number|null); + /** Result lastUpdateTime. */ + public lastUpdateTime?: (google.protobuf.ITimestamp|null); /** - * Creates a new ModelParameter instance using the specified properties. + * Creates a new Result instance using the specified properties. * @param [properties] Properties to set - * @returns ModelParameter instance + * @returns Result instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.Generator.IModelParameter): google.cloud.dialogflow.cx.v3.Generator.ModelParameter; + public static create(properties?: google.cloud.dialogflow.cx.v3.Experiment.IResult): google.cloud.dialogflow.cx.v3.Experiment.Result; /** - * Encodes the specified ModelParameter message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Generator.ModelParameter.verify|verify} messages. - * @param message ModelParameter message or plain object to encode + * Encodes the specified Result message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Experiment.Result.verify|verify} messages. + * @param message Result message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.Generator.IModelParameter, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.Experiment.IResult, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ModelParameter message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Generator.ModelParameter.verify|verify} messages. - * @param message ModelParameter message or plain object to encode + * Encodes the specified Result message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Experiment.Result.verify|verify} messages. + * @param message Result message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.Generator.IModelParameter, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.Experiment.IResult, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ModelParameter message from the specified reader or buffer. + * Decodes a Result message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ModelParameter + * @returns Result * @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.Generator.ModelParameter; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.Experiment.Result; /** - * Decodes a ModelParameter message from the specified reader or buffer, length delimited. + * Decodes a Result message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ModelParameter + * @returns Result * @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.Generator.ModelParameter; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.Experiment.Result; /** - * Verifies a ModelParameter message. + * Verifies a Result 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 ModelParameter message from a plain object. Also converts values to their respective internal types. + * Creates a Result message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ModelParameter + * @returns Result */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Generator.ModelParameter; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Experiment.Result; /** - * Creates a plain object from a ModelParameter message. Also converts values to other types if specified. - * @param message ModelParameter + * Creates a plain object from a Result message. Also converts values to other types if specified. + * @param message Result * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.Generator.ModelParameter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.Experiment.Result, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ModelParameter to JSON. + * Converts this Result to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ModelParameter + * Gets the default type url for Result * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - } - /** Properties of a Phrase. */ - interface IPhrase { + namespace Result { - /** Phrase text */ - text?: (string|null); - } + /** MetricType enum. */ + enum MetricType { + METRIC_UNSPECIFIED = 0, + CONTAINED_SESSION_NO_CALLBACK_RATE = 1, + LIVE_AGENT_HANDOFF_RATE = 2, + CALLBACK_SESSION_RATE = 3, + ABANDONED_SESSION_RATE = 4, + SESSION_END_RATE = 5 + } - /** Represents a Phrase. */ - class Phrase implements IPhrase { + /** CountType enum. */ + enum CountType { + COUNT_TYPE_UNSPECIFIED = 0, + TOTAL_NO_MATCH_COUNT = 1, + TOTAL_TURN_COUNT = 2, + AVERAGE_TURN_COUNT = 3 + } - /** - * Constructs a new Phrase. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IPhrase); + /** Properties of a ConfidenceInterval. */ + interface IConfidenceInterval { - /** Phrase text. */ - public text: string; + /** ConfidenceInterval confidenceLevel */ + confidenceLevel?: (number|null); - /** - * Creates a new Phrase instance using the specified properties. - * @param [properties] Properties to set - * @returns Phrase instance - */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IPhrase): google.cloud.dialogflow.cx.v3.Phrase; + /** ConfidenceInterval ratio */ + ratio?: (number|null); - /** - * Encodes the specified Phrase message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Phrase.verify|verify} messages. - * @param message Phrase message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.cx.v3.IPhrase, writer?: $protobuf.Writer): $protobuf.Writer; + /** ConfidenceInterval lowerBound */ + lowerBound?: (number|null); - /** - * Encodes the specified Phrase message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Phrase.verify|verify} messages. - * @param message Phrase message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IPhrase, writer?: $protobuf.Writer): $protobuf.Writer; + /** ConfidenceInterval upperBound */ + upperBound?: (number|null); + } - /** - * Decodes a Phrase message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Phrase - * @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.Phrase; + /** Represents a ConfidenceInterval. */ + class ConfidenceInterval implements IConfidenceInterval { - /** - * Decodes a Phrase message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Phrase - * @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.Phrase; + /** + * Constructs a new ConfidenceInterval. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.Experiment.Result.IConfidenceInterval); - /** - * Verifies a Phrase 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); + /** ConfidenceInterval confidenceLevel. */ + public confidenceLevel: number; - /** - * Creates a Phrase message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Phrase - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Phrase; + /** ConfidenceInterval ratio. */ + public ratio: number; - /** - * Creates a plain object from a Phrase message. Also converts values to other types if specified. - * @param message Phrase - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.cx.v3.Phrase, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** ConfidenceInterval lowerBound. */ + public lowerBound: number; - /** - * Converts this Phrase to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** ConfidenceInterval upperBound. */ + public upperBound: number; - /** - * Gets the default type url for Phrase - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Creates a new ConfidenceInterval instance using the specified properties. + * @param [properties] Properties to set + * @returns ConfidenceInterval instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.Experiment.Result.IConfidenceInterval): google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval; - /** Properties of a ListGeneratorsRequest. */ - interface IListGeneratorsRequest { + /** + * Encodes the specified ConfidenceInterval message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval.verify|verify} messages. + * @param message ConfidenceInterval message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.Experiment.Result.IConfidenceInterval, writer?: $protobuf.Writer): $protobuf.Writer; - /** ListGeneratorsRequest parent */ - parent?: (string|null); + /** + * Encodes the specified ConfidenceInterval message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval.verify|verify} messages. + * @param message ConfidenceInterval message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.Experiment.Result.IConfidenceInterval, writer?: $protobuf.Writer): $protobuf.Writer; - /** ListGeneratorsRequest languageCode */ - languageCode?: (string|null); + /** + * Decodes a ConfidenceInterval message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConfidenceInterval + * @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.Experiment.Result.ConfidenceInterval; - /** ListGeneratorsRequest pageSize */ - pageSize?: (number|null); + /** + * Decodes a ConfidenceInterval message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConfidenceInterval + * @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.Experiment.Result.ConfidenceInterval; - /** ListGeneratorsRequest pageToken */ - pageToken?: (string|null); + /** + * Verifies a ConfidenceInterval 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 ConfidenceInterval message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConfidenceInterval + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval; + + /** + * Creates a plain object from a ConfidenceInterval message. Also converts values to other types if specified. + * @param message ConfidenceInterval + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConfidenceInterval to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ConfidenceInterval + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Metric. */ + interface IMetric { + + /** Metric type */ + type?: (google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType|keyof typeof google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType|null); + + /** Metric countType */ + countType?: (google.cloud.dialogflow.cx.v3.Experiment.Result.CountType|keyof typeof google.cloud.dialogflow.cx.v3.Experiment.Result.CountType|null); + + /** Metric ratio */ + ratio?: (number|null); + + /** Metric count */ + count?: (number|null); + + /** Metric confidenceInterval */ + confidenceInterval?: (google.cloud.dialogflow.cx.v3.Experiment.Result.IConfidenceInterval|null); + } + + /** Represents a Metric. */ + class Metric implements IMetric { + + /** + * Constructs a new Metric. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.Experiment.Result.IMetric); + + /** Metric type. */ + public type: (google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType|keyof typeof google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType); + + /** Metric countType. */ + public countType: (google.cloud.dialogflow.cx.v3.Experiment.Result.CountType|keyof typeof google.cloud.dialogflow.cx.v3.Experiment.Result.CountType); + + /** Metric ratio. */ + public ratio?: (number|null); + + /** Metric count. */ + public count?: (number|null); + + /** Metric confidenceInterval. */ + public confidenceInterval?: (google.cloud.dialogflow.cx.v3.Experiment.Result.IConfidenceInterval|null); + + /** Metric value. */ + public value?: ("ratio"|"count"); + + /** + * Creates a new Metric instance using the specified properties. + * @param [properties] Properties to set + * @returns Metric instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.Experiment.Result.IMetric): google.cloud.dialogflow.cx.v3.Experiment.Result.Metric; + + /** + * Encodes the specified Metric message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Experiment.Result.Metric.verify|verify} messages. + * @param message Metric message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.Experiment.Result.IMetric, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Metric message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Experiment.Result.Metric.verify|verify} messages. + * @param message Metric message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.Experiment.Result.IMetric, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Metric message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Metric + * @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.Experiment.Result.Metric; + + /** + * Decodes a Metric message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Metric + * @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.Experiment.Result.Metric; + + /** + * Verifies a Metric 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 Metric message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Metric + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Experiment.Result.Metric; + + /** + * Creates a plain object from a Metric message. Also converts values to other types if specified. + * @param message Metric + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.Experiment.Result.Metric, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Metric to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Metric + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a VersionMetrics. */ + interface IVersionMetrics { + + /** VersionMetrics version */ + version?: (string|null); + + /** VersionMetrics metrics */ + metrics?: (google.cloud.dialogflow.cx.v3.Experiment.Result.IMetric[]|null); + + /** VersionMetrics sessionCount */ + sessionCount?: (number|null); + } + + /** Represents a VersionMetrics. */ + class VersionMetrics implements IVersionMetrics { + + /** + * Constructs a new VersionMetrics. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.Experiment.Result.IVersionMetrics); + + /** VersionMetrics version. */ + public version: string; + + /** VersionMetrics metrics. */ + public metrics: google.cloud.dialogflow.cx.v3.Experiment.Result.IMetric[]; + + /** VersionMetrics sessionCount. */ + public sessionCount: number; + + /** + * Creates a new VersionMetrics instance using the specified properties. + * @param [properties] Properties to set + * @returns VersionMetrics instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.Experiment.Result.IVersionMetrics): google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics; + + /** + * Encodes the specified VersionMetrics message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics.verify|verify} messages. + * @param message VersionMetrics message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.Experiment.Result.IVersionMetrics, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VersionMetrics message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics.verify|verify} messages. + * @param message VersionMetrics message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.Experiment.Result.IVersionMetrics, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VersionMetrics message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VersionMetrics + * @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.Experiment.Result.VersionMetrics; + + /** + * Decodes a VersionMetrics message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VersionMetrics + * @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.Experiment.Result.VersionMetrics; + + /** + * Verifies a VersionMetrics 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 VersionMetrics message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VersionMetrics + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics; + + /** + * Creates a plain object from a VersionMetrics message. Also converts values to other types if specified. + * @param message VersionMetrics + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VersionMetrics to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VersionMetrics + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } } - /** Represents a ListGeneratorsRequest. */ - class ListGeneratorsRequest implements IListGeneratorsRequest { + /** Properties of a VersionVariants. */ + interface IVersionVariants { + + /** VersionVariants variants */ + variants?: (google.cloud.dialogflow.cx.v3.VersionVariants.IVariant[]|null); + } + + /** Represents a VersionVariants. */ + class VersionVariants implements IVersionVariants { /** - * Constructs a new ListGeneratorsRequest. + * Constructs a new VersionVariants. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IListGeneratorsRequest); - - /** ListGeneratorsRequest parent. */ - public parent: string; - - /** ListGeneratorsRequest languageCode. */ - public languageCode: string; - - /** ListGeneratorsRequest pageSize. */ - public pageSize: number; + constructor(properties?: google.cloud.dialogflow.cx.v3.IVersionVariants); - /** ListGeneratorsRequest pageToken. */ - public pageToken: string; + /** VersionVariants variants. */ + public variants: google.cloud.dialogflow.cx.v3.VersionVariants.IVariant[]; /** - * Creates a new ListGeneratorsRequest instance using the specified properties. + * Creates a new VersionVariants instance using the specified properties. * @param [properties] Properties to set - * @returns ListGeneratorsRequest instance + * @returns VersionVariants instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IListGeneratorsRequest): google.cloud.dialogflow.cx.v3.ListGeneratorsRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3.IVersionVariants): google.cloud.dialogflow.cx.v3.VersionVariants; /** - * Encodes the specified ListGeneratorsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListGeneratorsRequest.verify|verify} messages. - * @param message ListGeneratorsRequest message or plain object to encode + * Encodes the specified VersionVariants message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.VersionVariants.verify|verify} messages. + * @param message VersionVariants message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IListGeneratorsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IVersionVariants, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListGeneratorsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListGeneratorsRequest.verify|verify} messages. - * @param message ListGeneratorsRequest message or plain object to encode + * Encodes the specified VersionVariants message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.VersionVariants.verify|verify} messages. + * @param message VersionVariants message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IListGeneratorsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IVersionVariants, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListGeneratorsRequest message from the specified reader or buffer. + * Decodes a VersionVariants message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListGeneratorsRequest + * @returns VersionVariants * @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.ListGeneratorsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.VersionVariants; /** - * Decodes a ListGeneratorsRequest message from the specified reader or buffer, length delimited. + * Decodes a VersionVariants message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListGeneratorsRequest + * @returns VersionVariants * @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.ListGeneratorsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.VersionVariants; /** - * Verifies a ListGeneratorsRequest message. + * Verifies a VersionVariants 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 ListGeneratorsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a VersionVariants message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListGeneratorsRequest + * @returns VersionVariants */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ListGeneratorsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.VersionVariants; /** - * Creates a plain object from a ListGeneratorsRequest message. Also converts values to other types if specified. - * @param message ListGeneratorsRequest + * Creates a plain object from a VersionVariants message. Also converts values to other types if specified. + * @param message VersionVariants * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.ListGeneratorsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.VersionVariants, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListGeneratorsRequest to JSON. + * Converts this VersionVariants to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListGeneratorsRequest + * Gets the default type url for VersionVariants * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListGeneratorsResponse. */ - interface IListGeneratorsResponse { + namespace VersionVariants { - /** ListGeneratorsResponse generators */ - generators?: (google.cloud.dialogflow.cx.v3.IGenerator[]|null); + /** Properties of a Variant. */ + interface IVariant { - /** ListGeneratorsResponse nextPageToken */ - nextPageToken?: (string|null); - } + /** Variant version */ + version?: (string|null); - /** Represents a ListGeneratorsResponse. */ - class ListGeneratorsResponse implements IListGeneratorsResponse { + /** Variant trafficAllocation */ + trafficAllocation?: (number|null); - /** - * Constructs a new ListGeneratorsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IListGeneratorsResponse); + /** Variant isControlGroup */ + isControlGroup?: (boolean|null); + } - /** ListGeneratorsResponse generators. */ - public generators: google.cloud.dialogflow.cx.v3.IGenerator[]; + /** Represents a Variant. */ + class Variant implements IVariant { - /** ListGeneratorsResponse nextPageToken. */ - public nextPageToken: string; + /** + * Constructs a new Variant. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.VersionVariants.IVariant); - /** - * Creates a new ListGeneratorsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListGeneratorsResponse instance - */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IListGeneratorsResponse): google.cloud.dialogflow.cx.v3.ListGeneratorsResponse; + /** Variant version. */ + public version: string; + + /** Variant trafficAllocation. */ + public trafficAllocation: number; + + /** Variant isControlGroup. */ + public isControlGroup: boolean; + + /** + * Creates a new Variant instance using the specified properties. + * @param [properties] Properties to set + * @returns Variant instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.VersionVariants.IVariant): google.cloud.dialogflow.cx.v3.VersionVariants.Variant; + + /** + * Encodes the specified Variant message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.VersionVariants.Variant.verify|verify} messages. + * @param message Variant message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.VersionVariants.IVariant, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Variant message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.VersionVariants.Variant.verify|verify} messages. + * @param message Variant message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.VersionVariants.IVariant, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Variant message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Variant + * @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.VersionVariants.Variant; + + /** + * Decodes a Variant message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Variant + * @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.VersionVariants.Variant; + + /** + * Verifies a Variant 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 Variant message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Variant + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.VersionVariants.Variant; + + /** + * Creates a plain object from a Variant message. Also converts values to other types if specified. + * @param message Variant + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.VersionVariants.Variant, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Variant to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Variant + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a VariantsHistory. */ + interface IVariantsHistory { + + /** VariantsHistory versionVariants */ + versionVariants?: (google.cloud.dialogflow.cx.v3.IVersionVariants|null); + + /** VariantsHistory updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a VariantsHistory. */ + class VariantsHistory implements IVariantsHistory { /** - * Encodes the specified ListGeneratorsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListGeneratorsResponse.verify|verify} messages. - * @param message ListGeneratorsResponse message or plain object to encode + * Constructs a new VariantsHistory. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.IVariantsHistory); + + /** VariantsHistory versionVariants. */ + public versionVariants?: (google.cloud.dialogflow.cx.v3.IVersionVariants|null); + + /** VariantsHistory updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** VariantsHistory variants. */ + public variants?: "versionVariants"; + + /** + * Creates a new VariantsHistory instance using the specified properties. + * @param [properties] Properties to set + * @returns VariantsHistory instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.IVariantsHistory): google.cloud.dialogflow.cx.v3.VariantsHistory; + + /** + * Encodes the specified VariantsHistory message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.VariantsHistory.verify|verify} messages. + * @param message VariantsHistory message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IListGeneratorsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IVariantsHistory, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListGeneratorsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListGeneratorsResponse.verify|verify} messages. - * @param message ListGeneratorsResponse message or plain object to encode + * Encodes the specified VariantsHistory message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.VariantsHistory.verify|verify} messages. + * @param message VariantsHistory message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IListGeneratorsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IVariantsHistory, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListGeneratorsResponse message from the specified reader or buffer. + * Decodes a VariantsHistory message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListGeneratorsResponse + * @returns VariantsHistory * @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.ListGeneratorsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.VariantsHistory; /** - * Decodes a ListGeneratorsResponse message from the specified reader or buffer, length delimited. + * Decodes a VariantsHistory message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListGeneratorsResponse + * @returns VariantsHistory * @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.ListGeneratorsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.VariantsHistory; /** - * Verifies a ListGeneratorsResponse message. + * Verifies a VariantsHistory 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 ListGeneratorsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a VariantsHistory message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListGeneratorsResponse + * @returns VariantsHistory */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ListGeneratorsResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.VariantsHistory; /** - * Creates a plain object from a ListGeneratorsResponse message. Also converts values to other types if specified. - * @param message ListGeneratorsResponse + * Creates a plain object from a VariantsHistory message. Also converts values to other types if specified. + * @param message VariantsHistory * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.ListGeneratorsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.VariantsHistory, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListGeneratorsResponse to JSON. + * Converts this VariantsHistory to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListGeneratorsResponse + * Gets the default type url for VariantsHistory * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GetGeneratorRequest. */ - interface IGetGeneratorRequest { + /** Properties of a RolloutConfig. */ + interface IRolloutConfig { - /** GetGeneratorRequest name */ - name?: (string|null); + /** RolloutConfig rolloutSteps */ + rolloutSteps?: (google.cloud.dialogflow.cx.v3.RolloutConfig.IRolloutStep[]|null); - /** GetGeneratorRequest languageCode */ - languageCode?: (string|null); + /** RolloutConfig rolloutCondition */ + rolloutCondition?: (string|null); + + /** RolloutConfig failureCondition */ + failureCondition?: (string|null); } - /** Represents a GetGeneratorRequest. */ - class GetGeneratorRequest implements IGetGeneratorRequest { + /** Represents a RolloutConfig. */ + class RolloutConfig implements IRolloutConfig { /** - * Constructs a new GetGeneratorRequest. + * Constructs a new RolloutConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IGetGeneratorRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3.IRolloutConfig); - /** GetGeneratorRequest name. */ - public name: string; + /** RolloutConfig rolloutSteps. */ + public rolloutSteps: google.cloud.dialogflow.cx.v3.RolloutConfig.IRolloutStep[]; - /** GetGeneratorRequest languageCode. */ - public languageCode: string; + /** RolloutConfig rolloutCondition. */ + public rolloutCondition: string; + + /** RolloutConfig failureCondition. */ + public failureCondition: string; /** - * Creates a new GetGeneratorRequest instance using the specified properties. + * Creates a new RolloutConfig instance using the specified properties. * @param [properties] Properties to set - * @returns GetGeneratorRequest instance + * @returns RolloutConfig instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IGetGeneratorRequest): google.cloud.dialogflow.cx.v3.GetGeneratorRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3.IRolloutConfig): google.cloud.dialogflow.cx.v3.RolloutConfig; /** - * Encodes the specified GetGeneratorRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetGeneratorRequest.verify|verify} messages. - * @param message GetGeneratorRequest message or plain object to encode + * Encodes the specified RolloutConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.RolloutConfig.verify|verify} messages. + * @param message RolloutConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IGetGeneratorRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IRolloutConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetGeneratorRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetGeneratorRequest.verify|verify} messages. - * @param message GetGeneratorRequest message or plain object to encode + * Encodes the specified RolloutConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.RolloutConfig.verify|verify} messages. + * @param message RolloutConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IGetGeneratorRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IRolloutConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetGeneratorRequest message from the specified reader or buffer. + * Decodes a RolloutConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetGeneratorRequest + * @returns RolloutConfig * @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.GetGeneratorRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.RolloutConfig; /** - * Decodes a GetGeneratorRequest message from the specified reader or buffer, length delimited. + * Decodes a RolloutConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetGeneratorRequest + * @returns RolloutConfig * @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.GetGeneratorRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.RolloutConfig; /** - * Verifies a GetGeneratorRequest message. + * Verifies a RolloutConfig 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 GetGeneratorRequest message from a plain object. Also converts values to their respective internal types. + * Creates a RolloutConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetGeneratorRequest + * @returns RolloutConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.GetGeneratorRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.RolloutConfig; /** - * Creates a plain object from a GetGeneratorRequest message. Also converts values to other types if specified. - * @param message GetGeneratorRequest + * Creates a plain object from a RolloutConfig message. Also converts values to other types if specified. + * @param message RolloutConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.GetGeneratorRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.RolloutConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetGeneratorRequest to JSON. + * Converts this RolloutConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GetGeneratorRequest + * Gets the default type url for RolloutConfig * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CreateGeneratorRequest. */ - interface ICreateGeneratorRequest { + namespace RolloutConfig { - /** CreateGeneratorRequest parent */ - parent?: (string|null); + /** Properties of a RolloutStep. */ + interface IRolloutStep { - /** CreateGeneratorRequest generator */ - generator?: (google.cloud.dialogflow.cx.v3.IGenerator|null); + /** RolloutStep displayName */ + displayName?: (string|null); - /** CreateGeneratorRequest languageCode */ - languageCode?: (string|null); + /** RolloutStep trafficPercent */ + trafficPercent?: (number|null); + + /** RolloutStep minDuration */ + minDuration?: (google.protobuf.IDuration|null); + } + + /** Represents a RolloutStep. */ + class RolloutStep implements IRolloutStep { + + /** + * Constructs a new RolloutStep. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.RolloutConfig.IRolloutStep); + + /** RolloutStep displayName. */ + public displayName: string; + + /** RolloutStep trafficPercent. */ + public trafficPercent: number; + + /** RolloutStep minDuration. */ + public minDuration?: (google.protobuf.IDuration|null); + + /** + * Creates a new RolloutStep instance using the specified properties. + * @param [properties] Properties to set + * @returns RolloutStep instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.RolloutConfig.IRolloutStep): google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep; + + /** + * Encodes the specified RolloutStep message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep.verify|verify} messages. + * @param message RolloutStep message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.RolloutConfig.IRolloutStep, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RolloutStep message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep.verify|verify} messages. + * @param message RolloutStep message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.RolloutConfig.IRolloutStep, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RolloutStep message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RolloutStep + * @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.RolloutConfig.RolloutStep; + + /** + * Decodes a RolloutStep message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RolloutStep + * @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.RolloutConfig.RolloutStep; + + /** + * Verifies a RolloutStep 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 RolloutStep message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RolloutStep + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep; + + /** + * Creates a plain object from a RolloutStep message. Also converts values to other types if specified. + * @param message RolloutStep + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RolloutStep to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RolloutStep + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } - /** Represents a CreateGeneratorRequest. */ - class CreateGeneratorRequest implements ICreateGeneratorRequest { + /** Properties of a RolloutState. */ + interface IRolloutState { + + /** RolloutState step */ + step?: (string|null); + + /** RolloutState stepIndex */ + stepIndex?: (number|null); + + /** RolloutState startTime */ + startTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a RolloutState. */ + class RolloutState implements IRolloutState { /** - * Constructs a new CreateGeneratorRequest. + * Constructs a new RolloutState. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.ICreateGeneratorRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3.IRolloutState); - /** CreateGeneratorRequest parent. */ - public parent: string; + /** RolloutState step. */ + public step: string; - /** CreateGeneratorRequest generator. */ - public generator?: (google.cloud.dialogflow.cx.v3.IGenerator|null); + /** RolloutState stepIndex. */ + public stepIndex: number; - /** CreateGeneratorRequest languageCode. */ - public languageCode: string; + /** RolloutState startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); /** - * Creates a new CreateGeneratorRequest instance using the specified properties. + * Creates a new RolloutState instance using the specified properties. * @param [properties] Properties to set - * @returns CreateGeneratorRequest instance + * @returns RolloutState instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.ICreateGeneratorRequest): google.cloud.dialogflow.cx.v3.CreateGeneratorRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3.IRolloutState): google.cloud.dialogflow.cx.v3.RolloutState; /** - * Encodes the specified CreateGeneratorRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateGeneratorRequest.verify|verify} messages. - * @param message CreateGeneratorRequest message or plain object to encode + * Encodes the specified RolloutState message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.RolloutState.verify|verify} messages. + * @param message RolloutState message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.ICreateGeneratorRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IRolloutState, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateGeneratorRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateGeneratorRequest.verify|verify} messages. - * @param message CreateGeneratorRequest message or plain object to encode + * Encodes the specified RolloutState message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.RolloutState.verify|verify} messages. + * @param message RolloutState message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ICreateGeneratorRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IRolloutState, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateGeneratorRequest message from the specified reader or buffer. + * Decodes a RolloutState message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateGeneratorRequest + * @returns RolloutState * @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.CreateGeneratorRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.RolloutState; /** - * Decodes a CreateGeneratorRequest message from the specified reader or buffer, length delimited. + * Decodes a RolloutState message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateGeneratorRequest + * @returns RolloutState * @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.CreateGeneratorRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.RolloutState; /** - * Verifies a CreateGeneratorRequest message. + * Verifies a RolloutState 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 CreateGeneratorRequest message from a plain object. Also converts values to their respective internal types. + * Creates a RolloutState message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateGeneratorRequest + * @returns RolloutState */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.CreateGeneratorRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.RolloutState; /** - * Creates a plain object from a CreateGeneratorRequest message. Also converts values to other types if specified. - * @param message CreateGeneratorRequest + * Creates a plain object from a RolloutState message. Also converts values to other types if specified. + * @param message RolloutState * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.CreateGeneratorRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.RolloutState, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateGeneratorRequest to JSON. + * Converts this RolloutState to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CreateGeneratorRequest + * Gets the default type url for RolloutState * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an UpdateGeneratorRequest. */ - interface IUpdateGeneratorRequest { + /** Properties of a ListExperimentsRequest. */ + interface IListExperimentsRequest { - /** UpdateGeneratorRequest generator */ - generator?: (google.cloud.dialogflow.cx.v3.IGenerator|null); + /** ListExperimentsRequest parent */ + parent?: (string|null); - /** UpdateGeneratorRequest languageCode */ - languageCode?: (string|null); + /** ListExperimentsRequest pageSize */ + pageSize?: (number|null); - /** UpdateGeneratorRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** ListExperimentsRequest pageToken */ + pageToken?: (string|null); } - /** Represents an UpdateGeneratorRequest. */ - class UpdateGeneratorRequest implements IUpdateGeneratorRequest { + /** Represents a ListExperimentsRequest. */ + class ListExperimentsRequest implements IListExperimentsRequest { /** - * Constructs a new UpdateGeneratorRequest. + * Constructs a new ListExperimentsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IUpdateGeneratorRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3.IListExperimentsRequest); - /** UpdateGeneratorRequest generator. */ - public generator?: (google.cloud.dialogflow.cx.v3.IGenerator|null); + /** ListExperimentsRequest parent. */ + public parent: string; - /** UpdateGeneratorRequest languageCode. */ - public languageCode: string; + /** ListExperimentsRequest pageSize. */ + public pageSize: number; - /** UpdateGeneratorRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** ListExperimentsRequest pageToken. */ + public pageToken: string; /** - * Creates a new UpdateGeneratorRequest instance using the specified properties. + * Creates a new ListExperimentsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateGeneratorRequest instance + * @returns ListExperimentsRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IUpdateGeneratorRequest): google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3.IListExperimentsRequest): google.cloud.dialogflow.cx.v3.ListExperimentsRequest; /** - * Encodes the specified UpdateGeneratorRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest.verify|verify} messages. - * @param message UpdateGeneratorRequest message or plain object to encode + * Encodes the specified ListExperimentsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListExperimentsRequest.verify|verify} messages. + * @param message ListExperimentsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IUpdateGeneratorRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IListExperimentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateGeneratorRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest.verify|verify} messages. - * @param message UpdateGeneratorRequest message or plain object to encode + * Encodes the specified ListExperimentsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListExperimentsRequest.verify|verify} messages. + * @param message ListExperimentsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IUpdateGeneratorRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IListExperimentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateGeneratorRequest message from the specified reader or buffer. + * Decodes a ListExperimentsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateGeneratorRequest + * @returns ListExperimentsRequest * @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.UpdateGeneratorRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.ListExperimentsRequest; /** - * Decodes an UpdateGeneratorRequest message from the specified reader or buffer, length delimited. + * Decodes a ListExperimentsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateGeneratorRequest + * @returns ListExperimentsRequest * @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.UpdateGeneratorRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.ListExperimentsRequest; + + /** + * Verifies a ListExperimentsRequest 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 ListExperimentsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListExperimentsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ListExperimentsRequest; + + /** + * Creates a plain object from a ListExperimentsRequest message. Also converts values to other types if specified. + * @param message ListExperimentsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.ListExperimentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListExperimentsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListExperimentsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListExperimentsResponse. */ + interface IListExperimentsResponse { + + /** ListExperimentsResponse experiments */ + experiments?: (google.cloud.dialogflow.cx.v3.IExperiment[]|null); + + /** ListExperimentsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListExperimentsResponse. */ + class ListExperimentsResponse implements IListExperimentsResponse { + + /** + * Constructs a new ListExperimentsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.IListExperimentsResponse); + + /** ListExperimentsResponse experiments. */ + public experiments: google.cloud.dialogflow.cx.v3.IExperiment[]; + + /** ListExperimentsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListExperimentsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListExperimentsResponse instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.IListExperimentsResponse): google.cloud.dialogflow.cx.v3.ListExperimentsResponse; + + /** + * Encodes the specified ListExperimentsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListExperimentsResponse.verify|verify} messages. + * @param message ListExperimentsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.IListExperimentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListExperimentsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListExperimentsResponse.verify|verify} messages. + * @param message ListExperimentsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IListExperimentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListExperimentsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListExperimentsResponse + * @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.ListExperimentsResponse; + + /** + * Decodes a ListExperimentsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListExperimentsResponse + * @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.ListExperimentsResponse; + + /** + * Verifies a ListExperimentsResponse 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 ListExperimentsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListExperimentsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ListExperimentsResponse; + + /** + * Creates a plain object from a ListExperimentsResponse message. Also converts values to other types if specified. + * @param message ListExperimentsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.ListExperimentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListExperimentsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListExperimentsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetExperimentRequest. */ + interface IGetExperimentRequest { + + /** GetExperimentRequest name */ + name?: (string|null); + } + + /** Represents a GetExperimentRequest. */ + class GetExperimentRequest implements IGetExperimentRequest { + + /** + * Constructs a new GetExperimentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.IGetExperimentRequest); + + /** GetExperimentRequest name. */ + public name: string; + + /** + * Creates a new GetExperimentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetExperimentRequest instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.IGetExperimentRequest): google.cloud.dialogflow.cx.v3.GetExperimentRequest; + + /** + * Encodes the specified GetExperimentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetExperimentRequest.verify|verify} messages. + * @param message GetExperimentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.IGetExperimentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetExperimentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetExperimentRequest.verify|verify} messages. + * @param message GetExperimentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IGetExperimentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetExperimentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetExperimentRequest + * @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.GetExperimentRequest; + + /** + * Decodes a GetExperimentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetExperimentRequest + * @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.GetExperimentRequest; + + /** + * Verifies a GetExperimentRequest 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 GetExperimentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetExperimentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.GetExperimentRequest; + + /** + * Creates a plain object from a GetExperimentRequest message. Also converts values to other types if specified. + * @param message GetExperimentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.GetExperimentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetExperimentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetExperimentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateExperimentRequest. */ + interface ICreateExperimentRequest { + + /** CreateExperimentRequest parent */ + parent?: (string|null); + + /** CreateExperimentRequest experiment */ + experiment?: (google.cloud.dialogflow.cx.v3.IExperiment|null); + } + + /** Represents a CreateExperimentRequest. */ + class CreateExperimentRequest implements ICreateExperimentRequest { + + /** + * Constructs a new CreateExperimentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.ICreateExperimentRequest); + + /** CreateExperimentRequest parent. */ + public parent: string; + + /** CreateExperimentRequest experiment. */ + public experiment?: (google.cloud.dialogflow.cx.v3.IExperiment|null); + + /** + * Creates a new CreateExperimentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateExperimentRequest instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.ICreateExperimentRequest): google.cloud.dialogflow.cx.v3.CreateExperimentRequest; + + /** + * Encodes the specified CreateExperimentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateExperimentRequest.verify|verify} messages. + * @param message CreateExperimentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.ICreateExperimentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateExperimentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateExperimentRequest.verify|verify} messages. + * @param message CreateExperimentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ICreateExperimentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateExperimentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateExperimentRequest + * @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.CreateExperimentRequest; + + /** + * Decodes a CreateExperimentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateExperimentRequest + * @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.CreateExperimentRequest; + + /** + * Verifies a CreateExperimentRequest 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 CreateExperimentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateExperimentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.CreateExperimentRequest; + + /** + * Creates a plain object from a CreateExperimentRequest message. Also converts values to other types if specified. + * @param message CreateExperimentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.CreateExperimentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateExperimentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateExperimentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateExperimentRequest. */ + interface IUpdateExperimentRequest { + + /** UpdateExperimentRequest experiment */ + experiment?: (google.cloud.dialogflow.cx.v3.IExperiment|null); + + /** UpdateExperimentRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateExperimentRequest. */ + class UpdateExperimentRequest implements IUpdateExperimentRequest { + + /** + * Constructs a new UpdateExperimentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.IUpdateExperimentRequest); + + /** UpdateExperimentRequest experiment. */ + public experiment?: (google.cloud.dialogflow.cx.v3.IExperiment|null); + + /** UpdateExperimentRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateExperimentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateExperimentRequest instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.IUpdateExperimentRequest): google.cloud.dialogflow.cx.v3.UpdateExperimentRequest; + + /** + * Encodes the specified UpdateExperimentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateExperimentRequest.verify|verify} messages. + * @param message UpdateExperimentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.IUpdateExperimentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateExperimentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateExperimentRequest.verify|verify} messages. + * @param message UpdateExperimentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IUpdateExperimentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateExperimentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateExperimentRequest + * @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.UpdateExperimentRequest; + + /** + * Decodes an UpdateExperimentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateExperimentRequest + * @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.UpdateExperimentRequest; + + /** + * Verifies an UpdateExperimentRequest 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 UpdateExperimentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateExperimentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.UpdateExperimentRequest; + + /** + * Creates a plain object from an UpdateExperimentRequest message. Also converts values to other types if specified. + * @param message UpdateExperimentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.UpdateExperimentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateExperimentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateExperimentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteExperimentRequest. */ + interface IDeleteExperimentRequest { + + /** DeleteExperimentRequest name */ + name?: (string|null); + } + + /** Represents a DeleteExperimentRequest. */ + class DeleteExperimentRequest implements IDeleteExperimentRequest { + + /** + * Constructs a new DeleteExperimentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.IDeleteExperimentRequest); + + /** DeleteExperimentRequest name. */ + public name: string; + + /** + * Creates a new DeleteExperimentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteExperimentRequest instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.IDeleteExperimentRequest): google.cloud.dialogflow.cx.v3.DeleteExperimentRequest; + + /** + * Encodes the specified DeleteExperimentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteExperimentRequest.verify|verify} messages. + * @param message DeleteExperimentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.IDeleteExperimentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteExperimentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteExperimentRequest.verify|verify} messages. + * @param message DeleteExperimentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IDeleteExperimentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteExperimentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteExperimentRequest + * @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.DeleteExperimentRequest; + + /** + * Decodes a DeleteExperimentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteExperimentRequest + * @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.DeleteExperimentRequest; + + /** + * Verifies a DeleteExperimentRequest 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 DeleteExperimentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteExperimentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.DeleteExperimentRequest; + + /** + * Creates a plain object from a DeleteExperimentRequest message. Also converts values to other types if specified. + * @param message DeleteExperimentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.DeleteExperimentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteExperimentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteExperimentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a StartExperimentRequest. */ + interface IStartExperimentRequest { + + /** StartExperimentRequest name */ + name?: (string|null); + } + + /** Represents a StartExperimentRequest. */ + class StartExperimentRequest implements IStartExperimentRequest { + + /** + * Constructs a new StartExperimentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.IStartExperimentRequest); + + /** StartExperimentRequest name. */ + public name: string; + + /** + * Creates a new StartExperimentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns StartExperimentRequest instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.IStartExperimentRequest): google.cloud.dialogflow.cx.v3.StartExperimentRequest; + + /** + * Encodes the specified StartExperimentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.StartExperimentRequest.verify|verify} messages. + * @param message StartExperimentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.IStartExperimentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StartExperimentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.StartExperimentRequest.verify|verify} messages. + * @param message StartExperimentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IStartExperimentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StartExperimentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StartExperimentRequest + * @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.StartExperimentRequest; + + /** + * Decodes a StartExperimentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StartExperimentRequest + * @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.StartExperimentRequest; + + /** + * Verifies a StartExperimentRequest 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 StartExperimentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StartExperimentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.StartExperimentRequest; + + /** + * Creates a plain object from a StartExperimentRequest message. Also converts values to other types if specified. + * @param message StartExperimentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.StartExperimentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StartExperimentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StartExperimentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a StopExperimentRequest. */ + interface IStopExperimentRequest { + + /** StopExperimentRequest name */ + name?: (string|null); + } + + /** Represents a StopExperimentRequest. */ + class StopExperimentRequest implements IStopExperimentRequest { + + /** + * Constructs a new StopExperimentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.IStopExperimentRequest); + + /** StopExperimentRequest name. */ + public name: string; + + /** + * Creates a new StopExperimentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns StopExperimentRequest instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.IStopExperimentRequest): google.cloud.dialogflow.cx.v3.StopExperimentRequest; + + /** + * Encodes the specified StopExperimentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.StopExperimentRequest.verify|verify} messages. + * @param message StopExperimentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.IStopExperimentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StopExperimentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.StopExperimentRequest.verify|verify} messages. + * @param message StopExperimentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IStopExperimentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StopExperimentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StopExperimentRequest + * @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.StopExperimentRequest; + + /** + * Decodes a StopExperimentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StopExperimentRequest + * @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.StopExperimentRequest; + + /** + * Verifies a StopExperimentRequest 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 StopExperimentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StopExperimentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.StopExperimentRequest; + + /** + * Creates a plain object from a StopExperimentRequest message. Also converts values to other types if specified. + * @param message StopExperimentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.StopExperimentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StopExperimentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StopExperimentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Represents a Generators */ + class Generators extends $protobuf.rpc.Service { + + /** + * Constructs a new Generators service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new Generators service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Generators; + + /** + * Calls ListGenerators. + * @param request ListGeneratorsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListGeneratorsResponse + */ + public listGenerators(request: google.cloud.dialogflow.cx.v3.IListGeneratorsRequest, callback: google.cloud.dialogflow.cx.v3.Generators.ListGeneratorsCallback): void; + + /** + * Calls ListGenerators. + * @param request ListGeneratorsRequest message or plain object + * @returns Promise + */ + public listGenerators(request: google.cloud.dialogflow.cx.v3.IListGeneratorsRequest): Promise; + + /** + * Calls GetGenerator. + * @param request GetGeneratorRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Generator + */ + public getGenerator(request: google.cloud.dialogflow.cx.v3.IGetGeneratorRequest, callback: google.cloud.dialogflow.cx.v3.Generators.GetGeneratorCallback): void; + + /** + * Calls GetGenerator. + * @param request GetGeneratorRequest message or plain object + * @returns Promise + */ + public getGenerator(request: google.cloud.dialogflow.cx.v3.IGetGeneratorRequest): Promise; + + /** + * Calls CreateGenerator. + * @param request CreateGeneratorRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Generator + */ + public createGenerator(request: google.cloud.dialogflow.cx.v3.ICreateGeneratorRequest, callback: google.cloud.dialogflow.cx.v3.Generators.CreateGeneratorCallback): void; + + /** + * Calls CreateGenerator. + * @param request CreateGeneratorRequest message or plain object + * @returns Promise + */ + public createGenerator(request: google.cloud.dialogflow.cx.v3.ICreateGeneratorRequest): Promise; + + /** + * Calls UpdateGenerator. + * @param request UpdateGeneratorRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Generator + */ + public updateGenerator(request: google.cloud.dialogflow.cx.v3.IUpdateGeneratorRequest, callback: google.cloud.dialogflow.cx.v3.Generators.UpdateGeneratorCallback): void; + + /** + * Calls UpdateGenerator. + * @param request UpdateGeneratorRequest message or plain object + * @returns Promise + */ + public updateGenerator(request: google.cloud.dialogflow.cx.v3.IUpdateGeneratorRequest): Promise; + + /** + * Calls DeleteGenerator. + * @param request DeleteGeneratorRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteGenerator(request: google.cloud.dialogflow.cx.v3.IDeleteGeneratorRequest, callback: google.cloud.dialogflow.cx.v3.Generators.DeleteGeneratorCallback): void; + + /** + * Calls DeleteGenerator. + * @param request DeleteGeneratorRequest message or plain object + * @returns Promise + */ + public deleteGenerator(request: google.cloud.dialogflow.cx.v3.IDeleteGeneratorRequest): Promise; + } + + namespace Generators { + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Generators|listGenerators}. + * @param error Error, if any + * @param [response] ListGeneratorsResponse + */ + type ListGeneratorsCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.ListGeneratorsResponse) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Generators|getGenerator}. + * @param error Error, if any + * @param [response] Generator + */ + type GetGeneratorCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.Generator) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Generators|createGenerator}. + * @param error Error, if any + * @param [response] Generator + */ + type CreateGeneratorCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.Generator) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Generators|updateGenerator}. + * @param error Error, if any + * @param [response] Generator + */ + type UpdateGeneratorCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.Generator) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Generators|deleteGenerator}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteGeneratorCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + } + + /** Properties of a Generator. */ + interface IGenerator { + + /** Generator name */ + name?: (string|null); + + /** Generator displayName */ + displayName?: (string|null); + + /** Generator promptText */ + promptText?: (google.cloud.dialogflow.cx.v3.IPhrase|null); + + /** Generator placeholders */ + placeholders?: (google.cloud.dialogflow.cx.v3.Generator.IPlaceholder[]|null); + + /** Generator llmModelSettings */ + llmModelSettings?: (google.cloud.dialogflow.cx.v3.ILlmModelSettings|null); + + /** Generator modelParameter */ + modelParameter?: (google.cloud.dialogflow.cx.v3.Generator.IModelParameter|null); + } + + /** Represents a Generator. */ + class Generator implements IGenerator { + + /** + * Constructs a new Generator. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.IGenerator); + + /** Generator name. */ + public name: string; + + /** Generator displayName. */ + public displayName: string; + + /** Generator promptText. */ + public promptText?: (google.cloud.dialogflow.cx.v3.IPhrase|null); + + /** Generator placeholders. */ + public placeholders: google.cloud.dialogflow.cx.v3.Generator.IPlaceholder[]; + + /** Generator llmModelSettings. */ + public llmModelSettings?: (google.cloud.dialogflow.cx.v3.ILlmModelSettings|null); + + /** Generator modelParameter. */ + public modelParameter?: (google.cloud.dialogflow.cx.v3.Generator.IModelParameter|null); + + /** + * Creates a new Generator instance using the specified properties. + * @param [properties] Properties to set + * @returns Generator instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.IGenerator): google.cloud.dialogflow.cx.v3.Generator; + + /** + * Encodes the specified Generator message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Generator.verify|verify} messages. + * @param message Generator message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.IGenerator, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Generator message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Generator.verify|verify} messages. + * @param message Generator message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IGenerator, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Generator message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Generator + * @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.Generator; + + /** + * Decodes a Generator message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Generator + * @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.Generator; + + /** + * Verifies a Generator 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 Generator message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Generator + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Generator; + + /** + * Creates a plain object from a Generator message. Also converts values to other types if specified. + * @param message Generator + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.Generator, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Generator to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Generator + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Generator { + + /** Properties of a Placeholder. */ + interface IPlaceholder { + + /** Placeholder id */ + id?: (string|null); + + /** Placeholder name */ + name?: (string|null); + } + + /** Represents a Placeholder. */ + class Placeholder implements IPlaceholder { + + /** + * Constructs a new Placeholder. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.Generator.IPlaceholder); + + /** Placeholder id. */ + public id: string; + + /** Placeholder name. */ + public name: string; + + /** + * Creates a new Placeholder instance using the specified properties. + * @param [properties] Properties to set + * @returns Placeholder instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.Generator.IPlaceholder): google.cloud.dialogflow.cx.v3.Generator.Placeholder; + + /** + * Encodes the specified Placeholder message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Generator.Placeholder.verify|verify} messages. + * @param message Placeholder message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.Generator.IPlaceholder, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Placeholder message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Generator.Placeholder.verify|verify} messages. + * @param message Placeholder message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.Generator.IPlaceholder, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Placeholder message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Placeholder + * @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.Generator.Placeholder; + + /** + * Decodes a Placeholder message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Placeholder + * @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.Generator.Placeholder; + + /** + * Verifies a Placeholder 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 Placeholder message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Placeholder + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Generator.Placeholder; + + /** + * Creates a plain object from a Placeholder message. Also converts values to other types if specified. + * @param message Placeholder + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.Generator.Placeholder, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Placeholder to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Placeholder + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ModelParameter. */ + interface IModelParameter { + + /** ModelParameter temperature */ + temperature?: (number|null); + + /** ModelParameter maxDecodeSteps */ + maxDecodeSteps?: (number|null); + + /** ModelParameter topP */ + topP?: (number|null); + + /** ModelParameter topK */ + topK?: (number|null); + } + + /** Represents a ModelParameter. */ + class ModelParameter implements IModelParameter { + + /** + * Constructs a new ModelParameter. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.Generator.IModelParameter); + + /** ModelParameter temperature. */ + public temperature?: (number|null); + + /** ModelParameter maxDecodeSteps. */ + public maxDecodeSteps?: (number|null); + + /** ModelParameter topP. */ + public topP?: (number|null); + + /** ModelParameter topK. */ + public topK?: (number|null); + + /** + * Creates a new ModelParameter instance using the specified properties. + * @param [properties] Properties to set + * @returns ModelParameter instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.Generator.IModelParameter): google.cloud.dialogflow.cx.v3.Generator.ModelParameter; + + /** + * Encodes the specified ModelParameter message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Generator.ModelParameter.verify|verify} messages. + * @param message ModelParameter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.Generator.IModelParameter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ModelParameter message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Generator.ModelParameter.verify|verify} messages. + * @param message ModelParameter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.Generator.IModelParameter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ModelParameter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ModelParameter + * @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.Generator.ModelParameter; + + /** + * Decodes a ModelParameter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ModelParameter + * @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.Generator.ModelParameter; + + /** + * Verifies a ModelParameter 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 ModelParameter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ModelParameter + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Generator.ModelParameter; + + /** + * Creates a plain object from a ModelParameter message. Also converts values to other types if specified. + * @param message ModelParameter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.Generator.ModelParameter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ModelParameter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ModelParameter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a Phrase. */ + interface IPhrase { + + /** Phrase text */ + text?: (string|null); + } + + /** Represents a Phrase. */ + class Phrase implements IPhrase { + + /** + * Constructs a new Phrase. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.IPhrase); + + /** Phrase text. */ + public text: string; + + /** + * Creates a new Phrase instance using the specified properties. + * @param [properties] Properties to set + * @returns Phrase instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.IPhrase): google.cloud.dialogflow.cx.v3.Phrase; + + /** + * Encodes the specified Phrase message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Phrase.verify|verify} messages. + * @param message Phrase message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.IPhrase, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Phrase message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Phrase.verify|verify} messages. + * @param message Phrase message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IPhrase, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Phrase message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Phrase + * @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.Phrase; + + /** + * Decodes a Phrase message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Phrase + * @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.Phrase; + + /** + * Verifies a Phrase 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 Phrase message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Phrase + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Phrase; + + /** + * Creates a plain object from a Phrase message. Also converts values to other types if specified. + * @param message Phrase + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.Phrase, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Phrase to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Phrase + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListGeneratorsRequest. */ + interface IListGeneratorsRequest { + + /** ListGeneratorsRequest parent */ + parent?: (string|null); + + /** ListGeneratorsRequest languageCode */ + languageCode?: (string|null); + + /** ListGeneratorsRequest pageSize */ + pageSize?: (number|null); + + /** ListGeneratorsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListGeneratorsRequest. */ + class ListGeneratorsRequest implements IListGeneratorsRequest { + + /** + * Constructs a new ListGeneratorsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.IListGeneratorsRequest); + + /** ListGeneratorsRequest parent. */ + public parent: string; + + /** ListGeneratorsRequest languageCode. */ + public languageCode: string; + + /** ListGeneratorsRequest pageSize. */ + public pageSize: number; + + /** ListGeneratorsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListGeneratorsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListGeneratorsRequest instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.IListGeneratorsRequest): google.cloud.dialogflow.cx.v3.ListGeneratorsRequest; + + /** + * Encodes the specified ListGeneratorsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListGeneratorsRequest.verify|verify} messages. + * @param message ListGeneratorsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.IListGeneratorsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListGeneratorsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListGeneratorsRequest.verify|verify} messages. + * @param message ListGeneratorsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IListGeneratorsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListGeneratorsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListGeneratorsRequest + * @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.ListGeneratorsRequest; + + /** + * Decodes a ListGeneratorsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListGeneratorsRequest + * @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.ListGeneratorsRequest; + + /** + * Verifies a ListGeneratorsRequest 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 ListGeneratorsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListGeneratorsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ListGeneratorsRequest; + + /** + * Creates a plain object from a ListGeneratorsRequest message. Also converts values to other types if specified. + * @param message ListGeneratorsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.ListGeneratorsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListGeneratorsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListGeneratorsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListGeneratorsResponse. */ + interface IListGeneratorsResponse { + + /** ListGeneratorsResponse generators */ + generators?: (google.cloud.dialogflow.cx.v3.IGenerator[]|null); + + /** ListGeneratorsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListGeneratorsResponse. */ + class ListGeneratorsResponse implements IListGeneratorsResponse { + + /** + * Constructs a new ListGeneratorsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.IListGeneratorsResponse); + + /** ListGeneratorsResponse generators. */ + public generators: google.cloud.dialogflow.cx.v3.IGenerator[]; + + /** ListGeneratorsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListGeneratorsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListGeneratorsResponse instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.IListGeneratorsResponse): google.cloud.dialogflow.cx.v3.ListGeneratorsResponse; + + /** + * Encodes the specified ListGeneratorsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListGeneratorsResponse.verify|verify} messages. + * @param message ListGeneratorsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.IListGeneratorsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListGeneratorsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListGeneratorsResponse.verify|verify} messages. + * @param message ListGeneratorsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IListGeneratorsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListGeneratorsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListGeneratorsResponse + * @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.ListGeneratorsResponse; + + /** + * Decodes a ListGeneratorsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListGeneratorsResponse + * @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.ListGeneratorsResponse; + + /** + * Verifies a ListGeneratorsResponse 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 ListGeneratorsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListGeneratorsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ListGeneratorsResponse; + + /** + * Creates a plain object from a ListGeneratorsResponse message. Also converts values to other types if specified. + * @param message ListGeneratorsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.ListGeneratorsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListGeneratorsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListGeneratorsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetGeneratorRequest. */ + interface IGetGeneratorRequest { + + /** GetGeneratorRequest name */ + name?: (string|null); + + /** GetGeneratorRequest languageCode */ + languageCode?: (string|null); + } + + /** Represents a GetGeneratorRequest. */ + class GetGeneratorRequest implements IGetGeneratorRequest { + + /** + * Constructs a new GetGeneratorRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.IGetGeneratorRequest); + + /** GetGeneratorRequest name. */ + public name: string; + + /** GetGeneratorRequest languageCode. */ + public languageCode: string; + + /** + * Creates a new GetGeneratorRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetGeneratorRequest instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.IGetGeneratorRequest): google.cloud.dialogflow.cx.v3.GetGeneratorRequest; + + /** + * Encodes the specified GetGeneratorRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetGeneratorRequest.verify|verify} messages. + * @param message GetGeneratorRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.IGetGeneratorRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetGeneratorRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetGeneratorRequest.verify|verify} messages. + * @param message GetGeneratorRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IGetGeneratorRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetGeneratorRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetGeneratorRequest + * @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.GetGeneratorRequest; + + /** + * Decodes a GetGeneratorRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetGeneratorRequest + * @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.GetGeneratorRequest; + + /** + * Verifies a GetGeneratorRequest 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 GetGeneratorRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetGeneratorRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.GetGeneratorRequest; + + /** + * Creates a plain object from a GetGeneratorRequest message. Also converts values to other types if specified. + * @param message GetGeneratorRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.GetGeneratorRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetGeneratorRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetGeneratorRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateGeneratorRequest. */ + interface ICreateGeneratorRequest { + + /** CreateGeneratorRequest parent */ + parent?: (string|null); + + /** CreateGeneratorRequest generator */ + generator?: (google.cloud.dialogflow.cx.v3.IGenerator|null); + + /** CreateGeneratorRequest languageCode */ + languageCode?: (string|null); + } + + /** Represents a CreateGeneratorRequest. */ + class CreateGeneratorRequest implements ICreateGeneratorRequest { + + /** + * Constructs a new CreateGeneratorRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.ICreateGeneratorRequest); + + /** CreateGeneratorRequest parent. */ + public parent: string; + + /** CreateGeneratorRequest generator. */ + public generator?: (google.cloud.dialogflow.cx.v3.IGenerator|null); + + /** CreateGeneratorRequest languageCode. */ + public languageCode: string; + + /** + * Creates a new CreateGeneratorRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateGeneratorRequest instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.ICreateGeneratorRequest): google.cloud.dialogflow.cx.v3.CreateGeneratorRequest; + + /** + * Encodes the specified CreateGeneratorRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateGeneratorRequest.verify|verify} messages. + * @param message CreateGeneratorRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.ICreateGeneratorRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateGeneratorRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateGeneratorRequest.verify|verify} messages. + * @param message CreateGeneratorRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ICreateGeneratorRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateGeneratorRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateGeneratorRequest + * @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.CreateGeneratorRequest; + + /** + * Decodes a CreateGeneratorRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateGeneratorRequest + * @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.CreateGeneratorRequest; + + /** + * Verifies a CreateGeneratorRequest 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 CreateGeneratorRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateGeneratorRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.CreateGeneratorRequest; + + /** + * Creates a plain object from a CreateGeneratorRequest message. Also converts values to other types if specified. + * @param message CreateGeneratorRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.CreateGeneratorRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateGeneratorRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateGeneratorRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateGeneratorRequest. */ + interface IUpdateGeneratorRequest { + + /** UpdateGeneratorRequest generator */ + generator?: (google.cloud.dialogflow.cx.v3.IGenerator|null); + + /** UpdateGeneratorRequest languageCode */ + languageCode?: (string|null); + + /** UpdateGeneratorRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateGeneratorRequest. */ + class UpdateGeneratorRequest implements IUpdateGeneratorRequest { + + /** + * Constructs a new UpdateGeneratorRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.IUpdateGeneratorRequest); + + /** UpdateGeneratorRequest generator. */ + public generator?: (google.cloud.dialogflow.cx.v3.IGenerator|null); + + /** UpdateGeneratorRequest languageCode. */ + public languageCode: string; + + /** UpdateGeneratorRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateGeneratorRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateGeneratorRequest instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.IUpdateGeneratorRequest): google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest; + + /** + * Encodes the specified UpdateGeneratorRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest.verify|verify} messages. + * @param message UpdateGeneratorRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.IUpdateGeneratorRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateGeneratorRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest.verify|verify} messages. + * @param message UpdateGeneratorRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IUpdateGeneratorRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateGeneratorRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateGeneratorRequest + * @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.UpdateGeneratorRequest; + + /** + * Decodes an UpdateGeneratorRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateGeneratorRequest + * @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.UpdateGeneratorRequest; + + /** + * Verifies an UpdateGeneratorRequest 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 UpdateGeneratorRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateGeneratorRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest; + + /** + * Creates a plain object from an UpdateGeneratorRequest message. Also converts values to other types if specified. + * @param message UpdateGeneratorRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateGeneratorRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateGeneratorRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteGeneratorRequest. */ + interface IDeleteGeneratorRequest { + + /** DeleteGeneratorRequest name */ + name?: (string|null); + + /** DeleteGeneratorRequest force */ + force?: (boolean|null); + } + + /** Represents a DeleteGeneratorRequest. */ + class DeleteGeneratorRequest implements IDeleteGeneratorRequest { + + /** + * Constructs a new DeleteGeneratorRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.IDeleteGeneratorRequest); + + /** DeleteGeneratorRequest name. */ + public name: string; + + /** DeleteGeneratorRequest force. */ + public force: boolean; + + /** + * Creates a new DeleteGeneratorRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteGeneratorRequest instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.IDeleteGeneratorRequest): google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest; + + /** + * Encodes the specified DeleteGeneratorRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest.verify|verify} messages. + * @param message DeleteGeneratorRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.IDeleteGeneratorRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteGeneratorRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest.verify|verify} messages. + * @param message DeleteGeneratorRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IDeleteGeneratorRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteGeneratorRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteGeneratorRequest + * @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.DeleteGeneratorRequest; + + /** + * Decodes a DeleteGeneratorRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteGeneratorRequest + * @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.DeleteGeneratorRequest; + + /** + * Verifies a DeleteGeneratorRequest 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 DeleteGeneratorRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteGeneratorRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest; + + /** + * Creates a plain object from a DeleteGeneratorRequest message. Also converts values to other types if specified. + * @param message DeleteGeneratorRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteGeneratorRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteGeneratorRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Represents a Playbooks */ + class Playbooks extends $protobuf.rpc.Service { + + /** + * Constructs a new Playbooks service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new Playbooks service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Playbooks; + + /** + * Calls CreatePlaybook. + * @param request CreatePlaybookRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Playbook + */ + public createPlaybook(request: google.cloud.dialogflow.cx.v3.ICreatePlaybookRequest, callback: google.cloud.dialogflow.cx.v3.Playbooks.CreatePlaybookCallback): void; + + /** + * Calls CreatePlaybook. + * @param request CreatePlaybookRequest message or plain object + * @returns Promise + */ + public createPlaybook(request: google.cloud.dialogflow.cx.v3.ICreatePlaybookRequest): Promise; + + /** + * Calls DeletePlaybook. + * @param request DeletePlaybookRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deletePlaybook(request: google.cloud.dialogflow.cx.v3.IDeletePlaybookRequest, callback: google.cloud.dialogflow.cx.v3.Playbooks.DeletePlaybookCallback): void; + + /** + * Calls DeletePlaybook. + * @param request DeletePlaybookRequest message or plain object + * @returns Promise + */ + public deletePlaybook(request: google.cloud.dialogflow.cx.v3.IDeletePlaybookRequest): Promise; + + /** + * Calls ListPlaybooks. + * @param request ListPlaybooksRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListPlaybooksResponse + */ + public listPlaybooks(request: google.cloud.dialogflow.cx.v3.IListPlaybooksRequest, callback: google.cloud.dialogflow.cx.v3.Playbooks.ListPlaybooksCallback): void; + + /** + * Calls ListPlaybooks. + * @param request ListPlaybooksRequest message or plain object + * @returns Promise + */ + public listPlaybooks(request: google.cloud.dialogflow.cx.v3.IListPlaybooksRequest): Promise; + + /** + * Calls GetPlaybook. + * @param request GetPlaybookRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Playbook + */ + public getPlaybook(request: google.cloud.dialogflow.cx.v3.IGetPlaybookRequest, callback: google.cloud.dialogflow.cx.v3.Playbooks.GetPlaybookCallback): void; + + /** + * Calls GetPlaybook. + * @param request GetPlaybookRequest message or plain object + * @returns Promise + */ + public getPlaybook(request: google.cloud.dialogflow.cx.v3.IGetPlaybookRequest): Promise; + + /** + * Calls ExportPlaybook. + * @param request ExportPlaybookRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public exportPlaybook(request: google.cloud.dialogflow.cx.v3.IExportPlaybookRequest, callback: google.cloud.dialogflow.cx.v3.Playbooks.ExportPlaybookCallback): void; + + /** + * Calls ExportPlaybook. + * @param request ExportPlaybookRequest message or plain object + * @returns Promise + */ + public exportPlaybook(request: google.cloud.dialogflow.cx.v3.IExportPlaybookRequest): Promise; + + /** + * Calls ImportPlaybook. + * @param request ImportPlaybookRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public importPlaybook(request: google.cloud.dialogflow.cx.v3.IImportPlaybookRequest, callback: google.cloud.dialogflow.cx.v3.Playbooks.ImportPlaybookCallback): void; + + /** + * Calls ImportPlaybook. + * @param request ImportPlaybookRequest message or plain object + * @returns Promise + */ + public importPlaybook(request: google.cloud.dialogflow.cx.v3.IImportPlaybookRequest): Promise; + + /** + * Calls UpdatePlaybook. + * @param request UpdatePlaybookRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Playbook + */ + public updatePlaybook(request: google.cloud.dialogflow.cx.v3.IUpdatePlaybookRequest, callback: google.cloud.dialogflow.cx.v3.Playbooks.UpdatePlaybookCallback): void; + + /** + * Calls UpdatePlaybook. + * @param request UpdatePlaybookRequest message or plain object + * @returns Promise + */ + public updatePlaybook(request: google.cloud.dialogflow.cx.v3.IUpdatePlaybookRequest): Promise; + + /** + * Calls CreatePlaybookVersion. + * @param request CreatePlaybookVersionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and PlaybookVersion + */ + public createPlaybookVersion(request: google.cloud.dialogflow.cx.v3.ICreatePlaybookVersionRequest, callback: google.cloud.dialogflow.cx.v3.Playbooks.CreatePlaybookVersionCallback): void; + + /** + * Calls CreatePlaybookVersion. + * @param request CreatePlaybookVersionRequest message or plain object + * @returns Promise + */ + public createPlaybookVersion(request: google.cloud.dialogflow.cx.v3.ICreatePlaybookVersionRequest): Promise; + + /** + * Calls GetPlaybookVersion. + * @param request GetPlaybookVersionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and PlaybookVersion + */ + public getPlaybookVersion(request: google.cloud.dialogflow.cx.v3.IGetPlaybookVersionRequest, callback: google.cloud.dialogflow.cx.v3.Playbooks.GetPlaybookVersionCallback): void; + + /** + * Calls GetPlaybookVersion. + * @param request GetPlaybookVersionRequest message or plain object + * @returns Promise + */ + public getPlaybookVersion(request: google.cloud.dialogflow.cx.v3.IGetPlaybookVersionRequest): Promise; + + /** + * Calls RestorePlaybookVersion. + * @param request RestorePlaybookVersionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and RestorePlaybookVersionResponse + */ + public restorePlaybookVersion(request: google.cloud.dialogflow.cx.v3.IRestorePlaybookVersionRequest, callback: google.cloud.dialogflow.cx.v3.Playbooks.RestorePlaybookVersionCallback): void; + + /** + * Calls RestorePlaybookVersion. + * @param request RestorePlaybookVersionRequest message or plain object + * @returns Promise + */ + public restorePlaybookVersion(request: google.cloud.dialogflow.cx.v3.IRestorePlaybookVersionRequest): Promise; + + /** + * Calls ListPlaybookVersions. + * @param request ListPlaybookVersionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListPlaybookVersionsResponse + */ + public listPlaybookVersions(request: google.cloud.dialogflow.cx.v3.IListPlaybookVersionsRequest, callback: google.cloud.dialogflow.cx.v3.Playbooks.ListPlaybookVersionsCallback): void; + + /** + * Calls ListPlaybookVersions. + * @param request ListPlaybookVersionsRequest message or plain object + * @returns Promise + */ + public listPlaybookVersions(request: google.cloud.dialogflow.cx.v3.IListPlaybookVersionsRequest): Promise; + + /** + * Calls DeletePlaybookVersion. + * @param request DeletePlaybookVersionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deletePlaybookVersion(request: google.cloud.dialogflow.cx.v3.IDeletePlaybookVersionRequest, callback: google.cloud.dialogflow.cx.v3.Playbooks.DeletePlaybookVersionCallback): void; + + /** + * Calls DeletePlaybookVersion. + * @param request DeletePlaybookVersionRequest message or plain object + * @returns Promise + */ + public deletePlaybookVersion(request: google.cloud.dialogflow.cx.v3.IDeletePlaybookVersionRequest): Promise; + } + + namespace Playbooks { + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Playbooks|createPlaybook}. + * @param error Error, if any + * @param [response] Playbook + */ + type CreatePlaybookCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.Playbook) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Playbooks|deletePlaybook}. + * @param error Error, if any + * @param [response] Empty + */ + type DeletePlaybookCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Playbooks|listPlaybooks}. + * @param error Error, if any + * @param [response] ListPlaybooksResponse + */ + type ListPlaybooksCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.ListPlaybooksResponse) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Playbooks|getPlaybook}. + * @param error Error, if any + * @param [response] Playbook + */ + type GetPlaybookCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.Playbook) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Playbooks|exportPlaybook}. + * @param error Error, if any + * @param [response] Operation + */ + type ExportPlaybookCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Playbooks|importPlaybook}. + * @param error Error, if any + * @param [response] Operation + */ + type ImportPlaybookCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Playbooks|updatePlaybook}. + * @param error Error, if any + * @param [response] Playbook + */ + type UpdatePlaybookCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.Playbook) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Playbooks|createPlaybookVersion}. + * @param error Error, if any + * @param [response] PlaybookVersion + */ + type CreatePlaybookVersionCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.PlaybookVersion) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Playbooks|getPlaybookVersion}. + * @param error Error, if any + * @param [response] PlaybookVersion + */ + type GetPlaybookVersionCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.PlaybookVersion) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Playbooks|restorePlaybookVersion}. + * @param error Error, if any + * @param [response] RestorePlaybookVersionResponse + */ + type RestorePlaybookVersionCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Playbooks|listPlaybookVersions}. + * @param error Error, if any + * @param [response] ListPlaybookVersionsResponse + */ + type ListPlaybookVersionsCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponse) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Playbooks|deletePlaybookVersion}. + * @param error Error, if any + * @param [response] Empty + */ + type DeletePlaybookVersionCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + } + + /** Properties of a CreatePlaybookRequest. */ + interface ICreatePlaybookRequest { + + /** CreatePlaybookRequest parent */ + parent?: (string|null); + + /** CreatePlaybookRequest playbook */ + playbook?: (google.cloud.dialogflow.cx.v3.IPlaybook|null); + } + + /** Represents a CreatePlaybookRequest. */ + class CreatePlaybookRequest implements ICreatePlaybookRequest { + + /** + * Constructs a new CreatePlaybookRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.ICreatePlaybookRequest); + + /** CreatePlaybookRequest parent. */ + public parent: string; + + /** CreatePlaybookRequest playbook. */ + public playbook?: (google.cloud.dialogflow.cx.v3.IPlaybook|null); + + /** + * Creates a new CreatePlaybookRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreatePlaybookRequest instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.ICreatePlaybookRequest): google.cloud.dialogflow.cx.v3.CreatePlaybookRequest; + + /** + * Encodes the specified CreatePlaybookRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreatePlaybookRequest.verify|verify} messages. + * @param message CreatePlaybookRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.ICreatePlaybookRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreatePlaybookRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreatePlaybookRequest.verify|verify} messages. + * @param message CreatePlaybookRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ICreatePlaybookRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreatePlaybookRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreatePlaybookRequest + * @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.CreatePlaybookRequest; + + /** + * Decodes a CreatePlaybookRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreatePlaybookRequest + * @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.CreatePlaybookRequest; + + /** + * Verifies a CreatePlaybookRequest 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 CreatePlaybookRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreatePlaybookRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.CreatePlaybookRequest; + + /** + * Creates a plain object from a CreatePlaybookRequest message. Also converts values to other types if specified. + * @param message CreatePlaybookRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.CreatePlaybookRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreatePlaybookRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreatePlaybookRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeletePlaybookRequest. */ + interface IDeletePlaybookRequest { + + /** DeletePlaybookRequest name */ + name?: (string|null); + } + + /** Represents a DeletePlaybookRequest. */ + class DeletePlaybookRequest implements IDeletePlaybookRequest { + + /** + * Constructs a new DeletePlaybookRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.IDeletePlaybookRequest); + + /** DeletePlaybookRequest name. */ + public name: string; + + /** + * Creates a new DeletePlaybookRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeletePlaybookRequest instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.IDeletePlaybookRequest): google.cloud.dialogflow.cx.v3.DeletePlaybookRequest; + + /** + * Encodes the specified DeletePlaybookRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeletePlaybookRequest.verify|verify} messages. + * @param message DeletePlaybookRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.IDeletePlaybookRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeletePlaybookRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeletePlaybookRequest.verify|verify} messages. + * @param message DeletePlaybookRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IDeletePlaybookRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeletePlaybookRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeletePlaybookRequest + * @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.DeletePlaybookRequest; + + /** + * Decodes a DeletePlaybookRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeletePlaybookRequest + * @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.DeletePlaybookRequest; + + /** + * Verifies a DeletePlaybookRequest 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 DeletePlaybookRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeletePlaybookRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.DeletePlaybookRequest; + + /** + * Creates a plain object from a DeletePlaybookRequest message. Also converts values to other types if specified. + * @param message DeletePlaybookRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.DeletePlaybookRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeletePlaybookRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeletePlaybookRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListPlaybooksRequest. */ + interface IListPlaybooksRequest { + + /** ListPlaybooksRequest parent */ + parent?: (string|null); + + /** ListPlaybooksRequest pageSize */ + pageSize?: (number|null); + + /** ListPlaybooksRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListPlaybooksRequest. */ + class ListPlaybooksRequest implements IListPlaybooksRequest { + + /** + * Constructs a new ListPlaybooksRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.IListPlaybooksRequest); + + /** ListPlaybooksRequest parent. */ + public parent: string; + + /** ListPlaybooksRequest pageSize. */ + public pageSize: number; + + /** ListPlaybooksRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListPlaybooksRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListPlaybooksRequest instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.IListPlaybooksRequest): google.cloud.dialogflow.cx.v3.ListPlaybooksRequest; + + /** + * Encodes the specified ListPlaybooksRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListPlaybooksRequest.verify|verify} messages. + * @param message ListPlaybooksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.IListPlaybooksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListPlaybooksRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListPlaybooksRequest.verify|verify} messages. + * @param message ListPlaybooksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IListPlaybooksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListPlaybooksRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListPlaybooksRequest + * @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.ListPlaybooksRequest; + + /** + * Decodes a ListPlaybooksRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListPlaybooksRequest + * @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.ListPlaybooksRequest; + + /** + * Verifies a ListPlaybooksRequest 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 ListPlaybooksRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListPlaybooksRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ListPlaybooksRequest; + + /** + * Creates a plain object from a ListPlaybooksRequest message. Also converts values to other types if specified. + * @param message ListPlaybooksRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.ListPlaybooksRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListPlaybooksRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListPlaybooksRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListPlaybooksResponse. */ + interface IListPlaybooksResponse { + + /** ListPlaybooksResponse playbooks */ + playbooks?: (google.cloud.dialogflow.cx.v3.IPlaybook[]|null); + + /** ListPlaybooksResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListPlaybooksResponse. */ + class ListPlaybooksResponse implements IListPlaybooksResponse { + + /** + * Constructs a new ListPlaybooksResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.IListPlaybooksResponse); + + /** ListPlaybooksResponse playbooks. */ + public playbooks: google.cloud.dialogflow.cx.v3.IPlaybook[]; + + /** ListPlaybooksResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListPlaybooksResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListPlaybooksResponse instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.IListPlaybooksResponse): google.cloud.dialogflow.cx.v3.ListPlaybooksResponse; + + /** + * Encodes the specified ListPlaybooksResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListPlaybooksResponse.verify|verify} messages. + * @param message ListPlaybooksResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.IListPlaybooksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListPlaybooksResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListPlaybooksResponse.verify|verify} messages. + * @param message ListPlaybooksResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IListPlaybooksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListPlaybooksResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListPlaybooksResponse + * @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.ListPlaybooksResponse; + + /** + * Decodes a ListPlaybooksResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListPlaybooksResponse + * @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.ListPlaybooksResponse; + + /** + * Verifies a ListPlaybooksResponse 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 ListPlaybooksResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListPlaybooksResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ListPlaybooksResponse; + + /** + * Creates a plain object from a ListPlaybooksResponse message. Also converts values to other types if specified. + * @param message ListPlaybooksResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.ListPlaybooksResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListPlaybooksResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListPlaybooksResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetPlaybookRequest. */ + interface IGetPlaybookRequest { + + /** GetPlaybookRequest name */ + name?: (string|null); + } + + /** Represents a GetPlaybookRequest. */ + class GetPlaybookRequest implements IGetPlaybookRequest { + + /** + * Constructs a new GetPlaybookRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.IGetPlaybookRequest); + + /** GetPlaybookRequest name. */ + public name: string; + + /** + * Creates a new GetPlaybookRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetPlaybookRequest instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.IGetPlaybookRequest): google.cloud.dialogflow.cx.v3.GetPlaybookRequest; + + /** + * Encodes the specified GetPlaybookRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetPlaybookRequest.verify|verify} messages. + * @param message GetPlaybookRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.IGetPlaybookRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetPlaybookRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetPlaybookRequest.verify|verify} messages. + * @param message GetPlaybookRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IGetPlaybookRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetPlaybookRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetPlaybookRequest + * @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.GetPlaybookRequest; + + /** + * Decodes a GetPlaybookRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetPlaybookRequest + * @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.GetPlaybookRequest; + + /** + * Verifies a GetPlaybookRequest 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 GetPlaybookRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetPlaybookRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.GetPlaybookRequest; + + /** + * Creates a plain object from a GetPlaybookRequest message. Also converts values to other types if specified. + * @param message GetPlaybookRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.GetPlaybookRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetPlaybookRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetPlaybookRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdatePlaybookRequest. */ + interface IUpdatePlaybookRequest { + + /** UpdatePlaybookRequest playbook */ + playbook?: (google.cloud.dialogflow.cx.v3.IPlaybook|null); + + /** UpdatePlaybookRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdatePlaybookRequest. */ + class UpdatePlaybookRequest implements IUpdatePlaybookRequest { + + /** + * Constructs a new UpdatePlaybookRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.IUpdatePlaybookRequest); + + /** UpdatePlaybookRequest playbook. */ + public playbook?: (google.cloud.dialogflow.cx.v3.IPlaybook|null); + + /** UpdatePlaybookRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdatePlaybookRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdatePlaybookRequest instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.IUpdatePlaybookRequest): google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest; + + /** + * Encodes the specified UpdatePlaybookRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest.verify|verify} messages. + * @param message UpdatePlaybookRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.IUpdatePlaybookRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdatePlaybookRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest.verify|verify} messages. + * @param message UpdatePlaybookRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IUpdatePlaybookRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdatePlaybookRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdatePlaybookRequest + * @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.UpdatePlaybookRequest; + + /** + * Decodes an UpdatePlaybookRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdatePlaybookRequest + * @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.UpdatePlaybookRequest; + + /** + * Verifies an UpdatePlaybookRequest 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 UpdatePlaybookRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdatePlaybookRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest; + + /** + * Creates a plain object from an UpdatePlaybookRequest message. Also converts values to other types if specified. + * @param message UpdatePlaybookRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdatePlaybookRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdatePlaybookRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Playbook. */ + interface IPlaybook { + + /** Playbook name */ + name?: (string|null); + + /** Playbook displayName */ + displayName?: (string|null); + + /** Playbook goal */ + goal?: (string|null); + + /** Playbook inputParameterDefinitions */ + inputParameterDefinitions?: (google.cloud.dialogflow.cx.v3.IParameterDefinition[]|null); + + /** Playbook outputParameterDefinitions */ + outputParameterDefinitions?: (google.cloud.dialogflow.cx.v3.IParameterDefinition[]|null); + + /** Playbook instruction */ + instruction?: (google.cloud.dialogflow.cx.v3.Playbook.IInstruction|null); + + /** Playbook tokenCount */ + tokenCount?: (number|Long|string|null); + + /** Playbook createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Playbook updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** Playbook referencedPlaybooks */ + referencedPlaybooks?: (string[]|null); + + /** Playbook referencedFlows */ + referencedFlows?: (string[]|null); + + /** Playbook referencedTools */ + referencedTools?: (string[]|null); + + /** Playbook inlineActions */ + inlineActions?: (string[]|null); + + /** Playbook codeBlock */ + codeBlock?: (google.cloud.dialogflow.cx.v3.ICodeBlock|null); + + /** Playbook llmModelSettings */ + llmModelSettings?: (google.cloud.dialogflow.cx.v3.ILlmModelSettings|null); + + /** Playbook handlers */ + handlers?: (google.cloud.dialogflow.cx.v3.IHandler[]|null); + + /** Playbook playbookType */ + playbookType?: (google.cloud.dialogflow.cx.v3.Playbook.PlaybookType|keyof typeof google.cloud.dialogflow.cx.v3.Playbook.PlaybookType|null); + } + + /** Represents a Playbook. */ + class Playbook implements IPlaybook { + + /** + * Constructs a new Playbook. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.IPlaybook); + + /** Playbook name. */ + public name: string; + + /** Playbook displayName. */ + public displayName: string; + + /** Playbook goal. */ + public goal: string; + + /** Playbook inputParameterDefinitions. */ + public inputParameterDefinitions: google.cloud.dialogflow.cx.v3.IParameterDefinition[]; + + /** Playbook outputParameterDefinitions. */ + public outputParameterDefinitions: google.cloud.dialogflow.cx.v3.IParameterDefinition[]; + + /** Playbook instruction. */ + public instruction?: (google.cloud.dialogflow.cx.v3.Playbook.IInstruction|null); + + /** Playbook tokenCount. */ + public tokenCount: (number|Long|string); + + /** Playbook createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Playbook updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** Playbook referencedPlaybooks. */ + public referencedPlaybooks: string[]; + + /** Playbook referencedFlows. */ + public referencedFlows: string[]; + + /** Playbook referencedTools. */ + public referencedTools: string[]; + + /** Playbook inlineActions. */ + public inlineActions: string[]; + + /** Playbook codeBlock. */ + public codeBlock?: (google.cloud.dialogflow.cx.v3.ICodeBlock|null); + + /** Playbook llmModelSettings. */ + public llmModelSettings?: (google.cloud.dialogflow.cx.v3.ILlmModelSettings|null); + + /** Playbook handlers. */ + public handlers: google.cloud.dialogflow.cx.v3.IHandler[]; + + /** Playbook playbookType. */ + public playbookType: (google.cloud.dialogflow.cx.v3.Playbook.PlaybookType|keyof typeof google.cloud.dialogflow.cx.v3.Playbook.PlaybookType); + + /** + * Creates a new Playbook instance using the specified properties. + * @param [properties] Properties to set + * @returns Playbook instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.IPlaybook): google.cloud.dialogflow.cx.v3.Playbook; + + /** + * Encodes the specified Playbook message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Playbook.verify|verify} messages. + * @param message Playbook message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.IPlaybook, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Playbook message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Playbook.verify|verify} messages. + * @param message Playbook message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IPlaybook, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Playbook message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Playbook + * @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.Playbook; + + /** + * Decodes a Playbook message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Playbook + * @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.Playbook; + + /** + * Verifies a Playbook 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 Playbook message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Playbook + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Playbook; + + /** + * Creates a plain object from a Playbook message. Also converts values to other types if specified. + * @param message Playbook + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.Playbook, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Playbook to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Playbook + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Playbook { + + /** Properties of a Step. */ + interface IStep { + + /** Step text */ + text?: (string|null); + + /** Step steps */ + steps?: (google.cloud.dialogflow.cx.v3.Playbook.IStep[]|null); + } + + /** Represents a Step. */ + class Step implements IStep { + + /** + * Constructs a new Step. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.Playbook.IStep); + + /** Step text. */ + public text?: (string|null); + + /** Step steps. */ + public steps: google.cloud.dialogflow.cx.v3.Playbook.IStep[]; + + /** Step instruction. */ + public instruction?: "text"; + + /** + * Creates a new Step instance using the specified properties. + * @param [properties] Properties to set + * @returns Step instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.Playbook.IStep): google.cloud.dialogflow.cx.v3.Playbook.Step; + + /** + * Encodes the specified Step message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Playbook.Step.verify|verify} messages. + * @param message Step message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.Playbook.IStep, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Step message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Playbook.Step.verify|verify} messages. + * @param message Step message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.Playbook.IStep, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Step message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Step + * @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.Playbook.Step; + + /** + * Decodes a Step message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Step + * @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.Playbook.Step; + + /** + * Verifies a Step 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 Step message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Step + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Playbook.Step; + + /** + * Creates a plain object from a Step message. Also converts values to other types if specified. + * @param message Step + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.Playbook.Step, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Step to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Step + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Instruction. */ + interface IInstruction { + + /** Instruction guidelines */ + guidelines?: (string|null); + + /** Instruction steps */ + steps?: (google.cloud.dialogflow.cx.v3.Playbook.IStep[]|null); + } + + /** Represents an Instruction. */ + class Instruction implements IInstruction { + + /** + * Constructs a new Instruction. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.Playbook.IInstruction); + + /** Instruction guidelines. */ + public guidelines: string; + + /** Instruction steps. */ + public steps: google.cloud.dialogflow.cx.v3.Playbook.IStep[]; + + /** + * Creates a new Instruction instance using the specified properties. + * @param [properties] Properties to set + * @returns Instruction instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.Playbook.IInstruction): google.cloud.dialogflow.cx.v3.Playbook.Instruction; + + /** + * Encodes the specified Instruction message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Playbook.Instruction.verify|verify} messages. + * @param message Instruction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.Playbook.IInstruction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Instruction message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Playbook.Instruction.verify|verify} messages. + * @param message Instruction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.Playbook.IInstruction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Instruction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Instruction + * @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.Playbook.Instruction; + + /** + * Decodes an Instruction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Instruction + * @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.Playbook.Instruction; + + /** + * Verifies an Instruction 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 Instruction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Instruction + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Playbook.Instruction; + + /** + * Creates a plain object from an Instruction message. Also converts values to other types if specified. + * @param message Instruction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.Playbook.Instruction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Instruction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Instruction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** PlaybookType enum. */ + enum PlaybookType { + PLAYBOOK_TYPE_UNSPECIFIED = 0, + TASK = 1, + ROUTINE = 3 + } + } + + /** Properties of a CreatePlaybookVersionRequest. */ + interface ICreatePlaybookVersionRequest { + + /** CreatePlaybookVersionRequest parent */ + parent?: (string|null); + + /** CreatePlaybookVersionRequest playbookVersion */ + playbookVersion?: (google.cloud.dialogflow.cx.v3.IPlaybookVersion|null); + } + + /** Represents a CreatePlaybookVersionRequest. */ + class CreatePlaybookVersionRequest implements ICreatePlaybookVersionRequest { + + /** + * Constructs a new CreatePlaybookVersionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.ICreatePlaybookVersionRequest); + + /** CreatePlaybookVersionRequest parent. */ + public parent: string; + + /** CreatePlaybookVersionRequest playbookVersion. */ + public playbookVersion?: (google.cloud.dialogflow.cx.v3.IPlaybookVersion|null); + + /** + * Creates a new CreatePlaybookVersionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreatePlaybookVersionRequest instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.ICreatePlaybookVersionRequest): google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest; + + /** + * Encodes the specified CreatePlaybookVersionRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest.verify|verify} messages. + * @param message CreatePlaybookVersionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.ICreatePlaybookVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreatePlaybookVersionRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest.verify|verify} messages. + * @param message CreatePlaybookVersionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ICreatePlaybookVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreatePlaybookVersionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreatePlaybookVersionRequest + * @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.CreatePlaybookVersionRequest; + + /** + * Decodes a CreatePlaybookVersionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreatePlaybookVersionRequest + * @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.CreatePlaybookVersionRequest; + + /** + * Verifies a CreatePlaybookVersionRequest 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 CreatePlaybookVersionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreatePlaybookVersionRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest; + + /** + * Creates a plain object from a CreatePlaybookVersionRequest message. Also converts values to other types if specified. + * @param message CreatePlaybookVersionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreatePlaybookVersionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreatePlaybookVersionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PlaybookVersion. */ + interface IPlaybookVersion { + + /** PlaybookVersion name */ + name?: (string|null); + + /** PlaybookVersion description */ + description?: (string|null); + + /** PlaybookVersion playbook */ + playbook?: (google.cloud.dialogflow.cx.v3.IPlaybook|null); + + /** PlaybookVersion examples */ + examples?: (google.cloud.dialogflow.cx.v3.IExample[]|null); + + /** PlaybookVersion updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a PlaybookVersion. */ + class PlaybookVersion implements IPlaybookVersion { + + /** + * Constructs a new PlaybookVersion. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.IPlaybookVersion); + + /** PlaybookVersion name. */ + public name: string; + + /** PlaybookVersion description. */ + public description: string; + + /** PlaybookVersion playbook. */ + public playbook?: (google.cloud.dialogflow.cx.v3.IPlaybook|null); + + /** PlaybookVersion examples. */ + public examples: google.cloud.dialogflow.cx.v3.IExample[]; + + /** PlaybookVersion updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new PlaybookVersion instance using the specified properties. + * @param [properties] Properties to set + * @returns PlaybookVersion instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.IPlaybookVersion): google.cloud.dialogflow.cx.v3.PlaybookVersion; + + /** + * Encodes the specified PlaybookVersion message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.PlaybookVersion.verify|verify} messages. + * @param message PlaybookVersion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.IPlaybookVersion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PlaybookVersion message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.PlaybookVersion.verify|verify} messages. + * @param message PlaybookVersion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IPlaybookVersion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PlaybookVersion message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PlaybookVersion + * @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.PlaybookVersion; + + /** + * Decodes a PlaybookVersion message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PlaybookVersion + * @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.PlaybookVersion; + + /** + * Verifies a PlaybookVersion 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 PlaybookVersion message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PlaybookVersion + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.PlaybookVersion; + + /** + * Creates a plain object from a PlaybookVersion message. Also converts values to other types if specified. + * @param message PlaybookVersion + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.PlaybookVersion, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PlaybookVersion to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PlaybookVersion + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetPlaybookVersionRequest. */ + interface IGetPlaybookVersionRequest { + + /** GetPlaybookVersionRequest name */ + name?: (string|null); + } + + /** Represents a GetPlaybookVersionRequest. */ + class GetPlaybookVersionRequest implements IGetPlaybookVersionRequest { + + /** + * Constructs a new GetPlaybookVersionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.IGetPlaybookVersionRequest); + + /** GetPlaybookVersionRequest name. */ + public name: string; + + /** + * Creates a new GetPlaybookVersionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetPlaybookVersionRequest instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.IGetPlaybookVersionRequest): google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest; + + /** + * Encodes the specified GetPlaybookVersionRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest.verify|verify} messages. + * @param message GetPlaybookVersionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.IGetPlaybookVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetPlaybookVersionRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest.verify|verify} messages. + * @param message GetPlaybookVersionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IGetPlaybookVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetPlaybookVersionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetPlaybookVersionRequest + * @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.GetPlaybookVersionRequest; + + /** + * Decodes a GetPlaybookVersionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetPlaybookVersionRequest + * @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.GetPlaybookVersionRequest; + + /** + * Verifies a GetPlaybookVersionRequest 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 GetPlaybookVersionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetPlaybookVersionRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest; + + /** + * Creates a plain object from a GetPlaybookVersionRequest message. Also converts values to other types if specified. + * @param message GetPlaybookVersionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetPlaybookVersionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetPlaybookVersionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RestorePlaybookVersionRequest. */ + interface IRestorePlaybookVersionRequest { + + /** RestorePlaybookVersionRequest name */ + name?: (string|null); + } + + /** Represents a RestorePlaybookVersionRequest. */ + class RestorePlaybookVersionRequest implements IRestorePlaybookVersionRequest { + + /** + * Constructs a new RestorePlaybookVersionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.IRestorePlaybookVersionRequest); + + /** RestorePlaybookVersionRequest name. */ + public name: string; + + /** + * Creates a new RestorePlaybookVersionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RestorePlaybookVersionRequest instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.IRestorePlaybookVersionRequest): google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest; + + /** + * Encodes the specified RestorePlaybookVersionRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest.verify|verify} messages. + * @param message RestorePlaybookVersionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.IRestorePlaybookVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RestorePlaybookVersionRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest.verify|verify} messages. + * @param message RestorePlaybookVersionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IRestorePlaybookVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RestorePlaybookVersionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RestorePlaybookVersionRequest + * @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.RestorePlaybookVersionRequest; + + /** + * Decodes a RestorePlaybookVersionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RestorePlaybookVersionRequest + * @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.RestorePlaybookVersionRequest; + + /** + * Verifies a RestorePlaybookVersionRequest 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 RestorePlaybookVersionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RestorePlaybookVersionRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest; + + /** + * Creates a plain object from a RestorePlaybookVersionRequest message. Also converts values to other types if specified. + * @param message RestorePlaybookVersionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RestorePlaybookVersionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RestorePlaybookVersionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RestorePlaybookVersionResponse. */ + interface IRestorePlaybookVersionResponse { + + /** RestorePlaybookVersionResponse playbook */ + playbook?: (google.cloud.dialogflow.cx.v3.IPlaybook|null); + } + + /** Represents a RestorePlaybookVersionResponse. */ + class RestorePlaybookVersionResponse implements IRestorePlaybookVersionResponse { + + /** + * Constructs a new RestorePlaybookVersionResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.IRestorePlaybookVersionResponse); + + /** RestorePlaybookVersionResponse playbook. */ + public playbook?: (google.cloud.dialogflow.cx.v3.IPlaybook|null); + + /** + * Creates a new RestorePlaybookVersionResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns RestorePlaybookVersionResponse instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.IRestorePlaybookVersionResponse): google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse; + + /** + * Encodes the specified RestorePlaybookVersionResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse.verify|verify} messages. + * @param message RestorePlaybookVersionResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.IRestorePlaybookVersionResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RestorePlaybookVersionResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse.verify|verify} messages. + * @param message RestorePlaybookVersionResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IRestorePlaybookVersionResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RestorePlaybookVersionResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RestorePlaybookVersionResponse + * @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.RestorePlaybookVersionResponse; + + /** + * Decodes a RestorePlaybookVersionResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RestorePlaybookVersionResponse + * @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.RestorePlaybookVersionResponse; + + /** + * Verifies a RestorePlaybookVersionResponse 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 RestorePlaybookVersionResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RestorePlaybookVersionResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse; + + /** + * Creates a plain object from a RestorePlaybookVersionResponse message. Also converts values to other types if specified. + * @param message RestorePlaybookVersionResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RestorePlaybookVersionResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RestorePlaybookVersionResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListPlaybookVersionsRequest. */ + interface IListPlaybookVersionsRequest { + + /** ListPlaybookVersionsRequest parent */ + parent?: (string|null); + + /** ListPlaybookVersionsRequest pageSize */ + pageSize?: (number|null); + + /** ListPlaybookVersionsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListPlaybookVersionsRequest. */ + class ListPlaybookVersionsRequest implements IListPlaybookVersionsRequest { + + /** + * Constructs a new ListPlaybookVersionsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.IListPlaybookVersionsRequest); + + /** ListPlaybookVersionsRequest parent. */ + public parent: string; + + /** ListPlaybookVersionsRequest pageSize. */ + public pageSize: number; + + /** ListPlaybookVersionsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListPlaybookVersionsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListPlaybookVersionsRequest instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.IListPlaybookVersionsRequest): google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest; + + /** + * Encodes the specified ListPlaybookVersionsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest.verify|verify} messages. + * @param message ListPlaybookVersionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.IListPlaybookVersionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListPlaybookVersionsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest.verify|verify} messages. + * @param message ListPlaybookVersionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IListPlaybookVersionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListPlaybookVersionsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListPlaybookVersionsRequest + * @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.ListPlaybookVersionsRequest; + + /** + * Decodes a ListPlaybookVersionsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListPlaybookVersionsRequest + * @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.ListPlaybookVersionsRequest; + + /** + * Verifies a ListPlaybookVersionsRequest 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 ListPlaybookVersionsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListPlaybookVersionsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest; + + /** + * Creates a plain object from a ListPlaybookVersionsRequest message. Also converts values to other types if specified. + * @param message ListPlaybookVersionsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListPlaybookVersionsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListPlaybookVersionsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListPlaybookVersionsResponse. */ + interface IListPlaybookVersionsResponse { + + /** ListPlaybookVersionsResponse playbookVersions */ + playbookVersions?: (google.cloud.dialogflow.cx.v3.IPlaybookVersion[]|null); + + /** ListPlaybookVersionsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListPlaybookVersionsResponse. */ + class ListPlaybookVersionsResponse implements IListPlaybookVersionsResponse { + + /** + * Constructs a new ListPlaybookVersionsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.IListPlaybookVersionsResponse); + + /** ListPlaybookVersionsResponse playbookVersions. */ + public playbookVersions: google.cloud.dialogflow.cx.v3.IPlaybookVersion[]; + + /** ListPlaybookVersionsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListPlaybookVersionsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListPlaybookVersionsResponse instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.IListPlaybookVersionsResponse): google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponse; + + /** + * Encodes the specified ListPlaybookVersionsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponse.verify|verify} messages. + * @param message ListPlaybookVersionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.IListPlaybookVersionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListPlaybookVersionsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponse.verify|verify} messages. + * @param message ListPlaybookVersionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IListPlaybookVersionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListPlaybookVersionsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListPlaybookVersionsResponse + * @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.ListPlaybookVersionsResponse; + + /** + * Decodes a ListPlaybookVersionsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListPlaybookVersionsResponse + * @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.ListPlaybookVersionsResponse; + + /** + * Verifies a ListPlaybookVersionsResponse 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 ListPlaybookVersionsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListPlaybookVersionsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponse; + + /** + * Creates a plain object from a ListPlaybookVersionsResponse message. Also converts values to other types if specified. + * @param message ListPlaybookVersionsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListPlaybookVersionsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListPlaybookVersionsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeletePlaybookVersionRequest. */ + interface IDeletePlaybookVersionRequest { + + /** DeletePlaybookVersionRequest name */ + name?: (string|null); + } + + /** Represents a DeletePlaybookVersionRequest. */ + class DeletePlaybookVersionRequest implements IDeletePlaybookVersionRequest { + + /** + * Constructs a new DeletePlaybookVersionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.IDeletePlaybookVersionRequest); + + /** DeletePlaybookVersionRequest name. */ + public name: string; + + /** + * Creates a new DeletePlaybookVersionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeletePlaybookVersionRequest instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.IDeletePlaybookVersionRequest): google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest; + + /** + * Encodes the specified DeletePlaybookVersionRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest.verify|verify} messages. + * @param message DeletePlaybookVersionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.IDeletePlaybookVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeletePlaybookVersionRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest.verify|verify} messages. + * @param message DeletePlaybookVersionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IDeletePlaybookVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeletePlaybookVersionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeletePlaybookVersionRequest + * @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.DeletePlaybookVersionRequest; + + /** + * Decodes a DeletePlaybookVersionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeletePlaybookVersionRequest + * @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.DeletePlaybookVersionRequest; + + /** + * Verifies a DeletePlaybookVersionRequest 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 DeletePlaybookVersionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeletePlaybookVersionRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest; + + /** + * Creates a plain object from a DeletePlaybookVersionRequest message. Also converts values to other types if specified. + * @param message DeletePlaybookVersionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeletePlaybookVersionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeletePlaybookVersionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ExportPlaybookRequest. */ + interface IExportPlaybookRequest { + + /** ExportPlaybookRequest name */ + name?: (string|null); + + /** ExportPlaybookRequest playbookUri */ + playbookUri?: (string|null); + + /** ExportPlaybookRequest dataFormat */ + dataFormat?: (google.cloud.dialogflow.cx.v3.ExportPlaybookRequest.DataFormat|keyof typeof google.cloud.dialogflow.cx.v3.ExportPlaybookRequest.DataFormat|null); + } + + /** Represents an ExportPlaybookRequest. */ + class ExportPlaybookRequest implements IExportPlaybookRequest { + + /** + * Constructs a new ExportPlaybookRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.IExportPlaybookRequest); + + /** ExportPlaybookRequest name. */ + public name: string; + + /** ExportPlaybookRequest playbookUri. */ + public playbookUri: string; + + /** ExportPlaybookRequest dataFormat. */ + public dataFormat: (google.cloud.dialogflow.cx.v3.ExportPlaybookRequest.DataFormat|keyof typeof google.cloud.dialogflow.cx.v3.ExportPlaybookRequest.DataFormat); + + /** + * Creates a new ExportPlaybookRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ExportPlaybookRequest instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.IExportPlaybookRequest): google.cloud.dialogflow.cx.v3.ExportPlaybookRequest; + + /** + * Encodes the specified ExportPlaybookRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ExportPlaybookRequest.verify|verify} messages. + * @param message ExportPlaybookRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.IExportPlaybookRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExportPlaybookRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ExportPlaybookRequest.verify|verify} messages. + * @param message ExportPlaybookRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IExportPlaybookRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExportPlaybookRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExportPlaybookRequest + * @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.ExportPlaybookRequest; + + /** + * Decodes an ExportPlaybookRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExportPlaybookRequest + * @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.ExportPlaybookRequest; + + /** + * Verifies an ExportPlaybookRequest 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 ExportPlaybookRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExportPlaybookRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ExportPlaybookRequest; + + /** + * Creates a plain object from an ExportPlaybookRequest message. Also converts values to other types if specified. + * @param message ExportPlaybookRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.ExportPlaybookRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExportPlaybookRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExportPlaybookRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ExportPlaybookRequest { + + /** DataFormat enum. */ + enum DataFormat { + DATA_FORMAT_UNSPECIFIED = 0, + BLOB = 1, + JSON = 2 + } + } + + /** Properties of an ImportPlaybookRequest. */ + interface IImportPlaybookRequest { + + /** ImportPlaybookRequest parent */ + parent?: (string|null); + + /** ImportPlaybookRequest playbookUri */ + playbookUri?: (string|null); + + /** ImportPlaybookRequest playbookContent */ + playbookContent?: (Uint8Array|Buffer|string|null); + + /** ImportPlaybookRequest importStrategy */ + importStrategy?: (google.cloud.dialogflow.cx.v3.IPlaybookImportStrategy|null); + } + + /** Represents an ImportPlaybookRequest. */ + class ImportPlaybookRequest implements IImportPlaybookRequest { + + /** + * Constructs a new ImportPlaybookRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.IImportPlaybookRequest); + + /** ImportPlaybookRequest parent. */ + public parent: string; + + /** ImportPlaybookRequest playbookUri. */ + public playbookUri?: (string|null); + + /** ImportPlaybookRequest playbookContent. */ + public playbookContent?: (Uint8Array|Buffer|string|null); + + /** ImportPlaybookRequest importStrategy. */ + public importStrategy?: (google.cloud.dialogflow.cx.v3.IPlaybookImportStrategy|null); + + /** ImportPlaybookRequest playbook. */ + public playbook?: ("playbookUri"|"playbookContent"); + + /** + * Creates a new ImportPlaybookRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ImportPlaybookRequest instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.IImportPlaybookRequest): google.cloud.dialogflow.cx.v3.ImportPlaybookRequest; + + /** + * Encodes the specified ImportPlaybookRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportPlaybookRequest.verify|verify} messages. + * @param message ImportPlaybookRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.IImportPlaybookRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ImportPlaybookRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportPlaybookRequest.verify|verify} messages. + * @param message ImportPlaybookRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IImportPlaybookRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ImportPlaybookRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ImportPlaybookRequest + * @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.ImportPlaybookRequest; + + /** + * Decodes an ImportPlaybookRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ImportPlaybookRequest + * @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.ImportPlaybookRequest; + + /** + * Verifies an ImportPlaybookRequest 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 ImportPlaybookRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ImportPlaybookRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ImportPlaybookRequest; + + /** + * Creates a plain object from an ImportPlaybookRequest message. Also converts values to other types if specified. + * @param message ImportPlaybookRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.ImportPlaybookRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ImportPlaybookRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ImportPlaybookRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PlaybookImportStrategy. */ + interface IPlaybookImportStrategy { + + /** PlaybookImportStrategy mainPlaybookImportStrategy */ + mainPlaybookImportStrategy?: (google.cloud.dialogflow.cx.v3.ImportStrategy|keyof typeof google.cloud.dialogflow.cx.v3.ImportStrategy|null); + + /** PlaybookImportStrategy nestedResourceImportStrategy */ + nestedResourceImportStrategy?: (google.cloud.dialogflow.cx.v3.ImportStrategy|keyof typeof google.cloud.dialogflow.cx.v3.ImportStrategy|null); + + /** PlaybookImportStrategy toolImportStrategy */ + toolImportStrategy?: (google.cloud.dialogflow.cx.v3.ImportStrategy|keyof typeof google.cloud.dialogflow.cx.v3.ImportStrategy|null); + } + + /** Represents a PlaybookImportStrategy. */ + class PlaybookImportStrategy implements IPlaybookImportStrategy { + + /** + * Constructs a new PlaybookImportStrategy. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.IPlaybookImportStrategy); + + /** PlaybookImportStrategy mainPlaybookImportStrategy. */ + public mainPlaybookImportStrategy: (google.cloud.dialogflow.cx.v3.ImportStrategy|keyof typeof google.cloud.dialogflow.cx.v3.ImportStrategy); + + /** PlaybookImportStrategy nestedResourceImportStrategy. */ + public nestedResourceImportStrategy: (google.cloud.dialogflow.cx.v3.ImportStrategy|keyof typeof google.cloud.dialogflow.cx.v3.ImportStrategy); + + /** PlaybookImportStrategy toolImportStrategy. */ + public toolImportStrategy: (google.cloud.dialogflow.cx.v3.ImportStrategy|keyof typeof google.cloud.dialogflow.cx.v3.ImportStrategy); + + /** + * Creates a new PlaybookImportStrategy instance using the specified properties. + * @param [properties] Properties to set + * @returns PlaybookImportStrategy instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.IPlaybookImportStrategy): google.cloud.dialogflow.cx.v3.PlaybookImportStrategy; + + /** + * Encodes the specified PlaybookImportStrategy message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.PlaybookImportStrategy.verify|verify} messages. + * @param message PlaybookImportStrategy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.IPlaybookImportStrategy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PlaybookImportStrategy message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.PlaybookImportStrategy.verify|verify} messages. + * @param message PlaybookImportStrategy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IPlaybookImportStrategy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PlaybookImportStrategy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PlaybookImportStrategy + * @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.PlaybookImportStrategy; + + /** + * Decodes a PlaybookImportStrategy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PlaybookImportStrategy + * @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.PlaybookImportStrategy; + + /** + * Verifies a PlaybookImportStrategy 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 PlaybookImportStrategy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PlaybookImportStrategy + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.PlaybookImportStrategy; + + /** + * Creates a plain object from a PlaybookImportStrategy message. Also converts values to other types if specified. + * @param message PlaybookImportStrategy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.PlaybookImportStrategy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PlaybookImportStrategy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PlaybookImportStrategy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ImportPlaybookResponse. */ + interface IImportPlaybookResponse { + + /** ImportPlaybookResponse playbook */ + playbook?: (string|null); + + /** ImportPlaybookResponse conflictingResources */ + conflictingResources?: (google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.IConflictingResources|null); + } + + /** Represents an ImportPlaybookResponse. */ + class ImportPlaybookResponse implements IImportPlaybookResponse { + + /** + * Constructs a new ImportPlaybookResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.IImportPlaybookResponse); + + /** ImportPlaybookResponse playbook. */ + public playbook: string; + + /** ImportPlaybookResponse conflictingResources. */ + public conflictingResources?: (google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.IConflictingResources|null); + + /** + * Creates a new ImportPlaybookResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ImportPlaybookResponse instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.IImportPlaybookResponse): google.cloud.dialogflow.cx.v3.ImportPlaybookResponse; + + /** + * Encodes the specified ImportPlaybookResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.verify|verify} messages. + * @param message ImportPlaybookResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.IImportPlaybookResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ImportPlaybookResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.verify|verify} messages. + * @param message ImportPlaybookResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IImportPlaybookResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ImportPlaybookResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ImportPlaybookResponse + * @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.ImportPlaybookResponse; + + /** + * Decodes an ImportPlaybookResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ImportPlaybookResponse + * @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.ImportPlaybookResponse; + + /** + * Verifies an ImportPlaybookResponse 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 ImportPlaybookResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ImportPlaybookResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ImportPlaybookResponse; + + /** + * Creates a plain object from an ImportPlaybookResponse message. Also converts values to other types if specified. + * @param message ImportPlaybookResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.ImportPlaybookResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ImportPlaybookResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ImportPlaybookResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ImportPlaybookResponse { + + /** Properties of a ConflictingResources. */ + interface IConflictingResources { + + /** ConflictingResources mainPlaybookDisplayName */ + mainPlaybookDisplayName?: (string|null); + + /** ConflictingResources nestedPlaybookDisplayNames */ + nestedPlaybookDisplayNames?: (string[]|null); + + /** ConflictingResources toolDisplayNames */ + toolDisplayNames?: (string[]|null); + } + + /** Represents a ConflictingResources. */ + class ConflictingResources implements IConflictingResources { + + /** + * Constructs a new ConflictingResources. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.IConflictingResources); + + /** ConflictingResources mainPlaybookDisplayName. */ + public mainPlaybookDisplayName: string; + + /** ConflictingResources nestedPlaybookDisplayNames. */ + public nestedPlaybookDisplayNames: string[]; + + /** ConflictingResources toolDisplayNames. */ + public toolDisplayNames: string[]; + + /** + * Creates a new ConflictingResources instance using the specified properties. + * @param [properties] Properties to set + * @returns ConflictingResources instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.IConflictingResources): google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources; + + /** + * Encodes the specified ConflictingResources message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources.verify|verify} messages. + * @param message ConflictingResources message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.IConflictingResources, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConflictingResources message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources.verify|verify} messages. + * @param message ConflictingResources message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.IConflictingResources, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConflictingResources message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConflictingResources + * @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.ImportPlaybookResponse.ConflictingResources; + + /** + * Decodes a ConflictingResources message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConflictingResources + * @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.ImportPlaybookResponse.ConflictingResources; + + /** + * Verifies a ConflictingResources 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 ConflictingResources message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConflictingResources + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources; + + /** + * Creates a plain object from a ConflictingResources message. Also converts values to other types if specified. + * @param message ConflictingResources + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConflictingResources to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ConflictingResources + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an ExportPlaybookResponse. */ + interface IExportPlaybookResponse { + + /** ExportPlaybookResponse playbookUri */ + playbookUri?: (string|null); + + /** ExportPlaybookResponse playbookContent */ + playbookContent?: (Uint8Array|Buffer|string|null); + } + + /** Represents an ExportPlaybookResponse. */ + class ExportPlaybookResponse implements IExportPlaybookResponse { + + /** + * Constructs a new ExportPlaybookResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.IExportPlaybookResponse); + + /** ExportPlaybookResponse playbookUri. */ + public playbookUri?: (string|null); + + /** ExportPlaybookResponse playbookContent. */ + public playbookContent?: (Uint8Array|Buffer|string|null); + + /** ExportPlaybookResponse playbook. */ + public playbook?: ("playbookUri"|"playbookContent"); + + /** + * Creates a new ExportPlaybookResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ExportPlaybookResponse instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.IExportPlaybookResponse): google.cloud.dialogflow.cx.v3.ExportPlaybookResponse; + + /** + * Encodes the specified ExportPlaybookResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ExportPlaybookResponse.verify|verify} messages. + * @param message ExportPlaybookResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.IExportPlaybookResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExportPlaybookResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ExportPlaybookResponse.verify|verify} messages. + * @param message ExportPlaybookResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IExportPlaybookResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExportPlaybookResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExportPlaybookResponse + * @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.ExportPlaybookResponse; + + /** + * Decodes an ExportPlaybookResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExportPlaybookResponse + * @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.ExportPlaybookResponse; + + /** + * Verifies an ExportPlaybookResponse 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 ExportPlaybookResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExportPlaybookResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ExportPlaybookResponse; + + /** + * Creates a plain object from an ExportPlaybookResponse message. Also converts values to other types if specified. + * @param message ExportPlaybookResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.ExportPlaybookResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExportPlaybookResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExportPlaybookResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Handler. */ + interface IHandler { + + /** Handler eventHandler */ + eventHandler?: (google.cloud.dialogflow.cx.v3.Handler.IEventHandler|null); + + /** Handler lifecycleHandler */ + lifecycleHandler?: (google.cloud.dialogflow.cx.v3.Handler.ILifecycleHandler|null); + } + + /** Represents a Handler. */ + class Handler implements IHandler { + + /** + * Constructs a new Handler. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.IHandler); + + /** Handler eventHandler. */ + public eventHandler?: (google.cloud.dialogflow.cx.v3.Handler.IEventHandler|null); + + /** Handler lifecycleHandler. */ + public lifecycleHandler?: (google.cloud.dialogflow.cx.v3.Handler.ILifecycleHandler|null); + + /** Handler handler. */ + public handler?: ("eventHandler"|"lifecycleHandler"); + + /** + * Creates a new Handler instance using the specified properties. + * @param [properties] Properties to set + * @returns Handler instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.IHandler): google.cloud.dialogflow.cx.v3.Handler; + + /** + * Encodes the specified Handler message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Handler.verify|verify} messages. + * @param message Handler message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.IHandler, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Handler message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Handler.verify|verify} messages. + * @param message Handler message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IHandler, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Handler message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Handler + * @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.Handler; + + /** + * Decodes a Handler message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Handler + * @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.Handler; + + /** + * Verifies a Handler 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 Handler message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Handler + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Handler; + + /** + * Creates a plain object from a Handler message. Also converts values to other types if specified. + * @param message Handler + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.Handler, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Handler to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Handler + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Handler { + + /** Properties of an EventHandler. */ + interface IEventHandler { + + /** EventHandler event */ + event?: (string|null); + + /** EventHandler condition */ + condition?: (string|null); + + /** EventHandler fulfillment */ + fulfillment?: (google.cloud.dialogflow.cx.v3.IFulfillment|null); + } + + /** Represents an EventHandler. */ + class EventHandler implements IEventHandler { + + /** + * Constructs a new EventHandler. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.Handler.IEventHandler); + + /** EventHandler event. */ + public event: string; + + /** EventHandler condition. */ + public condition: string; + + /** EventHandler fulfillment. */ + public fulfillment?: (google.cloud.dialogflow.cx.v3.IFulfillment|null); + + /** + * Creates a new EventHandler instance using the specified properties. + * @param [properties] Properties to set + * @returns EventHandler instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.Handler.IEventHandler): google.cloud.dialogflow.cx.v3.Handler.EventHandler; + + /** + * Encodes the specified EventHandler message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Handler.EventHandler.verify|verify} messages. + * @param message EventHandler message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.Handler.IEventHandler, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EventHandler message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Handler.EventHandler.verify|verify} messages. + * @param message EventHandler message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.Handler.IEventHandler, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EventHandler message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EventHandler + * @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.Handler.EventHandler; + + /** + * Decodes an EventHandler message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EventHandler + * @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.Handler.EventHandler; + + /** + * Verifies an EventHandler 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 EventHandler message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EventHandler + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Handler.EventHandler; + + /** + * Creates a plain object from an EventHandler message. Also converts values to other types if specified. + * @param message EventHandler + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.Handler.EventHandler, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EventHandler to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EventHandler + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LifecycleHandler. */ + interface ILifecycleHandler { + + /** LifecycleHandler lifecycleStage */ + lifecycleStage?: (string|null); + + /** LifecycleHandler condition */ + condition?: (string|null); + + /** LifecycleHandler fulfillment */ + fulfillment?: (google.cloud.dialogflow.cx.v3.IFulfillment|null); + } + + /** Represents a LifecycleHandler. */ + class LifecycleHandler implements ILifecycleHandler { + + /** + * Constructs a new LifecycleHandler. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.Handler.ILifecycleHandler); + + /** LifecycleHandler lifecycleStage. */ + public lifecycleStage: string; + + /** LifecycleHandler condition. */ + public condition: string; + + /** LifecycleHandler fulfillment. */ + public fulfillment?: (google.cloud.dialogflow.cx.v3.IFulfillment|null); + + /** + * Creates a new LifecycleHandler instance using the specified properties. + * @param [properties] Properties to set + * @returns LifecycleHandler instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.Handler.ILifecycleHandler): google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler; + + /** + * Encodes the specified LifecycleHandler message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler.verify|verify} messages. + * @param message LifecycleHandler message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.Handler.ILifecycleHandler, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LifecycleHandler message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler.verify|verify} messages. + * @param message LifecycleHandler message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.Handler.ILifecycleHandler, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LifecycleHandler message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LifecycleHandler + * @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.Handler.LifecycleHandler; + + /** + * Decodes a LifecycleHandler message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LifecycleHandler + * @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.Handler.LifecycleHandler; + + /** + * Verifies a LifecycleHandler 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 LifecycleHandler message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LifecycleHandler + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler; + + /** + * Creates a plain object from a LifecycleHandler message. Also converts values to other types if specified. + * @param message LifecycleHandler + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LifecycleHandler to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LifecycleHandler + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Represents a SecuritySettingsService */ + class SecuritySettingsService extends $protobuf.rpc.Service { + + /** + * Constructs a new SecuritySettingsService service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new SecuritySettingsService service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): SecuritySettingsService; + + /** + * Calls CreateSecuritySettings. + * @param request CreateSecuritySettingsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and SecuritySettings + */ + public createSecuritySettings(request: google.cloud.dialogflow.cx.v3.ICreateSecuritySettingsRequest, callback: google.cloud.dialogflow.cx.v3.SecuritySettingsService.CreateSecuritySettingsCallback): void; + + /** + * Calls CreateSecuritySettings. + * @param request CreateSecuritySettingsRequest message or plain object + * @returns Promise + */ + public createSecuritySettings(request: google.cloud.dialogflow.cx.v3.ICreateSecuritySettingsRequest): Promise; + + /** + * Calls GetSecuritySettings. + * @param request GetSecuritySettingsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and SecuritySettings + */ + public getSecuritySettings(request: google.cloud.dialogflow.cx.v3.IGetSecuritySettingsRequest, callback: google.cloud.dialogflow.cx.v3.SecuritySettingsService.GetSecuritySettingsCallback): void; + + /** + * Calls GetSecuritySettings. + * @param request GetSecuritySettingsRequest message or plain object + * @returns Promise + */ + public getSecuritySettings(request: google.cloud.dialogflow.cx.v3.IGetSecuritySettingsRequest): Promise; + + /** + * Calls UpdateSecuritySettings. + * @param request UpdateSecuritySettingsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and SecuritySettings + */ + public updateSecuritySettings(request: google.cloud.dialogflow.cx.v3.IUpdateSecuritySettingsRequest, callback: google.cloud.dialogflow.cx.v3.SecuritySettingsService.UpdateSecuritySettingsCallback): void; + + /** + * Calls UpdateSecuritySettings. + * @param request UpdateSecuritySettingsRequest message or plain object + * @returns Promise + */ + public updateSecuritySettings(request: google.cloud.dialogflow.cx.v3.IUpdateSecuritySettingsRequest): Promise; + + /** + * Calls ListSecuritySettings. + * @param request ListSecuritySettingsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListSecuritySettingsResponse + */ + public listSecuritySettings(request: google.cloud.dialogflow.cx.v3.IListSecuritySettingsRequest, callback: google.cloud.dialogflow.cx.v3.SecuritySettingsService.ListSecuritySettingsCallback): void; + + /** + * Calls ListSecuritySettings. + * @param request ListSecuritySettingsRequest message or plain object + * @returns Promise + */ + public listSecuritySettings(request: google.cloud.dialogflow.cx.v3.IListSecuritySettingsRequest): Promise; + + /** + * Calls DeleteSecuritySettings. + * @param request DeleteSecuritySettingsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteSecuritySettings(request: google.cloud.dialogflow.cx.v3.IDeleteSecuritySettingsRequest, callback: google.cloud.dialogflow.cx.v3.SecuritySettingsService.DeleteSecuritySettingsCallback): void; + + /** + * Calls DeleteSecuritySettings. + * @param request DeleteSecuritySettingsRequest message or plain object + * @returns Promise + */ + public deleteSecuritySettings(request: google.cloud.dialogflow.cx.v3.IDeleteSecuritySettingsRequest): Promise; + } + + namespace SecuritySettingsService { + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.SecuritySettingsService|createSecuritySettings}. + * @param error Error, if any + * @param [response] SecuritySettings + */ + type CreateSecuritySettingsCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.SecuritySettings) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.SecuritySettingsService|getSecuritySettings}. + * @param error Error, if any + * @param [response] SecuritySettings + */ + type GetSecuritySettingsCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.SecuritySettings) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.SecuritySettingsService|updateSecuritySettings}. + * @param error Error, if any + * @param [response] SecuritySettings + */ + type UpdateSecuritySettingsCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.SecuritySettings) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.SecuritySettingsService|listSecuritySettings}. + * @param error Error, if any + * @param [response] ListSecuritySettingsResponse + */ + type ListSecuritySettingsCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.SecuritySettingsService|deleteSecuritySettings}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteSecuritySettingsCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + } + + /** Properties of a GetSecuritySettingsRequest. */ + interface IGetSecuritySettingsRequest { + + /** GetSecuritySettingsRequest name */ + name?: (string|null); + } + + /** Represents a GetSecuritySettingsRequest. */ + class GetSecuritySettingsRequest implements IGetSecuritySettingsRequest { + + /** + * Constructs a new GetSecuritySettingsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.IGetSecuritySettingsRequest); + + /** GetSecuritySettingsRequest name. */ + public name: string; + + /** + * Creates a new GetSecuritySettingsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetSecuritySettingsRequest instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.IGetSecuritySettingsRequest): google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest; + + /** + * Encodes the specified GetSecuritySettingsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest.verify|verify} messages. + * @param message GetSecuritySettingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.IGetSecuritySettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetSecuritySettingsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest.verify|verify} messages. + * @param message GetSecuritySettingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IGetSecuritySettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetSecuritySettingsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetSecuritySettingsRequest + * @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.GetSecuritySettingsRequest; + + /** + * Decodes a GetSecuritySettingsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetSecuritySettingsRequest + * @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.GetSecuritySettingsRequest; + + /** + * Verifies a GetSecuritySettingsRequest 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 GetSecuritySettingsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetSecuritySettingsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest; + + /** + * Creates a plain object from a GetSecuritySettingsRequest message. Also converts values to other types if specified. + * @param message GetSecuritySettingsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetSecuritySettingsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetSecuritySettingsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateSecuritySettingsRequest. */ + interface IUpdateSecuritySettingsRequest { + + /** UpdateSecuritySettingsRequest securitySettings */ + securitySettings?: (google.cloud.dialogflow.cx.v3.ISecuritySettings|null); + + /** UpdateSecuritySettingsRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateSecuritySettingsRequest. */ + class UpdateSecuritySettingsRequest implements IUpdateSecuritySettingsRequest { + + /** + * Constructs a new UpdateSecuritySettingsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.IUpdateSecuritySettingsRequest); + + /** UpdateSecuritySettingsRequest securitySettings. */ + public securitySettings?: (google.cloud.dialogflow.cx.v3.ISecuritySettings|null); + + /** UpdateSecuritySettingsRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateSecuritySettingsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateSecuritySettingsRequest instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.IUpdateSecuritySettingsRequest): google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest; + + /** + * Encodes the specified UpdateSecuritySettingsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest.verify|verify} messages. + * @param message UpdateSecuritySettingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.IUpdateSecuritySettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateSecuritySettingsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest.verify|verify} messages. + * @param message UpdateSecuritySettingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IUpdateSecuritySettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateSecuritySettingsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateSecuritySettingsRequest + * @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.UpdateSecuritySettingsRequest; + + /** + * Decodes an UpdateSecuritySettingsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateSecuritySettingsRequest + * @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.UpdateSecuritySettingsRequest; + + /** + * Verifies an UpdateSecuritySettingsRequest 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 UpdateSecuritySettingsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateSecuritySettingsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest; + + /** + * Creates a plain object from an UpdateSecuritySettingsRequest message. Also converts values to other types if specified. + * @param message UpdateSecuritySettingsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateSecuritySettingsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateSecuritySettingsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListSecuritySettingsRequest. */ + interface IListSecuritySettingsRequest { + + /** ListSecuritySettingsRequest parent */ + parent?: (string|null); + + /** ListSecuritySettingsRequest pageSize */ + pageSize?: (number|null); + + /** ListSecuritySettingsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListSecuritySettingsRequest. */ + class ListSecuritySettingsRequest implements IListSecuritySettingsRequest { + + /** + * Constructs a new ListSecuritySettingsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.IListSecuritySettingsRequest); + + /** ListSecuritySettingsRequest parent. */ + public parent: string; + + /** ListSecuritySettingsRequest pageSize. */ + public pageSize: number; + + /** ListSecuritySettingsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListSecuritySettingsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListSecuritySettingsRequest instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.IListSecuritySettingsRequest): google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest; + + /** + * Encodes the specified ListSecuritySettingsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest.verify|verify} messages. + * @param message ListSecuritySettingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.IListSecuritySettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListSecuritySettingsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest.verify|verify} messages. + * @param message ListSecuritySettingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IListSecuritySettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListSecuritySettingsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListSecuritySettingsRequest + * @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.ListSecuritySettingsRequest; + + /** + * Decodes a ListSecuritySettingsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListSecuritySettingsRequest + * @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.ListSecuritySettingsRequest; + + /** + * Verifies a ListSecuritySettingsRequest 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 ListSecuritySettingsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListSecuritySettingsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest; + + /** + * Creates a plain object from a ListSecuritySettingsRequest message. Also converts values to other types if specified. + * @param message ListSecuritySettingsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListSecuritySettingsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListSecuritySettingsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListSecuritySettingsResponse. */ + interface IListSecuritySettingsResponse { + + /** ListSecuritySettingsResponse securitySettings */ + securitySettings?: (google.cloud.dialogflow.cx.v3.ISecuritySettings[]|null); + + /** ListSecuritySettingsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListSecuritySettingsResponse. */ + class ListSecuritySettingsResponse implements IListSecuritySettingsResponse { + + /** + * Constructs a new ListSecuritySettingsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.IListSecuritySettingsResponse); + + /** ListSecuritySettingsResponse securitySettings. */ + public securitySettings: google.cloud.dialogflow.cx.v3.ISecuritySettings[]; + + /** ListSecuritySettingsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListSecuritySettingsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListSecuritySettingsResponse instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.IListSecuritySettingsResponse): google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse; + + /** + * Encodes the specified ListSecuritySettingsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse.verify|verify} messages. + * @param message ListSecuritySettingsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.IListSecuritySettingsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListSecuritySettingsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse.verify|verify} messages. + * @param message ListSecuritySettingsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IListSecuritySettingsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListSecuritySettingsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListSecuritySettingsResponse + * @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.ListSecuritySettingsResponse; + + /** + * Decodes a ListSecuritySettingsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListSecuritySettingsResponse + * @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.ListSecuritySettingsResponse; + + /** + * Verifies a ListSecuritySettingsResponse 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 ListSecuritySettingsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListSecuritySettingsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse; + + /** + * Creates a plain object from a ListSecuritySettingsResponse message. Also converts values to other types if specified. + * @param message ListSecuritySettingsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListSecuritySettingsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListSecuritySettingsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateSecuritySettingsRequest. */ + interface ICreateSecuritySettingsRequest { + + /** CreateSecuritySettingsRequest parent */ + parent?: (string|null); + + /** CreateSecuritySettingsRequest securitySettings */ + securitySettings?: (google.cloud.dialogflow.cx.v3.ISecuritySettings|null); + } + + /** Represents a CreateSecuritySettingsRequest. */ + class CreateSecuritySettingsRequest implements ICreateSecuritySettingsRequest { + + /** + * Constructs a new CreateSecuritySettingsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.ICreateSecuritySettingsRequest); + + /** CreateSecuritySettingsRequest parent. */ + public parent: string; + + /** CreateSecuritySettingsRequest securitySettings. */ + public securitySettings?: (google.cloud.dialogflow.cx.v3.ISecuritySettings|null); + + /** + * Creates a new CreateSecuritySettingsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateSecuritySettingsRequest instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.ICreateSecuritySettingsRequest): google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest; + + /** + * Encodes the specified CreateSecuritySettingsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest.verify|verify} messages. + * @param message CreateSecuritySettingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.ICreateSecuritySettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateSecuritySettingsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest.verify|verify} messages. + * @param message CreateSecuritySettingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ICreateSecuritySettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateSecuritySettingsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateSecuritySettingsRequest + * @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.CreateSecuritySettingsRequest; + + /** + * Decodes a CreateSecuritySettingsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateSecuritySettingsRequest + * @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.CreateSecuritySettingsRequest; + + /** + * Verifies a CreateSecuritySettingsRequest 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 CreateSecuritySettingsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateSecuritySettingsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest; + + /** + * Creates a plain object from a CreateSecuritySettingsRequest message. Also converts values to other types if specified. + * @param message CreateSecuritySettingsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateSecuritySettingsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateSecuritySettingsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteSecuritySettingsRequest. */ + interface IDeleteSecuritySettingsRequest { + + /** DeleteSecuritySettingsRequest name */ + name?: (string|null); + } + + /** Represents a DeleteSecuritySettingsRequest. */ + class DeleteSecuritySettingsRequest implements IDeleteSecuritySettingsRequest { + + /** + * Constructs a new DeleteSecuritySettingsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.IDeleteSecuritySettingsRequest); + + /** DeleteSecuritySettingsRequest name. */ + public name: string; + + /** + * Creates a new DeleteSecuritySettingsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteSecuritySettingsRequest instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.IDeleteSecuritySettingsRequest): google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest; + + /** + * Encodes the specified DeleteSecuritySettingsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest.verify|verify} messages. + * @param message DeleteSecuritySettingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.IDeleteSecuritySettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteSecuritySettingsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest.verify|verify} messages. + * @param message DeleteSecuritySettingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IDeleteSecuritySettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteSecuritySettingsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteSecuritySettingsRequest + * @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.DeleteSecuritySettingsRequest; + + /** + * Decodes a DeleteSecuritySettingsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteSecuritySettingsRequest + * @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.DeleteSecuritySettingsRequest; + + /** + * Verifies a DeleteSecuritySettingsRequest 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 DeleteSecuritySettingsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteSecuritySettingsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest; + + /** + * Creates a plain object from a DeleteSecuritySettingsRequest message. Also converts values to other types if specified. + * @param message DeleteSecuritySettingsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteSecuritySettingsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteSecuritySettingsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SecuritySettings. */ + interface ISecuritySettings { + + /** SecuritySettings name */ + name?: (string|null); + + /** SecuritySettings displayName */ + displayName?: (string|null); + + /** SecuritySettings redactionStrategy */ + redactionStrategy?: (google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionStrategy|keyof typeof google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionStrategy|null); + + /** SecuritySettings redactionScope */ + redactionScope?: (google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionScope|keyof typeof google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionScope|null); + + /** SecuritySettings inspectTemplate */ + inspectTemplate?: (string|null); + + /** SecuritySettings deidentifyTemplate */ + deidentifyTemplate?: (string|null); + + /** SecuritySettings retentionWindowDays */ + retentionWindowDays?: (number|null); + + /** SecuritySettings retentionStrategy */ + retentionStrategy?: (google.cloud.dialogflow.cx.v3.SecuritySettings.RetentionStrategy|keyof typeof google.cloud.dialogflow.cx.v3.SecuritySettings.RetentionStrategy|null); + + /** SecuritySettings purgeDataTypes */ + purgeDataTypes?: (google.cloud.dialogflow.cx.v3.SecuritySettings.PurgeDataType[]|null); + + /** SecuritySettings audioExportSettings */ + audioExportSettings?: (google.cloud.dialogflow.cx.v3.SecuritySettings.IAudioExportSettings|null); + + /** SecuritySettings insightsExportSettings */ + insightsExportSettings?: (google.cloud.dialogflow.cx.v3.SecuritySettings.IInsightsExportSettings|null); + } + + /** Represents a SecuritySettings. */ + class SecuritySettings implements ISecuritySettings { + + /** + * Constructs a new SecuritySettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.ISecuritySettings); + + /** SecuritySettings name. */ + public name: string; + + /** SecuritySettings displayName. */ + public displayName: string; + + /** SecuritySettings redactionStrategy. */ + public redactionStrategy: (google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionStrategy|keyof typeof google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionStrategy); + + /** SecuritySettings redactionScope. */ + public redactionScope: (google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionScope|keyof typeof google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionScope); + + /** SecuritySettings inspectTemplate. */ + public inspectTemplate: string; + + /** SecuritySettings deidentifyTemplate. */ + public deidentifyTemplate: string; + + /** SecuritySettings retentionWindowDays. */ + public retentionWindowDays?: (number|null); + + /** SecuritySettings retentionStrategy. */ + public retentionStrategy?: (google.cloud.dialogflow.cx.v3.SecuritySettings.RetentionStrategy|keyof typeof google.cloud.dialogflow.cx.v3.SecuritySettings.RetentionStrategy|null); + + /** SecuritySettings purgeDataTypes. */ + public purgeDataTypes: google.cloud.dialogflow.cx.v3.SecuritySettings.PurgeDataType[]; + + /** SecuritySettings audioExportSettings. */ + public audioExportSettings?: (google.cloud.dialogflow.cx.v3.SecuritySettings.IAudioExportSettings|null); + + /** SecuritySettings insightsExportSettings. */ + public insightsExportSettings?: (google.cloud.dialogflow.cx.v3.SecuritySettings.IInsightsExportSettings|null); + + /** SecuritySettings dataRetention. */ + public dataRetention?: ("retentionWindowDays"|"retentionStrategy"); + + /** + * Creates a new SecuritySettings instance using the specified properties. + * @param [properties] Properties to set + * @returns SecuritySettings instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.ISecuritySettings): google.cloud.dialogflow.cx.v3.SecuritySettings; + + /** + * Encodes the specified SecuritySettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SecuritySettings.verify|verify} messages. + * @param message SecuritySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.ISecuritySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SecuritySettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SecuritySettings.verify|verify} messages. + * @param message SecuritySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ISecuritySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SecuritySettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SecuritySettings + * @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.SecuritySettings; + + /** + * Decodes a SecuritySettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SecuritySettings + * @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.SecuritySettings; + + /** + * Verifies a SecuritySettings 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 SecuritySettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SecuritySettings + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.SecuritySettings; + + /** + * Creates a plain object from a SecuritySettings message. Also converts values to other types if specified. + * @param message SecuritySettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.SecuritySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SecuritySettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SecuritySettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SecuritySettings { + + /** RedactionStrategy enum. */ + enum RedactionStrategy { + REDACTION_STRATEGY_UNSPECIFIED = 0, + REDACT_WITH_SERVICE = 1 + } + + /** RedactionScope enum. */ + enum RedactionScope { + REDACTION_SCOPE_UNSPECIFIED = 0, + REDACT_DISK_STORAGE = 2 + } + + /** RetentionStrategy enum. */ + enum RetentionStrategy { + RETENTION_STRATEGY_UNSPECIFIED = 0, + REMOVE_AFTER_CONVERSATION = 1 + } + + /** PurgeDataType enum. */ + enum PurgeDataType { + PURGE_DATA_TYPE_UNSPECIFIED = 0, + DIALOGFLOW_HISTORY = 1 + } + + /** Properties of an AudioExportSettings. */ + interface IAudioExportSettings { + + /** AudioExportSettings gcsBucket */ + gcsBucket?: (string|null); + + /** AudioExportSettings audioExportPattern */ + audioExportPattern?: (string|null); + + /** AudioExportSettings enableAudioRedaction */ + enableAudioRedaction?: (boolean|null); + + /** AudioExportSettings audioFormat */ + audioFormat?: (google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings.AudioFormat|keyof typeof google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings.AudioFormat|null); + + /** AudioExportSettings storeTtsAudio */ + storeTtsAudio?: (boolean|null); + } + + /** Represents an AudioExportSettings. */ + class AudioExportSettings implements IAudioExportSettings { + + /** + * Constructs a new AudioExportSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.SecuritySettings.IAudioExportSettings); + + /** AudioExportSettings gcsBucket. */ + public gcsBucket: string; + + /** AudioExportSettings audioExportPattern. */ + public audioExportPattern: string; + + /** AudioExportSettings enableAudioRedaction. */ + public enableAudioRedaction: boolean; + + /** AudioExportSettings audioFormat. */ + public audioFormat: (google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings.AudioFormat|keyof typeof google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings.AudioFormat); + + /** AudioExportSettings storeTtsAudio. */ + public storeTtsAudio: boolean; + + /** + * Creates a new AudioExportSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns AudioExportSettings instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.SecuritySettings.IAudioExportSettings): google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings; + + /** + * Encodes the specified AudioExportSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings.verify|verify} messages. + * @param message AudioExportSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.SecuritySettings.IAudioExportSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AudioExportSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings.verify|verify} messages. + * @param message AudioExportSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.SecuritySettings.IAudioExportSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AudioExportSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AudioExportSettings + * @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.SecuritySettings.AudioExportSettings; + + /** + * Decodes an AudioExportSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AudioExportSettings + * @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.SecuritySettings.AudioExportSettings; + + /** + * Verifies an AudioExportSettings 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 AudioExportSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AudioExportSettings + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings; + + /** + * Creates a plain object from an AudioExportSettings message. Also converts values to other types if specified. + * @param message AudioExportSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AudioExportSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AudioExportSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AudioExportSettings { + + /** AudioFormat enum. */ + enum AudioFormat { + AUDIO_FORMAT_UNSPECIFIED = 0, + MULAW = 1, + MP3 = 2, + OGG = 3 + } + } + + /** Properties of an InsightsExportSettings. */ + interface IInsightsExportSettings { + + /** InsightsExportSettings enableInsightsExport */ + enableInsightsExport?: (boolean|null); + } + + /** Represents an InsightsExportSettings. */ + class InsightsExportSettings implements IInsightsExportSettings { + + /** + * Constructs a new InsightsExportSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.SecuritySettings.IInsightsExportSettings); + + /** InsightsExportSettings enableInsightsExport. */ + public enableInsightsExport: boolean; + + /** + * Creates a new InsightsExportSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns InsightsExportSettings instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.SecuritySettings.IInsightsExportSettings): google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings; + + /** + * Encodes the specified InsightsExportSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings.verify|verify} messages. + * @param message InsightsExportSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.SecuritySettings.IInsightsExportSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InsightsExportSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings.verify|verify} messages. + * @param message InsightsExportSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.SecuritySettings.IInsightsExportSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InsightsExportSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InsightsExportSettings + * @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.SecuritySettings.InsightsExportSettings; + + /** + * Decodes an InsightsExportSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InsightsExportSettings + * @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.SecuritySettings.InsightsExportSettings; + + /** + * Verifies an InsightsExportSettings 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 InsightsExportSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InsightsExportSettings + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings; + + /** + * Creates a plain object from an InsightsExportSettings message. Also converts values to other types if specified. + * @param message InsightsExportSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InsightsExportSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InsightsExportSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Represents a Tools */ + class Tools extends $protobuf.rpc.Service { + + /** + * Constructs a new Tools service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new Tools service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Tools; + + /** + * Calls CreateTool. + * @param request CreateToolRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Tool + */ + public createTool(request: google.cloud.dialogflow.cx.v3.ICreateToolRequest, callback: google.cloud.dialogflow.cx.v3.Tools.CreateToolCallback): void; + + /** + * Calls CreateTool. + * @param request CreateToolRequest message or plain object + * @returns Promise + */ + public createTool(request: google.cloud.dialogflow.cx.v3.ICreateToolRequest): Promise; + + /** + * Calls ListTools. + * @param request ListToolsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListToolsResponse + */ + public listTools(request: google.cloud.dialogflow.cx.v3.IListToolsRequest, callback: google.cloud.dialogflow.cx.v3.Tools.ListToolsCallback): void; + + /** + * Calls ListTools. + * @param request ListToolsRequest message or plain object + * @returns Promise + */ + public listTools(request: google.cloud.dialogflow.cx.v3.IListToolsRequest): Promise; + + /** + * Calls GetTool. + * @param request GetToolRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Tool + */ + public getTool(request: google.cloud.dialogflow.cx.v3.IGetToolRequest, callback: google.cloud.dialogflow.cx.v3.Tools.GetToolCallback): void; + + /** + * Calls GetTool. + * @param request GetToolRequest message or plain object + * @returns Promise + */ + public getTool(request: google.cloud.dialogflow.cx.v3.IGetToolRequest): Promise; + + /** + * Calls UpdateTool. + * @param request UpdateToolRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Tool + */ + public updateTool(request: google.cloud.dialogflow.cx.v3.IUpdateToolRequest, callback: google.cloud.dialogflow.cx.v3.Tools.UpdateToolCallback): void; + + /** + * Calls UpdateTool. + * @param request UpdateToolRequest message or plain object + * @returns Promise + */ + public updateTool(request: google.cloud.dialogflow.cx.v3.IUpdateToolRequest): Promise; + + /** + * Calls DeleteTool. + * @param request DeleteToolRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteTool(request: google.cloud.dialogflow.cx.v3.IDeleteToolRequest, callback: google.cloud.dialogflow.cx.v3.Tools.DeleteToolCallback): void; + + /** + * Calls DeleteTool. + * @param request DeleteToolRequest message or plain object + * @returns Promise + */ + public deleteTool(request: google.cloud.dialogflow.cx.v3.IDeleteToolRequest): Promise; + + /** + * Calls ListToolVersions. + * @param request ListToolVersionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListToolVersionsResponse + */ + public listToolVersions(request: google.cloud.dialogflow.cx.v3.IListToolVersionsRequest, callback: google.cloud.dialogflow.cx.v3.Tools.ListToolVersionsCallback): void; + + /** + * Calls ListToolVersions. + * @param request ListToolVersionsRequest message or plain object + * @returns Promise + */ + public listToolVersions(request: google.cloud.dialogflow.cx.v3.IListToolVersionsRequest): Promise; + + /** + * Calls CreateToolVersion. + * @param request CreateToolVersionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ToolVersion + */ + public createToolVersion(request: google.cloud.dialogflow.cx.v3.ICreateToolVersionRequest, callback: google.cloud.dialogflow.cx.v3.Tools.CreateToolVersionCallback): void; + + /** + * Calls CreateToolVersion. + * @param request CreateToolVersionRequest message or plain object + * @returns Promise + */ + public createToolVersion(request: google.cloud.dialogflow.cx.v3.ICreateToolVersionRequest): Promise; + + /** + * Calls GetToolVersion. + * @param request GetToolVersionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ToolVersion + */ + public getToolVersion(request: google.cloud.dialogflow.cx.v3.IGetToolVersionRequest, callback: google.cloud.dialogflow.cx.v3.Tools.GetToolVersionCallback): void; + + /** + * Calls GetToolVersion. + * @param request GetToolVersionRequest message or plain object + * @returns Promise + */ + public getToolVersion(request: google.cloud.dialogflow.cx.v3.IGetToolVersionRequest): Promise; + + /** + * Calls DeleteToolVersion. + * @param request DeleteToolVersionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteToolVersion(request: google.cloud.dialogflow.cx.v3.IDeleteToolVersionRequest, callback: google.cloud.dialogflow.cx.v3.Tools.DeleteToolVersionCallback): void; + + /** + * Calls DeleteToolVersion. + * @param request DeleteToolVersionRequest message or plain object + * @returns Promise + */ + public deleteToolVersion(request: google.cloud.dialogflow.cx.v3.IDeleteToolVersionRequest): Promise; + + /** + * Calls RestoreToolVersion. + * @param request RestoreToolVersionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and RestoreToolVersionResponse + */ + public restoreToolVersion(request: google.cloud.dialogflow.cx.v3.IRestoreToolVersionRequest, callback: google.cloud.dialogflow.cx.v3.Tools.RestoreToolVersionCallback): void; + + /** + * Calls RestoreToolVersion. + * @param request RestoreToolVersionRequest message or plain object + * @returns Promise + */ + public restoreToolVersion(request: google.cloud.dialogflow.cx.v3.IRestoreToolVersionRequest): Promise; + } + + namespace Tools { + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Tools|createTool}. + * @param error Error, if any + * @param [response] Tool + */ + type CreateToolCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.Tool) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Tools|listTools}. + * @param error Error, if any + * @param [response] ListToolsResponse + */ + type ListToolsCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.ListToolsResponse) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Tools|getTool}. + * @param error Error, if any + * @param [response] Tool + */ + type GetToolCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.Tool) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Tools|updateTool}. + * @param error Error, if any + * @param [response] Tool + */ + type UpdateToolCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.Tool) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Tools|deleteTool}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteToolCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Tools|listToolVersions}. + * @param error Error, if any + * @param [response] ListToolVersionsResponse + */ + type ListToolVersionsCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.ListToolVersionsResponse) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Tools|createToolVersion}. + * @param error Error, if any + * @param [response] ToolVersion + */ + type CreateToolVersionCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.ToolVersion) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Tools|getToolVersion}. + * @param error Error, if any + * @param [response] ToolVersion + */ + type GetToolVersionCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.ToolVersion) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Tools|deleteToolVersion}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteToolVersionCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Tools|restoreToolVersion}. + * @param error Error, if any + * @param [response] RestoreToolVersionResponse + */ + type RestoreToolVersionCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse) => void; + } + + /** Properties of a CreateToolRequest. */ + interface ICreateToolRequest { + + /** CreateToolRequest parent */ + parent?: (string|null); + + /** CreateToolRequest tool */ + tool?: (google.cloud.dialogflow.cx.v3.ITool|null); + } + + /** Represents a CreateToolRequest. */ + class CreateToolRequest implements ICreateToolRequest { + + /** + * Constructs a new CreateToolRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.ICreateToolRequest); + + /** CreateToolRequest parent. */ + public parent: string; + + /** CreateToolRequest tool. */ + public tool?: (google.cloud.dialogflow.cx.v3.ITool|null); + + /** + * Creates a new CreateToolRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateToolRequest instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.ICreateToolRequest): google.cloud.dialogflow.cx.v3.CreateToolRequest; + + /** + * Encodes the specified CreateToolRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateToolRequest.verify|verify} messages. + * @param message CreateToolRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.ICreateToolRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateToolRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateToolRequest.verify|verify} messages. + * @param message CreateToolRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ICreateToolRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateToolRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateToolRequest + * @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.CreateToolRequest; + + /** + * Decodes a CreateToolRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateToolRequest + * @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.CreateToolRequest; + + /** + * Verifies a CreateToolRequest 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 CreateToolRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateToolRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.CreateToolRequest; + + /** + * Creates a plain object from a CreateToolRequest message. Also converts values to other types if specified. + * @param message CreateToolRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.CreateToolRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateToolRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateToolRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListToolsRequest. */ + interface IListToolsRequest { + + /** ListToolsRequest parent */ + parent?: (string|null); + + /** ListToolsRequest pageSize */ + pageSize?: (number|null); + + /** ListToolsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListToolsRequest. */ + class ListToolsRequest implements IListToolsRequest { + + /** + * Constructs a new ListToolsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.IListToolsRequest); + + /** ListToolsRequest parent. */ + public parent: string; + + /** ListToolsRequest pageSize. */ + public pageSize: number; + + /** ListToolsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListToolsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListToolsRequest instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.IListToolsRequest): google.cloud.dialogflow.cx.v3.ListToolsRequest; + + /** + * Encodes the specified ListToolsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListToolsRequest.verify|verify} messages. + * @param message ListToolsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.IListToolsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListToolsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListToolsRequest.verify|verify} messages. + * @param message ListToolsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IListToolsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListToolsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListToolsRequest + * @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.ListToolsRequest; + + /** + * Decodes a ListToolsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListToolsRequest + * @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.ListToolsRequest; + + /** + * Verifies a ListToolsRequest 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 ListToolsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListToolsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ListToolsRequest; + + /** + * Creates a plain object from a ListToolsRequest message. Also converts values to other types if specified. + * @param message ListToolsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.ListToolsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListToolsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListToolsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListToolsResponse. */ + interface IListToolsResponse { + + /** ListToolsResponse tools */ + tools?: (google.cloud.dialogflow.cx.v3.ITool[]|null); + + /** ListToolsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListToolsResponse. */ + class ListToolsResponse implements IListToolsResponse { + + /** + * Constructs a new ListToolsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.IListToolsResponse); + + /** ListToolsResponse tools. */ + public tools: google.cloud.dialogflow.cx.v3.ITool[]; + + /** ListToolsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListToolsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListToolsResponse instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.IListToolsResponse): google.cloud.dialogflow.cx.v3.ListToolsResponse; + + /** + * Encodes the specified ListToolsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListToolsResponse.verify|verify} messages. + * @param message ListToolsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.IListToolsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListToolsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListToolsResponse.verify|verify} messages. + * @param message ListToolsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IListToolsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListToolsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListToolsResponse + * @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.ListToolsResponse; + + /** + * Decodes a ListToolsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListToolsResponse + * @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.ListToolsResponse; + + /** + * Verifies a ListToolsResponse 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 ListToolsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListToolsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ListToolsResponse; + + /** + * Creates a plain object from a ListToolsResponse message. Also converts values to other types if specified. + * @param message ListToolsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.ListToolsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListToolsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListToolsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetToolRequest. */ + interface IGetToolRequest { + + /** GetToolRequest name */ + name?: (string|null); + } + + /** Represents a GetToolRequest. */ + class GetToolRequest implements IGetToolRequest { + + /** + * Constructs a new GetToolRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.IGetToolRequest); + + /** GetToolRequest name. */ + public name: string; + + /** + * Creates a new GetToolRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetToolRequest instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.IGetToolRequest): google.cloud.dialogflow.cx.v3.GetToolRequest; + + /** + * Encodes the specified GetToolRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetToolRequest.verify|verify} messages. + * @param message GetToolRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.IGetToolRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetToolRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetToolRequest.verify|verify} messages. + * @param message GetToolRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IGetToolRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetToolRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetToolRequest + * @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.GetToolRequest; + + /** + * Decodes a GetToolRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetToolRequest + * @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.GetToolRequest; + + /** + * Verifies a GetToolRequest 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 GetToolRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetToolRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.GetToolRequest; + + /** + * Creates a plain object from a GetToolRequest message. Also converts values to other types if specified. + * @param message GetToolRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.GetToolRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetToolRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetToolRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateToolRequest. */ + interface IUpdateToolRequest { + + /** UpdateToolRequest tool */ + tool?: (google.cloud.dialogflow.cx.v3.ITool|null); + + /** UpdateToolRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateToolRequest. */ + class UpdateToolRequest implements IUpdateToolRequest { + + /** + * Constructs a new UpdateToolRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.IUpdateToolRequest); + + /** UpdateToolRequest tool. */ + public tool?: (google.cloud.dialogflow.cx.v3.ITool|null); + + /** UpdateToolRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateToolRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateToolRequest instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.IUpdateToolRequest): google.cloud.dialogflow.cx.v3.UpdateToolRequest; + + /** + * Encodes the specified UpdateToolRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateToolRequest.verify|verify} messages. + * @param message UpdateToolRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.IUpdateToolRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateToolRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateToolRequest.verify|verify} messages. + * @param message UpdateToolRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IUpdateToolRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateToolRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateToolRequest + * @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.UpdateToolRequest; + + /** + * Decodes an UpdateToolRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateToolRequest + * @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.UpdateToolRequest; + + /** + * Verifies an UpdateToolRequest 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 UpdateToolRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateToolRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.UpdateToolRequest; + + /** + * Creates a plain object from an UpdateToolRequest message. Also converts values to other types if specified. + * @param message UpdateToolRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.UpdateToolRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateToolRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateToolRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteToolRequest. */ + interface IDeleteToolRequest { + + /** DeleteToolRequest name */ + name?: (string|null); + + /** DeleteToolRequest force */ + force?: (boolean|null); + } + + /** Represents a DeleteToolRequest. */ + class DeleteToolRequest implements IDeleteToolRequest { + + /** + * Constructs a new DeleteToolRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.IDeleteToolRequest); + + /** DeleteToolRequest name. */ + public name: string; + + /** DeleteToolRequest force. */ + public force: boolean; + + /** + * Creates a new DeleteToolRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteToolRequest instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.IDeleteToolRequest): google.cloud.dialogflow.cx.v3.DeleteToolRequest; + + /** + * Encodes the specified DeleteToolRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteToolRequest.verify|verify} messages. + * @param message DeleteToolRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.IDeleteToolRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteToolRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteToolRequest.verify|verify} messages. + * @param message DeleteToolRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IDeleteToolRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteToolRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteToolRequest + * @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.DeleteToolRequest; + + /** + * Decodes a DeleteToolRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteToolRequest + * @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.DeleteToolRequest; + + /** + * Verifies a DeleteToolRequest 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 DeleteToolRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteToolRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.DeleteToolRequest; + + /** + * Creates a plain object from a DeleteToolRequest message. Also converts values to other types if specified. + * @param message DeleteToolRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.DeleteToolRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteToolRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteToolRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Tool. */ + interface ITool { + + /** Tool name */ + name?: (string|null); + + /** Tool displayName */ + displayName?: (string|null); + + /** Tool description */ + description?: (string|null); + + /** Tool openApiSpec */ + openApiSpec?: (google.cloud.dialogflow.cx.v3.Tool.IOpenApiTool|null); + + /** Tool dataStoreSpec */ + dataStoreSpec?: (google.cloud.dialogflow.cx.v3.Tool.IDataStoreTool|null); + + /** Tool functionSpec */ + functionSpec?: (google.cloud.dialogflow.cx.v3.Tool.IFunctionTool|null); + + /** Tool toolType */ + toolType?: (google.cloud.dialogflow.cx.v3.Tool.ToolType|keyof typeof google.cloud.dialogflow.cx.v3.Tool.ToolType|null); + } + + /** Represents a Tool. */ + class Tool implements ITool { + + /** + * Constructs a new Tool. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.ITool); + + /** Tool name. */ + public name: string; + + /** Tool displayName. */ + public displayName: string; + + /** Tool description. */ + public description: string; + + /** Tool openApiSpec. */ + public openApiSpec?: (google.cloud.dialogflow.cx.v3.Tool.IOpenApiTool|null); + + /** Tool dataStoreSpec. */ + public dataStoreSpec?: (google.cloud.dialogflow.cx.v3.Tool.IDataStoreTool|null); + + /** Tool functionSpec. */ + public functionSpec?: (google.cloud.dialogflow.cx.v3.Tool.IFunctionTool|null); + + /** Tool toolType. */ + public toolType: (google.cloud.dialogflow.cx.v3.Tool.ToolType|keyof typeof google.cloud.dialogflow.cx.v3.Tool.ToolType); + + /** Tool specification. */ + public specification?: ("openApiSpec"|"dataStoreSpec"|"functionSpec"); + + /** + * Creates a new Tool instance using the specified properties. + * @param [properties] Properties to set + * @returns Tool instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.ITool): google.cloud.dialogflow.cx.v3.Tool; + + /** + * Encodes the specified Tool message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Tool.verify|verify} messages. + * @param message Tool message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.ITool, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Tool message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Tool.verify|verify} messages. + * @param message Tool message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ITool, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Tool message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Tool + * @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.Tool; + + /** + * Decodes a Tool message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Tool + * @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.Tool; + + /** + * Verifies a Tool 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 Tool message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Tool + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Tool; + + /** + * Creates a plain object from a Tool message. Also converts values to other types if specified. + * @param message Tool + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.Tool, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Tool to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Tool + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Tool { + + /** Properties of an OpenApiTool. */ + interface IOpenApiTool { + + /** OpenApiTool textSchema */ + textSchema?: (string|null); + + /** OpenApiTool authentication */ + authentication?: (google.cloud.dialogflow.cx.v3.Tool.IAuthentication|null); + + /** OpenApiTool tlsConfig */ + tlsConfig?: (google.cloud.dialogflow.cx.v3.Tool.ITLSConfig|null); + + /** OpenApiTool serviceDirectoryConfig */ + serviceDirectoryConfig?: (google.cloud.dialogflow.cx.v3.Tool.IServiceDirectoryConfig|null); + } + + /** Represents an OpenApiTool. */ + class OpenApiTool implements IOpenApiTool { + + /** + * Constructs a new OpenApiTool. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.Tool.IOpenApiTool); + + /** OpenApiTool textSchema. */ + public textSchema?: (string|null); + + /** OpenApiTool authentication. */ + public authentication?: (google.cloud.dialogflow.cx.v3.Tool.IAuthentication|null); + + /** OpenApiTool tlsConfig. */ + public tlsConfig?: (google.cloud.dialogflow.cx.v3.Tool.ITLSConfig|null); + + /** OpenApiTool serviceDirectoryConfig. */ + public serviceDirectoryConfig?: (google.cloud.dialogflow.cx.v3.Tool.IServiceDirectoryConfig|null); + + /** OpenApiTool schema. */ + public schema?: "textSchema"; + + /** + * Creates a new OpenApiTool instance using the specified properties. + * @param [properties] Properties to set + * @returns OpenApiTool instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.Tool.IOpenApiTool): google.cloud.dialogflow.cx.v3.Tool.OpenApiTool; + + /** + * Encodes the specified OpenApiTool message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Tool.OpenApiTool.verify|verify} messages. + * @param message OpenApiTool message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.Tool.IOpenApiTool, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OpenApiTool message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Tool.OpenApiTool.verify|verify} messages. + * @param message OpenApiTool message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.Tool.IOpenApiTool, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OpenApiTool message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OpenApiTool + * @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.Tool.OpenApiTool; + + /** + * Decodes an OpenApiTool message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OpenApiTool + * @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.Tool.OpenApiTool; + + /** + * Verifies an OpenApiTool 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 OpenApiTool message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OpenApiTool + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Tool.OpenApiTool; + + /** + * Creates a plain object from an OpenApiTool message. Also converts values to other types if specified. + * @param message OpenApiTool + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.Tool.OpenApiTool, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OpenApiTool to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OpenApiTool + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DataStoreTool. */ + interface IDataStoreTool { + + /** DataStoreTool dataStoreConnections */ + dataStoreConnections?: (google.cloud.dialogflow.cx.v3.IDataStoreConnection[]|null); + + /** DataStoreTool fallbackPrompt */ + fallbackPrompt?: (google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.IFallbackPrompt|null); + } + + /** Represents a DataStoreTool. */ + class DataStoreTool implements IDataStoreTool { + + /** + * Constructs a new DataStoreTool. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.Tool.IDataStoreTool); + + /** DataStoreTool dataStoreConnections. */ + public dataStoreConnections: google.cloud.dialogflow.cx.v3.IDataStoreConnection[]; + + /** DataStoreTool fallbackPrompt. */ + public fallbackPrompt?: (google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.IFallbackPrompt|null); + + /** + * Creates a new DataStoreTool instance using the specified properties. + * @param [properties] Properties to set + * @returns DataStoreTool instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.Tool.IDataStoreTool): google.cloud.dialogflow.cx.v3.Tool.DataStoreTool; + + /** + * Encodes the specified DataStoreTool message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.verify|verify} messages. + * @param message DataStoreTool message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.Tool.IDataStoreTool, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataStoreTool message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.verify|verify} messages. + * @param message DataStoreTool message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.Tool.IDataStoreTool, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataStoreTool message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataStoreTool + * @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.Tool.DataStoreTool; + + /** + * Decodes a DataStoreTool message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataStoreTool + * @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.Tool.DataStoreTool; + + /** + * Verifies a DataStoreTool 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 DataStoreTool message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataStoreTool + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Tool.DataStoreTool; + + /** + * Creates a plain object from a DataStoreTool message. Also converts values to other types if specified. + * @param message DataStoreTool + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.Tool.DataStoreTool, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataStoreTool to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataStoreTool + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DataStoreTool { + + /** Properties of a FallbackPrompt. */ + interface IFallbackPrompt { + } + + /** Represents a FallbackPrompt. */ + class FallbackPrompt implements IFallbackPrompt { + + /** + * Constructs a new FallbackPrompt. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.IFallbackPrompt); + + /** + * Creates a new FallbackPrompt instance using the specified properties. + * @param [properties] Properties to set + * @returns FallbackPrompt instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.IFallbackPrompt): google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt; + + /** + * Encodes the specified FallbackPrompt message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt.verify|verify} messages. + * @param message FallbackPrompt message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.IFallbackPrompt, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FallbackPrompt message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt.verify|verify} messages. + * @param message FallbackPrompt message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.IFallbackPrompt, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FallbackPrompt message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FallbackPrompt + * @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.Tool.DataStoreTool.FallbackPrompt; + + /** + * Decodes a FallbackPrompt message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FallbackPrompt + * @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.Tool.DataStoreTool.FallbackPrompt; + + /** + * Verifies a FallbackPrompt 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 FallbackPrompt message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FallbackPrompt + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt; + + /** + * Creates a plain object from a FallbackPrompt message. Also converts values to other types if specified. + * @param message FallbackPrompt + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FallbackPrompt to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FallbackPrompt + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a FunctionTool. */ + interface IFunctionTool { + + /** FunctionTool inputSchema */ + inputSchema?: (google.protobuf.IStruct|null); + + /** FunctionTool outputSchema */ + outputSchema?: (google.protobuf.IStruct|null); + } + + /** Represents a FunctionTool. */ + class FunctionTool implements IFunctionTool { + + /** + * Constructs a new FunctionTool. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.Tool.IFunctionTool); + + /** FunctionTool inputSchema. */ + public inputSchema?: (google.protobuf.IStruct|null); + + /** FunctionTool outputSchema. */ + public outputSchema?: (google.protobuf.IStruct|null); + + /** + * Creates a new FunctionTool instance using the specified properties. + * @param [properties] Properties to set + * @returns FunctionTool instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.Tool.IFunctionTool): google.cloud.dialogflow.cx.v3.Tool.FunctionTool; + + /** + * Encodes the specified FunctionTool message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Tool.FunctionTool.verify|verify} messages. + * @param message FunctionTool message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.Tool.IFunctionTool, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FunctionTool message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Tool.FunctionTool.verify|verify} messages. + * @param message FunctionTool message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.Tool.IFunctionTool, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FunctionTool message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FunctionTool + * @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.Tool.FunctionTool; + + /** + * Decodes a FunctionTool message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FunctionTool + * @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.Tool.FunctionTool; + + /** + * Verifies a FunctionTool 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 FunctionTool message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FunctionTool + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Tool.FunctionTool; + + /** + * Creates a plain object from a FunctionTool message. Also converts values to other types if specified. + * @param message FunctionTool + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.Tool.FunctionTool, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FunctionTool to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FunctionTool + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Authentication. */ + interface IAuthentication { + + /** Authentication apiKeyConfig */ + apiKeyConfig?: (google.cloud.dialogflow.cx.v3.Tool.Authentication.IApiKeyConfig|null); + + /** Authentication oauthConfig */ + oauthConfig?: (google.cloud.dialogflow.cx.v3.Tool.Authentication.IOAuthConfig|null); + + /** Authentication serviceAgentAuthConfig */ + serviceAgentAuthConfig?: (google.cloud.dialogflow.cx.v3.Tool.Authentication.IServiceAgentAuthConfig|null); + + /** Authentication bearerTokenConfig */ + bearerTokenConfig?: (google.cloud.dialogflow.cx.v3.Tool.Authentication.IBearerTokenConfig|null); + + /** Authentication serviceAccountAuthConfig */ + serviceAccountAuthConfig?: (google.cloud.dialogflow.cx.v3.Tool.Authentication.IServiceAccountAuthConfig|null); + } + + /** Represents an Authentication. */ + class Authentication implements IAuthentication { + + /** + * Constructs a new Authentication. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.Tool.IAuthentication); + + /** Authentication apiKeyConfig. */ + public apiKeyConfig?: (google.cloud.dialogflow.cx.v3.Tool.Authentication.IApiKeyConfig|null); + + /** Authentication oauthConfig. */ + public oauthConfig?: (google.cloud.dialogflow.cx.v3.Tool.Authentication.IOAuthConfig|null); + + /** Authentication serviceAgentAuthConfig. */ + public serviceAgentAuthConfig?: (google.cloud.dialogflow.cx.v3.Tool.Authentication.IServiceAgentAuthConfig|null); + + /** Authentication bearerTokenConfig. */ + public bearerTokenConfig?: (google.cloud.dialogflow.cx.v3.Tool.Authentication.IBearerTokenConfig|null); + + /** Authentication serviceAccountAuthConfig. */ + public serviceAccountAuthConfig?: (google.cloud.dialogflow.cx.v3.Tool.Authentication.IServiceAccountAuthConfig|null); + + /** Authentication authConfig. */ + public authConfig?: ("apiKeyConfig"|"oauthConfig"|"serviceAgentAuthConfig"|"bearerTokenConfig"|"serviceAccountAuthConfig"); + + /** + * Creates a new Authentication instance using the specified properties. + * @param [properties] Properties to set + * @returns Authentication instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.Tool.IAuthentication): google.cloud.dialogflow.cx.v3.Tool.Authentication; + + /** + * Encodes the specified Authentication message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Tool.Authentication.verify|verify} messages. + * @param message Authentication message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.Tool.IAuthentication, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Authentication message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Tool.Authentication.verify|verify} messages. + * @param message Authentication message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.Tool.IAuthentication, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Authentication message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Authentication + * @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.Tool.Authentication; + + /** + * Decodes an Authentication message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Authentication + * @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.Tool.Authentication; + + /** + * Verifies an Authentication 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 Authentication message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Authentication + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Tool.Authentication; + + /** + * Creates a plain object from an Authentication message. Also converts values to other types if specified. + * @param message Authentication + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.Tool.Authentication, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Authentication to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Authentication + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Authentication { + + /** Properties of an ApiKeyConfig. */ + interface IApiKeyConfig { + + /** ApiKeyConfig keyName */ + keyName?: (string|null); + + /** ApiKeyConfig apiKey */ + apiKey?: (string|null); + + /** ApiKeyConfig secretVersionForApiKey */ + secretVersionForApiKey?: (string|null); + + /** ApiKeyConfig requestLocation */ + requestLocation?: (google.cloud.dialogflow.cx.v3.Tool.Authentication.RequestLocation|keyof typeof google.cloud.dialogflow.cx.v3.Tool.Authentication.RequestLocation|null); + } + + /** Represents an ApiKeyConfig. */ + class ApiKeyConfig implements IApiKeyConfig { + + /** + * Constructs a new ApiKeyConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.Tool.Authentication.IApiKeyConfig); + + /** ApiKeyConfig keyName. */ + public keyName: string; + + /** ApiKeyConfig apiKey. */ + public apiKey: string; + + /** ApiKeyConfig secretVersionForApiKey. */ + public secretVersionForApiKey: string; + + /** ApiKeyConfig requestLocation. */ + public requestLocation: (google.cloud.dialogflow.cx.v3.Tool.Authentication.RequestLocation|keyof typeof google.cloud.dialogflow.cx.v3.Tool.Authentication.RequestLocation); + + /** + * Creates a new ApiKeyConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns ApiKeyConfig instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.Tool.Authentication.IApiKeyConfig): google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig; + + /** + * Encodes the specified ApiKeyConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig.verify|verify} messages. + * @param message ApiKeyConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.Tool.Authentication.IApiKeyConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ApiKeyConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig.verify|verify} messages. + * @param message ApiKeyConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.Tool.Authentication.IApiKeyConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ApiKeyConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ApiKeyConfig + * @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.Tool.Authentication.ApiKeyConfig; + + /** + * Decodes an ApiKeyConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ApiKeyConfig + * @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.Tool.Authentication.ApiKeyConfig; + + /** + * Verifies an ApiKeyConfig 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 ApiKeyConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ApiKeyConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig; + + /** + * Creates a plain object from an ApiKeyConfig message. Also converts values to other types if specified. + * @param message ApiKeyConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ApiKeyConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ApiKeyConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** RequestLocation enum. */ + enum RequestLocation { + REQUEST_LOCATION_UNSPECIFIED = 0, + HEADER = 1, + QUERY_STRING = 2 + } + + /** Properties of a OAuthConfig. */ + interface IOAuthConfig { + + /** OAuthConfig oauthGrantType */ + oauthGrantType?: (google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig.OauthGrantType|keyof typeof google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig.OauthGrantType|null); + + /** OAuthConfig clientId */ + clientId?: (string|null); + + /** OAuthConfig clientSecret */ + clientSecret?: (string|null); + + /** OAuthConfig secretVersionForClientSecret */ + secretVersionForClientSecret?: (string|null); + + /** OAuthConfig tokenEndpoint */ + tokenEndpoint?: (string|null); + + /** OAuthConfig scopes */ + scopes?: (string[]|null); + } + + /** Represents a OAuthConfig. */ + class OAuthConfig implements IOAuthConfig { + + /** + * Constructs a new OAuthConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.Tool.Authentication.IOAuthConfig); + + /** OAuthConfig oauthGrantType. */ + public oauthGrantType: (google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig.OauthGrantType|keyof typeof google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig.OauthGrantType); + + /** OAuthConfig clientId. */ + public clientId: string; + + /** OAuthConfig clientSecret. */ + public clientSecret: string; + + /** OAuthConfig secretVersionForClientSecret. */ + public secretVersionForClientSecret: string; + + /** OAuthConfig tokenEndpoint. */ + public tokenEndpoint: string; + + /** OAuthConfig scopes. */ + public scopes: string[]; + + /** + * Creates a new OAuthConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns OAuthConfig instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.Tool.Authentication.IOAuthConfig): google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig; + + /** + * Encodes the specified OAuthConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig.verify|verify} messages. + * @param message OAuthConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.Tool.Authentication.IOAuthConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OAuthConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig.verify|verify} messages. + * @param message OAuthConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.Tool.Authentication.IOAuthConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a OAuthConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OAuthConfig + * @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.Tool.Authentication.OAuthConfig; + + /** + * Decodes a OAuthConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OAuthConfig + * @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.Tool.Authentication.OAuthConfig; + + /** + * Verifies a OAuthConfig 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 OAuthConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OAuthConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig; + + /** + * Creates a plain object from a OAuthConfig message. Also converts values to other types if specified. + * @param message OAuthConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OAuthConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OAuthConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace OAuthConfig { + + /** OauthGrantType enum. */ + enum OauthGrantType { + OAUTH_GRANT_TYPE_UNSPECIFIED = 0, + CLIENT_CREDENTIAL = 1 + } + } + + /** Properties of a ServiceAgentAuthConfig. */ + interface IServiceAgentAuthConfig { + + /** ServiceAgentAuthConfig serviceAgentAuth */ + serviceAgentAuth?: (google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig.ServiceAgentAuth|keyof typeof google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig.ServiceAgentAuth|null); + } + + /** Represents a ServiceAgentAuthConfig. */ + class ServiceAgentAuthConfig implements IServiceAgentAuthConfig { + + /** + * Constructs a new ServiceAgentAuthConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.Tool.Authentication.IServiceAgentAuthConfig); + + /** ServiceAgentAuthConfig serviceAgentAuth. */ + public serviceAgentAuth: (google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig.ServiceAgentAuth|keyof typeof google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig.ServiceAgentAuth); + + /** + * Creates a new ServiceAgentAuthConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceAgentAuthConfig instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.Tool.Authentication.IServiceAgentAuthConfig): google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig; + + /** + * Encodes the specified ServiceAgentAuthConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig.verify|verify} messages. + * @param message ServiceAgentAuthConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.Tool.Authentication.IServiceAgentAuthConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceAgentAuthConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig.verify|verify} messages. + * @param message ServiceAgentAuthConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.Tool.Authentication.IServiceAgentAuthConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceAgentAuthConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceAgentAuthConfig + * @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.Tool.Authentication.ServiceAgentAuthConfig; + + /** + * Decodes a ServiceAgentAuthConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceAgentAuthConfig + * @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.Tool.Authentication.ServiceAgentAuthConfig; + + /** + * Verifies a ServiceAgentAuthConfig 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 ServiceAgentAuthConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceAgentAuthConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig; + + /** + * Creates a plain object from a ServiceAgentAuthConfig message. Also converts values to other types if specified. + * @param message ServiceAgentAuthConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceAgentAuthConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceAgentAuthConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ServiceAgentAuthConfig { + + /** ServiceAgentAuth enum. */ + enum ServiceAgentAuth { + SERVICE_AGENT_AUTH_UNSPECIFIED = 0, + ID_TOKEN = 1, + ACCESS_TOKEN = 2 + } + } + + /** Properties of a BearerTokenConfig. */ + interface IBearerTokenConfig { + + /** BearerTokenConfig token */ + token?: (string|null); + + /** BearerTokenConfig secretVersionForToken */ + secretVersionForToken?: (string|null); + } + + /** Represents a BearerTokenConfig. */ + class BearerTokenConfig implements IBearerTokenConfig { + + /** + * Constructs a new BearerTokenConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.Tool.Authentication.IBearerTokenConfig); + + /** BearerTokenConfig token. */ + public token: string; + + /** BearerTokenConfig secretVersionForToken. */ + public secretVersionForToken: string; + + /** + * Creates a new BearerTokenConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns BearerTokenConfig instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.Tool.Authentication.IBearerTokenConfig): google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig; + + /** + * Encodes the specified BearerTokenConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig.verify|verify} messages. + * @param message BearerTokenConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.Tool.Authentication.IBearerTokenConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BearerTokenConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig.verify|verify} messages. + * @param message BearerTokenConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.Tool.Authentication.IBearerTokenConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BearerTokenConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BearerTokenConfig + * @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.Tool.Authentication.BearerTokenConfig; + + /** + * Decodes a BearerTokenConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BearerTokenConfig + * @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.Tool.Authentication.BearerTokenConfig; + + /** + * Verifies a BearerTokenConfig 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 BearerTokenConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BearerTokenConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig; + + /** + * Creates a plain object from a BearerTokenConfig message. Also converts values to other types if specified. + * @param message BearerTokenConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BearerTokenConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BearerTokenConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ServiceAccountAuthConfig. */ + interface IServiceAccountAuthConfig { + + /** ServiceAccountAuthConfig serviceAccount */ + serviceAccount?: (string|null); + } + + /** Represents a ServiceAccountAuthConfig. */ + class ServiceAccountAuthConfig implements IServiceAccountAuthConfig { + + /** + * Constructs a new ServiceAccountAuthConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.Tool.Authentication.IServiceAccountAuthConfig); + + /** ServiceAccountAuthConfig serviceAccount. */ + public serviceAccount: string; + + /** + * Creates a new ServiceAccountAuthConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceAccountAuthConfig instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.Tool.Authentication.IServiceAccountAuthConfig): google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig; + + /** + * Encodes the specified ServiceAccountAuthConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig.verify|verify} messages. + * @param message ServiceAccountAuthConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.Tool.Authentication.IServiceAccountAuthConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceAccountAuthConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig.verify|verify} messages. + * @param message ServiceAccountAuthConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.Tool.Authentication.IServiceAccountAuthConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceAccountAuthConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceAccountAuthConfig + * @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.Tool.Authentication.ServiceAccountAuthConfig; + + /** + * Decodes a ServiceAccountAuthConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceAccountAuthConfig + * @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.Tool.Authentication.ServiceAccountAuthConfig; + + /** + * Verifies a ServiceAccountAuthConfig 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 ServiceAccountAuthConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceAccountAuthConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig; + + /** + * Creates a plain object from a ServiceAccountAuthConfig message. Also converts values to other types if specified. + * @param message ServiceAccountAuthConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceAccountAuthConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceAccountAuthConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a TLSConfig. */ + interface ITLSConfig { + + /** TLSConfig caCerts */ + caCerts?: (google.cloud.dialogflow.cx.v3.Tool.TLSConfig.ICACert[]|null); + } + + /** Represents a TLSConfig. */ + class TLSConfig implements ITLSConfig { + + /** + * Constructs a new TLSConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.Tool.ITLSConfig); + + /** TLSConfig caCerts. */ + public caCerts: google.cloud.dialogflow.cx.v3.Tool.TLSConfig.ICACert[]; + + /** + * Creates a new TLSConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns TLSConfig instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.Tool.ITLSConfig): google.cloud.dialogflow.cx.v3.Tool.TLSConfig; + + /** + * Encodes the specified TLSConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Tool.TLSConfig.verify|verify} messages. + * @param message TLSConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.Tool.ITLSConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TLSConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Tool.TLSConfig.verify|verify} messages. + * @param message TLSConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.Tool.ITLSConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TLSConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TLSConfig + * @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.Tool.TLSConfig; + + /** + * Decodes a TLSConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TLSConfig + * @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.Tool.TLSConfig; + + /** + * Verifies a TLSConfig 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 TLSConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TLSConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Tool.TLSConfig; + + /** + * Creates a plain object from a TLSConfig message. Also converts values to other types if specified. + * @param message TLSConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.Tool.TLSConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TLSConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TLSConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace TLSConfig { + + /** Properties of a CACert. */ + interface ICACert { + + /** CACert displayName */ + displayName?: (string|null); + + /** CACert cert */ + cert?: (Uint8Array|Buffer|string|null); + } + + /** Represents a CACert. */ + class CACert implements ICACert { + + /** + * Constructs a new CACert. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.Tool.TLSConfig.ICACert); + + /** CACert displayName. */ + public displayName: string; + + /** CACert cert. */ + public cert: (Uint8Array|Buffer|string); + + /** + * Creates a new CACert instance using the specified properties. + * @param [properties] Properties to set + * @returns CACert instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.Tool.TLSConfig.ICACert): google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert; + + /** + * Encodes the specified CACert message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert.verify|verify} messages. + * @param message CACert message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.Tool.TLSConfig.ICACert, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CACert message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert.verify|verify} messages. + * @param message CACert message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.Tool.TLSConfig.ICACert, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CACert message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CACert + * @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.Tool.TLSConfig.CACert; + + /** + * Decodes a CACert message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CACert + * @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.Tool.TLSConfig.CACert; + + /** + * Verifies a CACert 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 CACert message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CACert + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert; + + /** + * Creates a plain object from a CACert message. Also converts values to other types if specified. + * @param message CACert + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CACert to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CACert + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a ServiceDirectoryConfig. */ + interface IServiceDirectoryConfig { + + /** ServiceDirectoryConfig service */ + service?: (string|null); + } + + /** Represents a ServiceDirectoryConfig. */ + class ServiceDirectoryConfig implements IServiceDirectoryConfig { + + /** + * Constructs a new ServiceDirectoryConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.Tool.IServiceDirectoryConfig); + + /** ServiceDirectoryConfig service. */ + public service: string; + + /** + * Creates a new ServiceDirectoryConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceDirectoryConfig instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.Tool.IServiceDirectoryConfig): google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig; + + /** + * Encodes the specified ServiceDirectoryConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig.verify|verify} messages. + * @param message ServiceDirectoryConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.Tool.IServiceDirectoryConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceDirectoryConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig.verify|verify} messages. + * @param message ServiceDirectoryConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.Tool.IServiceDirectoryConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceDirectoryConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceDirectoryConfig + * @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.Tool.ServiceDirectoryConfig; + + /** + * Decodes a ServiceDirectoryConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceDirectoryConfig + * @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.Tool.ServiceDirectoryConfig; - /** - * Verifies an UpdateGeneratorRequest 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); + /** + * Verifies a ServiceDirectoryConfig 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 UpdateGeneratorRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateGeneratorRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest; + /** + * Creates a ServiceDirectoryConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceDirectoryConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig; - /** - * Creates a plain object from an UpdateGeneratorRequest message. Also converts values to other types if specified. - * @param message UpdateGeneratorRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a plain object from a ServiceDirectoryConfig message. Also converts values to other types if specified. + * @param message ServiceDirectoryConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this UpdateGeneratorRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Converts this ServiceDirectoryConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Gets the default type url for UpdateGeneratorRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; + /** + * Gets the default type url for ServiceDirectoryConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** ToolType enum. */ + enum ToolType { + TOOL_TYPE_UNSPECIFIED = 0, + CUSTOMIZED_TOOL = 1, + BUILTIN_TOOL = 2 + } } - /** Properties of a DeleteGeneratorRequest. */ - interface IDeleteGeneratorRequest { + /** Properties of a ListToolVersionsRequest. */ + interface IListToolVersionsRequest { - /** DeleteGeneratorRequest name */ - name?: (string|null); + /** ListToolVersionsRequest parent */ + parent?: (string|null); - /** DeleteGeneratorRequest force */ - force?: (boolean|null); + /** ListToolVersionsRequest pageSize */ + pageSize?: (number|null); + + /** ListToolVersionsRequest pageToken */ + pageToken?: (string|null); } - /** Represents a DeleteGeneratorRequest. */ - class DeleteGeneratorRequest implements IDeleteGeneratorRequest { + /** Represents a ListToolVersionsRequest. */ + class ListToolVersionsRequest implements IListToolVersionsRequest { /** - * Constructs a new DeleteGeneratorRequest. + * Constructs a new ListToolVersionsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IDeleteGeneratorRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3.IListToolVersionsRequest); - /** DeleteGeneratorRequest name. */ - public name: string; + /** ListToolVersionsRequest parent. */ + public parent: string; - /** DeleteGeneratorRequest force. */ - public force: boolean; + /** ListToolVersionsRequest pageSize. */ + public pageSize: number; + + /** ListToolVersionsRequest pageToken. */ + public pageToken: string; /** - * Creates a new DeleteGeneratorRequest instance using the specified properties. + * Creates a new ListToolVersionsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteGeneratorRequest instance + * @returns ListToolVersionsRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IDeleteGeneratorRequest): google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3.IListToolVersionsRequest): google.cloud.dialogflow.cx.v3.ListToolVersionsRequest; /** - * Encodes the specified DeleteGeneratorRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest.verify|verify} messages. - * @param message DeleteGeneratorRequest message or plain object to encode + * Encodes the specified ListToolVersionsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListToolVersionsRequest.verify|verify} messages. + * @param message ListToolVersionsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IDeleteGeneratorRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IListToolVersionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteGeneratorRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest.verify|verify} messages. - * @param message DeleteGeneratorRequest message or plain object to encode + * Encodes the specified ListToolVersionsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListToolVersionsRequest.verify|verify} messages. + * @param message ListToolVersionsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IDeleteGeneratorRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IListToolVersionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteGeneratorRequest message from the specified reader or buffer. + * Decodes a ListToolVersionsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteGeneratorRequest + * @returns ListToolVersionsRequest * @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.DeleteGeneratorRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.ListToolVersionsRequest; /** - * Decodes a DeleteGeneratorRequest message from the specified reader or buffer, length delimited. + * Decodes a ListToolVersionsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteGeneratorRequest + * @returns ListToolVersionsRequest * @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.DeleteGeneratorRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.ListToolVersionsRequest; /** - * Verifies a DeleteGeneratorRequest message. + * Verifies a ListToolVersionsRequest 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 DeleteGeneratorRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListToolVersionsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteGeneratorRequest + * @returns ListToolVersionsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ListToolVersionsRequest; /** - * Creates a plain object from a DeleteGeneratorRequest message. Also converts values to other types if specified. - * @param message DeleteGeneratorRequest + * Creates a plain object from a ListToolVersionsRequest message. Also converts values to other types if specified. + * @param message ListToolVersionsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.ListToolVersionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteGeneratorRequest to JSON. + * Converts this ListToolVersionsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DeleteGeneratorRequest + * Gets the default type url for ListToolVersionsRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Represents a SecuritySettingsService */ - class SecuritySettingsService extends $protobuf.rpc.Service { - - /** - * Constructs a new SecuritySettingsService service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); - - /** - * Creates new SecuritySettingsService service using the specified rpc implementation. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - * @returns RPC service. Useful where requests and/or responses are streamed. - */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): SecuritySettingsService; - - /** - * Calls CreateSecuritySettings. - * @param request CreateSecuritySettingsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and SecuritySettings - */ - public createSecuritySettings(request: google.cloud.dialogflow.cx.v3.ICreateSecuritySettingsRequest, callback: google.cloud.dialogflow.cx.v3.SecuritySettingsService.CreateSecuritySettingsCallback): void; - - /** - * Calls CreateSecuritySettings. - * @param request CreateSecuritySettingsRequest message or plain object - * @returns Promise - */ - public createSecuritySettings(request: google.cloud.dialogflow.cx.v3.ICreateSecuritySettingsRequest): Promise; - - /** - * Calls GetSecuritySettings. - * @param request GetSecuritySettingsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and SecuritySettings - */ - public getSecuritySettings(request: google.cloud.dialogflow.cx.v3.IGetSecuritySettingsRequest, callback: google.cloud.dialogflow.cx.v3.SecuritySettingsService.GetSecuritySettingsCallback): void; - - /** - * Calls GetSecuritySettings. - * @param request GetSecuritySettingsRequest message or plain object - * @returns Promise - */ - public getSecuritySettings(request: google.cloud.dialogflow.cx.v3.IGetSecuritySettingsRequest): Promise; - - /** - * Calls UpdateSecuritySettings. - * @param request UpdateSecuritySettingsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and SecuritySettings - */ - public updateSecuritySettings(request: google.cloud.dialogflow.cx.v3.IUpdateSecuritySettingsRequest, callback: google.cloud.dialogflow.cx.v3.SecuritySettingsService.UpdateSecuritySettingsCallback): void; - - /** - * Calls UpdateSecuritySettings. - * @param request UpdateSecuritySettingsRequest message or plain object - * @returns Promise - */ - public updateSecuritySettings(request: google.cloud.dialogflow.cx.v3.IUpdateSecuritySettingsRequest): Promise; - - /** - * Calls ListSecuritySettings. - * @param request ListSecuritySettingsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListSecuritySettingsResponse - */ - public listSecuritySettings(request: google.cloud.dialogflow.cx.v3.IListSecuritySettingsRequest, callback: google.cloud.dialogflow.cx.v3.SecuritySettingsService.ListSecuritySettingsCallback): void; - - /** - * Calls ListSecuritySettings. - * @param request ListSecuritySettingsRequest message or plain object - * @returns Promise - */ - public listSecuritySettings(request: google.cloud.dialogflow.cx.v3.IListSecuritySettingsRequest): Promise; - - /** - * Calls DeleteSecuritySettings. - * @param request DeleteSecuritySettingsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public deleteSecuritySettings(request: google.cloud.dialogflow.cx.v3.IDeleteSecuritySettingsRequest, callback: google.cloud.dialogflow.cx.v3.SecuritySettingsService.DeleteSecuritySettingsCallback): void; - - /** - * Calls DeleteSecuritySettings. - * @param request DeleteSecuritySettingsRequest message or plain object - * @returns Promise - */ - public deleteSecuritySettings(request: google.cloud.dialogflow.cx.v3.IDeleteSecuritySettingsRequest): Promise; - } - - namespace SecuritySettingsService { - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.SecuritySettingsService|createSecuritySettings}. - * @param error Error, if any - * @param [response] SecuritySettings - */ - type CreateSecuritySettingsCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.SecuritySettings) => void; - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.SecuritySettingsService|getSecuritySettings}. - * @param error Error, if any - * @param [response] SecuritySettings - */ - type GetSecuritySettingsCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.SecuritySettings) => void; - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.SecuritySettingsService|updateSecuritySettings}. - * @param error Error, if any - * @param [response] SecuritySettings - */ - type UpdateSecuritySettingsCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.SecuritySettings) => void; - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.SecuritySettingsService|listSecuritySettings}. - * @param error Error, if any - * @param [response] ListSecuritySettingsResponse - */ - type ListSecuritySettingsCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse) => void; - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.SecuritySettingsService|deleteSecuritySettings}. - * @param error Error, if any - * @param [response] Empty - */ - type DeleteSecuritySettingsCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - } + /** Properties of a ListToolVersionsResponse. */ + interface IListToolVersionsResponse { - /** Properties of a GetSecuritySettingsRequest. */ - interface IGetSecuritySettingsRequest { + /** ListToolVersionsResponse toolVersions */ + toolVersions?: (google.cloud.dialogflow.cx.v3.IToolVersion[]|null); - /** GetSecuritySettingsRequest name */ - name?: (string|null); + /** ListToolVersionsResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a GetSecuritySettingsRequest. */ - class GetSecuritySettingsRequest implements IGetSecuritySettingsRequest { + /** Represents a ListToolVersionsResponse. */ + class ListToolVersionsResponse implements IListToolVersionsResponse { /** - * Constructs a new GetSecuritySettingsRequest. + * Constructs a new ListToolVersionsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IGetSecuritySettingsRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3.IListToolVersionsResponse); - /** GetSecuritySettingsRequest name. */ - public name: string; + /** ListToolVersionsResponse toolVersions. */ + public toolVersions: google.cloud.dialogflow.cx.v3.IToolVersion[]; + + /** ListToolVersionsResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new GetSecuritySettingsRequest instance using the specified properties. + * Creates a new ListToolVersionsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns GetSecuritySettingsRequest instance + * @returns ListToolVersionsResponse instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IGetSecuritySettingsRequest): google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3.IListToolVersionsResponse): google.cloud.dialogflow.cx.v3.ListToolVersionsResponse; /** - * Encodes the specified GetSecuritySettingsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest.verify|verify} messages. - * @param message GetSecuritySettingsRequest message or plain object to encode + * Encodes the specified ListToolVersionsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListToolVersionsResponse.verify|verify} messages. + * @param message ListToolVersionsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IGetSecuritySettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IListToolVersionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetSecuritySettingsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest.verify|verify} messages. - * @param message GetSecuritySettingsRequest message or plain object to encode + * Encodes the specified ListToolVersionsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListToolVersionsResponse.verify|verify} messages. + * @param message ListToolVersionsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IGetSecuritySettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IListToolVersionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetSecuritySettingsRequest message from the specified reader or buffer. + * Decodes a ListToolVersionsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetSecuritySettingsRequest + * @returns ListToolVersionsResponse * @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.GetSecuritySettingsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.ListToolVersionsResponse; /** - * Decodes a GetSecuritySettingsRequest message from the specified reader or buffer, length delimited. + * Decodes a ListToolVersionsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetSecuritySettingsRequest + * @returns ListToolVersionsResponse * @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.GetSecuritySettingsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.ListToolVersionsResponse; /** - * Verifies a GetSecuritySettingsRequest message. + * Verifies a ListToolVersionsResponse 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 GetSecuritySettingsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListToolVersionsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetSecuritySettingsRequest + * @returns ListToolVersionsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ListToolVersionsResponse; /** - * Creates a plain object from a GetSecuritySettingsRequest message. Also converts values to other types if specified. - * @param message GetSecuritySettingsRequest + * Creates a plain object from a ListToolVersionsResponse message. Also converts values to other types if specified. + * @param message ListToolVersionsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.ListToolVersionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetSecuritySettingsRequest to JSON. + * Converts this ListToolVersionsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GetSecuritySettingsRequest + * Gets the default type url for ListToolVersionsResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an UpdateSecuritySettingsRequest. */ - interface IUpdateSecuritySettingsRequest { + /** Properties of a CreateToolVersionRequest. */ + interface ICreateToolVersionRequest { - /** UpdateSecuritySettingsRequest securitySettings */ - securitySettings?: (google.cloud.dialogflow.cx.v3.ISecuritySettings|null); + /** CreateToolVersionRequest parent */ + parent?: (string|null); - /** UpdateSecuritySettingsRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** CreateToolVersionRequest toolVersion */ + toolVersion?: (google.cloud.dialogflow.cx.v3.IToolVersion|null); } - /** Represents an UpdateSecuritySettingsRequest. */ - class UpdateSecuritySettingsRequest implements IUpdateSecuritySettingsRequest { + /** Represents a CreateToolVersionRequest. */ + class CreateToolVersionRequest implements ICreateToolVersionRequest { /** - * Constructs a new UpdateSecuritySettingsRequest. + * Constructs a new CreateToolVersionRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IUpdateSecuritySettingsRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3.ICreateToolVersionRequest); - /** UpdateSecuritySettingsRequest securitySettings. */ - public securitySettings?: (google.cloud.dialogflow.cx.v3.ISecuritySettings|null); + /** CreateToolVersionRequest parent. */ + public parent: string; - /** UpdateSecuritySettingsRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** CreateToolVersionRequest toolVersion. */ + public toolVersion?: (google.cloud.dialogflow.cx.v3.IToolVersion|null); /** - * Creates a new UpdateSecuritySettingsRequest instance using the specified properties. + * Creates a new CreateToolVersionRequest instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateSecuritySettingsRequest instance + * @returns CreateToolVersionRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IUpdateSecuritySettingsRequest): google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3.ICreateToolVersionRequest): google.cloud.dialogflow.cx.v3.CreateToolVersionRequest; /** - * Encodes the specified UpdateSecuritySettingsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest.verify|verify} messages. - * @param message UpdateSecuritySettingsRequest message or plain object to encode + * Encodes the specified CreateToolVersionRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateToolVersionRequest.verify|verify} messages. + * @param message CreateToolVersionRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IUpdateSecuritySettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.ICreateToolVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateSecuritySettingsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest.verify|verify} messages. - * @param message UpdateSecuritySettingsRequest message or plain object to encode + * Encodes the specified CreateToolVersionRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateToolVersionRequest.verify|verify} messages. + * @param message CreateToolVersionRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IUpdateSecuritySettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ICreateToolVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateSecuritySettingsRequest message from the specified reader or buffer. + * Decodes a CreateToolVersionRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateSecuritySettingsRequest + * @returns CreateToolVersionRequest * @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.UpdateSecuritySettingsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.CreateToolVersionRequest; /** - * Decodes an UpdateSecuritySettingsRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateToolVersionRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateSecuritySettingsRequest + * @returns CreateToolVersionRequest * @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.UpdateSecuritySettingsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.CreateToolVersionRequest; /** - * Verifies an UpdateSecuritySettingsRequest message. + * Verifies a CreateToolVersionRequest 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 UpdateSecuritySettingsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateToolVersionRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateSecuritySettingsRequest + * @returns CreateToolVersionRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.CreateToolVersionRequest; /** - * Creates a plain object from an UpdateSecuritySettingsRequest message. Also converts values to other types if specified. - * @param message UpdateSecuritySettingsRequest + * Creates a plain object from a CreateToolVersionRequest message. Also converts values to other types if specified. + * @param message CreateToolVersionRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.CreateToolVersionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateSecuritySettingsRequest to JSON. + * Converts this CreateToolVersionRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for UpdateSecuritySettingsRequest + * Gets the default type url for CreateToolVersionRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListSecuritySettingsRequest. */ - interface IListSecuritySettingsRequest { - - /** ListSecuritySettingsRequest parent */ - parent?: (string|null); - - /** ListSecuritySettingsRequest pageSize */ - pageSize?: (number|null); + /** Properties of a GetToolVersionRequest. */ + interface IGetToolVersionRequest { - /** ListSecuritySettingsRequest pageToken */ - pageToken?: (string|null); + /** GetToolVersionRequest name */ + name?: (string|null); } - /** Represents a ListSecuritySettingsRequest. */ - class ListSecuritySettingsRequest implements IListSecuritySettingsRequest { + /** Represents a GetToolVersionRequest. */ + class GetToolVersionRequest implements IGetToolVersionRequest { /** - * Constructs a new ListSecuritySettingsRequest. + * Constructs a new GetToolVersionRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IListSecuritySettingsRequest); - - /** ListSecuritySettingsRequest parent. */ - public parent: string; - - /** ListSecuritySettingsRequest pageSize. */ - public pageSize: number; + constructor(properties?: google.cloud.dialogflow.cx.v3.IGetToolVersionRequest); - /** ListSecuritySettingsRequest pageToken. */ - public pageToken: string; + /** GetToolVersionRequest name. */ + public name: string; /** - * Creates a new ListSecuritySettingsRequest instance using the specified properties. + * Creates a new GetToolVersionRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListSecuritySettingsRequest instance + * @returns GetToolVersionRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IListSecuritySettingsRequest): google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3.IGetToolVersionRequest): google.cloud.dialogflow.cx.v3.GetToolVersionRequest; /** - * Encodes the specified ListSecuritySettingsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest.verify|verify} messages. - * @param message ListSecuritySettingsRequest message or plain object to encode + * Encodes the specified GetToolVersionRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetToolVersionRequest.verify|verify} messages. + * @param message GetToolVersionRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IListSecuritySettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IGetToolVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListSecuritySettingsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest.verify|verify} messages. - * @param message ListSecuritySettingsRequest message or plain object to encode + * Encodes the specified GetToolVersionRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetToolVersionRequest.verify|verify} messages. + * @param message GetToolVersionRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IListSecuritySettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IGetToolVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListSecuritySettingsRequest message from the specified reader or buffer. + * Decodes a GetToolVersionRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListSecuritySettingsRequest + * @returns GetToolVersionRequest * @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.ListSecuritySettingsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.GetToolVersionRequest; /** - * Decodes a ListSecuritySettingsRequest message from the specified reader or buffer, length delimited. + * Decodes a GetToolVersionRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListSecuritySettingsRequest + * @returns GetToolVersionRequest * @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.ListSecuritySettingsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.GetToolVersionRequest; /** - * Verifies a ListSecuritySettingsRequest message. + * Verifies a GetToolVersionRequest 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 ListSecuritySettingsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetToolVersionRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListSecuritySettingsRequest + * @returns GetToolVersionRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.GetToolVersionRequest; /** - * Creates a plain object from a ListSecuritySettingsRequest message. Also converts values to other types if specified. - * @param message ListSecuritySettingsRequest + * Creates a plain object from a GetToolVersionRequest message. Also converts values to other types if specified. + * @param message GetToolVersionRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.GetToolVersionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListSecuritySettingsRequest to JSON. + * Converts this GetToolVersionRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListSecuritySettingsRequest + * Gets the default type url for GetToolVersionRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListSecuritySettingsResponse. */ - interface IListSecuritySettingsResponse { + /** Properties of a DeleteToolVersionRequest. */ + interface IDeleteToolVersionRequest { - /** ListSecuritySettingsResponse securitySettings */ - securitySettings?: (google.cloud.dialogflow.cx.v3.ISecuritySettings[]|null); + /** DeleteToolVersionRequest name */ + name?: (string|null); - /** ListSecuritySettingsResponse nextPageToken */ - nextPageToken?: (string|null); + /** DeleteToolVersionRequest force */ + force?: (boolean|null); } - /** Represents a ListSecuritySettingsResponse. */ - class ListSecuritySettingsResponse implements IListSecuritySettingsResponse { + /** Represents a DeleteToolVersionRequest. */ + class DeleteToolVersionRequest implements IDeleteToolVersionRequest { /** - * Constructs a new ListSecuritySettingsResponse. + * Constructs a new DeleteToolVersionRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IListSecuritySettingsResponse); + constructor(properties?: google.cloud.dialogflow.cx.v3.IDeleteToolVersionRequest); - /** ListSecuritySettingsResponse securitySettings. */ - public securitySettings: google.cloud.dialogflow.cx.v3.ISecuritySettings[]; + /** DeleteToolVersionRequest name. */ + public name: string; - /** ListSecuritySettingsResponse nextPageToken. */ - public nextPageToken: string; + /** DeleteToolVersionRequest force. */ + public force: boolean; /** - * Creates a new ListSecuritySettingsResponse instance using the specified properties. + * Creates a new DeleteToolVersionRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListSecuritySettingsResponse instance + * @returns DeleteToolVersionRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IListSecuritySettingsResponse): google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse; + public static create(properties?: google.cloud.dialogflow.cx.v3.IDeleteToolVersionRequest): google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest; /** - * Encodes the specified ListSecuritySettingsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse.verify|verify} messages. - * @param message ListSecuritySettingsResponse message or plain object to encode + * Encodes the specified DeleteToolVersionRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest.verify|verify} messages. + * @param message DeleteToolVersionRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IListSecuritySettingsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IDeleteToolVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListSecuritySettingsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse.verify|verify} messages. - * @param message ListSecuritySettingsResponse message or plain object to encode + * Encodes the specified DeleteToolVersionRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest.verify|verify} messages. + * @param message DeleteToolVersionRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IListSecuritySettingsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IDeleteToolVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListSecuritySettingsResponse message from the specified reader or buffer. + * Decodes a DeleteToolVersionRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListSecuritySettingsResponse + * @returns DeleteToolVersionRequest * @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.ListSecuritySettingsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest; /** - * Decodes a ListSecuritySettingsResponse message from the specified reader or buffer, length delimited. + * Decodes a DeleteToolVersionRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListSecuritySettingsResponse + * @returns DeleteToolVersionRequest * @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.ListSecuritySettingsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest; /** - * Verifies a ListSecuritySettingsResponse message. + * Verifies a DeleteToolVersionRequest 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 ListSecuritySettingsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteToolVersionRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListSecuritySettingsResponse + * @returns DeleteToolVersionRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest; /** - * Creates a plain object from a ListSecuritySettingsResponse message. Also converts values to other types if specified. - * @param message ListSecuritySettingsResponse + * Creates a plain object from a DeleteToolVersionRequest message. Also converts values to other types if specified. + * @param message DeleteToolVersionRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListSecuritySettingsResponse to JSON. + * Converts this DeleteToolVersionRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListSecuritySettingsResponse + * Gets the default type url for DeleteToolVersionRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CreateSecuritySettingsRequest. */ - interface ICreateSecuritySettingsRequest { - - /** CreateSecuritySettingsRequest parent */ - parent?: (string|null); + /** Properties of a RestoreToolVersionRequest. */ + interface IRestoreToolVersionRequest { - /** CreateSecuritySettingsRequest securitySettings */ - securitySettings?: (google.cloud.dialogflow.cx.v3.ISecuritySettings|null); + /** RestoreToolVersionRequest name */ + name?: (string|null); } - /** Represents a CreateSecuritySettingsRequest. */ - class CreateSecuritySettingsRequest implements ICreateSecuritySettingsRequest { + /** Represents a RestoreToolVersionRequest. */ + class RestoreToolVersionRequest implements IRestoreToolVersionRequest { /** - * Constructs a new CreateSecuritySettingsRequest. + * Constructs a new RestoreToolVersionRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.ICreateSecuritySettingsRequest); - - /** CreateSecuritySettingsRequest parent. */ - public parent: string; + constructor(properties?: google.cloud.dialogflow.cx.v3.IRestoreToolVersionRequest); - /** CreateSecuritySettingsRequest securitySettings. */ - public securitySettings?: (google.cloud.dialogflow.cx.v3.ISecuritySettings|null); + /** RestoreToolVersionRequest name. */ + public name: string; /** - * Creates a new CreateSecuritySettingsRequest instance using the specified properties. + * Creates a new RestoreToolVersionRequest instance using the specified properties. * @param [properties] Properties to set - * @returns CreateSecuritySettingsRequest instance + * @returns RestoreToolVersionRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.ICreateSecuritySettingsRequest): google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3.IRestoreToolVersionRequest): google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest; /** - * Encodes the specified CreateSecuritySettingsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest.verify|verify} messages. - * @param message CreateSecuritySettingsRequest message or plain object to encode + * Encodes the specified RestoreToolVersionRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest.verify|verify} messages. + * @param message RestoreToolVersionRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.ICreateSecuritySettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IRestoreToolVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateSecuritySettingsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest.verify|verify} messages. - * @param message CreateSecuritySettingsRequest message or plain object to encode + * Encodes the specified RestoreToolVersionRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest.verify|verify} messages. + * @param message RestoreToolVersionRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ICreateSecuritySettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IRestoreToolVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateSecuritySettingsRequest message from the specified reader or buffer. + * Decodes a RestoreToolVersionRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateSecuritySettingsRequest + * @returns RestoreToolVersionRequest * @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.CreateSecuritySettingsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest; /** - * Decodes a CreateSecuritySettingsRequest message from the specified reader or buffer, length delimited. + * Decodes a RestoreToolVersionRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateSecuritySettingsRequest + * @returns RestoreToolVersionRequest * @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.CreateSecuritySettingsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest; /** - * Verifies a CreateSecuritySettingsRequest message. + * Verifies a RestoreToolVersionRequest 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 CreateSecuritySettingsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a RestoreToolVersionRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateSecuritySettingsRequest + * @returns RestoreToolVersionRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest; /** - * Creates a plain object from a CreateSecuritySettingsRequest message. Also converts values to other types if specified. - * @param message CreateSecuritySettingsRequest + * Creates a plain object from a RestoreToolVersionRequest message. Also converts values to other types if specified. + * @param message RestoreToolVersionRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateSecuritySettingsRequest to JSON. + * Converts this RestoreToolVersionRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CreateSecuritySettingsRequest + * Gets the default type url for RestoreToolVersionRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a DeleteSecuritySettingsRequest. */ - interface IDeleteSecuritySettingsRequest { + /** Properties of a RestoreToolVersionResponse. */ + interface IRestoreToolVersionResponse { - /** DeleteSecuritySettingsRequest name */ - name?: (string|null); + /** RestoreToolVersionResponse tool */ + tool?: (google.cloud.dialogflow.cx.v3.ITool|null); } - /** Represents a DeleteSecuritySettingsRequest. */ - class DeleteSecuritySettingsRequest implements IDeleteSecuritySettingsRequest { + /** Represents a RestoreToolVersionResponse. */ + class RestoreToolVersionResponse implements IRestoreToolVersionResponse { /** - * Constructs a new DeleteSecuritySettingsRequest. + * Constructs a new RestoreToolVersionResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IDeleteSecuritySettingsRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3.IRestoreToolVersionResponse); - /** DeleteSecuritySettingsRequest name. */ - public name: string; + /** RestoreToolVersionResponse tool. */ + public tool?: (google.cloud.dialogflow.cx.v3.ITool|null); /** - * Creates a new DeleteSecuritySettingsRequest instance using the specified properties. + * Creates a new RestoreToolVersionResponse instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteSecuritySettingsRequest instance + * @returns RestoreToolVersionResponse instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IDeleteSecuritySettingsRequest): google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3.IRestoreToolVersionResponse): google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse; /** - * Encodes the specified DeleteSecuritySettingsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest.verify|verify} messages. - * @param message DeleteSecuritySettingsRequest message or plain object to encode + * Encodes the specified RestoreToolVersionResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse.verify|verify} messages. + * @param message RestoreToolVersionResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.IDeleteSecuritySettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IRestoreToolVersionResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteSecuritySettingsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest.verify|verify} messages. - * @param message DeleteSecuritySettingsRequest message or plain object to encode + * Encodes the specified RestoreToolVersionResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse.verify|verify} messages. + * @param message RestoreToolVersionResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IDeleteSecuritySettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IRestoreToolVersionResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteSecuritySettingsRequest message from the specified reader or buffer. + * Decodes a RestoreToolVersionResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteSecuritySettingsRequest + * @returns RestoreToolVersionResponse * @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.DeleteSecuritySettingsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse; /** - * Decodes a DeleteSecuritySettingsRequest message from the specified reader or buffer, length delimited. + * Decodes a RestoreToolVersionResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteSecuritySettingsRequest + * @returns RestoreToolVersionResponse * @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.DeleteSecuritySettingsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse; /** - * Verifies a DeleteSecuritySettingsRequest message. + * Verifies a RestoreToolVersionResponse 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 DeleteSecuritySettingsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a RestoreToolVersionResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteSecuritySettingsRequest + * @returns RestoreToolVersionResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse; /** - * Creates a plain object from a DeleteSecuritySettingsRequest message. Also converts values to other types if specified. - * @param message DeleteSecuritySettingsRequest + * Creates a plain object from a RestoreToolVersionResponse message. Also converts values to other types if specified. + * @param message RestoreToolVersionResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteSecuritySettingsRequest to JSON. + * Converts this RestoreToolVersionResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DeleteSecuritySettingsRequest + * Gets the default type url for RestoreToolVersionResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a SecuritySettings. */ - interface ISecuritySettings { + /** Properties of a ToolVersion. */ + interface IToolVersion { - /** SecuritySettings name */ + /** ToolVersion name */ name?: (string|null); - /** SecuritySettings displayName */ + /** ToolVersion displayName */ displayName?: (string|null); - /** SecuritySettings redactionStrategy */ - redactionStrategy?: (google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionStrategy|keyof typeof google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionStrategy|null); - - /** SecuritySettings redactionScope */ - redactionScope?: (google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionScope|keyof typeof google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionScope|null); - - /** SecuritySettings inspectTemplate */ - inspectTemplate?: (string|null); - - /** SecuritySettings deidentifyTemplate */ - deidentifyTemplate?: (string|null); - - /** SecuritySettings retentionWindowDays */ - retentionWindowDays?: (number|null); - - /** SecuritySettings retentionStrategy */ - retentionStrategy?: (google.cloud.dialogflow.cx.v3.SecuritySettings.RetentionStrategy|keyof typeof google.cloud.dialogflow.cx.v3.SecuritySettings.RetentionStrategy|null); - - /** SecuritySettings purgeDataTypes */ - purgeDataTypes?: (google.cloud.dialogflow.cx.v3.SecuritySettings.PurgeDataType[]|null); + /** ToolVersion tool */ + tool?: (google.cloud.dialogflow.cx.v3.ITool|null); - /** SecuritySettings audioExportSettings */ - audioExportSettings?: (google.cloud.dialogflow.cx.v3.SecuritySettings.IAudioExportSettings|null); + /** ToolVersion createTime */ + createTime?: (google.protobuf.ITimestamp|null); - /** SecuritySettings insightsExportSettings */ - insightsExportSettings?: (google.cloud.dialogflow.cx.v3.SecuritySettings.IInsightsExportSettings|null); + /** ToolVersion updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); } - /** Represents a SecuritySettings. */ - class SecuritySettings implements ISecuritySettings { + /** Represents a ToolVersion. */ + class ToolVersion implements IToolVersion { /** - * Constructs a new SecuritySettings. + * Constructs a new ToolVersion. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.ISecuritySettings); + constructor(properties?: google.cloud.dialogflow.cx.v3.IToolVersion); - /** SecuritySettings name. */ + /** ToolVersion name. */ public name: string; - /** SecuritySettings displayName. */ + /** ToolVersion displayName. */ public displayName: string; - /** SecuritySettings redactionStrategy. */ - public redactionStrategy: (google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionStrategy|keyof typeof google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionStrategy); - - /** SecuritySettings redactionScope. */ - public redactionScope: (google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionScope|keyof typeof google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionScope); - - /** SecuritySettings inspectTemplate. */ - public inspectTemplate: string; - - /** SecuritySettings deidentifyTemplate. */ - public deidentifyTemplate: string; - - /** SecuritySettings retentionWindowDays. */ - public retentionWindowDays?: (number|null); - - /** SecuritySettings retentionStrategy. */ - public retentionStrategy?: (google.cloud.dialogflow.cx.v3.SecuritySettings.RetentionStrategy|keyof typeof google.cloud.dialogflow.cx.v3.SecuritySettings.RetentionStrategy|null); - - /** SecuritySettings purgeDataTypes. */ - public purgeDataTypes: google.cloud.dialogflow.cx.v3.SecuritySettings.PurgeDataType[]; - - /** SecuritySettings audioExportSettings. */ - public audioExportSettings?: (google.cloud.dialogflow.cx.v3.SecuritySettings.IAudioExportSettings|null); + /** ToolVersion tool. */ + public tool?: (google.cloud.dialogflow.cx.v3.ITool|null); - /** SecuritySettings insightsExportSettings. */ - public insightsExportSettings?: (google.cloud.dialogflow.cx.v3.SecuritySettings.IInsightsExportSettings|null); + /** ToolVersion createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); - /** SecuritySettings dataRetention. */ - public dataRetention?: ("retentionWindowDays"|"retentionStrategy"); + /** ToolVersion updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); /** - * Creates a new SecuritySettings instance using the specified properties. + * Creates a new ToolVersion instance using the specified properties. * @param [properties] Properties to set - * @returns SecuritySettings instance + * @returns ToolVersion instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.ISecuritySettings): google.cloud.dialogflow.cx.v3.SecuritySettings; + public static create(properties?: google.cloud.dialogflow.cx.v3.IToolVersion): google.cloud.dialogflow.cx.v3.ToolVersion; /** - * Encodes the specified SecuritySettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SecuritySettings.verify|verify} messages. - * @param message SecuritySettings message or plain object to encode + * Encodes the specified ToolVersion message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ToolVersion.verify|verify} messages. + * @param message ToolVersion message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.ISecuritySettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IToolVersion, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SecuritySettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SecuritySettings.verify|verify} messages. - * @param message SecuritySettings message or plain object to encode + * Encodes the specified ToolVersion message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ToolVersion.verify|verify} messages. + * @param message ToolVersion message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ISecuritySettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IToolVersion, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SecuritySettings message from the specified reader or buffer. + * Decodes a ToolVersion message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SecuritySettings + * @returns ToolVersion * @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.SecuritySettings; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.ToolVersion; /** - * Decodes a SecuritySettings message from the specified reader or buffer, length delimited. + * Decodes a ToolVersion message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SecuritySettings + * @returns ToolVersion * @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.SecuritySettings; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.ToolVersion; /** - * Verifies a SecuritySettings message. + * Verifies a ToolVersion 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 SecuritySettings message from a plain object. Also converts values to their respective internal types. + * Creates a ToolVersion message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SecuritySettings + * @returns ToolVersion */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.SecuritySettings; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ToolVersion; /** - * Creates a plain object from a SecuritySettings message. Also converts values to other types if specified. - * @param message SecuritySettings + * Creates a plain object from a ToolVersion message. Also converts values to other types if specified. + * @param message ToolVersion * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.SecuritySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.ToolVersion, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SecuritySettings to JSON. + * Converts this ToolVersion to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for SecuritySettings + * Gets the default type url for ToolVersion * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace SecuritySettings { - - /** RedactionStrategy enum. */ - enum RedactionStrategy { - REDACTION_STRATEGY_UNSPECIFIED = 0, - REDACT_WITH_SERVICE = 1 - } - - /** RedactionScope enum. */ - enum RedactionScope { - REDACTION_SCOPE_UNSPECIFIED = 0, - REDACT_DISK_STORAGE = 2 - } - - /** RetentionStrategy enum. */ - enum RetentionStrategy { - RETENTION_STRATEGY_UNSPECIFIED = 0, - REMOVE_AFTER_CONVERSATION = 1 - } - - /** PurgeDataType enum. */ - enum PurgeDataType { - PURGE_DATA_TYPE_UNSPECIFIED = 0, - DIALOGFLOW_HISTORY = 1 - } - - /** Properties of an AudioExportSettings. */ - interface IAudioExportSettings { - - /** AudioExportSettings gcsBucket */ - gcsBucket?: (string|null); - - /** AudioExportSettings audioExportPattern */ - audioExportPattern?: (string|null); - - /** AudioExportSettings enableAudioRedaction */ - enableAudioRedaction?: (boolean|null); - - /** AudioExportSettings audioFormat */ - audioFormat?: (google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings.AudioFormat|keyof typeof google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings.AudioFormat|null); - - /** AudioExportSettings storeTtsAudio */ - storeTtsAudio?: (boolean|null); - } - - /** Represents an AudioExportSettings. */ - class AudioExportSettings implements IAudioExportSettings { - - /** - * Constructs a new AudioExportSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3.SecuritySettings.IAudioExportSettings); - - /** AudioExportSettings gcsBucket. */ - public gcsBucket: string; - - /** AudioExportSettings audioExportPattern. */ - public audioExportPattern: string; - - /** AudioExportSettings enableAudioRedaction. */ - public enableAudioRedaction: boolean; - - /** AudioExportSettings audioFormat. */ - public audioFormat: (google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings.AudioFormat|keyof typeof google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings.AudioFormat); - - /** AudioExportSettings storeTtsAudio. */ - public storeTtsAudio: boolean; - - /** - * Creates a new AudioExportSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns AudioExportSettings instance - */ - public static create(properties?: google.cloud.dialogflow.cx.v3.SecuritySettings.IAudioExportSettings): google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings; - - /** - * Encodes the specified AudioExportSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings.verify|verify} messages. - * @param message AudioExportSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.cx.v3.SecuritySettings.IAudioExportSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AudioExportSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings.verify|verify} messages. - * @param message AudioExportSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.SecuritySettings.IAudioExportSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AudioExportSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AudioExportSettings - * @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.SecuritySettings.AudioExportSettings; - - /** - * Decodes an AudioExportSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AudioExportSettings - * @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.SecuritySettings.AudioExportSettings; - - /** - * Verifies an AudioExportSettings 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 AudioExportSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AudioExportSettings - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings; - - /** - * Creates a plain object from an AudioExportSettings message. Also converts values to other types if specified. - * @param message AudioExportSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AudioExportSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AudioExportSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace AudioExportSettings { - - /** AudioFormat enum. */ - enum AudioFormat { - AUDIO_FORMAT_UNSPECIFIED = 0, - MULAW = 1, - MP3 = 2, - OGG = 3 - } - } - - /** Properties of an InsightsExportSettings. */ - interface IInsightsExportSettings { - - /** InsightsExportSettings enableInsightsExport */ - enableInsightsExport?: (boolean|null); - } - - /** Represents an InsightsExportSettings. */ - class InsightsExportSettings implements IInsightsExportSettings { - - /** - * Constructs a new InsightsExportSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3.SecuritySettings.IInsightsExportSettings); - - /** InsightsExportSettings enableInsightsExport. */ - public enableInsightsExport: boolean; - - /** - * Creates a new InsightsExportSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns InsightsExportSettings instance - */ - public static create(properties?: google.cloud.dialogflow.cx.v3.SecuritySettings.IInsightsExportSettings): google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings; - - /** - * Encodes the specified InsightsExportSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings.verify|verify} messages. - * @param message InsightsExportSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.cx.v3.SecuritySettings.IInsightsExportSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified InsightsExportSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings.verify|verify} messages. - * @param message InsightsExportSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.SecuritySettings.IInsightsExportSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an InsightsExportSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns InsightsExportSettings - * @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.SecuritySettings.InsightsExportSettings; - - /** - * Decodes an InsightsExportSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns InsightsExportSettings - * @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.SecuritySettings.InsightsExportSettings; - - /** - * Verifies an InsightsExportSettings 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 InsightsExportSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns InsightsExportSettings - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings; - - /** - * Creates a plain object from an InsightsExportSettings message. Also converts values to other types if specified. - * @param message InsightsExportSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this InsightsExportSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for InsightsExportSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - /** Represents a Versions */ class Versions extends $protobuf.rpc.Service { diff --git a/packages/google-cloud-dialogflow-cx/protos/protos.js b/packages/google-cloud-dialogflow-cx/protos/protos.js index dd52ff8cd4e..40f585628af 100644 --- a/packages/google-cloud-dialogflow-cx/protos/protos.js +++ b/packages/google-cloud-dialogflow-cx/protos/protos.js @@ -2069,6 +2069,7 @@ * @property {string|null} [avatarUri] Agent avatarUri * @property {google.cloud.dialogflow.cx.v3.ISpeechToTextSettings|null} [speechToTextSettings] Agent speechToTextSettings * @property {string|null} [startFlow] Agent startFlow + * @property {string|null} [startPlaybook] Agent startPlaybook * @property {string|null} [securitySettings] Agent securitySettings * @property {boolean|null} [enableStackdriverLogging] Agent enableStackdriverLogging * @property {boolean|null} [enableSpellCorrection] Agent enableSpellCorrection @@ -2167,11 +2168,19 @@ /** * Agent startFlow. - * @member {string} startFlow + * @member {string|null|undefined} startFlow + * @memberof google.cloud.dialogflow.cx.v3.Agent + * @instance + */ + Agent.prototype.startFlow = null; + + /** + * Agent startPlaybook. + * @member {string|null|undefined} startPlaybook * @memberof google.cloud.dialogflow.cx.v3.Agent * @instance */ - Agent.prototype.startFlow = ""; + Agent.prototype.startPlaybook = null; /** * Agent securitySettings. @@ -2288,6 +2297,17 @@ // OneOf field names bound to virtual getters and setters var $oneOfFields; + /** + * Agent sessionEntryResource. + * @member {"startFlow"|"startPlaybook"|undefined} sessionEntryResource + * @memberof google.cloud.dialogflow.cx.v3.Agent + * @instance + */ + Object.defineProperty(Agent.prototype, "sessionEntryResource", { + get: $util.oneOfGetter($oneOfFields = ["startFlow", "startPlaybook"]), + set: $util.oneOfSetter($oneOfFields) + }); + // Virtual OneOf for proto3 optional field Object.defineProperty(Agent.prototype, "_genAppBuilderSettings", { get: $util.oneOfGetter($oneOfFields = ["genAppBuilderSettings"]), @@ -2367,6 +2387,8 @@ $root.google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettings.encode(message.genAppBuilderSettings, writer.uint32(/* id 33, wireType 2 =*/266).fork()).ldelim(); if (message.answerFeedbackSettings != null && Object.hasOwnProperty.call(message, "answerFeedbackSettings")) $root.google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings.encode(message.answerFeedbackSettings, writer.uint32(/* id 38, wireType 2 =*/306).fork()).ldelim(); + if (message.startPlaybook != null && Object.hasOwnProperty.call(message, "startPlaybook")) + writer.uint32(/* id 39, wireType 2 =*/314).string(message.startPlaybook); if (message.enableMultiLanguageTraining != null && Object.hasOwnProperty.call(message, "enableMultiLanguageTraining")) writer.uint32(/* id 40, wireType 0 =*/320).bool(message.enableMultiLanguageTraining); if (message.personalizationSettings != null && Object.hasOwnProperty.call(message, "personalizationSettings")) @@ -2451,6 +2473,10 @@ message.startFlow = reader.string(); break; } + case 39: { + message.startPlaybook = reader.string(); + break; + } case 17: { message.securitySettings = reader.string(); break; @@ -2573,9 +2599,18 @@ if (error) return "speechToTextSettings." + error; } - if (message.startFlow != null && message.hasOwnProperty("startFlow")) + if (message.startFlow != null && message.hasOwnProperty("startFlow")) { + properties.sessionEntryResource = 1; if (!$util.isString(message.startFlow)) return "startFlow: string expected"; + } + if (message.startPlaybook != null && message.hasOwnProperty("startPlaybook")) { + if (properties.sessionEntryResource === 1) + return "sessionEntryResource: multiple values"; + properties.sessionEntryResource = 1; + if (!$util.isString(message.startPlaybook)) + return "startPlaybook: string expected"; + } if (message.securitySettings != null && message.hasOwnProperty("securitySettings")) if (!$util.isString(message.securitySettings)) return "securitySettings: string expected"; @@ -2680,6 +2715,8 @@ } if (object.startFlow != null) message.startFlow = String(object.startFlow); + if (object.startPlaybook != null) + message.startPlaybook = String(object.startPlaybook); if (object.securitySettings != null) message.securitySettings = String(object.securitySettings); if (object.enableStackdriverLogging != null) @@ -2755,7 +2792,6 @@ object.description = ""; object.avatarUri = ""; object.speechToTextSettings = null; - object.startFlow = ""; object.securitySettings = ""; object.enableStackdriverLogging = false; object.enableSpellCorrection = false; @@ -2787,8 +2823,11 @@ object.avatarUri = message.avatarUri; if (message.speechToTextSettings != null && message.hasOwnProperty("speechToTextSettings")) object.speechToTextSettings = $root.google.cloud.dialogflow.cx.v3.SpeechToTextSettings.toObject(message.speechToTextSettings, options); - if (message.startFlow != null && message.hasOwnProperty("startFlow")) + if (message.startFlow != null && message.hasOwnProperty("startFlow")) { object.startFlow = message.startFlow; + if (options.oneofs) + object.sessionEntryResource = "startFlow"; + } if (message.securitySettings != null && message.hasOwnProperty("securitySettings")) object.securitySettings = message.securitySettings; if (message.enableStackdriverLogging != null && message.hasOwnProperty("enableStackdriverLogging")) @@ -2810,6 +2849,11 @@ } if (message.answerFeedbackSettings != null && message.hasOwnProperty("answerFeedbackSettings")) object.answerFeedbackSettings = $root.google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings.toObject(message.answerFeedbackSettings, options); + if (message.startPlaybook != null && message.hasOwnProperty("startPlaybook")) { + object.startPlaybook = message.startPlaybook; + if (options.oneofs) + object.sessionEntryResource = "startPlaybook"; + } if (message.enableMultiLanguageTraining != null && message.hasOwnProperty("enableMultiLanguageTraining")) object.enableMultiLanguageTraining = message.enableMultiLanguageTraining; if (message.personalizationSettings != null && message.hasOwnProperty("personalizationSettings")) @@ -11242,6 +11286,8 @@ * @property {google.cloud.dialogflow.cx.v3.INluSettings|null} [nluSettings] Flow nluSettings * @property {google.cloud.dialogflow.cx.v3.IAdvancedSettings|null} [advancedSettings] Flow advancedSettings * @property {google.cloud.dialogflow.cx.v3.IKnowledgeConnectorSettings|null} [knowledgeConnectorSettings] Flow knowledgeConnectorSettings + * @property {Array.|null} [inputParameterDefinitions] Flow inputParameterDefinitions + * @property {Array.|null} [outputParameterDefinitions] Flow outputParameterDefinitions * @property {google.cloud.dialogflow.cx.v3.Flow.IMultiLanguageSettings|null} [multiLanguageSettings] Flow multiLanguageSettings * @property {boolean|null} [locked] Flow locked */ @@ -11258,6 +11304,8 @@ this.transitionRoutes = []; this.eventHandlers = []; this.transitionRouteGroups = []; + this.inputParameterDefinitions = []; + this.outputParameterDefinitions = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11336,6 +11384,22 @@ */ Flow.prototype.knowledgeConnectorSettings = null; + /** + * Flow inputParameterDefinitions. + * @member {Array.} inputParameterDefinitions + * @memberof google.cloud.dialogflow.cx.v3.Flow + * @instance + */ + Flow.prototype.inputParameterDefinitions = $util.emptyArray; + + /** + * Flow outputParameterDefinitions. + * @member {Array.} outputParameterDefinitions + * @memberof google.cloud.dialogflow.cx.v3.Flow + * @instance + */ + Flow.prototype.outputParameterDefinitions = $util.emptyArray; + /** * Flow multiLanguageSettings. * @member {google.cloud.dialogflow.cx.v3.Flow.IMultiLanguageSettings|null|undefined} multiLanguageSettings @@ -11397,6 +11461,12 @@ writer.uint32(/* id 15, wireType 2 =*/122).string(message.transitionRouteGroups[i]); if (message.knowledgeConnectorSettings != null && Object.hasOwnProperty.call(message, "knowledgeConnectorSettings")) $root.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings.encode(message.knowledgeConnectorSettings, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + if (message.inputParameterDefinitions != null && message.inputParameterDefinitions.length) + for (var i = 0; i < message.inputParameterDefinitions.length; ++i) + $root.google.cloud.dialogflow.cx.v3.ParameterDefinition.encode(message.inputParameterDefinitions[i], writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); + if (message.outputParameterDefinitions != null && message.outputParameterDefinitions.length) + for (var i = 0; i < message.outputParameterDefinitions.length; ++i) + $root.google.cloud.dialogflow.cx.v3.ParameterDefinition.encode(message.outputParameterDefinitions[i], writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); if (message.multiLanguageSettings != null && Object.hasOwnProperty.call(message, "multiLanguageSettings")) $root.google.cloud.dialogflow.cx.v3.Flow.MultiLanguageSettings.encode(message.multiLanguageSettings, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); if (message.locked != null && Object.hasOwnProperty.call(message, "locked")) @@ -11479,6 +11549,18 @@ message.knowledgeConnectorSettings = $root.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings.decode(reader, reader.uint32()); break; } + case 26: { + if (!(message.inputParameterDefinitions && message.inputParameterDefinitions.length)) + message.inputParameterDefinitions = []; + message.inputParameterDefinitions.push($root.google.cloud.dialogflow.cx.v3.ParameterDefinition.decode(reader, reader.uint32())); + break; + } + case 27: { + if (!(message.outputParameterDefinitions && message.outputParameterDefinitions.length)) + message.outputParameterDefinitions = []; + message.outputParameterDefinitions.push($root.google.cloud.dialogflow.cx.v3.ParameterDefinition.decode(reader, reader.uint32())); + break; + } case 28: { message.multiLanguageSettings = $root.google.cloud.dialogflow.cx.v3.Flow.MultiLanguageSettings.decode(reader, reader.uint32()); break; @@ -11571,6 +11653,24 @@ if (error) return "knowledgeConnectorSettings." + error; } + if (message.inputParameterDefinitions != null && message.hasOwnProperty("inputParameterDefinitions")) { + if (!Array.isArray(message.inputParameterDefinitions)) + return "inputParameterDefinitions: array expected"; + for (var i = 0; i < message.inputParameterDefinitions.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.ParameterDefinition.verify(message.inputParameterDefinitions[i]); + if (error) + return "inputParameterDefinitions." + error; + } + } + if (message.outputParameterDefinitions != null && message.hasOwnProperty("outputParameterDefinitions")) { + if (!Array.isArray(message.outputParameterDefinitions)) + return "outputParameterDefinitions: array expected"; + for (var i = 0; i < message.outputParameterDefinitions.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.ParameterDefinition.verify(message.outputParameterDefinitions[i]); + if (error) + return "outputParameterDefinitions." + error; + } + } if (message.multiLanguageSettings != null && message.hasOwnProperty("multiLanguageSettings")) { var error = $root.google.cloud.dialogflow.cx.v3.Flow.MultiLanguageSettings.verify(message.multiLanguageSettings); if (error) @@ -11642,6 +11742,26 @@ throw TypeError(".google.cloud.dialogflow.cx.v3.Flow.knowledgeConnectorSettings: object expected"); message.knowledgeConnectorSettings = $root.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings.fromObject(object.knowledgeConnectorSettings); } + if (object.inputParameterDefinitions) { + if (!Array.isArray(object.inputParameterDefinitions)) + throw TypeError(".google.cloud.dialogflow.cx.v3.Flow.inputParameterDefinitions: array expected"); + message.inputParameterDefinitions = []; + for (var i = 0; i < object.inputParameterDefinitions.length; ++i) { + if (typeof object.inputParameterDefinitions[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Flow.inputParameterDefinitions: object expected"); + message.inputParameterDefinitions[i] = $root.google.cloud.dialogflow.cx.v3.ParameterDefinition.fromObject(object.inputParameterDefinitions[i]); + } + } + if (object.outputParameterDefinitions) { + if (!Array.isArray(object.outputParameterDefinitions)) + throw TypeError(".google.cloud.dialogflow.cx.v3.Flow.outputParameterDefinitions: array expected"); + message.outputParameterDefinitions = []; + for (var i = 0; i < object.outputParameterDefinitions.length; ++i) { + if (typeof object.outputParameterDefinitions[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Flow.outputParameterDefinitions: object expected"); + message.outputParameterDefinitions[i] = $root.google.cloud.dialogflow.cx.v3.ParameterDefinition.fromObject(object.outputParameterDefinitions[i]); + } + } if (object.multiLanguageSettings != null) { if (typeof object.multiLanguageSettings !== "object") throw TypeError(".google.cloud.dialogflow.cx.v3.Flow.multiLanguageSettings: object expected"); @@ -11669,6 +11789,8 @@ object.transitionRoutes = []; object.eventHandlers = []; object.transitionRouteGroups = []; + object.inputParameterDefinitions = []; + object.outputParameterDefinitions = []; } if (options.defaults) { object.name = ""; @@ -11707,6 +11829,16 @@ } if (message.knowledgeConnectorSettings != null && message.hasOwnProperty("knowledgeConnectorSettings")) object.knowledgeConnectorSettings = $root.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings.toObject(message.knowledgeConnectorSettings, options); + if (message.inputParameterDefinitions && message.inputParameterDefinitions.length) { + object.inputParameterDefinitions = []; + for (var j = 0; j < message.inputParameterDefinitions.length; ++j) + object.inputParameterDefinitions[j] = $root.google.cloud.dialogflow.cx.v3.ParameterDefinition.toObject(message.inputParameterDefinitions[j], options); + } + if (message.outputParameterDefinitions && message.outputParameterDefinitions.length) { + object.outputParameterDefinitions = []; + for (var j = 0; j < message.outputParameterDefinitions.length; ++j) + object.outputParameterDefinitions[j] = $root.google.cloud.dialogflow.cx.v3.ParameterDefinition.toObject(message.outputParameterDefinitions[j], options); + } if (message.multiLanguageSettings != null && message.hasOwnProperty("multiLanguageSettings")) object.multiLanguageSettings = $root.google.cloud.dialogflow.cx.v3.Flow.MultiLanguageSettings.toObject(message.multiLanguageSettings, options); if (message.locked != null && message.hasOwnProperty("locked")) @@ -17348,6 +17480,7 @@ * @property {google.cloud.dialogflow.cx.v3.IFulfillment|null} [triggerFulfillment] EventHandler triggerFulfillment * @property {string|null} [targetPage] EventHandler targetPage * @property {string|null} [targetFlow] EventHandler targetFlow + * @property {string|null} [targetPlaybook] EventHandler targetPlaybook */ /** @@ -17405,17 +17538,25 @@ */ EventHandler.prototype.targetFlow = null; + /** + * EventHandler targetPlaybook. + * @member {string|null|undefined} targetPlaybook + * @memberof google.cloud.dialogflow.cx.v3.EventHandler + * @instance + */ + EventHandler.prototype.targetPlaybook = null; + // OneOf field names bound to virtual getters and setters var $oneOfFields; /** * EventHandler target. - * @member {"targetPage"|"targetFlow"|undefined} target + * @member {"targetPage"|"targetFlow"|"targetPlaybook"|undefined} target * @memberof google.cloud.dialogflow.cx.v3.EventHandler * @instance */ Object.defineProperty(EventHandler.prototype, "target", { - get: $util.oneOfGetter($oneOfFields = ["targetPage", "targetFlow"]), + get: $util.oneOfGetter($oneOfFields = ["targetPage", "targetFlow", "targetPlaybook"]), set: $util.oneOfSetter($oneOfFields) }); @@ -17453,6 +17594,8 @@ $root.google.cloud.dialogflow.cx.v3.Fulfillment.encode(message.triggerFulfillment, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.name); + if (message.targetPlaybook != null && Object.hasOwnProperty.call(message, "targetPlaybook")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.targetPlaybook); return writer; }; @@ -17509,6 +17652,10 @@ message.targetFlow = reader.string(); break; } + case 7: { + message.targetPlaybook = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -17568,6 +17715,13 @@ if (!$util.isString(message.targetFlow)) return "targetFlow: string expected"; } + if (message.targetPlaybook != null && message.hasOwnProperty("targetPlaybook")) { + if (properties.target === 1) + return "target: multiple values"; + properties.target = 1; + if (!$util.isString(message.targetPlaybook)) + return "targetPlaybook: string expected"; + } return null; }; @@ -17596,6 +17750,8 @@ message.targetPage = String(object.targetPage); if (object.targetFlow != null) message.targetFlow = String(object.targetFlow); + if (object.targetPlaybook != null) + message.targetPlaybook = String(object.targetPlaybook); return message; }; @@ -17633,6 +17789,11 @@ object.triggerFulfillment = $root.google.cloud.dialogflow.cx.v3.Fulfillment.toObject(message.triggerFulfillment, options); if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; + if (message.targetPlaybook != null && message.hasOwnProperty("targetPlaybook")) { + object.targetPlaybook = message.targetPlaybook; + if (options.oneofs) + object.target = "targetPlaybook"; + } return object; }; @@ -20947,6 +21108,7 @@ * @property {string|null} [documentTitle] SearchSnippet documentTitle * @property {string|null} [documentUri] SearchSnippet documentUri * @property {string|null} [text] SearchSnippet text + * @property {google.protobuf.IStruct|null} [metadata] SearchSnippet metadata */ /** @@ -20988,6 +21150,14 @@ */ SearchSnippet.prototype.text = ""; + /** + * SearchSnippet metadata. + * @member {google.protobuf.IStruct|null|undefined} metadata + * @memberof google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.SearchSnippet + * @instance + */ + SearchSnippet.prototype.metadata = null; + /** * Creates a new SearchSnippet instance using the specified properties. * @function create @@ -21018,6 +21188,8 @@ writer.uint32(/* id 2, wireType 2 =*/18).string(message.documentUri); if (message.text != null && Object.hasOwnProperty.call(message, "text")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.text); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.google.protobuf.Struct.encode(message.metadata, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; @@ -21066,6 +21238,10 @@ message.text = reader.string(); break; } + case 5: { + message.metadata = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -21110,6 +21286,11 @@ if (message.text != null && message.hasOwnProperty("text")) if (!$util.isString(message.text)) return "text: string expected"; + if (message.metadata != null && message.hasOwnProperty("metadata")) { + var error = $root.google.protobuf.Struct.verify(message.metadata); + if (error) + return "metadata." + error; + } return null; }; @@ -21131,6 +21312,11 @@ message.documentUri = String(object.documentUri); if (object.text != null) message.text = String(object.text); + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.SearchSnippet.metadata: object expected"); + message.metadata = $root.google.protobuf.Struct.fromObject(object.metadata); + } return message; }; @@ -21151,6 +21337,7 @@ object.documentTitle = ""; object.documentUri = ""; object.text = ""; + object.metadata = null; } if (message.documentTitle != null && message.hasOwnProperty("documentTitle")) object.documentTitle = message.documentTitle; @@ -21158,6 +21345,8 @@ object.documentUri = message.documentUri; if (message.text != null && message.hasOwnProperty("text")) object.text = message.text; + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.google.protobuf.Struct.toObject(message.metadata, options); return object; }; @@ -24376,6 +24565,7 @@ * @property {google.cloud.dialogflow.cx.v3.ResponseMessage.IMixedAudio|null} [mixedAudio] ResponseMessage mixedAudio * @property {google.cloud.dialogflow.cx.v3.ResponseMessage.ITelephonyTransferCall|null} [telephonyTransferCall] ResponseMessage telephonyTransferCall * @property {google.cloud.dialogflow.cx.v3.ResponseMessage.IKnowledgeInfoCard|null} [knowledgeInfoCard] ResponseMessage knowledgeInfoCard + * @property {google.cloud.dialogflow.cx.v3.IToolCall|null} [toolCall] ResponseMessage toolCall * @property {google.cloud.dialogflow.cx.v3.ResponseMessage.ResponseType|null} [responseType] ResponseMessage responseType * @property {string|null} [channel] ResponseMessage channel */ @@ -24475,6 +24665,14 @@ */ ResponseMessage.prototype.knowledgeInfoCard = null; + /** + * ResponseMessage toolCall. + * @member {google.cloud.dialogflow.cx.v3.IToolCall|null|undefined} toolCall + * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage + * @instance + */ + ResponseMessage.prototype.toolCall = null; + /** * ResponseMessage responseType. * @member {google.cloud.dialogflow.cx.v3.ResponseMessage.ResponseType} responseType @@ -24496,12 +24694,12 @@ /** * ResponseMessage message. - * @member {"text"|"payload"|"conversationSuccess"|"outputAudioText"|"liveAgentHandoff"|"endInteraction"|"playAudio"|"mixedAudio"|"telephonyTransferCall"|"knowledgeInfoCard"|undefined} message + * @member {"text"|"payload"|"conversationSuccess"|"outputAudioText"|"liveAgentHandoff"|"endInteraction"|"playAudio"|"mixedAudio"|"telephonyTransferCall"|"knowledgeInfoCard"|"toolCall"|undefined} message * @memberof google.cloud.dialogflow.cx.v3.ResponseMessage * @instance */ Object.defineProperty(ResponseMessage.prototype, "message", { - get: $util.oneOfGetter($oneOfFields = ["text", "payload", "conversationSuccess", "outputAudioText", "liveAgentHandoff", "endInteraction", "playAudio", "mixedAudio", "telephonyTransferCall", "knowledgeInfoCard"]), + get: $util.oneOfGetter($oneOfFields = ["text", "payload", "conversationSuccess", "outputAudioText", "liveAgentHandoff", "endInteraction", "playAudio", "mixedAudio", "telephonyTransferCall", "knowledgeInfoCard", "toolCall"]), set: $util.oneOfSetter($oneOfFields) }); @@ -24553,6 +24751,8 @@ writer.uint32(/* id 19, wireType 2 =*/154).string(message.channel); if (message.knowledgeInfoCard != null && Object.hasOwnProperty.call(message, "knowledgeInfoCard")) $root.google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard.encode(message.knowledgeInfoCard, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + if (message.toolCall != null && Object.hasOwnProperty.call(message, "toolCall")) + $root.google.cloud.dialogflow.cx.v3.ToolCall.encode(message.toolCall, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); return writer; }; @@ -24629,6 +24829,10 @@ message.knowledgeInfoCard = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard.decode(reader, reader.uint32()); break; } + case 22: { + message.toolCall = $root.google.cloud.dialogflow.cx.v3.ToolCall.decode(reader, reader.uint32()); + break; + } case 4: { message.responseType = reader.int32(); break; @@ -24771,6 +24975,16 @@ return "knowledgeInfoCard." + error; } } + if (message.toolCall != null && message.hasOwnProperty("toolCall")) { + if (properties.message === 1) + return "message: multiple values"; + properties.message = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3.ToolCall.verify(message.toolCall); + if (error) + return "toolCall." + error; + } + } if (message.responseType != null && message.hasOwnProperty("responseType")) switch (message.responseType) { default: @@ -24849,6 +25063,11 @@ throw TypeError(".google.cloud.dialogflow.cx.v3.ResponseMessage.knowledgeInfoCard: object expected"); message.knowledgeInfoCard = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.KnowledgeInfoCard.fromObject(object.knowledgeInfoCard); } + if (object.toolCall != null) { + if (typeof object.toolCall !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.ResponseMessage.toolCall: object expected"); + message.toolCall = $root.google.cloud.dialogflow.cx.v3.ToolCall.fromObject(object.toolCall); + } switch (object.responseType) { default: if (typeof object.responseType === "number") { @@ -24949,6 +25168,11 @@ if (options.oneofs) object.message = "knowledgeInfoCard"; } + if (message.toolCall != null && message.hasOwnProperty("toolCall")) { + object.toolCall = $root.google.cloud.dialogflow.cx.v3.ToolCall.toObject(message.toolCall, options); + if (options.oneofs) + object.message = "toolCall"; + } return object; }; @@ -27251,30 +27475,26 @@ return ResponseMessage; })(); - v3.ValidationMessage = (function() { + v3.ToolCall = (function() { /** - * Properties of a ValidationMessage. + * Properties of a ToolCall. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IValidationMessage - * @property {google.cloud.dialogflow.cx.v3.ValidationMessage.ResourceType|null} [resourceType] ValidationMessage resourceType - * @property {Array.|null} [resources] ValidationMessage resources - * @property {Array.|null} [resourceNames] ValidationMessage resourceNames - * @property {google.cloud.dialogflow.cx.v3.ValidationMessage.Severity|null} [severity] ValidationMessage severity - * @property {string|null} [detail] ValidationMessage detail + * @interface IToolCall + * @property {string|null} [tool] ToolCall tool + * @property {string|null} [action] ToolCall action + * @property {google.protobuf.IStruct|null} [inputParameters] ToolCall inputParameters */ /** - * Constructs a new ValidationMessage. + * Constructs a new ToolCall. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a ValidationMessage. - * @implements IValidationMessage + * @classdesc Represents a ToolCall. + * @implements IToolCall * @constructor - * @param {google.cloud.dialogflow.cx.v3.IValidationMessage=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IToolCall=} [properties] Properties to set */ - function ValidationMessage(properties) { - this.resources = []; - this.resourceNames = []; + function ToolCall(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -27282,139 +27502,105 @@ } /** - * ValidationMessage resourceType. - * @member {google.cloud.dialogflow.cx.v3.ValidationMessage.ResourceType} resourceType - * @memberof google.cloud.dialogflow.cx.v3.ValidationMessage - * @instance - */ - ValidationMessage.prototype.resourceType = 0; - - /** - * ValidationMessage resources. - * @member {Array.} resources - * @memberof google.cloud.dialogflow.cx.v3.ValidationMessage - * @instance - */ - ValidationMessage.prototype.resources = $util.emptyArray; - - /** - * ValidationMessage resourceNames. - * @member {Array.} resourceNames - * @memberof google.cloud.dialogflow.cx.v3.ValidationMessage + * ToolCall tool. + * @member {string} tool + * @memberof google.cloud.dialogflow.cx.v3.ToolCall * @instance */ - ValidationMessage.prototype.resourceNames = $util.emptyArray; + ToolCall.prototype.tool = ""; /** - * ValidationMessage severity. - * @member {google.cloud.dialogflow.cx.v3.ValidationMessage.Severity} severity - * @memberof google.cloud.dialogflow.cx.v3.ValidationMessage + * ToolCall action. + * @member {string} action + * @memberof google.cloud.dialogflow.cx.v3.ToolCall * @instance */ - ValidationMessage.prototype.severity = 0; + ToolCall.prototype.action = ""; /** - * ValidationMessage detail. - * @member {string} detail - * @memberof google.cloud.dialogflow.cx.v3.ValidationMessage + * ToolCall inputParameters. + * @member {google.protobuf.IStruct|null|undefined} inputParameters + * @memberof google.cloud.dialogflow.cx.v3.ToolCall * @instance */ - ValidationMessage.prototype.detail = ""; + ToolCall.prototype.inputParameters = null; /** - * Creates a new ValidationMessage instance using the specified properties. + * Creates a new ToolCall instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.ValidationMessage + * @memberof google.cloud.dialogflow.cx.v3.ToolCall * @static - * @param {google.cloud.dialogflow.cx.v3.IValidationMessage=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ValidationMessage} ValidationMessage instance + * @param {google.cloud.dialogflow.cx.v3.IToolCall=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ToolCall} ToolCall instance */ - ValidationMessage.create = function create(properties) { - return new ValidationMessage(properties); + ToolCall.create = function create(properties) { + return new ToolCall(properties); }; /** - * Encodes the specified ValidationMessage message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ValidationMessage.verify|verify} messages. + * Encodes the specified ToolCall message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ToolCall.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ValidationMessage + * @memberof google.cloud.dialogflow.cx.v3.ToolCall * @static - * @param {google.cloud.dialogflow.cx.v3.IValidationMessage} message ValidationMessage message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IToolCall} message ToolCall message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ValidationMessage.encode = function encode(message, writer) { + ToolCall.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.resourceType != null && Object.hasOwnProperty.call(message, "resourceType")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.resourceType); - if (message.resources != null && message.resources.length) - for (var i = 0; i < message.resources.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.resources[i]); - if (message.severity != null && Object.hasOwnProperty.call(message, "severity")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.severity); - if (message.detail != null && Object.hasOwnProperty.call(message, "detail")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.detail); - if (message.resourceNames != null && message.resourceNames.length) - for (var i = 0; i < message.resourceNames.length; ++i) - $root.google.cloud.dialogflow.cx.v3.ResourceName.encode(message.resourceNames[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.tool != null && Object.hasOwnProperty.call(message, "tool")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.tool); + if (message.action != null && Object.hasOwnProperty.call(message, "action")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.action); + if (message.inputParameters != null && Object.hasOwnProperty.call(message, "inputParameters")) + $root.google.protobuf.Struct.encode(message.inputParameters, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified ValidationMessage message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ValidationMessage.verify|verify} messages. + * Encodes the specified ToolCall message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ToolCall.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ValidationMessage + * @memberof google.cloud.dialogflow.cx.v3.ToolCall * @static - * @param {google.cloud.dialogflow.cx.v3.IValidationMessage} message ValidationMessage message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IToolCall} message ToolCall message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ValidationMessage.encodeDelimited = function encodeDelimited(message, writer) { + ToolCall.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ValidationMessage message from the specified reader or buffer. + * Decodes a ToolCall message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ValidationMessage + * @memberof google.cloud.dialogflow.cx.v3.ToolCall * @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.ValidationMessage} ValidationMessage + * @returns {google.cloud.dialogflow.cx.v3.ToolCall} ToolCall * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ValidationMessage.decode = function decode(reader, length, error) { + ToolCall.decode = function decode(reader, length, error) { 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.ValidationMessage(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ToolCall(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.resourceType = reader.int32(); + message.tool = reader.string(); break; } case 2: { - if (!(message.resources && message.resources.length)) - message.resources = []; - message.resources.push(reader.string()); - break; - } - case 6: { - if (!(message.resourceNames && message.resourceNames.length)) - message.resourceNames = []; - message.resourceNames.push($root.google.cloud.dialogflow.cx.v3.ResourceName.decode(reader, reader.uint32())); + message.action = reader.string(); break; } case 3: { - message.severity = reader.int32(); - break; - } - case 4: { - message.detail = reader.string(); + message.inputParameters = $root.google.protobuf.Struct.decode(reader, reader.uint32()); break; } default: @@ -27426,358 +27612,147 @@ }; /** - * Decodes a ValidationMessage message from the specified reader or buffer, length delimited. + * Decodes a ToolCall message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ValidationMessage + * @memberof google.cloud.dialogflow.cx.v3.ToolCall * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ValidationMessage} ValidationMessage + * @returns {google.cloud.dialogflow.cx.v3.ToolCall} ToolCall * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ValidationMessage.decodeDelimited = function decodeDelimited(reader) { + ToolCall.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ValidationMessage message. + * Verifies a ToolCall message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ValidationMessage + * @memberof google.cloud.dialogflow.cx.v3.ToolCall * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ValidationMessage.verify = function verify(message) { + ToolCall.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.resourceType != null && message.hasOwnProperty("resourceType")) - switch (message.resourceType) { - default: - return "resourceType: enum value expected"; - case 0: - case 1: - case 2: - case 8: - case 9: - case 10: - case 11: - case 3: - case 12: - case 4: - case 5: - case 6: - case 13: - case 7: - case 14: - break; - } - if (message.resources != null && message.hasOwnProperty("resources")) { - if (!Array.isArray(message.resources)) - return "resources: array expected"; - for (var i = 0; i < message.resources.length; ++i) - if (!$util.isString(message.resources[i])) - return "resources: string[] expected"; - } - if (message.resourceNames != null && message.hasOwnProperty("resourceNames")) { - if (!Array.isArray(message.resourceNames)) - return "resourceNames: array expected"; - for (var i = 0; i < message.resourceNames.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.ResourceName.verify(message.resourceNames[i]); - if (error) - return "resourceNames." + error; - } + if (message.tool != null && message.hasOwnProperty("tool")) + if (!$util.isString(message.tool)) + return "tool: string expected"; + if (message.action != null && message.hasOwnProperty("action")) + if (!$util.isString(message.action)) + return "action: string expected"; + if (message.inputParameters != null && message.hasOwnProperty("inputParameters")) { + var error = $root.google.protobuf.Struct.verify(message.inputParameters); + if (error) + return "inputParameters." + error; } - if (message.severity != null && message.hasOwnProperty("severity")) - switch (message.severity) { - default: - return "severity: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.detail != null && message.hasOwnProperty("detail")) - if (!$util.isString(message.detail)) - return "detail: string expected"; return null; }; /** - * Creates a ValidationMessage message from a plain object. Also converts values to their respective internal types. + * Creates a ToolCall message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ValidationMessage + * @memberof google.cloud.dialogflow.cx.v3.ToolCall * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ValidationMessage} ValidationMessage + * @returns {google.cloud.dialogflow.cx.v3.ToolCall} ToolCall */ - ValidationMessage.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ValidationMessage) + ToolCall.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ToolCall) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.ValidationMessage(); - switch (object.resourceType) { - default: - if (typeof object.resourceType === "number") { - message.resourceType = object.resourceType; - break; - } - break; - case "RESOURCE_TYPE_UNSPECIFIED": - case 0: - message.resourceType = 0; - break; - case "AGENT": - case 1: - message.resourceType = 1; - break; - case "INTENT": - case 2: - message.resourceType = 2; - break; - case "INTENT_TRAINING_PHRASE": - case 8: - message.resourceType = 8; - break; - case "INTENT_PARAMETER": - case 9: - message.resourceType = 9; - break; - case "INTENTS": - case 10: - message.resourceType = 10; - break; - case "INTENT_TRAINING_PHRASES": - case 11: - message.resourceType = 11; - break; - case "ENTITY_TYPE": - case 3: - message.resourceType = 3; - break; - case "ENTITY_TYPES": - case 12: - message.resourceType = 12; - break; - case "WEBHOOK": - case 4: - message.resourceType = 4; - break; - case "FLOW": - case 5: - message.resourceType = 5; - break; - case "PAGE": - case 6: - message.resourceType = 6; - break; - case "PAGES": - case 13: - message.resourceType = 13; - break; - case "TRANSITION_ROUTE_GROUP": - case 7: - message.resourceType = 7; - break; - case "AGENT_TRANSITION_ROUTE_GROUP": - case 14: - message.resourceType = 14; - break; + var message = new $root.google.cloud.dialogflow.cx.v3.ToolCall(); + if (object.tool != null) + message.tool = String(object.tool); + if (object.action != null) + message.action = String(object.action); + if (object.inputParameters != null) { + if (typeof object.inputParameters !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.ToolCall.inputParameters: object expected"); + message.inputParameters = $root.google.protobuf.Struct.fromObject(object.inputParameters); } - if (object.resources) { - if (!Array.isArray(object.resources)) - throw TypeError(".google.cloud.dialogflow.cx.v3.ValidationMessage.resources: array expected"); - message.resources = []; - for (var i = 0; i < object.resources.length; ++i) - message.resources[i] = String(object.resources[i]); - } - if (object.resourceNames) { - if (!Array.isArray(object.resourceNames)) - throw TypeError(".google.cloud.dialogflow.cx.v3.ValidationMessage.resourceNames: array expected"); - message.resourceNames = []; - for (var i = 0; i < object.resourceNames.length; ++i) { - if (typeof object.resourceNames[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.ValidationMessage.resourceNames: object expected"); - message.resourceNames[i] = $root.google.cloud.dialogflow.cx.v3.ResourceName.fromObject(object.resourceNames[i]); - } - } - switch (object.severity) { - default: - if (typeof object.severity === "number") { - message.severity = object.severity; - break; - } - break; - case "SEVERITY_UNSPECIFIED": - case 0: - message.severity = 0; - break; - case "INFO": - case 1: - message.severity = 1; - break; - case "WARNING": - case 2: - message.severity = 2; - break; - case "ERROR": - case 3: - message.severity = 3; - break; - } - if (object.detail != null) - message.detail = String(object.detail); - return message; - }; - - /** - * Creates a plain object from a ValidationMessage message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ValidationMessage - * @static - * @param {google.cloud.dialogflow.cx.v3.ValidationMessage} message ValidationMessage - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ValidationMessage.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.resources = []; - object.resourceNames = []; - } - if (options.defaults) { - object.resourceType = options.enums === String ? "RESOURCE_TYPE_UNSPECIFIED" : 0; - object.severity = options.enums === String ? "SEVERITY_UNSPECIFIED" : 0; - object.detail = ""; - } - if (message.resourceType != null && message.hasOwnProperty("resourceType")) - object.resourceType = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.ValidationMessage.ResourceType[message.resourceType] === undefined ? message.resourceType : $root.google.cloud.dialogflow.cx.v3.ValidationMessage.ResourceType[message.resourceType] : message.resourceType; - if (message.resources && message.resources.length) { - object.resources = []; - for (var j = 0; j < message.resources.length; ++j) - object.resources[j] = message.resources[j]; - } - if (message.severity != null && message.hasOwnProperty("severity")) - object.severity = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.ValidationMessage.Severity[message.severity] === undefined ? message.severity : $root.google.cloud.dialogflow.cx.v3.ValidationMessage.Severity[message.severity] : message.severity; - if (message.detail != null && message.hasOwnProperty("detail")) - object.detail = message.detail; - if (message.resourceNames && message.resourceNames.length) { - object.resourceNames = []; - for (var j = 0; j < message.resourceNames.length; ++j) - object.resourceNames[j] = $root.google.cloud.dialogflow.cx.v3.ResourceName.toObject(message.resourceNames[j], options); + return message; + }; + + /** + * Creates a plain object from a ToolCall message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.ToolCall + * @static + * @param {google.cloud.dialogflow.cx.v3.ToolCall} message ToolCall + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ToolCall.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.tool = ""; + object.action = ""; + object.inputParameters = null; } + if (message.tool != null && message.hasOwnProperty("tool")) + object.tool = message.tool; + if (message.action != null && message.hasOwnProperty("action")) + object.action = message.action; + if (message.inputParameters != null && message.hasOwnProperty("inputParameters")) + object.inputParameters = $root.google.protobuf.Struct.toObject(message.inputParameters, options); return object; }; /** - * Converts this ValidationMessage to JSON. + * Converts this ToolCall to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ValidationMessage + * @memberof google.cloud.dialogflow.cx.v3.ToolCall * @instance * @returns {Object.} JSON object */ - ValidationMessage.prototype.toJSON = function toJSON() { + ToolCall.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ValidationMessage + * Gets the default type url for ToolCall * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.ValidationMessage + * @memberof google.cloud.dialogflow.cx.v3.ToolCall * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ValidationMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ToolCall.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ValidationMessage"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ToolCall"; }; - /** - * ResourceType enum. - * @name google.cloud.dialogflow.cx.v3.ValidationMessage.ResourceType - * @enum {number} - * @property {number} RESOURCE_TYPE_UNSPECIFIED=0 RESOURCE_TYPE_UNSPECIFIED value - * @property {number} AGENT=1 AGENT value - * @property {number} INTENT=2 INTENT value - * @property {number} INTENT_TRAINING_PHRASE=8 INTENT_TRAINING_PHRASE value - * @property {number} INTENT_PARAMETER=9 INTENT_PARAMETER value - * @property {number} INTENTS=10 INTENTS value - * @property {number} INTENT_TRAINING_PHRASES=11 INTENT_TRAINING_PHRASES value - * @property {number} ENTITY_TYPE=3 ENTITY_TYPE value - * @property {number} ENTITY_TYPES=12 ENTITY_TYPES value - * @property {number} WEBHOOK=4 WEBHOOK value - * @property {number} FLOW=5 FLOW value - * @property {number} PAGE=6 PAGE value - * @property {number} PAGES=13 PAGES value - * @property {number} TRANSITION_ROUTE_GROUP=7 TRANSITION_ROUTE_GROUP value - * @property {number} AGENT_TRANSITION_ROUTE_GROUP=14 AGENT_TRANSITION_ROUTE_GROUP value - */ - ValidationMessage.ResourceType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "RESOURCE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "AGENT"] = 1; - values[valuesById[2] = "INTENT"] = 2; - values[valuesById[8] = "INTENT_TRAINING_PHRASE"] = 8; - values[valuesById[9] = "INTENT_PARAMETER"] = 9; - values[valuesById[10] = "INTENTS"] = 10; - values[valuesById[11] = "INTENT_TRAINING_PHRASES"] = 11; - values[valuesById[3] = "ENTITY_TYPE"] = 3; - values[valuesById[12] = "ENTITY_TYPES"] = 12; - values[valuesById[4] = "WEBHOOK"] = 4; - values[valuesById[5] = "FLOW"] = 5; - values[valuesById[6] = "PAGE"] = 6; - values[valuesById[13] = "PAGES"] = 13; - values[valuesById[7] = "TRANSITION_ROUTE_GROUP"] = 7; - values[valuesById[14] = "AGENT_TRANSITION_ROUTE_GROUP"] = 14; - return values; - })(); - - /** - * Severity enum. - * @name google.cloud.dialogflow.cx.v3.ValidationMessage.Severity - * @enum {number} - * @property {number} SEVERITY_UNSPECIFIED=0 SEVERITY_UNSPECIFIED value - * @property {number} INFO=1 INFO value - * @property {number} WARNING=2 WARNING value - * @property {number} ERROR=3 ERROR value - */ - ValidationMessage.Severity = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SEVERITY_UNSPECIFIED"] = 0; - values[valuesById[1] = "INFO"] = 1; - values[valuesById[2] = "WARNING"] = 2; - values[valuesById[3] = "ERROR"] = 3; - return values; - })(); - - return ValidationMessage; + return ToolCall; })(); - v3.ResourceName = (function() { + v3.ToolCallResult = (function() { /** - * Properties of a ResourceName. + * Properties of a ToolCallResult. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IResourceName - * @property {string|null} [name] ResourceName name - * @property {string|null} [displayName] ResourceName displayName + * @interface IToolCallResult + * @property {string|null} [tool] ToolCallResult tool + * @property {string|null} [action] ToolCallResult action + * @property {google.cloud.dialogflow.cx.v3.ToolCallResult.IError|null} [error] ToolCallResult error + * @property {google.protobuf.IStruct|null} [outputParameters] ToolCallResult outputParameters */ /** - * Constructs a new ResourceName. + * Constructs a new ToolCallResult. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a ResourceName. - * @implements IResourceName + * @classdesc Represents a ToolCallResult. + * @implements IToolCallResult * @constructor - * @param {google.cloud.dialogflow.cx.v3.IResourceName=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IToolCallResult=} [properties] Properties to set */ - function ResourceName(properties) { + function ToolCallResult(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -27785,91 +27760,133 @@ } /** - * ResourceName name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.ResourceName + * ToolCallResult tool. + * @member {string} tool + * @memberof google.cloud.dialogflow.cx.v3.ToolCallResult * @instance */ - ResourceName.prototype.name = ""; + ToolCallResult.prototype.tool = ""; /** - * ResourceName displayName. - * @member {string} displayName - * @memberof google.cloud.dialogflow.cx.v3.ResourceName + * ToolCallResult action. + * @member {string} action + * @memberof google.cloud.dialogflow.cx.v3.ToolCallResult * @instance */ - ResourceName.prototype.displayName = ""; + ToolCallResult.prototype.action = ""; /** - * Creates a new ResourceName instance using the specified properties. + * ToolCallResult error. + * @member {google.cloud.dialogflow.cx.v3.ToolCallResult.IError|null|undefined} error + * @memberof google.cloud.dialogflow.cx.v3.ToolCallResult + * @instance + */ + ToolCallResult.prototype.error = null; + + /** + * ToolCallResult outputParameters. + * @member {google.protobuf.IStruct|null|undefined} outputParameters + * @memberof google.cloud.dialogflow.cx.v3.ToolCallResult + * @instance + */ + ToolCallResult.prototype.outputParameters = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ToolCallResult result. + * @member {"error"|"outputParameters"|undefined} result + * @memberof google.cloud.dialogflow.cx.v3.ToolCallResult + * @instance + */ + Object.defineProperty(ToolCallResult.prototype, "result", { + get: $util.oneOfGetter($oneOfFields = ["error", "outputParameters"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ToolCallResult instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.ResourceName + * @memberof google.cloud.dialogflow.cx.v3.ToolCallResult * @static - * @param {google.cloud.dialogflow.cx.v3.IResourceName=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ResourceName} ResourceName instance + * @param {google.cloud.dialogflow.cx.v3.IToolCallResult=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ToolCallResult} ToolCallResult instance */ - ResourceName.create = function create(properties) { - return new ResourceName(properties); + ToolCallResult.create = function create(properties) { + return new ToolCallResult(properties); }; /** - * Encodes the specified ResourceName message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ResourceName.verify|verify} messages. + * Encodes the specified ToolCallResult message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ToolCallResult.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ResourceName + * @memberof google.cloud.dialogflow.cx.v3.ToolCallResult * @static - * @param {google.cloud.dialogflow.cx.v3.IResourceName} message ResourceName message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IToolCallResult} message ToolCallResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceName.encode = function encode(message, writer) { + ToolCallResult.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.tool != null && Object.hasOwnProperty.call(message, "tool")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.tool); + if (message.action != null && Object.hasOwnProperty.call(message, "action")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.action); + if (message.error != null && Object.hasOwnProperty.call(message, "error")) + $root.google.cloud.dialogflow.cx.v3.ToolCallResult.Error.encode(message.error, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.outputParameters != null && Object.hasOwnProperty.call(message, "outputParameters")) + $root.google.protobuf.Struct.encode(message.outputParameters, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified ResourceName message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ResourceName.verify|verify} messages. + * Encodes the specified ToolCallResult message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ToolCallResult.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ResourceName + * @memberof google.cloud.dialogflow.cx.v3.ToolCallResult * @static - * @param {google.cloud.dialogflow.cx.v3.IResourceName} message ResourceName message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IToolCallResult} message ToolCallResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceName.encodeDelimited = function encodeDelimited(message, writer) { + ToolCallResult.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ResourceName message from the specified reader or buffer. + * Decodes a ToolCallResult message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ResourceName + * @memberof google.cloud.dialogflow.cx.v3.ToolCallResult * @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.ResourceName} ResourceName + * @returns {google.cloud.dialogflow.cx.v3.ToolCallResult} ToolCallResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResourceName.decode = function decode(reader, length, error) { + ToolCallResult.decode = function decode(reader, length, error) { 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.ResourceName(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ToolCallResult(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.tool = reader.string(); break; } case 2: { - message.displayName = reader.string(); + message.action = reader.string(); + break; + } + case 3: { + message.error = $root.google.cloud.dialogflow.cx.v3.ToolCallResult.Error.decode(reader, reader.uint32()); + break; + } + case 4: { + message.outputParameters = $root.google.protobuf.Struct.decode(reader, reader.uint32()); break; } default: @@ -27881,269 +27898,498 @@ }; /** - * Decodes a ResourceName message from the specified reader or buffer, length delimited. + * Decodes a ToolCallResult message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ResourceName + * @memberof google.cloud.dialogflow.cx.v3.ToolCallResult * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ResourceName} ResourceName + * @returns {google.cloud.dialogflow.cx.v3.ToolCallResult} ToolCallResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResourceName.decodeDelimited = function decodeDelimited(reader) { + ToolCallResult.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ResourceName message. + * Verifies a ToolCallResult message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ResourceName + * @memberof google.cloud.dialogflow.cx.v3.ToolCallResult * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ResourceName.verify = function verify(message) { + ToolCallResult.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; + var properties = {}; + if (message.tool != null && message.hasOwnProperty("tool")) + if (!$util.isString(message.tool)) + return "tool: string expected"; + if (message.action != null && message.hasOwnProperty("action")) + if (!$util.isString(message.action)) + return "action: string expected"; + if (message.error != null && message.hasOwnProperty("error")) { + properties.result = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3.ToolCallResult.Error.verify(message.error); + if (error) + return "error." + error; + } + } + if (message.outputParameters != null && message.hasOwnProperty("outputParameters")) { + if (properties.result === 1) + return "result: multiple values"; + properties.result = 1; + { + var error = $root.google.protobuf.Struct.verify(message.outputParameters); + if (error) + return "outputParameters." + error; + } + } return null; }; /** - * Creates a ResourceName message from a plain object. Also converts values to their respective internal types. + * Creates a ToolCallResult message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ResourceName + * @memberof google.cloud.dialogflow.cx.v3.ToolCallResult * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ResourceName} ResourceName + * @returns {google.cloud.dialogflow.cx.v3.ToolCallResult} ToolCallResult */ - ResourceName.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ResourceName) + ToolCallResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ToolCallResult) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.ResourceName(); - if (object.name != null) - message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); + var message = new $root.google.cloud.dialogflow.cx.v3.ToolCallResult(); + if (object.tool != null) + message.tool = String(object.tool); + if (object.action != null) + message.action = String(object.action); + if (object.error != null) { + if (typeof object.error !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.ToolCallResult.error: object expected"); + message.error = $root.google.cloud.dialogflow.cx.v3.ToolCallResult.Error.fromObject(object.error); + } + if (object.outputParameters != null) { + if (typeof object.outputParameters !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.ToolCallResult.outputParameters: object expected"); + message.outputParameters = $root.google.protobuf.Struct.fromObject(object.outputParameters); + } return message; }; /** - * Creates a plain object from a ResourceName message. Also converts values to other types if specified. + * Creates a plain object from a ToolCallResult message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ResourceName + * @memberof google.cloud.dialogflow.cx.v3.ToolCallResult * @static - * @param {google.cloud.dialogflow.cx.v3.ResourceName} message ResourceName + * @param {google.cloud.dialogflow.cx.v3.ToolCallResult} message ToolCallResult * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResourceName.toObject = function toObject(message, options) { + ToolCallResult.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; - object.displayName = ""; + object.tool = ""; + object.action = ""; + } + if (message.tool != null && message.hasOwnProperty("tool")) + object.tool = message.tool; + if (message.action != null && message.hasOwnProperty("action")) + object.action = message.action; + if (message.error != null && message.hasOwnProperty("error")) { + object.error = $root.google.cloud.dialogflow.cx.v3.ToolCallResult.Error.toObject(message.error, options); + if (options.oneofs) + object.result = "error"; + } + if (message.outputParameters != null && message.hasOwnProperty("outputParameters")) { + object.outputParameters = $root.google.protobuf.Struct.toObject(message.outputParameters, options); + if (options.oneofs) + object.result = "outputParameters"; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; return object; }; /** - * Converts this ResourceName to JSON. + * Converts this ToolCallResult to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ResourceName + * @memberof google.cloud.dialogflow.cx.v3.ToolCallResult * @instance * @returns {Object.} JSON object */ - ResourceName.prototype.toJSON = function toJSON() { + ToolCallResult.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ResourceName + * Gets the default type url for ToolCallResult * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.ResourceName + * @memberof google.cloud.dialogflow.cx.v3.ToolCallResult * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ResourceName.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ToolCallResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ResourceName"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ToolCallResult"; }; - return ResourceName; - })(); - - v3.GenerativeSettings = (function() { + ToolCallResult.Error = (function() { - /** - * Properties of a GenerativeSettings. - * @memberof google.cloud.dialogflow.cx.v3 - * @interface IGenerativeSettings - * @property {string|null} [name] GenerativeSettings name - * @property {google.cloud.dialogflow.cx.v3.GenerativeSettings.IFallbackSettings|null} [fallbackSettings] GenerativeSettings fallbackSettings - * @property {google.cloud.dialogflow.cx.v3.ISafetySettings|null} [generativeSafetySettings] GenerativeSettings generativeSafetySettings - * @property {google.cloud.dialogflow.cx.v3.GenerativeSettings.IKnowledgeConnectorSettings|null} [knowledgeConnectorSettings] GenerativeSettings knowledgeConnectorSettings - * @property {string|null} [languageCode] GenerativeSettings languageCode - */ + /** + * Properties of an Error. + * @memberof google.cloud.dialogflow.cx.v3.ToolCallResult + * @interface IError + * @property {string|null} [message] Error message + */ - /** - * Constructs a new GenerativeSettings. - * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a GenerativeSettings. - * @implements IGenerativeSettings - * @constructor - * @param {google.cloud.dialogflow.cx.v3.IGenerativeSettings=} [properties] Properties to set - */ - function GenerativeSettings(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]]; - } + /** + * Constructs a new Error. + * @memberof google.cloud.dialogflow.cx.v3.ToolCallResult + * @classdesc Represents an Error. + * @implements IError + * @constructor + * @param {google.cloud.dialogflow.cx.v3.ToolCallResult.IError=} [properties] Properties to set + */ + function Error(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]]; + } - /** - * GenerativeSettings name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings - * @instance - */ - GenerativeSettings.prototype.name = ""; + /** + * Error message. + * @member {string} message + * @memberof google.cloud.dialogflow.cx.v3.ToolCallResult.Error + * @instance + */ + Error.prototype.message = ""; - /** - * GenerativeSettings fallbackSettings. - * @member {google.cloud.dialogflow.cx.v3.GenerativeSettings.IFallbackSettings|null|undefined} fallbackSettings - * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings - * @instance - */ - GenerativeSettings.prototype.fallbackSettings = null; + /** + * Creates a new Error instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.ToolCallResult.Error + * @static + * @param {google.cloud.dialogflow.cx.v3.ToolCallResult.IError=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ToolCallResult.Error} Error instance + */ + Error.create = function create(properties) { + return new Error(properties); + }; - /** - * GenerativeSettings generativeSafetySettings. - * @member {google.cloud.dialogflow.cx.v3.ISafetySettings|null|undefined} generativeSafetySettings - * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings - * @instance - */ - GenerativeSettings.prototype.generativeSafetySettings = null; + /** + * Encodes the specified Error message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ToolCallResult.Error.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.ToolCallResult.Error + * @static + * @param {google.cloud.dialogflow.cx.v3.ToolCallResult.IError} message Error message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Error.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.message); + return writer; + }; - /** - * GenerativeSettings knowledgeConnectorSettings. - * @member {google.cloud.dialogflow.cx.v3.GenerativeSettings.IKnowledgeConnectorSettings|null|undefined} knowledgeConnectorSettings - * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings - * @instance - */ - GenerativeSettings.prototype.knowledgeConnectorSettings = null; + /** + * Encodes the specified Error message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ToolCallResult.Error.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.ToolCallResult.Error + * @static + * @param {google.cloud.dialogflow.cx.v3.ToolCallResult.IError} message Error message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Error.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * GenerativeSettings languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings - * @instance - */ - GenerativeSettings.prototype.languageCode = ""; + /** + * Decodes an Error message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.ToolCallResult.Error + * @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.ToolCallResult.Error} Error + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Error.decode = function decode(reader, length, error) { + 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.ToolCallResult.Error(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.message = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Creates a new GenerativeSettings instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings - * @static - * @param {google.cloud.dialogflow.cx.v3.IGenerativeSettings=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.GenerativeSettings} GenerativeSettings instance - */ - GenerativeSettings.create = function create(properties) { - return new GenerativeSettings(properties); + /** + * Decodes an Error message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.ToolCallResult.Error + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.ToolCallResult.Error} Error + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Error.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Error message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.ToolCallResult.Error + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Error.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + return null; + }; + + /** + * Creates an Error message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.ToolCallResult.Error + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.ToolCallResult.Error} Error + */ + Error.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ToolCallResult.Error) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.ToolCallResult.Error(); + if (object.message != null) + message.message = String(object.message); + return message; + }; + + /** + * Creates a plain object from an Error message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.ToolCallResult.Error + * @static + * @param {google.cloud.dialogflow.cx.v3.ToolCallResult.Error} message Error + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Error.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.message = ""; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + return object; + }; + + /** + * Converts this Error to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.ToolCallResult.Error + * @instance + * @returns {Object.} JSON object + */ + Error.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Error + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.ToolCallResult.Error + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Error.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ToolCallResult.Error"; + }; + + return Error; + })(); + + return ToolCallResult; + })(); + + v3.ParameterDefinition = (function() { + + /** + * Properties of a ParameterDefinition. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IParameterDefinition + * @property {string|null} [name] ParameterDefinition name + * @property {google.cloud.dialogflow.cx.v3.ParameterDefinition.ParameterType|null} [type] ParameterDefinition type + * @property {google.cloud.dialogflow.cx.v3.ITypeSchema|null} [typeSchema] ParameterDefinition typeSchema + * @property {string|null} [description] ParameterDefinition description + */ + + /** + * Constructs a new ParameterDefinition. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a ParameterDefinition. + * @implements IParameterDefinition + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IParameterDefinition=} [properties] Properties to set + */ + function ParameterDefinition(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]]; + } + + /** + * ParameterDefinition name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.ParameterDefinition + * @instance + */ + ParameterDefinition.prototype.name = ""; + + /** + * ParameterDefinition type. + * @member {google.cloud.dialogflow.cx.v3.ParameterDefinition.ParameterType} type + * @memberof google.cloud.dialogflow.cx.v3.ParameterDefinition + * @instance + */ + ParameterDefinition.prototype.type = 0; + + /** + * ParameterDefinition typeSchema. + * @member {google.cloud.dialogflow.cx.v3.ITypeSchema|null|undefined} typeSchema + * @memberof google.cloud.dialogflow.cx.v3.ParameterDefinition + * @instance + */ + ParameterDefinition.prototype.typeSchema = null; + + /** + * ParameterDefinition description. + * @member {string} description + * @memberof google.cloud.dialogflow.cx.v3.ParameterDefinition + * @instance + */ + ParameterDefinition.prototype.description = ""; + + /** + * Creates a new ParameterDefinition instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.ParameterDefinition + * @static + * @param {google.cloud.dialogflow.cx.v3.IParameterDefinition=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ParameterDefinition} ParameterDefinition instance + */ + ParameterDefinition.create = function create(properties) { + return new ParameterDefinition(properties); }; /** - * Encodes the specified GenerativeSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GenerativeSettings.verify|verify} messages. + * Encodes the specified ParameterDefinition message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ParameterDefinition.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings + * @memberof google.cloud.dialogflow.cx.v3.ParameterDefinition * @static - * @param {google.cloud.dialogflow.cx.v3.IGenerativeSettings} message GenerativeSettings message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IParameterDefinition} message ParameterDefinition message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GenerativeSettings.encode = function encode(message, writer) { + ParameterDefinition.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.fallbackSettings != null && Object.hasOwnProperty.call(message, "fallbackSettings")) - $root.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.encode(message.fallbackSettings, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.generativeSafetySettings != null && Object.hasOwnProperty.call(message, "generativeSafetySettings")) - $root.google.cloud.dialogflow.cx.v3.SafetySettings.encode(message.generativeSafetySettings, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.languageCode); if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.name); - if (message.knowledgeConnectorSettings != null && Object.hasOwnProperty.call(message, "knowledgeConnectorSettings")) - $root.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings.encode(message.knowledgeConnectorSettings, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.typeSchema != null && Object.hasOwnProperty.call(message, "typeSchema")) + $root.google.cloud.dialogflow.cx.v3.TypeSchema.encode(message.typeSchema, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified GenerativeSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GenerativeSettings.verify|verify} messages. + * Encodes the specified ParameterDefinition message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ParameterDefinition.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings + * @memberof google.cloud.dialogflow.cx.v3.ParameterDefinition * @static - * @param {google.cloud.dialogflow.cx.v3.IGenerativeSettings} message GenerativeSettings message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IParameterDefinition} message ParameterDefinition message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GenerativeSettings.encodeDelimited = function encodeDelimited(message, writer) { + ParameterDefinition.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GenerativeSettings message from the specified reader or buffer. + * Decodes a ParameterDefinition message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings + * @memberof google.cloud.dialogflow.cx.v3.ParameterDefinition * @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.GenerativeSettings} GenerativeSettings + * @returns {google.cloud.dialogflow.cx.v3.ParameterDefinition} ParameterDefinition * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GenerativeSettings.decode = function decode(reader, length, error) { + ParameterDefinition.decode = function decode(reader, length, error) { 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.GenerativeSettings(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ParameterDefinition(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { - case 5: { - message.name = reader.string(); - break; - } case 1: { - message.fallbackSettings = $root.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.decode(reader, reader.uint32()); + message.name = reader.string(); break; } - case 3: { - message.generativeSafetySettings = $root.google.cloud.dialogflow.cx.v3.SafetySettings.decode(reader, reader.uint32()); + case 2: { + message.type = reader.int32(); break; } - case 7: { - message.knowledgeConnectorSettings = $root.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings.decode(reader, reader.uint32()); + case 4: { + message.typeSchema = $root.google.cloud.dialogflow.cx.v3.TypeSchema.decode(reader, reader.uint32()); break; } - case 4: { - message.languageCode = reader.string(); + case 3: { + message.description = reader.string(); break; } default: @@ -28155,1075 +28401,1147 @@ }; /** - * Decodes a GenerativeSettings message from the specified reader or buffer, length delimited. + * Decodes a ParameterDefinition message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings + * @memberof google.cloud.dialogflow.cx.v3.ParameterDefinition * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.GenerativeSettings} GenerativeSettings + * @returns {google.cloud.dialogflow.cx.v3.ParameterDefinition} ParameterDefinition * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GenerativeSettings.decodeDelimited = function decodeDelimited(reader) { + ParameterDefinition.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GenerativeSettings message. + * Verifies a ParameterDefinition message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings + * @memberof google.cloud.dialogflow.cx.v3.ParameterDefinition * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GenerativeSettings.verify = function verify(message) { + ParameterDefinition.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.fallbackSettings != null && message.hasOwnProperty("fallbackSettings")) { - var error = $root.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.verify(message.fallbackSettings); - if (error) - return "fallbackSettings." + error; - } - if (message.generativeSafetySettings != null && message.hasOwnProperty("generativeSafetySettings")) { - var error = $root.google.cloud.dialogflow.cx.v3.SafetySettings.verify(message.generativeSafetySettings); - if (error) - return "generativeSafetySettings." + error; - } - if (message.knowledgeConnectorSettings != null && message.hasOwnProperty("knowledgeConnectorSettings")) { - var error = $root.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings.verify(message.knowledgeConnectorSettings); + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + if (message.typeSchema != null && message.hasOwnProperty("typeSchema")) { + var error = $root.google.cloud.dialogflow.cx.v3.TypeSchema.verify(message.typeSchema); if (error) - return "knowledgeConnectorSettings." + error; + return "typeSchema." + error; } - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; return null; }; /** - * Creates a GenerativeSettings message from a plain object. Also converts values to their respective internal types. + * Creates a ParameterDefinition message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings + * @memberof google.cloud.dialogflow.cx.v3.ParameterDefinition * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.GenerativeSettings} GenerativeSettings + * @returns {google.cloud.dialogflow.cx.v3.ParameterDefinition} ParameterDefinition */ - GenerativeSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.GenerativeSettings) + ParameterDefinition.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ParameterDefinition) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.GenerativeSettings(); + var message = new $root.google.cloud.dialogflow.cx.v3.ParameterDefinition(); if (object.name != null) message.name = String(object.name); - if (object.fallbackSettings != null) { - if (typeof object.fallbackSettings !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.GenerativeSettings.fallbackSettings: object expected"); - message.fallbackSettings = $root.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.fromObject(object.fallbackSettings); - } - if (object.generativeSafetySettings != null) { - if (typeof object.generativeSafetySettings !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.GenerativeSettings.generativeSafetySettings: object expected"); - message.generativeSafetySettings = $root.google.cloud.dialogflow.cx.v3.SafetySettings.fromObject(object.generativeSafetySettings); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "PARAMETER_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "STRING": + case 1: + message.type = 1; + break; + case "NUMBER": + case 2: + message.type = 2; + break; + case "BOOLEAN": + case 3: + message.type = 3; + break; + case "NULL": + case 4: + message.type = 4; + break; + case "OBJECT": + case 5: + message.type = 5; + break; + case "LIST": + case 6: + message.type = 6; + break; } - if (object.knowledgeConnectorSettings != null) { - if (typeof object.knowledgeConnectorSettings !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.GenerativeSettings.knowledgeConnectorSettings: object expected"); - message.knowledgeConnectorSettings = $root.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings.fromObject(object.knowledgeConnectorSettings); + if (object.typeSchema != null) { + if (typeof object.typeSchema !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.ParameterDefinition.typeSchema: object expected"); + message.typeSchema = $root.google.cloud.dialogflow.cx.v3.TypeSchema.fromObject(object.typeSchema); } - if (object.languageCode != null) - message.languageCode = String(object.languageCode); + if (object.description != null) + message.description = String(object.description); return message; }; /** - * Creates a plain object from a GenerativeSettings message. Also converts values to other types if specified. + * Creates a plain object from a ParameterDefinition message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings + * @memberof google.cloud.dialogflow.cx.v3.ParameterDefinition * @static - * @param {google.cloud.dialogflow.cx.v3.GenerativeSettings} message GenerativeSettings + * @param {google.cloud.dialogflow.cx.v3.ParameterDefinition} message ParameterDefinition * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GenerativeSettings.toObject = function toObject(message, options) { + ParameterDefinition.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.fallbackSettings = null; - object.generativeSafetySettings = null; - object.languageCode = ""; object.name = ""; - object.knowledgeConnectorSettings = null; + object.type = options.enums === String ? "PARAMETER_TYPE_UNSPECIFIED" : 0; + object.description = ""; + object.typeSchema = null; } - if (message.fallbackSettings != null && message.hasOwnProperty("fallbackSettings")) - object.fallbackSettings = $root.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.toObject(message.fallbackSettings, options); - if (message.generativeSafetySettings != null && message.hasOwnProperty("generativeSafetySettings")) - object.generativeSafetySettings = $root.google.cloud.dialogflow.cx.v3.SafetySettings.toObject(message.generativeSafetySettings, options); - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.knowledgeConnectorSettings != null && message.hasOwnProperty("knowledgeConnectorSettings")) - object.knowledgeConnectorSettings = $root.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings.toObject(message.knowledgeConnectorSettings, options); + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.ParameterDefinition.ParameterType[message.type] === undefined ? message.type : $root.google.cloud.dialogflow.cx.v3.ParameterDefinition.ParameterType[message.type] : message.type; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.typeSchema != null && message.hasOwnProperty("typeSchema")) + object.typeSchema = $root.google.cloud.dialogflow.cx.v3.TypeSchema.toObject(message.typeSchema, options); return object; }; /** - * Converts this GenerativeSettings to JSON. + * Converts this ParameterDefinition to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings + * @memberof google.cloud.dialogflow.cx.v3.ParameterDefinition * @instance * @returns {Object.} JSON object */ - GenerativeSettings.prototype.toJSON = function toJSON() { + ParameterDefinition.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GenerativeSettings + * Gets the default type url for ParameterDefinition * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings + * @memberof google.cloud.dialogflow.cx.v3.ParameterDefinition * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GenerativeSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ParameterDefinition.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.GenerativeSettings"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ParameterDefinition"; }; - GenerativeSettings.FallbackSettings = (function() { - - /** - * Properties of a FallbackSettings. - * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings - * @interface IFallbackSettings - * @property {string|null} [selectedPrompt] FallbackSettings selectedPrompt - * @property {Array.|null} [promptTemplates] FallbackSettings promptTemplates - */ + /** + * ParameterType enum. + * @name google.cloud.dialogflow.cx.v3.ParameterDefinition.ParameterType + * @enum {number} + * @property {number} PARAMETER_TYPE_UNSPECIFIED=0 PARAMETER_TYPE_UNSPECIFIED value + * @property {number} STRING=1 STRING value + * @property {number} NUMBER=2 NUMBER value + * @property {number} BOOLEAN=3 BOOLEAN value + * @property {number} NULL=4 NULL value + * @property {number} OBJECT=5 OBJECT value + * @property {number} LIST=6 LIST value + */ + ParameterDefinition.ParameterType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PARAMETER_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "STRING"] = 1; + values[valuesById[2] = "NUMBER"] = 2; + values[valuesById[3] = "BOOLEAN"] = 3; + values[valuesById[4] = "NULL"] = 4; + values[valuesById[5] = "OBJECT"] = 5; + values[valuesById[6] = "LIST"] = 6; + return values; + })(); - /** - * Constructs a new FallbackSettings. - * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings - * @classdesc Represents a FallbackSettings. - * @implements IFallbackSettings - * @constructor - * @param {google.cloud.dialogflow.cx.v3.GenerativeSettings.IFallbackSettings=} [properties] Properties to set - */ - function FallbackSettings(properties) { - this.promptTemplates = []; - 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]]; - } + return ParameterDefinition; + })(); - /** - * FallbackSettings selectedPrompt. - * @member {string} selectedPrompt - * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings - * @instance - */ - FallbackSettings.prototype.selectedPrompt = ""; + v3.TypeSchema = (function() { - /** - * FallbackSettings promptTemplates. - * @member {Array.} promptTemplates - * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings - * @instance - */ - FallbackSettings.prototype.promptTemplates = $util.emptyArray; + /** + * Properties of a TypeSchema. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface ITypeSchema + * @property {google.cloud.dialogflow.cx.v3.IInlineSchema|null} [inlineSchema] TypeSchema inlineSchema + * @property {google.cloud.dialogflow.cx.v3.TypeSchema.ISchemaReference|null} [schemaReference] TypeSchema schemaReference + */ - /** - * Creates a new FallbackSettings instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings - * @static - * @param {google.cloud.dialogflow.cx.v3.GenerativeSettings.IFallbackSettings=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings} FallbackSettings instance - */ - FallbackSettings.create = function create(properties) { - return new FallbackSettings(properties); - }; + /** + * Constructs a new TypeSchema. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a TypeSchema. + * @implements ITypeSchema + * @constructor + * @param {google.cloud.dialogflow.cx.v3.ITypeSchema=} [properties] Properties to set + */ + function TypeSchema(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]]; + } - /** - * Encodes the specified FallbackSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings - * @static - * @param {google.cloud.dialogflow.cx.v3.GenerativeSettings.IFallbackSettings} message FallbackSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FallbackSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.selectedPrompt != null && Object.hasOwnProperty.call(message, "selectedPrompt")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.selectedPrompt); - if (message.promptTemplates != null && message.promptTemplates.length) - for (var i = 0; i < message.promptTemplates.length; ++i) - $root.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate.encode(message.promptTemplates[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; + /** + * TypeSchema inlineSchema. + * @member {google.cloud.dialogflow.cx.v3.IInlineSchema|null|undefined} inlineSchema + * @memberof google.cloud.dialogflow.cx.v3.TypeSchema + * @instance + */ + TypeSchema.prototype.inlineSchema = null; - /** - * Encodes the specified FallbackSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings - * @static - * @param {google.cloud.dialogflow.cx.v3.GenerativeSettings.IFallbackSettings} message FallbackSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FallbackSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * TypeSchema schemaReference. + * @member {google.cloud.dialogflow.cx.v3.TypeSchema.ISchemaReference|null|undefined} schemaReference + * @memberof google.cloud.dialogflow.cx.v3.TypeSchema + * @instance + */ + TypeSchema.prototype.schemaReference = null; - /** - * Decodes a FallbackSettings message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings - * @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.GenerativeSettings.FallbackSettings} FallbackSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FallbackSettings.decode = function decode(reader, length, error) { - 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.GenerativeSettings.FallbackSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 3: { - message.selectedPrompt = reader.string(); - break; - } - case 4: { - if (!(message.promptTemplates && message.promptTemplates.length)) - message.promptTemplates = []; - message.promptTemplates.push($root.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * Decodes a FallbackSettings message from the specified reader or buffer, length delimited. + /** + * TypeSchema schema. + * @member {"inlineSchema"|"schemaReference"|undefined} schema + * @memberof google.cloud.dialogflow.cx.v3.TypeSchema + * @instance + */ + Object.defineProperty(TypeSchema.prototype, "schema", { + get: $util.oneOfGetter($oneOfFields = ["inlineSchema", "schemaReference"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new TypeSchema instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.TypeSchema + * @static + * @param {google.cloud.dialogflow.cx.v3.ITypeSchema=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.TypeSchema} TypeSchema instance + */ + TypeSchema.create = function create(properties) { + return new TypeSchema(properties); + }; + + /** + * Encodes the specified TypeSchema message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TypeSchema.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.TypeSchema + * @static + * @param {google.cloud.dialogflow.cx.v3.ITypeSchema} message TypeSchema message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TypeSchema.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.inlineSchema != null && Object.hasOwnProperty.call(message, "inlineSchema")) + $root.google.cloud.dialogflow.cx.v3.InlineSchema.encode(message.inlineSchema, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.schemaReference != null && Object.hasOwnProperty.call(message, "schemaReference")) + $root.google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference.encode(message.schemaReference, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TypeSchema message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TypeSchema.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.TypeSchema + * @static + * @param {google.cloud.dialogflow.cx.v3.ITypeSchema} message TypeSchema message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TypeSchema.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TypeSchema message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.TypeSchema + * @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.TypeSchema} TypeSchema + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TypeSchema.decode = function decode(reader, length, error) { + 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.TypeSchema(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.inlineSchema = $root.google.cloud.dialogflow.cx.v3.InlineSchema.decode(reader, reader.uint32()); + break; + } + case 2: { + message.schemaReference = $root.google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TypeSchema message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.TypeSchema + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.TypeSchema} TypeSchema + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TypeSchema.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TypeSchema message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.TypeSchema + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TypeSchema.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.inlineSchema != null && message.hasOwnProperty("inlineSchema")) { + properties.schema = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3.InlineSchema.verify(message.inlineSchema); + if (error) + return "inlineSchema." + error; + } + } + if (message.schemaReference != null && message.hasOwnProperty("schemaReference")) { + if (properties.schema === 1) + return "schema: multiple values"; + properties.schema = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference.verify(message.schemaReference); + if (error) + return "schemaReference." + error; + } + } + return null; + }; + + /** + * Creates a TypeSchema message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.TypeSchema + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.TypeSchema} TypeSchema + */ + TypeSchema.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.TypeSchema) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.TypeSchema(); + if (object.inlineSchema != null) { + if (typeof object.inlineSchema !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.TypeSchema.inlineSchema: object expected"); + message.inlineSchema = $root.google.cloud.dialogflow.cx.v3.InlineSchema.fromObject(object.inlineSchema); + } + if (object.schemaReference != null) { + if (typeof object.schemaReference !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.TypeSchema.schemaReference: object expected"); + message.schemaReference = $root.google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference.fromObject(object.schemaReference); + } + return message; + }; + + /** + * Creates a plain object from a TypeSchema message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.TypeSchema + * @static + * @param {google.cloud.dialogflow.cx.v3.TypeSchema} message TypeSchema + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TypeSchema.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.inlineSchema != null && message.hasOwnProperty("inlineSchema")) { + object.inlineSchema = $root.google.cloud.dialogflow.cx.v3.InlineSchema.toObject(message.inlineSchema, options); + if (options.oneofs) + object.schema = "inlineSchema"; + } + if (message.schemaReference != null && message.hasOwnProperty("schemaReference")) { + object.schemaReference = $root.google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference.toObject(message.schemaReference, options); + if (options.oneofs) + object.schema = "schemaReference"; + } + return object; + }; + + /** + * Converts this TypeSchema to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.TypeSchema + * @instance + * @returns {Object.} JSON object + */ + TypeSchema.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TypeSchema + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.TypeSchema + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TypeSchema.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.TypeSchema"; + }; + + TypeSchema.SchemaReference = (function() { + + /** + * Properties of a SchemaReference. + * @memberof google.cloud.dialogflow.cx.v3.TypeSchema + * @interface ISchemaReference + * @property {string|null} [tool] SchemaReference tool + * @property {string|null} [schema] SchemaReference schema + */ + + /** + * Constructs a new SchemaReference. + * @memberof google.cloud.dialogflow.cx.v3.TypeSchema + * @classdesc Represents a SchemaReference. + * @implements ISchemaReference + * @constructor + * @param {google.cloud.dialogflow.cx.v3.TypeSchema.ISchemaReference=} [properties] Properties to set + */ + function SchemaReference(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]]; + } + + /** + * SchemaReference tool. + * @member {string} tool + * @memberof google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference + * @instance + */ + SchemaReference.prototype.tool = ""; + + /** + * SchemaReference schema. + * @member {string} schema + * @memberof google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference + * @instance + */ + SchemaReference.prototype.schema = ""; + + /** + * Creates a new SchemaReference instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference + * @static + * @param {google.cloud.dialogflow.cx.v3.TypeSchema.ISchemaReference=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference} SchemaReference instance + */ + SchemaReference.create = function create(properties) { + return new SchemaReference(properties); + }; + + /** + * Encodes the specified SchemaReference message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference + * @static + * @param {google.cloud.dialogflow.cx.v3.TypeSchema.ISchemaReference} message SchemaReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SchemaReference.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tool != null && Object.hasOwnProperty.call(message, "tool")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.tool); + if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.schema); + return writer; + }; + + /** + * Encodes the specified SchemaReference message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference + * @static + * @param {google.cloud.dialogflow.cx.v3.TypeSchema.ISchemaReference} message SchemaReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SchemaReference.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SchemaReference message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference + * @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.TypeSchema.SchemaReference} SchemaReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SchemaReference.decode = function decode(reader, length, error) { + 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.TypeSchema.SchemaReference(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.tool = reader.string(); + break; + } + case 2: { + message.schema = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SchemaReference message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings + * @memberof google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings} FallbackSettings + * @returns {google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference} SchemaReference * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FallbackSettings.decodeDelimited = function decodeDelimited(reader) { + SchemaReference.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FallbackSettings message. + * Verifies a SchemaReference message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings + * @memberof google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FallbackSettings.verify = function verify(message) { + SchemaReference.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.selectedPrompt != null && message.hasOwnProperty("selectedPrompt")) - if (!$util.isString(message.selectedPrompt)) - return "selectedPrompt: string expected"; - if (message.promptTemplates != null && message.hasOwnProperty("promptTemplates")) { - if (!Array.isArray(message.promptTemplates)) - return "promptTemplates: array expected"; - for (var i = 0; i < message.promptTemplates.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate.verify(message.promptTemplates[i]); - if (error) - return "promptTemplates." + error; - } - } + if (message.tool != null && message.hasOwnProperty("tool")) + if (!$util.isString(message.tool)) + return "tool: string expected"; + if (message.schema != null && message.hasOwnProperty("schema")) + if (!$util.isString(message.schema)) + return "schema: string expected"; return null; }; /** - * Creates a FallbackSettings message from a plain object. Also converts values to their respective internal types. + * Creates a SchemaReference message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings + * @memberof google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings} FallbackSettings + * @returns {google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference} SchemaReference */ - FallbackSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings) + SchemaReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings(); - if (object.selectedPrompt != null) - message.selectedPrompt = String(object.selectedPrompt); - if (object.promptTemplates) { - if (!Array.isArray(object.promptTemplates)) - throw TypeError(".google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.promptTemplates: array expected"); - message.promptTemplates = []; - for (var i = 0; i < object.promptTemplates.length; ++i) { - if (typeof object.promptTemplates[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.promptTemplates: object expected"); - message.promptTemplates[i] = $root.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate.fromObject(object.promptTemplates[i]); - } - } + var message = new $root.google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference(); + if (object.tool != null) + message.tool = String(object.tool); + if (object.schema != null) + message.schema = String(object.schema); return message; }; /** - * Creates a plain object from a FallbackSettings message. Also converts values to other types if specified. + * Creates a plain object from a SchemaReference message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings + * @memberof google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference * @static - * @param {google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings} message FallbackSettings + * @param {google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference} message SchemaReference * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FallbackSettings.toObject = function toObject(message, options) { + SchemaReference.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.promptTemplates = []; - if (options.defaults) - object.selectedPrompt = ""; - if (message.selectedPrompt != null && message.hasOwnProperty("selectedPrompt")) - object.selectedPrompt = message.selectedPrompt; - if (message.promptTemplates && message.promptTemplates.length) { - object.promptTemplates = []; - for (var j = 0; j < message.promptTemplates.length; ++j) - object.promptTemplates[j] = $root.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate.toObject(message.promptTemplates[j], options); + if (options.defaults) { + object.tool = ""; + object.schema = ""; } + if (message.tool != null && message.hasOwnProperty("tool")) + object.tool = message.tool; + if (message.schema != null && message.hasOwnProperty("schema")) + object.schema = message.schema; return object; }; /** - * Converts this FallbackSettings to JSON. + * Converts this SchemaReference to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings + * @memberof google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference * @instance * @returns {Object.} JSON object */ - FallbackSettings.prototype.toJSON = function toJSON() { + SchemaReference.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for FallbackSettings + * Gets the default type url for SchemaReference * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings + * @memberof google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - FallbackSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SchemaReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.TypeSchema.SchemaReference"; }; - FallbackSettings.PromptTemplate = (function() { + return SchemaReference; + })(); - /** - * Properties of a PromptTemplate. - * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings - * @interface IPromptTemplate - * @property {string|null} [displayName] PromptTemplate displayName - * @property {string|null} [promptText] PromptTemplate promptText - * @property {boolean|null} [frozen] PromptTemplate frozen - */ + return TypeSchema; + })(); - /** - * Constructs a new PromptTemplate. - * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings - * @classdesc Represents a PromptTemplate. - * @implements IPromptTemplate - * @constructor - * @param {google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.IPromptTemplate=} [properties] Properties to set - */ - function PromptTemplate(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]]; - } + v3.InlineSchema = (function() { - /** - * PromptTemplate displayName. - * @member {string} displayName - * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate - * @instance - */ - PromptTemplate.prototype.displayName = ""; + /** + * Properties of an InlineSchema. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IInlineSchema + * @property {google.cloud.dialogflow.cx.v3.DataType|null} [type] InlineSchema type + * @property {google.cloud.dialogflow.cx.v3.ITypeSchema|null} [items] InlineSchema items + */ - /** - * PromptTemplate promptText. - * @member {string} promptText - * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate - * @instance - */ - PromptTemplate.prototype.promptText = ""; + /** + * Constructs a new InlineSchema. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents an InlineSchema. + * @implements IInlineSchema + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IInlineSchema=} [properties] Properties to set + */ + function InlineSchema(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]]; + } - /** - * PromptTemplate frozen. - * @member {boolean} frozen - * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate - * @instance - */ - PromptTemplate.prototype.frozen = false; + /** + * InlineSchema type. + * @member {google.cloud.dialogflow.cx.v3.DataType} type + * @memberof google.cloud.dialogflow.cx.v3.InlineSchema + * @instance + */ + InlineSchema.prototype.type = 0; - /** - * Creates a new PromptTemplate instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate - * @static - * @param {google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.IPromptTemplate=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate} PromptTemplate instance - */ - PromptTemplate.create = function create(properties) { - return new PromptTemplate(properties); - }; + /** + * InlineSchema items. + * @member {google.cloud.dialogflow.cx.v3.ITypeSchema|null|undefined} items + * @memberof google.cloud.dialogflow.cx.v3.InlineSchema + * @instance + */ + InlineSchema.prototype.items = null; - /** - * Encodes the specified PromptTemplate message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate - * @static - * @param {google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.IPromptTemplate} message PromptTemplate message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PromptTemplate.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); - if (message.promptText != null && Object.hasOwnProperty.call(message, "promptText")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.promptText); - if (message.frozen != null && Object.hasOwnProperty.call(message, "frozen")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.frozen); - return writer; - }; + /** + * Creates a new InlineSchema instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.InlineSchema + * @static + * @param {google.cloud.dialogflow.cx.v3.IInlineSchema=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.InlineSchema} InlineSchema instance + */ + InlineSchema.create = function create(properties) { + return new InlineSchema(properties); + }; - /** - * Encodes the specified PromptTemplate message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate - * @static - * @param {google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.IPromptTemplate} message PromptTemplate message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PromptTemplate.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified InlineSchema message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.InlineSchema.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.InlineSchema + * @static + * @param {google.cloud.dialogflow.cx.v3.IInlineSchema} message InlineSchema message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InlineSchema.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); + if (message.items != null && Object.hasOwnProperty.call(message, "items")) + $root.google.cloud.dialogflow.cx.v3.TypeSchema.encode(message.items, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; - /** - * Decodes a PromptTemplate message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate - * @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.GenerativeSettings.FallbackSettings.PromptTemplate} PromptTemplate - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PromptTemplate.decode = function decode(reader, length, error) { - 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.GenerativeSettings.FallbackSettings.PromptTemplate(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.displayName = reader.string(); - break; - } - case 2: { - message.promptText = reader.string(); - break; - } - case 3: { - message.frozen = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } + /** + * Encodes the specified InlineSchema message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.InlineSchema.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.InlineSchema + * @static + * @param {google.cloud.dialogflow.cx.v3.IInlineSchema} message InlineSchema message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InlineSchema.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InlineSchema message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.InlineSchema + * @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.InlineSchema} InlineSchema + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InlineSchema.decode = function decode(reader, length, error) { + 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.InlineSchema(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.type = reader.int32(); + break; } - return message; - }; + case 2: { + message.items = $root.google.cloud.dialogflow.cx.v3.TypeSchema.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Decodes a PromptTemplate message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate} PromptTemplate - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PromptTemplate.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes an InlineSchema message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.InlineSchema + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.InlineSchema} InlineSchema + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InlineSchema.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a PromptTemplate message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PromptTemplate.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.promptText != null && message.hasOwnProperty("promptText")) - if (!$util.isString(message.promptText)) - return "promptText: string expected"; - if (message.frozen != null && message.hasOwnProperty("frozen")) - if (typeof message.frozen !== "boolean") - return "frozen: boolean expected"; - return null; - }; + /** + * Verifies an InlineSchema message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.InlineSchema + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InlineSchema.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 6: + break; + } + if (message.items != null && message.hasOwnProperty("items")) { + var error = $root.google.cloud.dialogflow.cx.v3.TypeSchema.verify(message.items); + if (error) + return "items." + error; + } + return null; + }; - /** - * Creates a PromptTemplate message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate} PromptTemplate - */ - PromptTemplate.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.promptText != null) - message.promptText = String(object.promptText); - if (object.frozen != null) - message.frozen = Boolean(object.frozen); - return message; - }; + /** + * Creates an InlineSchema message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.InlineSchema + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.InlineSchema} InlineSchema + */ + InlineSchema.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.InlineSchema) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.InlineSchema(); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "DATA_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "STRING": + case 1: + message.type = 1; + break; + case "NUMBER": + case 2: + message.type = 2; + break; + case "BOOLEAN": + case 3: + message.type = 3; + break; + case "ARRAY": + case 6: + message.type = 6; + break; + } + if (object.items != null) { + if (typeof object.items !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.InlineSchema.items: object expected"); + message.items = $root.google.cloud.dialogflow.cx.v3.TypeSchema.fromObject(object.items); + } + return message; + }; - /** - * Creates a plain object from a PromptTemplate message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate - * @static - * @param {google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate} message PromptTemplate - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PromptTemplate.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.displayName = ""; - object.promptText = ""; - object.frozen = false; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.promptText != null && message.hasOwnProperty("promptText")) - object.promptText = message.promptText; - if (message.frozen != null && message.hasOwnProperty("frozen")) - object.frozen = message.frozen; - return object; - }; + /** + * Creates a plain object from an InlineSchema message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.InlineSchema + * @static + * @param {google.cloud.dialogflow.cx.v3.InlineSchema} message InlineSchema + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InlineSchema.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = options.enums === String ? "DATA_TYPE_UNSPECIFIED" : 0; + object.items = null; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.DataType[message.type] === undefined ? message.type : $root.google.cloud.dialogflow.cx.v3.DataType[message.type] : message.type; + if (message.items != null && message.hasOwnProperty("items")) + object.items = $root.google.cloud.dialogflow.cx.v3.TypeSchema.toObject(message.items, options); + return object; + }; - /** - * Converts this PromptTemplate to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate - * @instance - * @returns {Object.} JSON object - */ - PromptTemplate.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this InlineSchema to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.InlineSchema + * @instance + * @returns {Object.} JSON object + */ + InlineSchema.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Gets the default type url for PromptTemplate - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PromptTemplate.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate"; - }; + /** + * Gets the default type url for InlineSchema + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.InlineSchema + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InlineSchema.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.InlineSchema"; + }; - return PromptTemplate; - })(); + return InlineSchema; + })(); - return FallbackSettings; - })(); + /** + * DataType enum. + * @name google.cloud.dialogflow.cx.v3.DataType + * @enum {number} + * @property {number} DATA_TYPE_UNSPECIFIED=0 DATA_TYPE_UNSPECIFIED value + * @property {number} STRING=1 STRING value + * @property {number} NUMBER=2 NUMBER value + * @property {number} BOOLEAN=3 BOOLEAN value + * @property {number} ARRAY=6 ARRAY value + */ + v3.DataType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DATA_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "STRING"] = 1; + values[valuesById[2] = "NUMBER"] = 2; + values[valuesById[3] = "BOOLEAN"] = 3; + values[valuesById[6] = "ARRAY"] = 6; + return values; + })(); - GenerativeSettings.KnowledgeConnectorSettings = (function() { + v3.ValidationMessage = (function() { - /** - * Properties of a KnowledgeConnectorSettings. - * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings - * @interface IKnowledgeConnectorSettings - * @property {string|null} [business] KnowledgeConnectorSettings business - * @property {string|null} [agent] KnowledgeConnectorSettings agent - * @property {string|null} [agentIdentity] KnowledgeConnectorSettings agentIdentity - * @property {string|null} [businessDescription] KnowledgeConnectorSettings businessDescription - * @property {string|null} [agentScope] KnowledgeConnectorSettings agentScope - * @property {boolean|null} [disableDataStoreFallback] KnowledgeConnectorSettings disableDataStoreFallback - */ + /** + * Properties of a ValidationMessage. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IValidationMessage + * @property {google.cloud.dialogflow.cx.v3.ValidationMessage.ResourceType|null} [resourceType] ValidationMessage resourceType + * @property {Array.|null} [resources] ValidationMessage resources + * @property {Array.|null} [resourceNames] ValidationMessage resourceNames + * @property {google.cloud.dialogflow.cx.v3.ValidationMessage.Severity|null} [severity] ValidationMessage severity + * @property {string|null} [detail] ValidationMessage detail + */ - /** - * Constructs a new KnowledgeConnectorSettings. - * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings - * @classdesc Represents a KnowledgeConnectorSettings. - * @implements IKnowledgeConnectorSettings - * @constructor - * @param {google.cloud.dialogflow.cx.v3.GenerativeSettings.IKnowledgeConnectorSettings=} [properties] Properties to set - */ - function KnowledgeConnectorSettings(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]]; - } + /** + * Constructs a new ValidationMessage. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a ValidationMessage. + * @implements IValidationMessage + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IValidationMessage=} [properties] Properties to set + */ + function ValidationMessage(properties) { + this.resources = []; + this.resourceNames = []; + 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]]; + } - /** - * KnowledgeConnectorSettings business. - * @member {string} business - * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings - * @instance - */ - KnowledgeConnectorSettings.prototype.business = ""; + /** + * ValidationMessage resourceType. + * @member {google.cloud.dialogflow.cx.v3.ValidationMessage.ResourceType} resourceType + * @memberof google.cloud.dialogflow.cx.v3.ValidationMessage + * @instance + */ + ValidationMessage.prototype.resourceType = 0; - /** - * KnowledgeConnectorSettings agent. - * @member {string} agent - * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings - * @instance - */ - KnowledgeConnectorSettings.prototype.agent = ""; + /** + * ValidationMessage resources. + * @member {Array.} resources + * @memberof google.cloud.dialogflow.cx.v3.ValidationMessage + * @instance + */ + ValidationMessage.prototype.resources = $util.emptyArray; - /** - * KnowledgeConnectorSettings agentIdentity. - * @member {string} agentIdentity - * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings - * @instance - */ - KnowledgeConnectorSettings.prototype.agentIdentity = ""; + /** + * ValidationMessage resourceNames. + * @member {Array.} resourceNames + * @memberof google.cloud.dialogflow.cx.v3.ValidationMessage + * @instance + */ + ValidationMessage.prototype.resourceNames = $util.emptyArray; - /** - * KnowledgeConnectorSettings businessDescription. - * @member {string} businessDescription - * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings - * @instance - */ - KnowledgeConnectorSettings.prototype.businessDescription = ""; + /** + * ValidationMessage severity. + * @member {google.cloud.dialogflow.cx.v3.ValidationMessage.Severity} severity + * @memberof google.cloud.dialogflow.cx.v3.ValidationMessage + * @instance + */ + ValidationMessage.prototype.severity = 0; - /** - * KnowledgeConnectorSettings agentScope. - * @member {string} agentScope - * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings - * @instance - */ - KnowledgeConnectorSettings.prototype.agentScope = ""; + /** + * ValidationMessage detail. + * @member {string} detail + * @memberof google.cloud.dialogflow.cx.v3.ValidationMessage + * @instance + */ + ValidationMessage.prototype.detail = ""; - /** - * KnowledgeConnectorSettings disableDataStoreFallback. - * @member {boolean} disableDataStoreFallback - * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings - * @instance - */ - KnowledgeConnectorSettings.prototype.disableDataStoreFallback = false; + /** + * Creates a new ValidationMessage instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.ValidationMessage + * @static + * @param {google.cloud.dialogflow.cx.v3.IValidationMessage=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ValidationMessage} ValidationMessage instance + */ + ValidationMessage.create = function create(properties) { + return new ValidationMessage(properties); + }; - /** - * Creates a new KnowledgeConnectorSettings instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings - * @static - * @param {google.cloud.dialogflow.cx.v3.GenerativeSettings.IKnowledgeConnectorSettings=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings} KnowledgeConnectorSettings instance - */ - KnowledgeConnectorSettings.create = function create(properties) { - return new KnowledgeConnectorSettings(properties); - }; - - /** - * Encodes the specified KnowledgeConnectorSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings - * @static - * @param {google.cloud.dialogflow.cx.v3.GenerativeSettings.IKnowledgeConnectorSettings} message KnowledgeConnectorSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - KnowledgeConnectorSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.business != null && Object.hasOwnProperty.call(message, "business")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.business); - if (message.agent != null && Object.hasOwnProperty.call(message, "agent")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.agent); - if (message.agentIdentity != null && Object.hasOwnProperty.call(message, "agentIdentity")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.agentIdentity); - if (message.businessDescription != null && Object.hasOwnProperty.call(message, "businessDescription")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.businessDescription); - if (message.agentScope != null && Object.hasOwnProperty.call(message, "agentScope")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.agentScope); - if (message.disableDataStoreFallback != null && Object.hasOwnProperty.call(message, "disableDataStoreFallback")) - writer.uint32(/* id 8, wireType 0 =*/64).bool(message.disableDataStoreFallback); - return writer; - }; - - /** - * Encodes the specified KnowledgeConnectorSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings - * @static - * @param {google.cloud.dialogflow.cx.v3.GenerativeSettings.IKnowledgeConnectorSettings} message KnowledgeConnectorSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - KnowledgeConnectorSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a KnowledgeConnectorSettings message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings - * @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.GenerativeSettings.KnowledgeConnectorSettings} KnowledgeConnectorSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - KnowledgeConnectorSettings.decode = function decode(reader, length, error) { - 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.GenerativeSettings.KnowledgeConnectorSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.business = reader.string(); - break; - } - case 2: { - message.agent = reader.string(); - break; - } - case 3: { - message.agentIdentity = reader.string(); - break; - } - case 4: { - message.businessDescription = reader.string(); - break; - } - case 5: { - message.agentScope = reader.string(); - break; - } - case 8: { - message.disableDataStoreFallback = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a KnowledgeConnectorSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings} KnowledgeConnectorSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - KnowledgeConnectorSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a KnowledgeConnectorSettings message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - KnowledgeConnectorSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.business != null && message.hasOwnProperty("business")) - if (!$util.isString(message.business)) - return "business: string expected"; - if (message.agent != null && message.hasOwnProperty("agent")) - if (!$util.isString(message.agent)) - return "agent: string expected"; - if (message.agentIdentity != null && message.hasOwnProperty("agentIdentity")) - if (!$util.isString(message.agentIdentity)) - return "agentIdentity: string expected"; - if (message.businessDescription != null && message.hasOwnProperty("businessDescription")) - if (!$util.isString(message.businessDescription)) - return "businessDescription: string expected"; - if (message.agentScope != null && message.hasOwnProperty("agentScope")) - if (!$util.isString(message.agentScope)) - return "agentScope: string expected"; - if (message.disableDataStoreFallback != null && message.hasOwnProperty("disableDataStoreFallback")) - if (typeof message.disableDataStoreFallback !== "boolean") - return "disableDataStoreFallback: boolean expected"; - return null; - }; - - /** - * Creates a KnowledgeConnectorSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings} KnowledgeConnectorSettings - */ - KnowledgeConnectorSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings(); - if (object.business != null) - message.business = String(object.business); - if (object.agent != null) - message.agent = String(object.agent); - if (object.agentIdentity != null) - message.agentIdentity = String(object.agentIdentity); - if (object.businessDescription != null) - message.businessDescription = String(object.businessDescription); - if (object.agentScope != null) - message.agentScope = String(object.agentScope); - if (object.disableDataStoreFallback != null) - message.disableDataStoreFallback = Boolean(object.disableDataStoreFallback); - return message; - }; - - /** - * Creates a plain object from a KnowledgeConnectorSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings - * @static - * @param {google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings} message KnowledgeConnectorSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - KnowledgeConnectorSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.business = ""; - object.agent = ""; - object.agentIdentity = ""; - object.businessDescription = ""; - object.agentScope = ""; - object.disableDataStoreFallback = false; - } - if (message.business != null && message.hasOwnProperty("business")) - object.business = message.business; - if (message.agent != null && message.hasOwnProperty("agent")) - object.agent = message.agent; - if (message.agentIdentity != null && message.hasOwnProperty("agentIdentity")) - object.agentIdentity = message.agentIdentity; - if (message.businessDescription != null && message.hasOwnProperty("businessDescription")) - object.businessDescription = message.businessDescription; - if (message.agentScope != null && message.hasOwnProperty("agentScope")) - object.agentScope = message.agentScope; - if (message.disableDataStoreFallback != null && message.hasOwnProperty("disableDataStoreFallback")) - object.disableDataStoreFallback = message.disableDataStoreFallback; - return object; - }; - - /** - * Converts this KnowledgeConnectorSettings to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings - * @instance - * @returns {Object.} JSON object - */ - KnowledgeConnectorSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for KnowledgeConnectorSettings - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - KnowledgeConnectorSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings"; - }; - - return KnowledgeConnectorSettings; - })(); - - return GenerativeSettings; - })(); - - v3.SafetySettings = (function() { - - /** - * Properties of a SafetySettings. - * @memberof google.cloud.dialogflow.cx.v3 - * @interface ISafetySettings - * @property {Array.|null} [bannedPhrases] SafetySettings bannedPhrases - */ - - /** - * Constructs a new SafetySettings. - * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a SafetySettings. - * @implements ISafetySettings - * @constructor - * @param {google.cloud.dialogflow.cx.v3.ISafetySettings=} [properties] Properties to set - */ - function SafetySettings(properties) { - this.bannedPhrases = []; - 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]]; - } - - /** - * SafetySettings bannedPhrases. - * @member {Array.} bannedPhrases - * @memberof google.cloud.dialogflow.cx.v3.SafetySettings - * @instance - */ - SafetySettings.prototype.bannedPhrases = $util.emptyArray; - - /** - * Creates a new SafetySettings instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.SafetySettings - * @static - * @param {google.cloud.dialogflow.cx.v3.ISafetySettings=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.SafetySettings} SafetySettings instance - */ - SafetySettings.create = function create(properties) { - return new SafetySettings(properties); - }; - - /** - * Encodes the specified SafetySettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SafetySettings.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.SafetySettings - * @static - * @param {google.cloud.dialogflow.cx.v3.ISafetySettings} message SafetySettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SafetySettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.bannedPhrases != null && message.bannedPhrases.length) - for (var i = 0; i < message.bannedPhrases.length; ++i) - $root.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase.encode(message.bannedPhrases[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; + /** + * Encodes the specified ValidationMessage message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ValidationMessage.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.ValidationMessage + * @static + * @param {google.cloud.dialogflow.cx.v3.IValidationMessage} message ValidationMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValidationMessage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resourceType != null && Object.hasOwnProperty.call(message, "resourceType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.resourceType); + if (message.resources != null && message.resources.length) + for (var i = 0; i < message.resources.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.resources[i]); + if (message.severity != null && Object.hasOwnProperty.call(message, "severity")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.severity); + if (message.detail != null && Object.hasOwnProperty.call(message, "detail")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.detail); + if (message.resourceNames != null && message.resourceNames.length) + for (var i = 0; i < message.resourceNames.length; ++i) + $root.google.cloud.dialogflow.cx.v3.ResourceName.encode(message.resourceNames[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; /** - * Encodes the specified SafetySettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SafetySettings.verify|verify} messages. + * Encodes the specified ValidationMessage message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ValidationMessage.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.SafetySettings + * @memberof google.cloud.dialogflow.cx.v3.ValidationMessage * @static - * @param {google.cloud.dialogflow.cx.v3.ISafetySettings} message SafetySettings message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IValidationMessage} message ValidationMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SafetySettings.encodeDelimited = function encodeDelimited(message, writer) { + ValidationMessage.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SafetySettings message from the specified reader or buffer. + * Decodes a ValidationMessage message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.SafetySettings + * @memberof google.cloud.dialogflow.cx.v3.ValidationMessage * @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.SafetySettings} SafetySettings + * @returns {google.cloud.dialogflow.cx.v3.ValidationMessage} ValidationMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SafetySettings.decode = function decode(reader, length, error) { + ValidationMessage.decode = function decode(reader, length, error) { 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.SafetySettings(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ValidationMessage(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - if (!(message.bannedPhrases && message.bannedPhrases.length)) - message.bannedPhrases = []; - message.bannedPhrases.push($root.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase.decode(reader, reader.uint32())); + message.resourceType = reader.int32(); + break; + } + case 2: { + if (!(message.resources && message.resources.length)) + message.resources = []; + message.resources.push(reader.string()); + break; + } + case 6: { + if (!(message.resourceNames && message.resourceNames.length)) + message.resourceNames = []; + message.resourceNames.push($root.google.cloud.dialogflow.cx.v3.ResourceName.decode(reader, reader.uint32())); + break; + } + case 3: { + message.severity = reader.int32(); + break; + } + case 4: { + message.detail = reader.string(); break; } default: @@ -29235,592 +29553,450 @@ }; /** - * Decodes a SafetySettings message from the specified reader or buffer, length delimited. + * Decodes a ValidationMessage message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.SafetySettings + * @memberof google.cloud.dialogflow.cx.v3.ValidationMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.SafetySettings} SafetySettings + * @returns {google.cloud.dialogflow.cx.v3.ValidationMessage} ValidationMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SafetySettings.decodeDelimited = function decodeDelimited(reader) { + ValidationMessage.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SafetySettings message. + * Verifies a ValidationMessage message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.SafetySettings + * @memberof google.cloud.dialogflow.cx.v3.ValidationMessage * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SafetySettings.verify = function verify(message) { + ValidationMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.bannedPhrases != null && message.hasOwnProperty("bannedPhrases")) { - if (!Array.isArray(message.bannedPhrases)) - return "bannedPhrases: array expected"; - for (var i = 0; i < message.bannedPhrases.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase.verify(message.bannedPhrases[i]); + if (message.resourceType != null && message.hasOwnProperty("resourceType")) + switch (message.resourceType) { + default: + return "resourceType: enum value expected"; + case 0: + case 1: + case 2: + case 8: + case 9: + case 10: + case 11: + case 3: + case 12: + case 4: + case 5: + case 6: + case 13: + case 7: + case 14: + break; + } + if (message.resources != null && message.hasOwnProperty("resources")) { + if (!Array.isArray(message.resources)) + return "resources: array expected"; + for (var i = 0; i < message.resources.length; ++i) + if (!$util.isString(message.resources[i])) + return "resources: string[] expected"; + } + if (message.resourceNames != null && message.hasOwnProperty("resourceNames")) { + if (!Array.isArray(message.resourceNames)) + return "resourceNames: array expected"; + for (var i = 0; i < message.resourceNames.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.ResourceName.verify(message.resourceNames[i]); if (error) - return "bannedPhrases." + error; + return "resourceNames." + error; } } + if (message.severity != null && message.hasOwnProperty("severity")) + switch (message.severity) { + default: + return "severity: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.detail != null && message.hasOwnProperty("detail")) + if (!$util.isString(message.detail)) + return "detail: string expected"; return null; }; /** - * Creates a SafetySettings message from a plain object. Also converts values to their respective internal types. + * Creates a ValidationMessage message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.SafetySettings + * @memberof google.cloud.dialogflow.cx.v3.ValidationMessage * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.SafetySettings} SafetySettings + * @returns {google.cloud.dialogflow.cx.v3.ValidationMessage} ValidationMessage */ - SafetySettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.SafetySettings) + ValidationMessage.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ValidationMessage) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.SafetySettings(); - if (object.bannedPhrases) { - if (!Array.isArray(object.bannedPhrases)) - throw TypeError(".google.cloud.dialogflow.cx.v3.SafetySettings.bannedPhrases: array expected"); - message.bannedPhrases = []; - for (var i = 0; i < object.bannedPhrases.length; ++i) { - if (typeof object.bannedPhrases[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.SafetySettings.bannedPhrases: object expected"); - message.bannedPhrases[i] = $root.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase.fromObject(object.bannedPhrases[i]); + var message = new $root.google.cloud.dialogflow.cx.v3.ValidationMessage(); + switch (object.resourceType) { + default: + if (typeof object.resourceType === "number") { + message.resourceType = object.resourceType; + break; } + break; + case "RESOURCE_TYPE_UNSPECIFIED": + case 0: + message.resourceType = 0; + break; + case "AGENT": + case 1: + message.resourceType = 1; + break; + case "INTENT": + case 2: + message.resourceType = 2; + break; + case "INTENT_TRAINING_PHRASE": + case 8: + message.resourceType = 8; + break; + case "INTENT_PARAMETER": + case 9: + message.resourceType = 9; + break; + case "INTENTS": + case 10: + message.resourceType = 10; + break; + case "INTENT_TRAINING_PHRASES": + case 11: + message.resourceType = 11; + break; + case "ENTITY_TYPE": + case 3: + message.resourceType = 3; + break; + case "ENTITY_TYPES": + case 12: + message.resourceType = 12; + break; + case "WEBHOOK": + case 4: + message.resourceType = 4; + break; + case "FLOW": + case 5: + message.resourceType = 5; + break; + case "PAGE": + case 6: + message.resourceType = 6; + break; + case "PAGES": + case 13: + message.resourceType = 13; + break; + case "TRANSITION_ROUTE_GROUP": + case 7: + message.resourceType = 7; + break; + case "AGENT_TRANSITION_ROUTE_GROUP": + case 14: + message.resourceType = 14; + break; } - return message; - }; - - /** - * Creates a plain object from a SafetySettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.SafetySettings - * @static - * @param {google.cloud.dialogflow.cx.v3.SafetySettings} message SafetySettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SafetySettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.bannedPhrases = []; - if (message.bannedPhrases && message.bannedPhrases.length) { - object.bannedPhrases = []; - for (var j = 0; j < message.bannedPhrases.length; ++j) - object.bannedPhrases[j] = $root.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase.toObject(message.bannedPhrases[j], options); - } - return object; + if (object.resources) { + if (!Array.isArray(object.resources)) + throw TypeError(".google.cloud.dialogflow.cx.v3.ValidationMessage.resources: array expected"); + message.resources = []; + for (var i = 0; i < object.resources.length; ++i) + message.resources[i] = String(object.resources[i]); + } + if (object.resourceNames) { + if (!Array.isArray(object.resourceNames)) + throw TypeError(".google.cloud.dialogflow.cx.v3.ValidationMessage.resourceNames: array expected"); + message.resourceNames = []; + for (var i = 0; i < object.resourceNames.length; ++i) { + if (typeof object.resourceNames[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.ValidationMessage.resourceNames: object expected"); + message.resourceNames[i] = $root.google.cloud.dialogflow.cx.v3.ResourceName.fromObject(object.resourceNames[i]); + } + } + switch (object.severity) { + default: + if (typeof object.severity === "number") { + message.severity = object.severity; + break; + } + break; + case "SEVERITY_UNSPECIFIED": + case 0: + message.severity = 0; + break; + case "INFO": + case 1: + message.severity = 1; + break; + case "WARNING": + case 2: + message.severity = 2; + break; + case "ERROR": + case 3: + message.severity = 3; + break; + } + if (object.detail != null) + message.detail = String(object.detail); + return message; }; /** - * Converts this SafetySettings to JSON. + * Creates a plain object from a ValidationMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.ValidationMessage + * @static + * @param {google.cloud.dialogflow.cx.v3.ValidationMessage} message ValidationMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ValidationMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.resources = []; + object.resourceNames = []; + } + if (options.defaults) { + object.resourceType = options.enums === String ? "RESOURCE_TYPE_UNSPECIFIED" : 0; + object.severity = options.enums === String ? "SEVERITY_UNSPECIFIED" : 0; + object.detail = ""; + } + if (message.resourceType != null && message.hasOwnProperty("resourceType")) + object.resourceType = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.ValidationMessage.ResourceType[message.resourceType] === undefined ? message.resourceType : $root.google.cloud.dialogflow.cx.v3.ValidationMessage.ResourceType[message.resourceType] : message.resourceType; + if (message.resources && message.resources.length) { + object.resources = []; + for (var j = 0; j < message.resources.length; ++j) + object.resources[j] = message.resources[j]; + } + if (message.severity != null && message.hasOwnProperty("severity")) + object.severity = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.ValidationMessage.Severity[message.severity] === undefined ? message.severity : $root.google.cloud.dialogflow.cx.v3.ValidationMessage.Severity[message.severity] : message.severity; + if (message.detail != null && message.hasOwnProperty("detail")) + object.detail = message.detail; + if (message.resourceNames && message.resourceNames.length) { + object.resourceNames = []; + for (var j = 0; j < message.resourceNames.length; ++j) + object.resourceNames[j] = $root.google.cloud.dialogflow.cx.v3.ResourceName.toObject(message.resourceNames[j], options); + } + return object; + }; + + /** + * Converts this ValidationMessage to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.SafetySettings + * @memberof google.cloud.dialogflow.cx.v3.ValidationMessage * @instance * @returns {Object.} JSON object */ - SafetySettings.prototype.toJSON = function toJSON() { + ValidationMessage.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SafetySettings + * Gets the default type url for ValidationMessage * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.SafetySettings + * @memberof google.cloud.dialogflow.cx.v3.ValidationMessage * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SafetySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ValidationMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.SafetySettings"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ValidationMessage"; }; - SafetySettings.Phrase = (function() { - - /** - * Properties of a Phrase. - * @memberof google.cloud.dialogflow.cx.v3.SafetySettings - * @interface IPhrase - * @property {string|null} [text] Phrase text - * @property {string|null} [languageCode] Phrase languageCode - */ - - /** - * Constructs a new Phrase. - * @memberof google.cloud.dialogflow.cx.v3.SafetySettings - * @classdesc Represents a Phrase. - * @implements IPhrase - * @constructor - * @param {google.cloud.dialogflow.cx.v3.SafetySettings.IPhrase=} [properties] Properties to set - */ - function Phrase(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]]; - } - - /** - * Phrase text. - * @member {string} text - * @memberof google.cloud.dialogflow.cx.v3.SafetySettings.Phrase - * @instance - */ - Phrase.prototype.text = ""; - - /** - * Phrase languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3.SafetySettings.Phrase - * @instance - */ - Phrase.prototype.languageCode = ""; - - /** - * Creates a new Phrase instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.SafetySettings.Phrase - * @static - * @param {google.cloud.dialogflow.cx.v3.SafetySettings.IPhrase=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.SafetySettings.Phrase} Phrase instance - */ - Phrase.create = function create(properties) { - return new Phrase(properties); - }; - - /** - * Encodes the specified Phrase message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SafetySettings.Phrase.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.SafetySettings.Phrase - * @static - * @param {google.cloud.dialogflow.cx.v3.SafetySettings.IPhrase} message Phrase message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Phrase.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.text != null && Object.hasOwnProperty.call(message, "text")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.text); - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); - return writer; - }; - - /** - * Encodes the specified Phrase message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SafetySettings.Phrase.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.SafetySettings.Phrase - * @static - * @param {google.cloud.dialogflow.cx.v3.SafetySettings.IPhrase} message Phrase message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Phrase.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Phrase message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.SafetySettings.Phrase - * @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.SafetySettings.Phrase} Phrase - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Phrase.decode = function decode(reader, length, error) { - 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.SafetySettings.Phrase(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.text = reader.string(); - break; - } - case 2: { - message.languageCode = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Phrase message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.SafetySettings.Phrase - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.SafetySettings.Phrase} Phrase - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Phrase.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Phrase message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.SafetySettings.Phrase - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Phrase.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.text != null && message.hasOwnProperty("text")) - if (!$util.isString(message.text)) - return "text: string expected"; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; - return null; - }; - - /** - * Creates a Phrase message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.SafetySettings.Phrase - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.SafetySettings.Phrase} Phrase - */ - Phrase.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase(); - if (object.text != null) - message.text = String(object.text); - if (object.languageCode != null) - message.languageCode = String(object.languageCode); - return message; - }; - - /** - * Creates a plain object from a Phrase message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.SafetySettings.Phrase - * @static - * @param {google.cloud.dialogflow.cx.v3.SafetySettings.Phrase} message Phrase - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Phrase.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.text = ""; - object.languageCode = ""; - } - if (message.text != null && message.hasOwnProperty("text")) - object.text = message.text; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; - return object; - }; - - /** - * Converts this Phrase to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.SafetySettings.Phrase - * @instance - * @returns {Object.} JSON object - */ - Phrase.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Phrase - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.SafetySettings.Phrase - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Phrase.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.SafetySettings.Phrase"; - }; + /** + * ResourceType enum. + * @name google.cloud.dialogflow.cx.v3.ValidationMessage.ResourceType + * @enum {number} + * @property {number} RESOURCE_TYPE_UNSPECIFIED=0 RESOURCE_TYPE_UNSPECIFIED value + * @property {number} AGENT=1 AGENT value + * @property {number} INTENT=2 INTENT value + * @property {number} INTENT_TRAINING_PHRASE=8 INTENT_TRAINING_PHRASE value + * @property {number} INTENT_PARAMETER=9 INTENT_PARAMETER value + * @property {number} INTENTS=10 INTENTS value + * @property {number} INTENT_TRAINING_PHRASES=11 INTENT_TRAINING_PHRASES value + * @property {number} ENTITY_TYPE=3 ENTITY_TYPE value + * @property {number} ENTITY_TYPES=12 ENTITY_TYPES value + * @property {number} WEBHOOK=4 WEBHOOK value + * @property {number} FLOW=5 FLOW value + * @property {number} PAGE=6 PAGE value + * @property {number} PAGES=13 PAGES value + * @property {number} TRANSITION_ROUTE_GROUP=7 TRANSITION_ROUTE_GROUP value + * @property {number} AGENT_TRANSITION_ROUTE_GROUP=14 AGENT_TRANSITION_ROUTE_GROUP value + */ + ValidationMessage.ResourceType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RESOURCE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "AGENT"] = 1; + values[valuesById[2] = "INTENT"] = 2; + values[valuesById[8] = "INTENT_TRAINING_PHRASE"] = 8; + values[valuesById[9] = "INTENT_PARAMETER"] = 9; + values[valuesById[10] = "INTENTS"] = 10; + values[valuesById[11] = "INTENT_TRAINING_PHRASES"] = 11; + values[valuesById[3] = "ENTITY_TYPE"] = 3; + values[valuesById[12] = "ENTITY_TYPES"] = 12; + values[valuesById[4] = "WEBHOOK"] = 4; + values[valuesById[5] = "FLOW"] = 5; + values[valuesById[6] = "PAGE"] = 6; + values[valuesById[13] = "PAGES"] = 13; + values[valuesById[7] = "TRANSITION_ROUTE_GROUP"] = 7; + values[valuesById[14] = "AGENT_TRANSITION_ROUTE_GROUP"] = 14; + return values; + })(); - return Phrase; + /** + * Severity enum. + * @name google.cloud.dialogflow.cx.v3.ValidationMessage.Severity + * @enum {number} + * @property {number} SEVERITY_UNSPECIFIED=0 SEVERITY_UNSPECIFIED value + * @property {number} INFO=1 INFO value + * @property {number} WARNING=2 WARNING value + * @property {number} ERROR=3 ERROR value + */ + ValidationMessage.Severity = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SEVERITY_UNSPECIFIED"] = 0; + values[valuesById[1] = "INFO"] = 1; + values[valuesById[2] = "WARNING"] = 2; + values[valuesById[3] = "ERROR"] = 3; + return values; })(); - return SafetySettings; + return ValidationMessage; })(); - v3.Changelogs = (function() { + v3.ResourceName = (function() { /** - * Constructs a new Changelogs service. + * Properties of a ResourceName. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a Changelogs - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @interface IResourceName + * @property {string|null} [name] ResourceName name + * @property {string|null} [displayName] ResourceName displayName */ - function Changelogs(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (Changelogs.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Changelogs; /** - * Creates new Changelogs service using the specified rpc implementation. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.Changelogs - * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {Changelogs} RPC service. Useful where requests and/or responses are streamed. + * Constructs a new ResourceName. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a ResourceName. + * @implements IResourceName + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IResourceName=} [properties] Properties to set */ - Changelogs.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; + function ResourceName(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]]; + } /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Changelogs|listChangelogs}. - * @memberof google.cloud.dialogflow.cx.v3.Changelogs - * @typedef ListChangelogsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.ListChangelogsResponse} [response] ListChangelogsResponse + * ResourceName name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.ResourceName + * @instance */ + ResourceName.prototype.name = ""; /** - * Calls ListChangelogs. - * @function listChangelogs - * @memberof google.cloud.dialogflow.cx.v3.Changelogs + * ResourceName displayName. + * @member {string} displayName + * @memberof google.cloud.dialogflow.cx.v3.ResourceName * @instance - * @param {google.cloud.dialogflow.cx.v3.IListChangelogsRequest} request ListChangelogsRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Changelogs.ListChangelogsCallback} callback Node-style callback called with the error, if any, and ListChangelogsResponse - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(Changelogs.prototype.listChangelogs = function listChangelogs(request, callback) { - return this.rpcCall(listChangelogs, $root.google.cloud.dialogflow.cx.v3.ListChangelogsRequest, $root.google.cloud.dialogflow.cx.v3.ListChangelogsResponse, request, callback); - }, "name", { value: "ListChangelogs" }); + ResourceName.prototype.displayName = ""; /** - * Calls ListChangelogs. - * @function listChangelogs - * @memberof google.cloud.dialogflow.cx.v3.Changelogs - * @instance - * @param {google.cloud.dialogflow.cx.v3.IListChangelogsRequest} request ListChangelogsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a new ResourceName instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.ResourceName + * @static + * @param {google.cloud.dialogflow.cx.v3.IResourceName=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ResourceName} ResourceName instance */ + ResourceName.create = function create(properties) { + return new ResourceName(properties); + }; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Changelogs|getChangelog}. - * @memberof google.cloud.dialogflow.cx.v3.Changelogs - * @typedef GetChangelogCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.Changelog} [response] Changelog + * Encodes the specified ResourceName message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ResourceName.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.ResourceName + * @static + * @param {google.cloud.dialogflow.cx.v3.IResourceName} message ResourceName message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + ResourceName.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + return writer; + }; /** - * Calls GetChangelog. - * @function getChangelog - * @memberof google.cloud.dialogflow.cx.v3.Changelogs - * @instance - * @param {google.cloud.dialogflow.cx.v3.IGetChangelogRequest} request GetChangelogRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Changelogs.GetChangelogCallback} callback Node-style callback called with the error, if any, and Changelog - * @returns {undefined} - * @variation 1 + * Encodes the specified ResourceName message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ResourceName.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.ResourceName + * @static + * @param {google.cloud.dialogflow.cx.v3.IResourceName} message ResourceName message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(Changelogs.prototype.getChangelog = function getChangelog(request, callback) { - return this.rpcCall(getChangelog, $root.google.cloud.dialogflow.cx.v3.GetChangelogRequest, $root.google.cloud.dialogflow.cx.v3.Changelog, request, callback); - }, "name", { value: "GetChangelog" }); + ResourceName.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Calls GetChangelog. - * @function getChangelog - * @memberof google.cloud.dialogflow.cx.v3.Changelogs - * @instance - * @param {google.cloud.dialogflow.cx.v3.IGetChangelogRequest} request GetChangelogRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Changelogs; - })(); - - v3.ListChangelogsRequest = (function() { - - /** - * Properties of a ListChangelogsRequest. - * @memberof google.cloud.dialogflow.cx.v3 - * @interface IListChangelogsRequest - * @property {string|null} [parent] ListChangelogsRequest parent - * @property {string|null} [filter] ListChangelogsRequest filter - * @property {number|null} [pageSize] ListChangelogsRequest pageSize - * @property {string|null} [pageToken] ListChangelogsRequest pageToken - */ - - /** - * Constructs a new ListChangelogsRequest. - * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a ListChangelogsRequest. - * @implements IListChangelogsRequest - * @constructor - * @param {google.cloud.dialogflow.cx.v3.IListChangelogsRequest=} [properties] Properties to set - */ - function ListChangelogsRequest(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]]; - } - - /** - * ListChangelogsRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsRequest - * @instance - */ - ListChangelogsRequest.prototype.parent = ""; - - /** - * ListChangelogsRequest filter. - * @member {string} filter - * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsRequest - * @instance - */ - ListChangelogsRequest.prototype.filter = ""; - - /** - * ListChangelogsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsRequest - * @instance - */ - ListChangelogsRequest.prototype.pageSize = 0; - - /** - * ListChangelogsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsRequest - * @instance - */ - ListChangelogsRequest.prototype.pageToken = ""; - - /** - * Creates a new ListChangelogsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.IListChangelogsRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ListChangelogsRequest} ListChangelogsRequest instance - */ - ListChangelogsRequest.create = function create(properties) { - return new ListChangelogsRequest(properties); - }; - - /** - * Encodes the specified ListChangelogsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListChangelogsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.IListChangelogsRequest} message ListChangelogsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListChangelogsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); - return writer; - }; - - /** - * Encodes the specified ListChangelogsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListChangelogsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.IListChangelogsRequest} message ListChangelogsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListChangelogsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListChangelogsRequest message from the specified reader or buffer. + * Decodes a ResourceName message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsRequest + * @memberof google.cloud.dialogflow.cx.v3.ResourceName * @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.ListChangelogsRequest} ListChangelogsRequest + * @returns {google.cloud.dialogflow.cx.v3.ResourceName} ResourceName * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListChangelogsRequest.decode = function decode(reader, length, error) { + ResourceName.decode = function decode(reader, length, error) { 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.ListChangelogsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ResourceName(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + message.name = reader.string(); break; } case 2: { - message.filter = reader.string(); - break; - } - case 3: { - message.pageSize = reader.int32(); - break; - } - case 4: { - message.pageToken = reader.string(); + message.displayName = reader.string(); break; } default: @@ -29832,149 +30008,136 @@ }; /** - * Decodes a ListChangelogsRequest message from the specified reader or buffer, length delimited. + * Decodes a ResourceName message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsRequest + * @memberof google.cloud.dialogflow.cx.v3.ResourceName * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ListChangelogsRequest} ListChangelogsRequest + * @returns {google.cloud.dialogflow.cx.v3.ResourceName} ResourceName * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListChangelogsRequest.decodeDelimited = function decodeDelimited(reader) { + ResourceName.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListChangelogsRequest message. + * Verifies a ResourceName message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsRequest + * @memberof google.cloud.dialogflow.cx.v3.ResourceName * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListChangelogsRequest.verify = function verify(message) { + ResourceName.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; return null; }; /** - * Creates a ListChangelogsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ResourceName message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsRequest + * @memberof google.cloud.dialogflow.cx.v3.ResourceName * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ListChangelogsRequest} ListChangelogsRequest + * @returns {google.cloud.dialogflow.cx.v3.ResourceName} ResourceName */ - ListChangelogsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListChangelogsRequest) + ResourceName.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ResourceName) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.ListChangelogsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.filter != null) - message.filter = String(object.filter); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); + var message = new $root.google.cloud.dialogflow.cx.v3.ResourceName(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); return message; }; /** - * Creates a plain object from a ListChangelogsRequest message. Also converts values to other types if specified. + * Creates a plain object from a ResourceName message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsRequest + * @memberof google.cloud.dialogflow.cx.v3.ResourceName * @static - * @param {google.cloud.dialogflow.cx.v3.ListChangelogsRequest} message ListChangelogsRequest + * @param {google.cloud.dialogflow.cx.v3.ResourceName} message ResourceName * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListChangelogsRequest.toObject = function toObject(message, options) { + ResourceName.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.filter = ""; - object.pageSize = 0; - object.pageToken = ""; + object.name = ""; + object.displayName = ""; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; return object; }; /** - * Converts this ListChangelogsRequest to JSON. + * Converts this ResourceName to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsRequest + * @memberof google.cloud.dialogflow.cx.v3.ResourceName * @instance * @returns {Object.} JSON object */ - ListChangelogsRequest.prototype.toJSON = function toJSON() { + ResourceName.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListChangelogsRequest + * Gets the default type url for ResourceName * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsRequest + * @memberof google.cloud.dialogflow.cx.v3.ResourceName * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListChangelogsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ResourceName.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListChangelogsRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ResourceName"; }; - return ListChangelogsRequest; + return ResourceName; })(); - v3.ListChangelogsResponse = (function() { + v3.GenerativeSettings = (function() { /** - * Properties of a ListChangelogsResponse. + * Properties of a GenerativeSettings. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IListChangelogsResponse - * @property {Array.|null} [changelogs] ListChangelogsResponse changelogs - * @property {string|null} [nextPageToken] ListChangelogsResponse nextPageToken + * @interface IGenerativeSettings + * @property {string|null} [name] GenerativeSettings name + * @property {google.cloud.dialogflow.cx.v3.GenerativeSettings.IFallbackSettings|null} [fallbackSettings] GenerativeSettings fallbackSettings + * @property {google.cloud.dialogflow.cx.v3.ISafetySettings|null} [generativeSafetySettings] GenerativeSettings generativeSafetySettings + * @property {google.cloud.dialogflow.cx.v3.GenerativeSettings.IKnowledgeConnectorSettings|null} [knowledgeConnectorSettings] GenerativeSettings knowledgeConnectorSettings + * @property {string|null} [languageCode] GenerativeSettings languageCode + * @property {google.cloud.dialogflow.cx.v3.ILlmModelSettings|null} [llmModelSettings] GenerativeSettings llmModelSettings */ /** - * Constructs a new ListChangelogsResponse. + * Constructs a new GenerativeSettings. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a ListChangelogsResponse. - * @implements IListChangelogsResponse + * @classdesc Represents a GenerativeSettings. + * @implements IGenerativeSettings * @constructor - * @param {google.cloud.dialogflow.cx.v3.IListChangelogsResponse=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IGenerativeSettings=} [properties] Properties to set */ - function ListChangelogsResponse(properties) { - this.changelogs = []; + function GenerativeSettings(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -29982,94 +30145,147 @@ } /** - * ListChangelogsResponse changelogs. - * @member {Array.} changelogs - * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsResponse + * GenerativeSettings name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings * @instance */ - ListChangelogsResponse.prototype.changelogs = $util.emptyArray; + GenerativeSettings.prototype.name = ""; /** - * ListChangelogsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsResponse + * GenerativeSettings fallbackSettings. + * @member {google.cloud.dialogflow.cx.v3.GenerativeSettings.IFallbackSettings|null|undefined} fallbackSettings + * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings * @instance */ - ListChangelogsResponse.prototype.nextPageToken = ""; + GenerativeSettings.prototype.fallbackSettings = null; /** - * Creates a new ListChangelogsResponse instance using the specified properties. + * GenerativeSettings generativeSafetySettings. + * @member {google.cloud.dialogflow.cx.v3.ISafetySettings|null|undefined} generativeSafetySettings + * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings + * @instance + */ + GenerativeSettings.prototype.generativeSafetySettings = null; + + /** + * GenerativeSettings knowledgeConnectorSettings. + * @member {google.cloud.dialogflow.cx.v3.GenerativeSettings.IKnowledgeConnectorSettings|null|undefined} knowledgeConnectorSettings + * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings + * @instance + */ + GenerativeSettings.prototype.knowledgeConnectorSettings = null; + + /** + * GenerativeSettings languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings + * @instance + */ + GenerativeSettings.prototype.languageCode = ""; + + /** + * GenerativeSettings llmModelSettings. + * @member {google.cloud.dialogflow.cx.v3.ILlmModelSettings|null|undefined} llmModelSettings + * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings + * @instance + */ + GenerativeSettings.prototype.llmModelSettings = null; + + /** + * Creates a new GenerativeSettings instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsResponse + * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings * @static - * @param {google.cloud.dialogflow.cx.v3.IListChangelogsResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ListChangelogsResponse} ListChangelogsResponse instance + * @param {google.cloud.dialogflow.cx.v3.IGenerativeSettings=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.GenerativeSettings} GenerativeSettings instance */ - ListChangelogsResponse.create = function create(properties) { - return new ListChangelogsResponse(properties); + GenerativeSettings.create = function create(properties) { + return new GenerativeSettings(properties); }; /** - * Encodes the specified ListChangelogsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListChangelogsResponse.verify|verify} messages. + * Encodes the specified GenerativeSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GenerativeSettings.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsResponse + * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings * @static - * @param {google.cloud.dialogflow.cx.v3.IListChangelogsResponse} message ListChangelogsResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IGenerativeSettings} message GenerativeSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListChangelogsResponse.encode = function encode(message, writer) { + GenerativeSettings.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.changelogs != null && message.changelogs.length) - for (var i = 0; i < message.changelogs.length; ++i) - $root.google.cloud.dialogflow.cx.v3.Changelog.encode(message.changelogs[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.fallbackSettings != null && Object.hasOwnProperty.call(message, "fallbackSettings")) + $root.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.encode(message.fallbackSettings, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.generativeSafetySettings != null && Object.hasOwnProperty.call(message, "generativeSafetySettings")) + $root.google.cloud.dialogflow.cx.v3.SafetySettings.encode(message.generativeSafetySettings, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.languageCode); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.name); + if (message.knowledgeConnectorSettings != null && Object.hasOwnProperty.call(message, "knowledgeConnectorSettings")) + $root.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings.encode(message.knowledgeConnectorSettings, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.llmModelSettings != null && Object.hasOwnProperty.call(message, "llmModelSettings")) + $root.google.cloud.dialogflow.cx.v3.LlmModelSettings.encode(message.llmModelSettings, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListChangelogsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListChangelogsResponse.verify|verify} messages. + * Encodes the specified GenerativeSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GenerativeSettings.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsResponse + * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings * @static - * @param {google.cloud.dialogflow.cx.v3.IListChangelogsResponse} message ListChangelogsResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IGenerativeSettings} message GenerativeSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListChangelogsResponse.encodeDelimited = function encodeDelimited(message, writer) { + GenerativeSettings.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListChangelogsResponse message from the specified reader or buffer. + * Decodes a GenerativeSettings message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsResponse + * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings * @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.ListChangelogsResponse} ListChangelogsResponse + * @returns {google.cloud.dialogflow.cx.v3.GenerativeSettings} GenerativeSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListChangelogsResponse.decode = function decode(reader, length, error) { + GenerativeSettings.decode = function decode(reader, length, error) { 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.ListChangelogsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.GenerativeSettings(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { + case 5: { + message.name = reader.string(); + break; + } case 1: { - if (!(message.changelogs && message.changelogs.length)) - message.changelogs = []; - message.changelogs.push($root.google.cloud.dialogflow.cx.v3.Changelog.decode(reader, reader.uint32())); + message.fallbackSettings = $root.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.decode(reader, reader.uint32()); break; } - case 2: { - message.nextPageToken = reader.string(); + case 3: { + message.generativeSafetySettings = $root.google.cloud.dialogflow.cx.v3.SafetySettings.decode(reader, reader.uint32()); + break; + } + case 7: { + message.knowledgeConnectorSettings = $root.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings.decode(reader, reader.uint32()); + break; + } + case 4: { + message.languageCode = reader.string(); + break; + } + case 8: { + message.llmModelSettings = $root.google.cloud.dialogflow.cx.v3.LlmModelSettings.decode(reader, reader.uint32()); break; } default: @@ -30081,831 +30297,1007 @@ }; /** - * Decodes a ListChangelogsResponse message from the specified reader or buffer, length delimited. + * Decodes a GenerativeSettings message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsResponse + * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ListChangelogsResponse} ListChangelogsResponse + * @returns {google.cloud.dialogflow.cx.v3.GenerativeSettings} GenerativeSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListChangelogsResponse.decodeDelimited = function decodeDelimited(reader) { + GenerativeSettings.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListChangelogsResponse message. + * Verifies a GenerativeSettings message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsResponse + * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListChangelogsResponse.verify = function verify(message) { + GenerativeSettings.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.changelogs != null && message.hasOwnProperty("changelogs")) { - if (!Array.isArray(message.changelogs)) - return "changelogs: array expected"; - for (var i = 0; i < message.changelogs.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.Changelog.verify(message.changelogs[i]); - if (error) - return "changelogs." + error; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.fallbackSettings != null && message.hasOwnProperty("fallbackSettings")) { + var error = $root.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.verify(message.fallbackSettings); + if (error) + return "fallbackSettings." + error; + } + if (message.generativeSafetySettings != null && message.hasOwnProperty("generativeSafetySettings")) { + var error = $root.google.cloud.dialogflow.cx.v3.SafetySettings.verify(message.generativeSafetySettings); + if (error) + return "generativeSafetySettings." + error; + } + if (message.knowledgeConnectorSettings != null && message.hasOwnProperty("knowledgeConnectorSettings")) { + var error = $root.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings.verify(message.knowledgeConnectorSettings); + if (error) + return "knowledgeConnectorSettings." + error; + } + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; + if (message.llmModelSettings != null && message.hasOwnProperty("llmModelSettings")) { + var error = $root.google.cloud.dialogflow.cx.v3.LlmModelSettings.verify(message.llmModelSettings); + if (error) + return "llmModelSettings." + error; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; return null; }; /** - * Creates a ListChangelogsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GenerativeSettings message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsResponse + * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ListChangelogsResponse} ListChangelogsResponse + * @returns {google.cloud.dialogflow.cx.v3.GenerativeSettings} GenerativeSettings */ - ListChangelogsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListChangelogsResponse) + GenerativeSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.GenerativeSettings) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.ListChangelogsResponse(); - if (object.changelogs) { - if (!Array.isArray(object.changelogs)) - throw TypeError(".google.cloud.dialogflow.cx.v3.ListChangelogsResponse.changelogs: array expected"); - message.changelogs = []; - for (var i = 0; i < object.changelogs.length; ++i) { - if (typeof object.changelogs[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.ListChangelogsResponse.changelogs: object expected"); - message.changelogs[i] = $root.google.cloud.dialogflow.cx.v3.Changelog.fromObject(object.changelogs[i]); - } + var message = new $root.google.cloud.dialogflow.cx.v3.GenerativeSettings(); + if (object.name != null) + message.name = String(object.name); + if (object.fallbackSettings != null) { + if (typeof object.fallbackSettings !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.GenerativeSettings.fallbackSettings: object expected"); + message.fallbackSettings = $root.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.fromObject(object.fallbackSettings); + } + if (object.generativeSafetySettings != null) { + if (typeof object.generativeSafetySettings !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.GenerativeSettings.generativeSafetySettings: object expected"); + message.generativeSafetySettings = $root.google.cloud.dialogflow.cx.v3.SafetySettings.fromObject(object.generativeSafetySettings); + } + if (object.knowledgeConnectorSettings != null) { + if (typeof object.knowledgeConnectorSettings !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.GenerativeSettings.knowledgeConnectorSettings: object expected"); + message.knowledgeConnectorSettings = $root.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings.fromObject(object.knowledgeConnectorSettings); + } + if (object.languageCode != null) + message.languageCode = String(object.languageCode); + if (object.llmModelSettings != null) { + if (typeof object.llmModelSettings !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.GenerativeSettings.llmModelSettings: object expected"); + message.llmModelSettings = $root.google.cloud.dialogflow.cx.v3.LlmModelSettings.fromObject(object.llmModelSettings); } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a ListChangelogsResponse message. Also converts values to other types if specified. + * Creates a plain object from a GenerativeSettings message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsResponse + * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings * @static - * @param {google.cloud.dialogflow.cx.v3.ListChangelogsResponse} message ListChangelogsResponse + * @param {google.cloud.dialogflow.cx.v3.GenerativeSettings} message GenerativeSettings * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListChangelogsResponse.toObject = function toObject(message, options) { + GenerativeSettings.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.changelogs = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.changelogs && message.changelogs.length) { - object.changelogs = []; - for (var j = 0; j < message.changelogs.length; ++j) - object.changelogs[j] = $root.google.cloud.dialogflow.cx.v3.Changelog.toObject(message.changelogs[j], options); + if (options.defaults) { + object.fallbackSettings = null; + object.generativeSafetySettings = null; + object.languageCode = ""; + object.name = ""; + object.knowledgeConnectorSettings = null; + object.llmModelSettings = null; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + if (message.fallbackSettings != null && message.hasOwnProperty("fallbackSettings")) + object.fallbackSettings = $root.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.toObject(message.fallbackSettings, options); + if (message.generativeSafetySettings != null && message.hasOwnProperty("generativeSafetySettings")) + object.generativeSafetySettings = $root.google.cloud.dialogflow.cx.v3.SafetySettings.toObject(message.generativeSafetySettings, options); + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.knowledgeConnectorSettings != null && message.hasOwnProperty("knowledgeConnectorSettings")) + object.knowledgeConnectorSettings = $root.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings.toObject(message.knowledgeConnectorSettings, options); + if (message.llmModelSettings != null && message.hasOwnProperty("llmModelSettings")) + object.llmModelSettings = $root.google.cloud.dialogflow.cx.v3.LlmModelSettings.toObject(message.llmModelSettings, options); return object; }; /** - * Converts this ListChangelogsResponse to JSON. + * Converts this GenerativeSettings to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsResponse + * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings * @instance * @returns {Object.} JSON object */ - ListChangelogsResponse.prototype.toJSON = function toJSON() { + GenerativeSettings.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListChangelogsResponse + * Gets the default type url for GenerativeSettings * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsResponse + * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListChangelogsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GenerativeSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListChangelogsResponse"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.GenerativeSettings"; }; - return ListChangelogsResponse; - })(); + GenerativeSettings.FallbackSettings = (function() { - v3.GetChangelogRequest = (function() { + /** + * Properties of a FallbackSettings. + * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings + * @interface IFallbackSettings + * @property {string|null} [selectedPrompt] FallbackSettings selectedPrompt + * @property {Array.|null} [promptTemplates] FallbackSettings promptTemplates + */ - /** - * Properties of a GetChangelogRequest. - * @memberof google.cloud.dialogflow.cx.v3 - * @interface IGetChangelogRequest - * @property {string|null} [name] GetChangelogRequest name - */ + /** + * Constructs a new FallbackSettings. + * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings + * @classdesc Represents a FallbackSettings. + * @implements IFallbackSettings + * @constructor + * @param {google.cloud.dialogflow.cx.v3.GenerativeSettings.IFallbackSettings=} [properties] Properties to set + */ + function FallbackSettings(properties) { + this.promptTemplates = []; + 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]]; + } - /** - * Constructs a new GetChangelogRequest. - * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a GetChangelogRequest. - * @implements IGetChangelogRequest - * @constructor - * @param {google.cloud.dialogflow.cx.v3.IGetChangelogRequest=} [properties] Properties to set - */ - function GetChangelogRequest(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]]; - } + /** + * FallbackSettings selectedPrompt. + * @member {string} selectedPrompt + * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings + * @instance + */ + FallbackSettings.prototype.selectedPrompt = ""; - /** - * GetChangelogRequest name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.GetChangelogRequest - * @instance - */ - GetChangelogRequest.prototype.name = ""; + /** + * FallbackSettings promptTemplates. + * @member {Array.} promptTemplates + * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings + * @instance + */ + FallbackSettings.prototype.promptTemplates = $util.emptyArray; - /** - * Creates a new GetChangelogRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.GetChangelogRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.IGetChangelogRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.GetChangelogRequest} GetChangelogRequest instance - */ - GetChangelogRequest.create = function create(properties) { - return new GetChangelogRequest(properties); - }; + /** + * Creates a new FallbackSettings instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings + * @static + * @param {google.cloud.dialogflow.cx.v3.GenerativeSettings.IFallbackSettings=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings} FallbackSettings instance + */ + FallbackSettings.create = function create(properties) { + return new FallbackSettings(properties); + }; - /** - * Encodes the specified GetChangelogRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetChangelogRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.GetChangelogRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.IGetChangelogRequest} message GetChangelogRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetChangelogRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; + /** + * Encodes the specified FallbackSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings + * @static + * @param {google.cloud.dialogflow.cx.v3.GenerativeSettings.IFallbackSettings} message FallbackSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FallbackSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.selectedPrompt != null && Object.hasOwnProperty.call(message, "selectedPrompt")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.selectedPrompt); + if (message.promptTemplates != null && message.promptTemplates.length) + for (var i = 0; i < message.promptTemplates.length; ++i) + $root.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate.encode(message.promptTemplates[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; - /** - * Encodes the specified GetChangelogRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetChangelogRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.GetChangelogRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.IGetChangelogRequest} message GetChangelogRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetChangelogRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified FallbackSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings + * @static + * @param {google.cloud.dialogflow.cx.v3.GenerativeSettings.IFallbackSettings} message FallbackSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FallbackSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a GetChangelogRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.GetChangelogRequest - * @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.GetChangelogRequest} GetChangelogRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetChangelogRequest.decode = function decode(reader, length, error) { - 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.GetChangelogRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); + /** + * Decodes a FallbackSettings message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings + * @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.GenerativeSettings.FallbackSettings} FallbackSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FallbackSettings.decode = function decode(reader, length, error) { + 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.GenerativeSettings.FallbackSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 3: { + message.selectedPrompt = reader.string(); + break; + } + case 4: { + if (!(message.promptTemplates && message.promptTemplates.length)) + message.promptTemplates = []; + message.promptTemplates.push($root.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); break; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; + return message; + }; - /** - * Decodes a GetChangelogRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.GetChangelogRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.GetChangelogRequest} GetChangelogRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetChangelogRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a FallbackSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings} FallbackSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FallbackSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a GetChangelogRequest message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.GetChangelogRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetChangelogRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; + /** + * Verifies a FallbackSettings message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FallbackSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.selectedPrompt != null && message.hasOwnProperty("selectedPrompt")) + if (!$util.isString(message.selectedPrompt)) + return "selectedPrompt: string expected"; + if (message.promptTemplates != null && message.hasOwnProperty("promptTemplates")) { + if (!Array.isArray(message.promptTemplates)) + return "promptTemplates: array expected"; + for (var i = 0; i < message.promptTemplates.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate.verify(message.promptTemplates[i]); + if (error) + return "promptTemplates." + error; + } + } + return null; + }; - /** - * Creates a GetChangelogRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.GetChangelogRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.GetChangelogRequest} GetChangelogRequest - */ - GetChangelogRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.GetChangelogRequest) + /** + * Creates a FallbackSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings} FallbackSettings + */ + FallbackSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings(); + if (object.selectedPrompt != null) + message.selectedPrompt = String(object.selectedPrompt); + if (object.promptTemplates) { + if (!Array.isArray(object.promptTemplates)) + throw TypeError(".google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.promptTemplates: array expected"); + message.promptTemplates = []; + for (var i = 0; i < object.promptTemplates.length; ++i) { + if (typeof object.promptTemplates[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.promptTemplates: object expected"); + message.promptTemplates[i] = $root.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate.fromObject(object.promptTemplates[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FallbackSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings + * @static + * @param {google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings} message FallbackSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FallbackSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.promptTemplates = []; + if (options.defaults) + object.selectedPrompt = ""; + if (message.selectedPrompt != null && message.hasOwnProperty("selectedPrompt")) + object.selectedPrompt = message.selectedPrompt; + if (message.promptTemplates && message.promptTemplates.length) { + object.promptTemplates = []; + for (var j = 0; j < message.promptTemplates.length; ++j) + object.promptTemplates[j] = $root.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate.toObject(message.promptTemplates[j], options); + } return object; - var message = new $root.google.cloud.dialogflow.cx.v3.GetChangelogRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; + }; - /** - * Creates a plain object from a GetChangelogRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.GetChangelogRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.GetChangelogRequest} message GetChangelogRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetChangelogRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; + /** + * Converts this FallbackSettings to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings + * @instance + * @returns {Object.} JSON object + */ + FallbackSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this GetChangelogRequest to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.GetChangelogRequest - * @instance - * @returns {Object.} JSON object - */ - GetChangelogRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Gets the default type url for FallbackSettings + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FallbackSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings"; + }; - /** - * Gets the default type url for GetChangelogRequest - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.GetChangelogRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetChangelogRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.GetChangelogRequest"; - }; + FallbackSettings.PromptTemplate = (function() { - return GetChangelogRequest; - })(); + /** + * Properties of a PromptTemplate. + * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings + * @interface IPromptTemplate + * @property {string|null} [displayName] PromptTemplate displayName + * @property {string|null} [promptText] PromptTemplate promptText + * @property {boolean|null} [frozen] PromptTemplate frozen + */ - v3.Changelog = (function() { + /** + * Constructs a new PromptTemplate. + * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings + * @classdesc Represents a PromptTemplate. + * @implements IPromptTemplate + * @constructor + * @param {google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.IPromptTemplate=} [properties] Properties to set + */ + function PromptTemplate(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]]; + } - /** - * Properties of a Changelog. - * @memberof google.cloud.dialogflow.cx.v3 - * @interface IChangelog - * @property {string|null} [name] Changelog name - * @property {string|null} [userEmail] Changelog userEmail - * @property {string|null} [displayName] Changelog displayName - * @property {string|null} [action] Changelog action - * @property {string|null} [type] Changelog type - * @property {string|null} [resource] Changelog resource - * @property {google.protobuf.ITimestamp|null} [createTime] Changelog createTime - * @property {string|null} [languageCode] Changelog languageCode - */ + /** + * PromptTemplate displayName. + * @member {string} displayName + * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate + * @instance + */ + PromptTemplate.prototype.displayName = ""; - /** - * Constructs a new Changelog. - * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a Changelog. - * @implements IChangelog - * @constructor - * @param {google.cloud.dialogflow.cx.v3.IChangelog=} [properties] Properties to set - */ - function Changelog(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]]; - } + /** + * PromptTemplate promptText. + * @member {string} promptText + * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate + * @instance + */ + PromptTemplate.prototype.promptText = ""; - /** - * Changelog name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.Changelog - * @instance - */ - Changelog.prototype.name = ""; + /** + * PromptTemplate frozen. + * @member {boolean} frozen + * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate + * @instance + */ + PromptTemplate.prototype.frozen = false; - /** - * Changelog userEmail. - * @member {string} userEmail - * @memberof google.cloud.dialogflow.cx.v3.Changelog - * @instance - */ - Changelog.prototype.userEmail = ""; - - /** - * Changelog displayName. - * @member {string} displayName - * @memberof google.cloud.dialogflow.cx.v3.Changelog - * @instance - */ - Changelog.prototype.displayName = ""; + /** + * Creates a new PromptTemplate instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate + * @static + * @param {google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.IPromptTemplate=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate} PromptTemplate instance + */ + PromptTemplate.create = function create(properties) { + return new PromptTemplate(properties); + }; - /** - * Changelog action. - * @member {string} action - * @memberof google.cloud.dialogflow.cx.v3.Changelog - * @instance - */ - Changelog.prototype.action = ""; + /** + * Encodes the specified PromptTemplate message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate + * @static + * @param {google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.IPromptTemplate} message PromptTemplate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PromptTemplate.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.promptText != null && Object.hasOwnProperty.call(message, "promptText")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.promptText); + if (message.frozen != null && Object.hasOwnProperty.call(message, "frozen")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.frozen); + return writer; + }; - /** - * Changelog type. - * @member {string} type - * @memberof google.cloud.dialogflow.cx.v3.Changelog - * @instance - */ - Changelog.prototype.type = ""; + /** + * Encodes the specified PromptTemplate message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate + * @static + * @param {google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.IPromptTemplate} message PromptTemplate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PromptTemplate.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Changelog resource. - * @member {string} resource - * @memberof google.cloud.dialogflow.cx.v3.Changelog - * @instance - */ - Changelog.prototype.resource = ""; + /** + * Decodes a PromptTemplate message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate + * @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.GenerativeSettings.FallbackSettings.PromptTemplate} PromptTemplate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PromptTemplate.decode = function decode(reader, length, error) { + 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.GenerativeSettings.FallbackSettings.PromptTemplate(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.displayName = reader.string(); + break; + } + case 2: { + message.promptText = reader.string(); + break; + } + case 3: { + message.frozen = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Changelog createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.dialogflow.cx.v3.Changelog - * @instance - */ - Changelog.prototype.createTime = null; + /** + * Decodes a PromptTemplate message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate} PromptTemplate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PromptTemplate.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Changelog languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3.Changelog - * @instance - */ - Changelog.prototype.languageCode = ""; + /** + * Verifies a PromptTemplate message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PromptTemplate.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.promptText != null && message.hasOwnProperty("promptText")) + if (!$util.isString(message.promptText)) + return "promptText: string expected"; + if (message.frozen != null && message.hasOwnProperty("frozen")) + if (typeof message.frozen !== "boolean") + return "frozen: boolean expected"; + return null; + }; - /** - * Creates a new Changelog instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.Changelog - * @static - * @param {google.cloud.dialogflow.cx.v3.IChangelog=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.Changelog} Changelog instance - */ - Changelog.create = function create(properties) { - return new Changelog(properties); - }; + /** + * Creates a PromptTemplate message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate} PromptTemplate + */ + PromptTemplate.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.promptText != null) + message.promptText = String(object.promptText); + if (object.frozen != null) + message.frozen = Boolean(object.frozen); + return message; + }; - /** - * Encodes the specified Changelog message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Changelog.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.Changelog - * @static - * @param {google.cloud.dialogflow.cx.v3.IChangelog} message Changelog message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Changelog.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.userEmail != null && Object.hasOwnProperty.call(message, "userEmail")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.userEmail); - if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.resource); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.displayName); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.type); - if (message.action != null && Object.hasOwnProperty.call(message, "action")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.action); - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 14, wireType 2 =*/114).string(message.languageCode); - return writer; - }; + /** + * Creates a plain object from a PromptTemplate message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate + * @static + * @param {google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate} message PromptTemplate + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PromptTemplate.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.displayName = ""; + object.promptText = ""; + object.frozen = false; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.promptText != null && message.hasOwnProperty("promptText")) + object.promptText = message.promptText; + if (message.frozen != null && message.hasOwnProperty("frozen")) + object.frozen = message.frozen; + return object; + }; - /** - * Encodes the specified Changelog message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Changelog.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Changelog - * @static - * @param {google.cloud.dialogflow.cx.v3.IChangelog} message Changelog message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Changelog.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Converts this PromptTemplate to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate + * @instance + * @returns {Object.} JSON object + */ + PromptTemplate.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Decodes a Changelog message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.Changelog - * @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.Changelog} Changelog - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Changelog.decode = function decode(reader, length, error) { - 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.Changelog(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.userEmail = reader.string(); - break; - } - case 7: { - message.displayName = reader.string(); - break; - } - case 11: { - message.action = reader.string(); - break; - } - case 8: { - message.type = reader.string(); - break; - } - case 3: { - message.resource = reader.string(); - break; - } - case 4: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 14: { - message.languageCode = reader.string(); - break; + /** + * Gets the default type url for PromptTemplate + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PromptTemplate.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate"; + }; - /** - * Decodes a Changelog message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Changelog - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.Changelog} Changelog - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Changelog.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + return PromptTemplate; + })(); - /** - * Verifies a Changelog message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.Changelog - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Changelog.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.userEmail != null && message.hasOwnProperty("userEmail")) - if (!$util.isString(message.userEmail)) - return "userEmail: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.action != null && message.hasOwnProperty("action")) - if (!$util.isString(message.action)) - return "action: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.resource != null && message.hasOwnProperty("resource")) - if (!$util.isString(message.resource)) - return "resource: string expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; - return null; - }; + return FallbackSettings; + })(); - /** - * Creates a Changelog message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.Changelog - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.Changelog} Changelog - */ - Changelog.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.Changelog) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.Changelog(); - if (object.name != null) - message.name = String(object.name); - if (object.userEmail != null) - message.userEmail = String(object.userEmail); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.action != null) - message.action = String(object.action); - if (object.type != null) - message.type = String(object.type); - if (object.resource != null) - message.resource = String(object.resource); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.Changelog.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.languageCode != null) - message.languageCode = String(object.languageCode); - return message; - }; + GenerativeSettings.KnowledgeConnectorSettings = (function() { - /** - * Creates a plain object from a Changelog message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.Changelog - * @static - * @param {google.cloud.dialogflow.cx.v3.Changelog} message Changelog - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Changelog.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.userEmail = ""; - object.resource = ""; - object.createTime = null; - object.displayName = ""; - object.type = ""; - object.action = ""; - object.languageCode = ""; + /** + * Properties of a KnowledgeConnectorSettings. + * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings + * @interface IKnowledgeConnectorSettings + * @property {string|null} [business] KnowledgeConnectorSettings business + * @property {string|null} [agent] KnowledgeConnectorSettings agent + * @property {string|null} [agentIdentity] KnowledgeConnectorSettings agentIdentity + * @property {string|null} [businessDescription] KnowledgeConnectorSettings businessDescription + * @property {string|null} [agentScope] KnowledgeConnectorSettings agentScope + * @property {boolean|null} [disableDataStoreFallback] KnowledgeConnectorSettings disableDataStoreFallback + */ + + /** + * Constructs a new KnowledgeConnectorSettings. + * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings + * @classdesc Represents a KnowledgeConnectorSettings. + * @implements IKnowledgeConnectorSettings + * @constructor + * @param {google.cloud.dialogflow.cx.v3.GenerativeSettings.IKnowledgeConnectorSettings=} [properties] Properties to set + */ + function KnowledgeConnectorSettings(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]]; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.userEmail != null && message.hasOwnProperty("userEmail")) - object.userEmail = message.userEmail; - if (message.resource != null && message.hasOwnProperty("resource")) - object.resource = message.resource; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.action != null && message.hasOwnProperty("action")) - object.action = message.action; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; - return object; - }; - /** - * Converts this Changelog to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.Changelog - * @instance - * @returns {Object.} JSON object - */ - Changelog.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * KnowledgeConnectorSettings business. + * @member {string} business + * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings + * @instance + */ + KnowledgeConnectorSettings.prototype.business = ""; - /** - * Gets the default type url for Changelog - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.Changelog - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Changelog.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Changelog"; - }; + /** + * KnowledgeConnectorSettings agent. + * @member {string} agent + * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings + * @instance + */ + KnowledgeConnectorSettings.prototype.agent = ""; - return Changelog; - })(); + /** + * KnowledgeConnectorSettings agentIdentity. + * @member {string} agentIdentity + * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings + * @instance + */ + KnowledgeConnectorSettings.prototype.agentIdentity = ""; - v3.Deployments = (function() { + /** + * KnowledgeConnectorSettings businessDescription. + * @member {string} businessDescription + * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings + * @instance + */ + KnowledgeConnectorSettings.prototype.businessDescription = ""; - /** - * Constructs a new Deployments service. - * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a Deployments - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function Deployments(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } + /** + * KnowledgeConnectorSettings agentScope. + * @member {string} agentScope + * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings + * @instance + */ + KnowledgeConnectorSettings.prototype.agentScope = ""; - (Deployments.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Deployments; + /** + * KnowledgeConnectorSettings disableDataStoreFallback. + * @member {boolean} disableDataStoreFallback + * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings + * @instance + */ + KnowledgeConnectorSettings.prototype.disableDataStoreFallback = false; - /** - * Creates new Deployments service using the specified rpc implementation. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.Deployments - * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {Deployments} RPC service. Useful where requests and/or responses are streamed. - */ - Deployments.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; + /** + * Creates a new KnowledgeConnectorSettings instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings + * @static + * @param {google.cloud.dialogflow.cx.v3.GenerativeSettings.IKnowledgeConnectorSettings=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings} KnowledgeConnectorSettings instance + */ + KnowledgeConnectorSettings.create = function create(properties) { + return new KnowledgeConnectorSettings(properties); + }; - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Deployments|listDeployments}. - * @memberof google.cloud.dialogflow.cx.v3.Deployments - * @typedef ListDeploymentsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.ListDeploymentsResponse} [response] ListDeploymentsResponse - */ + /** + * Encodes the specified KnowledgeConnectorSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings + * @static + * @param {google.cloud.dialogflow.cx.v3.GenerativeSettings.IKnowledgeConnectorSettings} message KnowledgeConnectorSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KnowledgeConnectorSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.business != null && Object.hasOwnProperty.call(message, "business")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.business); + if (message.agent != null && Object.hasOwnProperty.call(message, "agent")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.agent); + if (message.agentIdentity != null && Object.hasOwnProperty.call(message, "agentIdentity")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.agentIdentity); + if (message.businessDescription != null && Object.hasOwnProperty.call(message, "businessDescription")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.businessDescription); + if (message.agentScope != null && Object.hasOwnProperty.call(message, "agentScope")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.agentScope); + if (message.disableDataStoreFallback != null && Object.hasOwnProperty.call(message, "disableDataStoreFallback")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.disableDataStoreFallback); + return writer; + }; - /** - * Calls ListDeployments. - * @function listDeployments - * @memberof google.cloud.dialogflow.cx.v3.Deployments - * @instance - * @param {google.cloud.dialogflow.cx.v3.IListDeploymentsRequest} request ListDeploymentsRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Deployments.ListDeploymentsCallback} callback Node-style callback called with the error, if any, and ListDeploymentsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Deployments.prototype.listDeployments = function listDeployments(request, callback) { - return this.rpcCall(listDeployments, $root.google.cloud.dialogflow.cx.v3.ListDeploymentsRequest, $root.google.cloud.dialogflow.cx.v3.ListDeploymentsResponse, request, callback); - }, "name", { value: "ListDeployments" }); + /** + * Encodes the specified KnowledgeConnectorSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings + * @static + * @param {google.cloud.dialogflow.cx.v3.GenerativeSettings.IKnowledgeConnectorSettings} message KnowledgeConnectorSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KnowledgeConnectorSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Calls ListDeployments. - * @function listDeployments - * @memberof google.cloud.dialogflow.cx.v3.Deployments - * @instance - * @param {google.cloud.dialogflow.cx.v3.IListDeploymentsRequest} request ListDeploymentsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Decodes a KnowledgeConnectorSettings message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings + * @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.GenerativeSettings.KnowledgeConnectorSettings} KnowledgeConnectorSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KnowledgeConnectorSettings.decode = function decode(reader, length, error) { + 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.GenerativeSettings.KnowledgeConnectorSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.business = reader.string(); + break; + } + case 2: { + message.agent = reader.string(); + break; + } + case 3: { + message.agentIdentity = reader.string(); + break; + } + case 4: { + message.businessDescription = reader.string(); + break; + } + case 5: { + message.agentScope = reader.string(); + break; + } + case 8: { + message.disableDataStoreFallback = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Deployments|getDeployment}. - * @memberof google.cloud.dialogflow.cx.v3.Deployments - * @typedef GetDeploymentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.Deployment} [response] Deployment - */ + /** + * Decodes a KnowledgeConnectorSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings} KnowledgeConnectorSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KnowledgeConnectorSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Calls GetDeployment. - * @function getDeployment - * @memberof google.cloud.dialogflow.cx.v3.Deployments - * @instance - * @param {google.cloud.dialogflow.cx.v3.IGetDeploymentRequest} request GetDeploymentRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Deployments.GetDeploymentCallback} callback Node-style callback called with the error, if any, and Deployment - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Deployments.prototype.getDeployment = function getDeployment(request, callback) { - return this.rpcCall(getDeployment, $root.google.cloud.dialogflow.cx.v3.GetDeploymentRequest, $root.google.cloud.dialogflow.cx.v3.Deployment, request, callback); - }, "name", { value: "GetDeployment" }); + /** + * Verifies a KnowledgeConnectorSettings message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + KnowledgeConnectorSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.business != null && message.hasOwnProperty("business")) + if (!$util.isString(message.business)) + return "business: string expected"; + if (message.agent != null && message.hasOwnProperty("agent")) + if (!$util.isString(message.agent)) + return "agent: string expected"; + if (message.agentIdentity != null && message.hasOwnProperty("agentIdentity")) + if (!$util.isString(message.agentIdentity)) + return "agentIdentity: string expected"; + if (message.businessDescription != null && message.hasOwnProperty("businessDescription")) + if (!$util.isString(message.businessDescription)) + return "businessDescription: string expected"; + if (message.agentScope != null && message.hasOwnProperty("agentScope")) + if (!$util.isString(message.agentScope)) + return "agentScope: string expected"; + if (message.disableDataStoreFallback != null && message.hasOwnProperty("disableDataStoreFallback")) + if (typeof message.disableDataStoreFallback !== "boolean") + return "disableDataStoreFallback: boolean expected"; + return null; + }; - /** - * Calls GetDeployment. - * @function getDeployment - * @memberof google.cloud.dialogflow.cx.v3.Deployments - * @instance - * @param {google.cloud.dialogflow.cx.v3.IGetDeploymentRequest} request GetDeploymentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Creates a KnowledgeConnectorSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings} KnowledgeConnectorSettings + */ + KnowledgeConnectorSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings(); + if (object.business != null) + message.business = String(object.business); + if (object.agent != null) + message.agent = String(object.agent); + if (object.agentIdentity != null) + message.agentIdentity = String(object.agentIdentity); + if (object.businessDescription != null) + message.businessDescription = String(object.businessDescription); + if (object.agentScope != null) + message.agentScope = String(object.agentScope); + if (object.disableDataStoreFallback != null) + message.disableDataStoreFallback = Boolean(object.disableDataStoreFallback); + return message; + }; - return Deployments; + /** + * Creates a plain object from a KnowledgeConnectorSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings + * @static + * @param {google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings} message KnowledgeConnectorSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + KnowledgeConnectorSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.business = ""; + object.agent = ""; + object.agentIdentity = ""; + object.businessDescription = ""; + object.agentScope = ""; + object.disableDataStoreFallback = false; + } + if (message.business != null && message.hasOwnProperty("business")) + object.business = message.business; + if (message.agent != null && message.hasOwnProperty("agent")) + object.agent = message.agent; + if (message.agentIdentity != null && message.hasOwnProperty("agentIdentity")) + object.agentIdentity = message.agentIdentity; + if (message.businessDescription != null && message.hasOwnProperty("businessDescription")) + object.businessDescription = message.businessDescription; + if (message.agentScope != null && message.hasOwnProperty("agentScope")) + object.agentScope = message.agentScope; + if (message.disableDataStoreFallback != null && message.hasOwnProperty("disableDataStoreFallback")) + object.disableDataStoreFallback = message.disableDataStoreFallback; + return object; + }; + + /** + * Converts this KnowledgeConnectorSettings to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings + * @instance + * @returns {Object.} JSON object + */ + KnowledgeConnectorSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for KnowledgeConnectorSettings + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + KnowledgeConnectorSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings"; + }; + + return KnowledgeConnectorSettings; + })(); + + return GenerativeSettings; })(); - v3.Deployment = (function() { + v3.LlmModelSettings = (function() { /** - * Properties of a Deployment. + * Properties of a LlmModelSettings. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IDeployment - * @property {string|null} [name] Deployment name - * @property {string|null} [flowVersion] Deployment flowVersion - * @property {google.cloud.dialogflow.cx.v3.Deployment.State|null} [state] Deployment state - * @property {google.cloud.dialogflow.cx.v3.Deployment.IResult|null} [result] Deployment result - * @property {google.protobuf.ITimestamp|null} [startTime] Deployment startTime - * @property {google.protobuf.ITimestamp|null} [endTime] Deployment endTime + * @interface ILlmModelSettings + * @property {string|null} [model] LlmModelSettings model + * @property {string|null} [promptText] LlmModelSettings promptText */ /** - * Constructs a new Deployment. + * Constructs a new LlmModelSettings. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a Deployment. - * @implements IDeployment + * @classdesc Represents a LlmModelSettings. + * @implements ILlmModelSettings * @constructor - * @param {google.cloud.dialogflow.cx.v3.IDeployment=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.ILlmModelSettings=} [properties] Properties to set */ - function Deployment(properties) { + function LlmModelSettings(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -30913,147 +31305,369 @@ } /** - * Deployment name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.Deployment - * @instance - */ - Deployment.prototype.name = ""; - - /** - * Deployment flowVersion. - * @member {string} flowVersion - * @memberof google.cloud.dialogflow.cx.v3.Deployment - * @instance - */ - Deployment.prototype.flowVersion = ""; - - /** - * Deployment state. - * @member {google.cloud.dialogflow.cx.v3.Deployment.State} state - * @memberof google.cloud.dialogflow.cx.v3.Deployment - * @instance - */ - Deployment.prototype.state = 0; - - /** - * Deployment result. - * @member {google.cloud.dialogflow.cx.v3.Deployment.IResult|null|undefined} result - * @memberof google.cloud.dialogflow.cx.v3.Deployment - * @instance - */ - Deployment.prototype.result = null; - - /** - * Deployment startTime. - * @member {google.protobuf.ITimestamp|null|undefined} startTime - * @memberof google.cloud.dialogflow.cx.v3.Deployment + * LlmModelSettings model. + * @member {string} model + * @memberof google.cloud.dialogflow.cx.v3.LlmModelSettings * @instance */ - Deployment.prototype.startTime = null; + LlmModelSettings.prototype.model = ""; /** - * Deployment endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.cloud.dialogflow.cx.v3.Deployment + * LlmModelSettings promptText. + * @member {string} promptText + * @memberof google.cloud.dialogflow.cx.v3.LlmModelSettings * @instance */ - Deployment.prototype.endTime = null; + LlmModelSettings.prototype.promptText = ""; /** - * Creates a new Deployment instance using the specified properties. + * Creates a new LlmModelSettings instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.Deployment + * @memberof google.cloud.dialogflow.cx.v3.LlmModelSettings * @static - * @param {google.cloud.dialogflow.cx.v3.IDeployment=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.Deployment} Deployment instance + * @param {google.cloud.dialogflow.cx.v3.ILlmModelSettings=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.LlmModelSettings} LlmModelSettings instance */ - Deployment.create = function create(properties) { - return new Deployment(properties); + LlmModelSettings.create = function create(properties) { + return new LlmModelSettings(properties); }; /** - * Encodes the specified Deployment message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Deployment.verify|verify} messages. + * Encodes the specified LlmModelSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.LlmModelSettings.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.Deployment + * @memberof google.cloud.dialogflow.cx.v3.LlmModelSettings * @static - * @param {google.cloud.dialogflow.cx.v3.IDeployment} message Deployment message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ILlmModelSettings} message LlmModelSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Deployment.encode = function encode(message, writer) { + LlmModelSettings.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.flowVersion != null && Object.hasOwnProperty.call(message, "flowVersion")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.flowVersion); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.state); - if (message.result != null && Object.hasOwnProperty.call(message, "result")) - $root.google.cloud.dialogflow.cx.v3.Deployment.Result.encode(message.result, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.model != null && Object.hasOwnProperty.call(message, "model")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.model); + if (message.promptText != null && Object.hasOwnProperty.call(message, "promptText")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.promptText); return writer; }; /** - * Encodes the specified Deployment message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Deployment.verify|verify} messages. + * Encodes the specified LlmModelSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.LlmModelSettings.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Deployment + * @memberof google.cloud.dialogflow.cx.v3.LlmModelSettings * @static - * @param {google.cloud.dialogflow.cx.v3.IDeployment} message Deployment message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ILlmModelSettings} message LlmModelSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Deployment.encodeDelimited = function encodeDelimited(message, writer) { + LlmModelSettings.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Deployment message from the specified reader or buffer. + * Decodes a LlmModelSettings message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.Deployment + * @memberof google.cloud.dialogflow.cx.v3.LlmModelSettings * @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.Deployment} Deployment + * @returns {google.cloud.dialogflow.cx.v3.LlmModelSettings} LlmModelSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Deployment.decode = function decode(reader, length, error) { + LlmModelSettings.decode = function decode(reader, length, error) { 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.Deployment(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.LlmModelSettings(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.model = reader.string(); break; } case 2: { - message.flowVersion = reader.string(); - break; - } - case 3: { - message.state = reader.int32(); - break; - } - case 4: { - message.result = $root.google.cloud.dialogflow.cx.v3.Deployment.Result.decode(reader, reader.uint32()); + message.promptText = reader.string(); break; } - case 5: { - message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LlmModelSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.LlmModelSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.LlmModelSettings} LlmModelSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LlmModelSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LlmModelSettings message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.LlmModelSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LlmModelSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.model != null && message.hasOwnProperty("model")) + if (!$util.isString(message.model)) + return "model: string expected"; + if (message.promptText != null && message.hasOwnProperty("promptText")) + if (!$util.isString(message.promptText)) + return "promptText: string expected"; + return null; + }; + + /** + * Creates a LlmModelSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.LlmModelSettings + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.LlmModelSettings} LlmModelSettings + */ + LlmModelSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.LlmModelSettings) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.LlmModelSettings(); + if (object.model != null) + message.model = String(object.model); + if (object.promptText != null) + message.promptText = String(object.promptText); + return message; + }; + + /** + * Creates a plain object from a LlmModelSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.LlmModelSettings + * @static + * @param {google.cloud.dialogflow.cx.v3.LlmModelSettings} message LlmModelSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LlmModelSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.model = ""; + object.promptText = ""; + } + if (message.model != null && message.hasOwnProperty("model")) + object.model = message.model; + if (message.promptText != null && message.hasOwnProperty("promptText")) + object.promptText = message.promptText; + return object; + }; + + /** + * Converts this LlmModelSettings to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.LlmModelSettings + * @instance + * @returns {Object.} JSON object + */ + LlmModelSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LlmModelSettings + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.LlmModelSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LlmModelSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.LlmModelSettings"; + }; + + return LlmModelSettings; + })(); + + v3.SafetySettings = (function() { + + /** + * Properties of a SafetySettings. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface ISafetySettings + * @property {google.cloud.dialogflow.cx.v3.SafetySettings.PhraseMatchStrategy|null} [defaultBannedPhraseMatchStrategy] SafetySettings defaultBannedPhraseMatchStrategy + * @property {Array.|null} [bannedPhrases] SafetySettings bannedPhrases + * @property {google.cloud.dialogflow.cx.v3.SafetySettings.IRaiSettings|null} [raiSettings] SafetySettings raiSettings + * @property {google.cloud.dialogflow.cx.v3.SafetySettings.IRaiSettings|null} [defaultRaiSettings] SafetySettings defaultRaiSettings + * @property {google.cloud.dialogflow.cx.v3.SafetySettings.IPromptSecuritySettings|null} [promptSecuritySettings] SafetySettings promptSecuritySettings + */ + + /** + * Constructs a new SafetySettings. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a SafetySettings. + * @implements ISafetySettings + * @constructor + * @param {google.cloud.dialogflow.cx.v3.ISafetySettings=} [properties] Properties to set + */ + function SafetySettings(properties) { + this.bannedPhrases = []; + 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]]; + } + + /** + * SafetySettings defaultBannedPhraseMatchStrategy. + * @member {google.cloud.dialogflow.cx.v3.SafetySettings.PhraseMatchStrategy} defaultBannedPhraseMatchStrategy + * @memberof google.cloud.dialogflow.cx.v3.SafetySettings + * @instance + */ + SafetySettings.prototype.defaultBannedPhraseMatchStrategy = 0; + + /** + * SafetySettings bannedPhrases. + * @member {Array.} bannedPhrases + * @memberof google.cloud.dialogflow.cx.v3.SafetySettings + * @instance + */ + SafetySettings.prototype.bannedPhrases = $util.emptyArray; + + /** + * SafetySettings raiSettings. + * @member {google.cloud.dialogflow.cx.v3.SafetySettings.IRaiSettings|null|undefined} raiSettings + * @memberof google.cloud.dialogflow.cx.v3.SafetySettings + * @instance + */ + SafetySettings.prototype.raiSettings = null; + + /** + * SafetySettings defaultRaiSettings. + * @member {google.cloud.dialogflow.cx.v3.SafetySettings.IRaiSettings|null|undefined} defaultRaiSettings + * @memberof google.cloud.dialogflow.cx.v3.SafetySettings + * @instance + */ + SafetySettings.prototype.defaultRaiSettings = null; + + /** + * SafetySettings promptSecuritySettings. + * @member {google.cloud.dialogflow.cx.v3.SafetySettings.IPromptSecuritySettings|null|undefined} promptSecuritySettings + * @memberof google.cloud.dialogflow.cx.v3.SafetySettings + * @instance + */ + SafetySettings.prototype.promptSecuritySettings = null; + + /** + * Creates a new SafetySettings instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.SafetySettings + * @static + * @param {google.cloud.dialogflow.cx.v3.ISafetySettings=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.SafetySettings} SafetySettings instance + */ + SafetySettings.create = function create(properties) { + return new SafetySettings(properties); + }; + + /** + * Encodes the specified SafetySettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SafetySettings.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.SafetySettings + * @static + * @param {google.cloud.dialogflow.cx.v3.ISafetySettings} message SafetySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SafetySettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.bannedPhrases != null && message.bannedPhrases.length) + for (var i = 0; i < message.bannedPhrases.length; ++i) + $root.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase.encode(message.bannedPhrases[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.raiSettings != null && Object.hasOwnProperty.call(message, "raiSettings")) + $root.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.encode(message.raiSettings, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.defaultRaiSettings != null && Object.hasOwnProperty.call(message, "defaultRaiSettings")) + $root.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.encode(message.defaultRaiSettings, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.defaultBannedPhraseMatchStrategy != null && Object.hasOwnProperty.call(message, "defaultBannedPhraseMatchStrategy")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.defaultBannedPhraseMatchStrategy); + if (message.promptSecuritySettings != null && Object.hasOwnProperty.call(message, "promptSecuritySettings")) + $root.google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings.encode(message.promptSecuritySettings, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SafetySettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SafetySettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.SafetySettings + * @static + * @param {google.cloud.dialogflow.cx.v3.ISafetySettings} message SafetySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SafetySettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SafetySettings message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.SafetySettings + * @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.SafetySettings} SafetySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SafetySettings.decode = function decode(reader, length, error) { + 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.SafetySettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 4: { + message.defaultBannedPhraseMatchStrategy = reader.int32(); + break; } - case 6: { - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + case 1: { + if (!(message.bannedPhrases && message.bannedPhrases.length)) + message.bannedPhrases = []; + message.bannedPhrases.push($root.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase.decode(reader, reader.uint32())); + break; + } + case 2: { + message.raiSettings = $root.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.decode(reader, reader.uint32()); + break; + } + case 3: { + message.defaultRaiSettings = $root.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.decode(reader, reader.uint32()); + break; + } + case 8: { + message.promptSecuritySettings = $root.google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings.decode(reader, reader.uint32()); break; } default: @@ -31065,224 +31679,210 @@ }; /** - * Decodes a Deployment message from the specified reader or buffer, length delimited. + * Decodes a SafetySettings message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Deployment + * @memberof google.cloud.dialogflow.cx.v3.SafetySettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.Deployment} Deployment + * @returns {google.cloud.dialogflow.cx.v3.SafetySettings} SafetySettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Deployment.decodeDelimited = function decodeDelimited(reader) { + SafetySettings.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Deployment message. + * Verifies a SafetySettings message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.Deployment + * @memberof google.cloud.dialogflow.cx.v3.SafetySettings * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Deployment.verify = function verify(message) { + SafetySettings.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.flowVersion != null && message.hasOwnProperty("flowVersion")) - if (!$util.isString(message.flowVersion)) - return "flowVersion: string expected"; - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { + if (message.defaultBannedPhraseMatchStrategy != null && message.hasOwnProperty("defaultBannedPhraseMatchStrategy")) + switch (message.defaultBannedPhraseMatchStrategy) { default: - return "state: enum value expected"; + return "defaultBannedPhraseMatchStrategy: enum value expected"; case 0: case 1: case 2: - case 3: break; } - if (message.result != null && message.hasOwnProperty("result")) { - var error = $root.google.cloud.dialogflow.cx.v3.Deployment.Result.verify(message.result); + if (message.bannedPhrases != null && message.hasOwnProperty("bannedPhrases")) { + if (!Array.isArray(message.bannedPhrases)) + return "bannedPhrases: array expected"; + for (var i = 0; i < message.bannedPhrases.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase.verify(message.bannedPhrases[i]); + if (error) + return "bannedPhrases." + error; + } + } + if (message.raiSettings != null && message.hasOwnProperty("raiSettings")) { + var error = $root.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.verify(message.raiSettings); if (error) - return "result." + error; + return "raiSettings." + error; } - if (message.startTime != null && message.hasOwnProperty("startTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (message.defaultRaiSettings != null && message.hasOwnProperty("defaultRaiSettings")) { + var error = $root.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.verify(message.defaultRaiSettings); if (error) - return "startTime." + error; + return "defaultRaiSettings." + error; } - if (message.endTime != null && message.hasOwnProperty("endTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (message.promptSecuritySettings != null && message.hasOwnProperty("promptSecuritySettings")) { + var error = $root.google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings.verify(message.promptSecuritySettings); if (error) - return "endTime." + error; + return "promptSecuritySettings." + error; } return null; }; /** - * Creates a Deployment message from a plain object. Also converts values to their respective internal types. + * Creates a SafetySettings message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.Deployment + * @memberof google.cloud.dialogflow.cx.v3.SafetySettings * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.Deployment} Deployment + * @returns {google.cloud.dialogflow.cx.v3.SafetySettings} SafetySettings */ - Deployment.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.Deployment) + SafetySettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.SafetySettings) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.Deployment(); - if (object.name != null) - message.name = String(object.name); - if (object.flowVersion != null) - message.flowVersion = String(object.flowVersion); - switch (object.state) { + var message = new $root.google.cloud.dialogflow.cx.v3.SafetySettings(); + switch (object.defaultBannedPhraseMatchStrategy) { default: - if (typeof object.state === "number") { - message.state = object.state; + if (typeof object.defaultBannedPhraseMatchStrategy === "number") { + message.defaultBannedPhraseMatchStrategy = object.defaultBannedPhraseMatchStrategy; break; } break; - case "STATE_UNSPECIFIED": + case "PHRASE_MATCH_STRATEGY_UNSPECIFIED": case 0: - message.state = 0; + message.defaultBannedPhraseMatchStrategy = 0; break; - case "RUNNING": + case "PARTIAL_MATCH": case 1: - message.state = 1; + message.defaultBannedPhraseMatchStrategy = 1; break; - case "SUCCEEDED": + case "WORD_MATCH": case 2: - message.state = 2; - break; - case "FAILED": - case 3: - message.state = 3; + message.defaultBannedPhraseMatchStrategy = 2; break; } - if (object.result != null) { - if (typeof object.result !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.Deployment.result: object expected"); - message.result = $root.google.cloud.dialogflow.cx.v3.Deployment.Result.fromObject(object.result); + if (object.bannedPhrases) { + if (!Array.isArray(object.bannedPhrases)) + throw TypeError(".google.cloud.dialogflow.cx.v3.SafetySettings.bannedPhrases: array expected"); + message.bannedPhrases = []; + for (var i = 0; i < object.bannedPhrases.length; ++i) { + if (typeof object.bannedPhrases[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.SafetySettings.bannedPhrases: object expected"); + message.bannedPhrases[i] = $root.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase.fromObject(object.bannedPhrases[i]); + } } - if (object.startTime != null) { - if (typeof object.startTime !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.Deployment.startTime: object expected"); - message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + if (object.raiSettings != null) { + if (typeof object.raiSettings !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.SafetySettings.raiSettings: object expected"); + message.raiSettings = $root.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.fromObject(object.raiSettings); } - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.Deployment.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + if (object.defaultRaiSettings != null) { + if (typeof object.defaultRaiSettings !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.SafetySettings.defaultRaiSettings: object expected"); + message.defaultRaiSettings = $root.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.fromObject(object.defaultRaiSettings); + } + if (object.promptSecuritySettings != null) { + if (typeof object.promptSecuritySettings !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.SafetySettings.promptSecuritySettings: object expected"); + message.promptSecuritySettings = $root.google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings.fromObject(object.promptSecuritySettings); } return message; }; /** - * Creates a plain object from a Deployment message. Also converts values to other types if specified. + * Creates a plain object from a SafetySettings message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.Deployment + * @memberof google.cloud.dialogflow.cx.v3.SafetySettings * @static - * @param {google.cloud.dialogflow.cx.v3.Deployment} message Deployment + * @param {google.cloud.dialogflow.cx.v3.SafetySettings} message SafetySettings * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Deployment.toObject = function toObject(message, options) { + SafetySettings.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.bannedPhrases = []; if (options.defaults) { - object.name = ""; - object.flowVersion = ""; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.result = null; - object.startTime = null; - object.endTime = null; + object.raiSettings = null; + object.defaultRaiSettings = null; + object.defaultBannedPhraseMatchStrategy = options.enums === String ? "PHRASE_MATCH_STRATEGY_UNSPECIFIED" : 0; + object.promptSecuritySettings = null; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.flowVersion != null && message.hasOwnProperty("flowVersion")) - object.flowVersion = message.flowVersion; - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.Deployment.State[message.state] === undefined ? message.state : $root.google.cloud.dialogflow.cx.v3.Deployment.State[message.state] : message.state; - if (message.result != null && message.hasOwnProperty("result")) - object.result = $root.google.cloud.dialogflow.cx.v3.Deployment.Result.toObject(message.result, options); - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.bannedPhrases && message.bannedPhrases.length) { + object.bannedPhrases = []; + for (var j = 0; j < message.bannedPhrases.length; ++j) + object.bannedPhrases[j] = $root.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase.toObject(message.bannedPhrases[j], options); + } + if (message.raiSettings != null && message.hasOwnProperty("raiSettings")) + object.raiSettings = $root.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.toObject(message.raiSettings, options); + if (message.defaultRaiSettings != null && message.hasOwnProperty("defaultRaiSettings")) + object.defaultRaiSettings = $root.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.toObject(message.defaultRaiSettings, options); + if (message.defaultBannedPhraseMatchStrategy != null && message.hasOwnProperty("defaultBannedPhraseMatchStrategy")) + object.defaultBannedPhraseMatchStrategy = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.SafetySettings.PhraseMatchStrategy[message.defaultBannedPhraseMatchStrategy] === undefined ? message.defaultBannedPhraseMatchStrategy : $root.google.cloud.dialogflow.cx.v3.SafetySettings.PhraseMatchStrategy[message.defaultBannedPhraseMatchStrategy] : message.defaultBannedPhraseMatchStrategy; + if (message.promptSecuritySettings != null && message.hasOwnProperty("promptSecuritySettings")) + object.promptSecuritySettings = $root.google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings.toObject(message.promptSecuritySettings, options); return object; }; /** - * Converts this Deployment to JSON. + * Converts this SafetySettings to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.Deployment + * @memberof google.cloud.dialogflow.cx.v3.SafetySettings * @instance * @returns {Object.} JSON object */ - Deployment.prototype.toJSON = function toJSON() { + SafetySettings.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Deployment + * Gets the default type url for SafetySettings * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.Deployment + * @memberof google.cloud.dialogflow.cx.v3.SafetySettings * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Deployment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SafetySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Deployment"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.SafetySettings"; }; - /** - * State enum. - * @name google.cloud.dialogflow.cx.v3.Deployment.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} RUNNING=1 RUNNING value - * @property {number} SUCCEEDED=2 SUCCEEDED value - * @property {number} FAILED=3 FAILED value - */ - Deployment.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "RUNNING"] = 1; - values[valuesById[2] = "SUCCEEDED"] = 2; - values[valuesById[3] = "FAILED"] = 3; - return values; - })(); - - Deployment.Result = (function() { + SafetySettings.Phrase = (function() { /** - * Properties of a Result. - * @memberof google.cloud.dialogflow.cx.v3.Deployment - * @interface IResult - * @property {Array.|null} [deploymentTestResults] Result deploymentTestResults - * @property {string|null} [experiment] Result experiment + * Properties of a Phrase. + * @memberof google.cloud.dialogflow.cx.v3.SafetySettings + * @interface IPhrase + * @property {string|null} [text] Phrase text + * @property {string|null} [languageCode] Phrase languageCode */ /** - * Constructs a new Result. - * @memberof google.cloud.dialogflow.cx.v3.Deployment - * @classdesc Represents a Result. - * @implements IResult + * Constructs a new Phrase. + * @memberof google.cloud.dialogflow.cx.v3.SafetySettings + * @classdesc Represents a Phrase. + * @implements IPhrase * @constructor - * @param {google.cloud.dialogflow.cx.v3.Deployment.IResult=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.SafetySettings.IPhrase=} [properties] Properties to set */ - function Result(properties) { - this.deploymentTestResults = []; + function Phrase(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -31290,94 +31890,91 @@ } /** - * Result deploymentTestResults. - * @member {Array.} deploymentTestResults - * @memberof google.cloud.dialogflow.cx.v3.Deployment.Result + * Phrase text. + * @member {string} text + * @memberof google.cloud.dialogflow.cx.v3.SafetySettings.Phrase * @instance */ - Result.prototype.deploymentTestResults = $util.emptyArray; + Phrase.prototype.text = ""; /** - * Result experiment. - * @member {string} experiment - * @memberof google.cloud.dialogflow.cx.v3.Deployment.Result + * Phrase languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3.SafetySettings.Phrase * @instance */ - Result.prototype.experiment = ""; + Phrase.prototype.languageCode = ""; /** - * Creates a new Result instance using the specified properties. + * Creates a new Phrase instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.Deployment.Result + * @memberof google.cloud.dialogflow.cx.v3.SafetySettings.Phrase * @static - * @param {google.cloud.dialogflow.cx.v3.Deployment.IResult=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.Deployment.Result} Result instance + * @param {google.cloud.dialogflow.cx.v3.SafetySettings.IPhrase=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.SafetySettings.Phrase} Phrase instance */ - Result.create = function create(properties) { - return new Result(properties); + Phrase.create = function create(properties) { + return new Phrase(properties); }; /** - * Encodes the specified Result message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Deployment.Result.verify|verify} messages. + * Encodes the specified Phrase message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SafetySettings.Phrase.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.Deployment.Result + * @memberof google.cloud.dialogflow.cx.v3.SafetySettings.Phrase * @static - * @param {google.cloud.dialogflow.cx.v3.Deployment.IResult} message Result message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.SafetySettings.IPhrase} message Phrase message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Result.encode = function encode(message, writer) { + Phrase.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.deploymentTestResults != null && message.deploymentTestResults.length) - for (var i = 0; i < message.deploymentTestResults.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.deploymentTestResults[i]); - if (message.experiment != null && Object.hasOwnProperty.call(message, "experiment")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.experiment); + if (message.text != null && Object.hasOwnProperty.call(message, "text")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.text); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); return writer; }; /** - * Encodes the specified Result message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Deployment.Result.verify|verify} messages. + * Encodes the specified Phrase message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SafetySettings.Phrase.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Deployment.Result + * @memberof google.cloud.dialogflow.cx.v3.SafetySettings.Phrase * @static - * @param {google.cloud.dialogflow.cx.v3.Deployment.IResult} message Result message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.SafetySettings.IPhrase} message Phrase message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Result.encodeDelimited = function encodeDelimited(message, writer) { + Phrase.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Result message from the specified reader or buffer. + * Decodes a Phrase message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.Deployment.Result + * @memberof google.cloud.dialogflow.cx.v3.SafetySettings.Phrase * @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.Deployment.Result} Result + * @returns {google.cloud.dialogflow.cx.v3.SafetySettings.Phrase} Phrase * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Result.decode = function decode(reader, length, error) { + Phrase.decode = function decode(reader, length, error) { 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.Deployment.Result(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - if (!(message.deploymentTestResults && message.deploymentTestResults.length)) - message.deploymentTestResults = []; - message.deploymentTestResults.push(reader.string()); + message.text = reader.string(); break; } case 2: { - message.experiment = reader.string(); + message.languageCode = reader.string(); break; } default: @@ -31389,648 +31986,1022 @@ }; /** - * Decodes a Result message from the specified reader or buffer, length delimited. + * Decodes a Phrase message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Deployment.Result + * @memberof google.cloud.dialogflow.cx.v3.SafetySettings.Phrase * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.Deployment.Result} Result + * @returns {google.cloud.dialogflow.cx.v3.SafetySettings.Phrase} Phrase * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Result.decodeDelimited = function decodeDelimited(reader) { + Phrase.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Result message. + * Verifies a Phrase message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.Deployment.Result + * @memberof google.cloud.dialogflow.cx.v3.SafetySettings.Phrase * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Result.verify = function verify(message) { + Phrase.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.deploymentTestResults != null && message.hasOwnProperty("deploymentTestResults")) { - if (!Array.isArray(message.deploymentTestResults)) - return "deploymentTestResults: array expected"; - for (var i = 0; i < message.deploymentTestResults.length; ++i) - if (!$util.isString(message.deploymentTestResults[i])) - return "deploymentTestResults: string[] expected"; - } - if (message.experiment != null && message.hasOwnProperty("experiment")) - if (!$util.isString(message.experiment)) - return "experiment: string expected"; + if (message.text != null && message.hasOwnProperty("text")) + if (!$util.isString(message.text)) + return "text: string expected"; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; return null; }; /** - * Creates a Result message from a plain object. Also converts values to their respective internal types. + * Creates a Phrase message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.Deployment.Result + * @memberof google.cloud.dialogflow.cx.v3.SafetySettings.Phrase * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.Deployment.Result} Result + * @returns {google.cloud.dialogflow.cx.v3.SafetySettings.Phrase} Phrase */ - Result.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.Deployment.Result) + Phrase.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.Deployment.Result(); - if (object.deploymentTestResults) { - if (!Array.isArray(object.deploymentTestResults)) - throw TypeError(".google.cloud.dialogflow.cx.v3.Deployment.Result.deploymentTestResults: array expected"); - message.deploymentTestResults = []; - for (var i = 0; i < object.deploymentTestResults.length; ++i) - message.deploymentTestResults[i] = String(object.deploymentTestResults[i]); - } - if (object.experiment != null) - message.experiment = String(object.experiment); + var message = new $root.google.cloud.dialogflow.cx.v3.SafetySettings.Phrase(); + if (object.text != null) + message.text = String(object.text); + if (object.languageCode != null) + message.languageCode = String(object.languageCode); return message; }; /** - * Creates a plain object from a Result message. Also converts values to other types if specified. + * Creates a plain object from a Phrase message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.Deployment.Result + * @memberof google.cloud.dialogflow.cx.v3.SafetySettings.Phrase * @static - * @param {google.cloud.dialogflow.cx.v3.Deployment.Result} message Result + * @param {google.cloud.dialogflow.cx.v3.SafetySettings.Phrase} message Phrase * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Result.toObject = function toObject(message, options) { + Phrase.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.deploymentTestResults = []; - if (options.defaults) - object.experiment = ""; - if (message.deploymentTestResults && message.deploymentTestResults.length) { - object.deploymentTestResults = []; - for (var j = 0; j < message.deploymentTestResults.length; ++j) - object.deploymentTestResults[j] = message.deploymentTestResults[j]; + if (options.defaults) { + object.text = ""; + object.languageCode = ""; } - if (message.experiment != null && message.hasOwnProperty("experiment")) - object.experiment = message.experiment; + if (message.text != null && message.hasOwnProperty("text")) + object.text = message.text; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; return object; }; /** - * Converts this Result to JSON. + * Converts this Phrase to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.Deployment.Result + * @memberof google.cloud.dialogflow.cx.v3.SafetySettings.Phrase * @instance * @returns {Object.} JSON object */ - Result.prototype.toJSON = function toJSON() { + Phrase.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Result + * Gets the default type url for Phrase * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.Deployment.Result + * @memberof google.cloud.dialogflow.cx.v3.SafetySettings.Phrase * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Result.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Phrase.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Deployment.Result"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.SafetySettings.Phrase"; }; - return Result; + return Phrase; })(); - return Deployment; - })(); - - v3.ListDeploymentsRequest = (function() { - /** - * Properties of a ListDeploymentsRequest. - * @memberof google.cloud.dialogflow.cx.v3 - * @interface IListDeploymentsRequest - * @property {string|null} [parent] ListDeploymentsRequest parent - * @property {number|null} [pageSize] ListDeploymentsRequest pageSize - * @property {string|null} [pageToken] ListDeploymentsRequest pageToken + * PhraseMatchStrategy enum. + * @name google.cloud.dialogflow.cx.v3.SafetySettings.PhraseMatchStrategy + * @enum {number} + * @property {number} PHRASE_MATCH_STRATEGY_UNSPECIFIED=0 PHRASE_MATCH_STRATEGY_UNSPECIFIED value + * @property {number} PARTIAL_MATCH=1 PARTIAL_MATCH value + * @property {number} WORD_MATCH=2 WORD_MATCH value */ + SafetySettings.PhraseMatchStrategy = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PHRASE_MATCH_STRATEGY_UNSPECIFIED"] = 0; + values[valuesById[1] = "PARTIAL_MATCH"] = 1; + values[valuesById[2] = "WORD_MATCH"] = 2; + return values; + })(); - /** - * Constructs a new ListDeploymentsRequest. - * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a ListDeploymentsRequest. - * @implements IListDeploymentsRequest - * @constructor - * @param {google.cloud.dialogflow.cx.v3.IListDeploymentsRequest=} [properties] Properties to set - */ - function ListDeploymentsRequest(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]]; - } + SafetySettings.RaiSettings = (function() { - /** - * ListDeploymentsRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsRequest - * @instance - */ - ListDeploymentsRequest.prototype.parent = ""; + /** + * Properties of a RaiSettings. + * @memberof google.cloud.dialogflow.cx.v3.SafetySettings + * @interface IRaiSettings + * @property {Array.|null} [categoryFilters] RaiSettings categoryFilters + */ - /** - * ListDeploymentsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsRequest - * @instance - */ - ListDeploymentsRequest.prototype.pageSize = 0; + /** + * Constructs a new RaiSettings. + * @memberof google.cloud.dialogflow.cx.v3.SafetySettings + * @classdesc Represents a RaiSettings. + * @implements IRaiSettings + * @constructor + * @param {google.cloud.dialogflow.cx.v3.SafetySettings.IRaiSettings=} [properties] Properties to set + */ + function RaiSettings(properties) { + this.categoryFilters = []; + 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]]; + } - /** - * ListDeploymentsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsRequest - * @instance - */ - ListDeploymentsRequest.prototype.pageToken = ""; + /** + * RaiSettings categoryFilters. + * @member {Array.} categoryFilters + * @memberof google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings + * @instance + */ + RaiSettings.prototype.categoryFilters = $util.emptyArray; - /** - * Creates a new ListDeploymentsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.IListDeploymentsRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ListDeploymentsRequest} ListDeploymentsRequest instance - */ - ListDeploymentsRequest.create = function create(properties) { - return new ListDeploymentsRequest(properties); - }; + /** + * Creates a new RaiSettings instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings + * @static + * @param {google.cloud.dialogflow.cx.v3.SafetySettings.IRaiSettings=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings} RaiSettings instance + */ + RaiSettings.create = function create(properties) { + return new RaiSettings(properties); + }; - /** - * Encodes the specified ListDeploymentsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListDeploymentsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.IListDeploymentsRequest} message ListDeploymentsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListDeploymentsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - return writer; - }; + /** + * Encodes the specified RaiSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings + * @static + * @param {google.cloud.dialogflow.cx.v3.SafetySettings.IRaiSettings} message RaiSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RaiSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.categoryFilters != null && message.categoryFilters.length) + for (var i = 0; i < message.categoryFilters.length; ++i) + $root.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter.encode(message.categoryFilters[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; - /** - * Encodes the specified ListDeploymentsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListDeploymentsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.IListDeploymentsRequest} message ListDeploymentsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListDeploymentsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified RaiSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings + * @static + * @param {google.cloud.dialogflow.cx.v3.SafetySettings.IRaiSettings} message RaiSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RaiSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a ListDeploymentsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsRequest - * @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.ListDeploymentsRequest} ListDeploymentsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListDeploymentsRequest.decode = function decode(reader, length, error) { - 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.ListDeploymentsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); + /** + * Decodes a RaiSettings message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings + * @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.SafetySettings.RaiSettings} RaiSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RaiSettings.decode = function decode(reader, length, error) { + 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.SafetySettings.RaiSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - } - case 3: { - message.pageToken = reader.string(); + switch (tag >>> 3) { + case 3: { + if (!(message.categoryFilters && message.categoryFilters.length)) + message.categoryFilters = []; + message.categoryFilters.push($root.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); break; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; + return message; + }; - /** - * Decodes a ListDeploymentsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ListDeploymentsRequest} ListDeploymentsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListDeploymentsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a RaiSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings} RaiSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RaiSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a ListDeploymentsRequest message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListDeploymentsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - return null; - }; + /** + * Verifies a RaiSettings message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RaiSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.categoryFilters != null && message.hasOwnProperty("categoryFilters")) { + if (!Array.isArray(message.categoryFilters)) + return "categoryFilters: array expected"; + for (var i = 0; i < message.categoryFilters.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter.verify(message.categoryFilters[i]); + if (error) + return "categoryFilters." + error; + } + } + return null; + }; - /** - * Creates a ListDeploymentsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ListDeploymentsRequest} ListDeploymentsRequest - */ - ListDeploymentsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListDeploymentsRequest) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.ListDeploymentsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - return message; - }; + /** + * Creates a RaiSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings} RaiSettings + */ + RaiSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings(); + if (object.categoryFilters) { + if (!Array.isArray(object.categoryFilters)) + throw TypeError(".google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.categoryFilters: array expected"); + message.categoryFilters = []; + for (var i = 0; i < object.categoryFilters.length; ++i) { + if (typeof object.categoryFilters[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.categoryFilters: object expected"); + message.categoryFilters[i] = $root.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter.fromObject(object.categoryFilters[i]); + } + } + return message; + }; - /** - * Creates a plain object from a ListDeploymentsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.ListDeploymentsRequest} message ListDeploymentsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListDeploymentsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - return object; - }; + /** + * Creates a plain object from a RaiSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings + * @static + * @param {google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings} message RaiSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RaiSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.categoryFilters = []; + if (message.categoryFilters && message.categoryFilters.length) { + object.categoryFilters = []; + for (var j = 0; j < message.categoryFilters.length; ++j) + object.categoryFilters[j] = $root.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter.toObject(message.categoryFilters[j], options); + } + return object; + }; - /** - * Converts this ListDeploymentsRequest to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsRequest - * @instance - * @returns {Object.} JSON object - */ - ListDeploymentsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this RaiSettings to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings + * @instance + * @returns {Object.} JSON object + */ + RaiSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Gets the default type url for ListDeploymentsRequest - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListDeploymentsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListDeploymentsRequest"; - }; + /** + * Gets the default type url for RaiSettings + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RaiSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings"; + }; - return ListDeploymentsRequest; - })(); + /** + * SafetyFilterLevel enum. + * @name google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.SafetyFilterLevel + * @enum {number} + * @property {number} SAFETY_FILTER_LEVEL_UNSPECIFIED=0 SAFETY_FILTER_LEVEL_UNSPECIFIED value + * @property {number} BLOCK_NONE=1 BLOCK_NONE value + * @property {number} BLOCK_FEW=2 BLOCK_FEW value + * @property {number} BLOCK_SOME=3 BLOCK_SOME value + * @property {number} BLOCK_MOST=4 BLOCK_MOST value + */ + RaiSettings.SafetyFilterLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SAFETY_FILTER_LEVEL_UNSPECIFIED"] = 0; + values[valuesById[1] = "BLOCK_NONE"] = 1; + values[valuesById[2] = "BLOCK_FEW"] = 2; + values[valuesById[3] = "BLOCK_SOME"] = 3; + values[valuesById[4] = "BLOCK_MOST"] = 4; + return values; + })(); - v3.ListDeploymentsResponse = (function() { + /** + * SafetyCategory enum. + * @name google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.SafetyCategory + * @enum {number} + * @property {number} SAFETY_CATEGORY_UNSPECIFIED=0 SAFETY_CATEGORY_UNSPECIFIED value + * @property {number} DANGEROUS_CONTENT=1 DANGEROUS_CONTENT value + * @property {number} HATE_SPEECH=2 HATE_SPEECH value + * @property {number} HARASSMENT=3 HARASSMENT value + * @property {number} SEXUALLY_EXPLICIT_CONTENT=4 SEXUALLY_EXPLICIT_CONTENT value + */ + RaiSettings.SafetyCategory = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SAFETY_CATEGORY_UNSPECIFIED"] = 0; + values[valuesById[1] = "DANGEROUS_CONTENT"] = 1; + values[valuesById[2] = "HATE_SPEECH"] = 2; + values[valuesById[3] = "HARASSMENT"] = 3; + values[valuesById[4] = "SEXUALLY_EXPLICIT_CONTENT"] = 4; + return values; + })(); - /** - * Properties of a ListDeploymentsResponse. - * @memberof google.cloud.dialogflow.cx.v3 - * @interface IListDeploymentsResponse - * @property {Array.|null} [deployments] ListDeploymentsResponse deployments - * @property {string|null} [nextPageToken] ListDeploymentsResponse nextPageToken - */ + RaiSettings.CategoryFilter = (function() { - /** - * Constructs a new ListDeploymentsResponse. - * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a ListDeploymentsResponse. - * @implements IListDeploymentsResponse - * @constructor - * @param {google.cloud.dialogflow.cx.v3.IListDeploymentsResponse=} [properties] Properties to set - */ - function ListDeploymentsResponse(properties) { - this.deployments = []; - 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]]; - } + /** + * Properties of a CategoryFilter. + * @memberof google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings + * @interface ICategoryFilter + * @property {google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.SafetyCategory|null} [category] CategoryFilter category + * @property {google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.SafetyFilterLevel|null} [filterLevel] CategoryFilter filterLevel + */ - /** - * ListDeploymentsResponse deployments. - * @member {Array.} deployments - * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsResponse - * @instance - */ - ListDeploymentsResponse.prototype.deployments = $util.emptyArray; + /** + * Constructs a new CategoryFilter. + * @memberof google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings + * @classdesc Represents a CategoryFilter. + * @implements ICategoryFilter + * @constructor + * @param {google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.ICategoryFilter=} [properties] Properties to set + */ + function CategoryFilter(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]]; + } - /** - * ListDeploymentsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsResponse - * @instance - */ - ListDeploymentsResponse.prototype.nextPageToken = ""; + /** + * CategoryFilter category. + * @member {google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.SafetyCategory} category + * @memberof google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter + * @instance + */ + CategoryFilter.prototype.category = 0; - /** - * Creates a new ListDeploymentsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsResponse - * @static - * @param {google.cloud.dialogflow.cx.v3.IListDeploymentsResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ListDeploymentsResponse} ListDeploymentsResponse instance - */ - ListDeploymentsResponse.create = function create(properties) { - return new ListDeploymentsResponse(properties); - }; + /** + * CategoryFilter filterLevel. + * @member {google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.SafetyFilterLevel} filterLevel + * @memberof google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter + * @instance + */ + CategoryFilter.prototype.filterLevel = 0; - /** - * Encodes the specified ListDeploymentsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListDeploymentsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsResponse - * @static - * @param {google.cloud.dialogflow.cx.v3.IListDeploymentsResponse} message ListDeploymentsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListDeploymentsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.deployments != null && message.deployments.length) - for (var i = 0; i < message.deployments.length; ++i) - $root.google.cloud.dialogflow.cx.v3.Deployment.encode(message.deployments[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - return writer; - }; + /** + * Creates a new CategoryFilter instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter + * @static + * @param {google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.ICategoryFilter=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter} CategoryFilter instance + */ + CategoryFilter.create = function create(properties) { + return new CategoryFilter(properties); + }; - /** - * Encodes the specified ListDeploymentsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListDeploymentsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsResponse - * @static - * @param {google.cloud.dialogflow.cx.v3.IListDeploymentsResponse} message ListDeploymentsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListDeploymentsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified CategoryFilter message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter + * @static + * @param {google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.ICategoryFilter} message CategoryFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CategoryFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.category != null && Object.hasOwnProperty.call(message, "category")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.category); + if (message.filterLevel != null && Object.hasOwnProperty.call(message, "filterLevel")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.filterLevel); + return writer; + }; - /** - * Decodes a ListDeploymentsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsResponse - * @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.ListDeploymentsResponse} ListDeploymentsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListDeploymentsResponse.decode = function decode(reader, length, error) { - 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.ListDeploymentsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.deployments && message.deployments.length)) - message.deployments = []; - message.deployments.push($root.google.cloud.dialogflow.cx.v3.Deployment.decode(reader, reader.uint32())); + /** + * Encodes the specified CategoryFilter message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter + * @static + * @param {google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.ICategoryFilter} message CategoryFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CategoryFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CategoryFilter message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter + * @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.SafetySettings.RaiSettings.CategoryFilter} CategoryFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CategoryFilter.decode = function decode(reader, length, error) { + 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.SafetySettings.RaiSettings.CategoryFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.category = reader.int32(); + break; + } + case 2: { + message.filterLevel = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CategoryFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter} CategoryFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CategoryFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CategoryFilter message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CategoryFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.category != null && message.hasOwnProperty("category")) + switch (message.category) { + default: + return "category: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.filterLevel != null && message.hasOwnProperty("filterLevel")) + switch (message.filterLevel) { + default: + return "filterLevel: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + return null; + }; + + /** + * Creates a CategoryFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter} CategoryFilter + */ + CategoryFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter(); + switch (object.category) { + default: + if (typeof object.category === "number") { + message.category = object.category; + break; + } + break; + case "SAFETY_CATEGORY_UNSPECIFIED": + case 0: + message.category = 0; + break; + case "DANGEROUS_CONTENT": + case 1: + message.category = 1; + break; + case "HATE_SPEECH": + case 2: + message.category = 2; + break; + case "HARASSMENT": + case 3: + message.category = 3; + break; + case "SEXUALLY_EXPLICIT_CONTENT": + case 4: + message.category = 4; break; } - case 2: { - message.nextPageToken = reader.string(); + switch (object.filterLevel) { + default: + if (typeof object.filterLevel === "number") { + message.filterLevel = object.filterLevel; + break; + } + break; + case "SAFETY_FILTER_LEVEL_UNSPECIFIED": + case 0: + message.filterLevel = 0; + break; + case "BLOCK_NONE": + case 1: + message.filterLevel = 1; + break; + case "BLOCK_FEW": + case 2: + message.filterLevel = 2; + break; + case "BLOCK_SOME": + case 3: + message.filterLevel = 3; + break; + case "BLOCK_MOST": + case 4: + message.filterLevel = 4; break; } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + return message; + }; - /** - * Decodes a ListDeploymentsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ListDeploymentsResponse} ListDeploymentsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListDeploymentsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a plain object from a CategoryFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter + * @static + * @param {google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter} message CategoryFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CategoryFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.category = options.enums === String ? "SAFETY_CATEGORY_UNSPECIFIED" : 0; + object.filterLevel = options.enums === String ? "SAFETY_FILTER_LEVEL_UNSPECIFIED" : 0; + } + if (message.category != null && message.hasOwnProperty("category")) + object.category = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.SafetyCategory[message.category] === undefined ? message.category : $root.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.SafetyCategory[message.category] : message.category; + if (message.filterLevel != null && message.hasOwnProperty("filterLevel")) + object.filterLevel = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.SafetyFilterLevel[message.filterLevel] === undefined ? message.filterLevel : $root.google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.SafetyFilterLevel[message.filterLevel] : message.filterLevel; + return object; + }; - /** - * Verifies a ListDeploymentsResponse message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListDeploymentsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.deployments != null && message.hasOwnProperty("deployments")) { - if (!Array.isArray(message.deployments)) - return "deployments: array expected"; - for (var i = 0; i < message.deployments.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.Deployment.verify(message.deployments[i]); - if (error) - return "deployments." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; + /** + * Converts this CategoryFilter to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter + * @instance + * @returns {Object.} JSON object + */ + CategoryFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates a ListDeploymentsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ListDeploymentsResponse} ListDeploymentsResponse - */ - ListDeploymentsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListDeploymentsResponse) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.ListDeploymentsResponse(); - if (object.deployments) { - if (!Array.isArray(object.deployments)) - throw TypeError(".google.cloud.dialogflow.cx.v3.ListDeploymentsResponse.deployments: array expected"); - message.deployments = []; - for (var i = 0; i < object.deployments.length; ++i) { - if (typeof object.deployments[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.ListDeploymentsResponse.deployments: object expected"); - message.deployments[i] = $root.google.cloud.dialogflow.cx.v3.Deployment.fromObject(object.deployments[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; + /** + * Gets the default type url for CategoryFilter + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CategoryFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.SafetySettings.RaiSettings.CategoryFilter"; + }; - /** - * Creates a plain object from a ListDeploymentsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsResponse - * @static - * @param {google.cloud.dialogflow.cx.v3.ListDeploymentsResponse} message ListDeploymentsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListDeploymentsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.deployments = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.deployments && message.deployments.length) { - object.deployments = []; - for (var j = 0; j < message.deployments.length; ++j) - object.deployments[j] = $root.google.cloud.dialogflow.cx.v3.Deployment.toObject(message.deployments[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; + return CategoryFilter; + })(); - /** - * Converts this ListDeploymentsResponse to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsResponse - * @instance - * @returns {Object.} JSON object + return RaiSettings; + })(); + + SafetySettings.PromptSecuritySettings = (function() { + + /** + * Properties of a PromptSecuritySettings. + * @memberof google.cloud.dialogflow.cx.v3.SafetySettings + * @interface IPromptSecuritySettings + * @property {boolean|null} [enablePromptSecurity] PromptSecuritySettings enablePromptSecurity + */ + + /** + * Constructs a new PromptSecuritySettings. + * @memberof google.cloud.dialogflow.cx.v3.SafetySettings + * @classdesc Represents a PromptSecuritySettings. + * @implements IPromptSecuritySettings + * @constructor + * @param {google.cloud.dialogflow.cx.v3.SafetySettings.IPromptSecuritySettings=} [properties] Properties to set + */ + function PromptSecuritySettings(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]]; + } + + /** + * PromptSecuritySettings enablePromptSecurity. + * @member {boolean} enablePromptSecurity + * @memberof google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings + * @instance + */ + PromptSecuritySettings.prototype.enablePromptSecurity = false; + + /** + * Creates a new PromptSecuritySettings instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings + * @static + * @param {google.cloud.dialogflow.cx.v3.SafetySettings.IPromptSecuritySettings=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings} PromptSecuritySettings instance + */ + PromptSecuritySettings.create = function create(properties) { + return new PromptSecuritySettings(properties); + }; + + /** + * Encodes the specified PromptSecuritySettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings + * @static + * @param {google.cloud.dialogflow.cx.v3.SafetySettings.IPromptSecuritySettings} message PromptSecuritySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PromptSecuritySettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enablePromptSecurity != null && Object.hasOwnProperty.call(message, "enablePromptSecurity")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enablePromptSecurity); + return writer; + }; + + /** + * Encodes the specified PromptSecuritySettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings + * @static + * @param {google.cloud.dialogflow.cx.v3.SafetySettings.IPromptSecuritySettings} message PromptSecuritySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PromptSecuritySettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PromptSecuritySettings message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings + * @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.SafetySettings.PromptSecuritySettings} PromptSecuritySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PromptSecuritySettings.decode = function decode(reader, length, error) { + 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.SafetySettings.PromptSecuritySettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.enablePromptSecurity = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PromptSecuritySettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings} PromptSecuritySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PromptSecuritySettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PromptSecuritySettings message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PromptSecuritySettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enablePromptSecurity != null && message.hasOwnProperty("enablePromptSecurity")) + if (typeof message.enablePromptSecurity !== "boolean") + return "enablePromptSecurity: boolean expected"; + return null; + }; + + /** + * Creates a PromptSecuritySettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings} PromptSecuritySettings + */ + PromptSecuritySettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings(); + if (object.enablePromptSecurity != null) + message.enablePromptSecurity = Boolean(object.enablePromptSecurity); + return message; + }; + + /** + * Creates a plain object from a PromptSecuritySettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings + * @static + * @param {google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings} message PromptSecuritySettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PromptSecuritySettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.enablePromptSecurity = false; + if (message.enablePromptSecurity != null && message.hasOwnProperty("enablePromptSecurity")) + object.enablePromptSecurity = message.enablePromptSecurity; + return object; + }; + + /** + * Converts this PromptSecuritySettings to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings + * @instance + * @returns {Object.} JSON object + */ + PromptSecuritySettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PromptSecuritySettings + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PromptSecuritySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.SafetySettings.PromptSecuritySettings"; + }; + + return PromptSecuritySettings; + })(); + + return SafetySettings; + })(); + + v3.Changelogs = (function() { + + /** + * Constructs a new Changelogs service. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a Changelogs + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited */ - ListDeploymentsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + function Changelogs(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Changelogs.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Changelogs; /** - * Gets the default type url for ListDeploymentsResponse - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsResponse + * Creates new Changelogs service using the specified rpc implementation. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.Changelogs * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Changelogs} RPC service. Useful where requests and/or responses are streamed. */ - ListDeploymentsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListDeploymentsResponse"; + Changelogs.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); }; - return ListDeploymentsResponse; + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Changelogs|listChangelogs}. + * @memberof google.cloud.dialogflow.cx.v3.Changelogs + * @typedef ListChangelogsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.ListChangelogsResponse} [response] ListChangelogsResponse + */ + + /** + * Calls ListChangelogs. + * @function listChangelogs + * @memberof google.cloud.dialogflow.cx.v3.Changelogs + * @instance + * @param {google.cloud.dialogflow.cx.v3.IListChangelogsRequest} request ListChangelogsRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Changelogs.ListChangelogsCallback} callback Node-style callback called with the error, if any, and ListChangelogsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Changelogs.prototype.listChangelogs = function listChangelogs(request, callback) { + return this.rpcCall(listChangelogs, $root.google.cloud.dialogflow.cx.v3.ListChangelogsRequest, $root.google.cloud.dialogflow.cx.v3.ListChangelogsResponse, request, callback); + }, "name", { value: "ListChangelogs" }); + + /** + * Calls ListChangelogs. + * @function listChangelogs + * @memberof google.cloud.dialogflow.cx.v3.Changelogs + * @instance + * @param {google.cloud.dialogflow.cx.v3.IListChangelogsRequest} request ListChangelogsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Changelogs|getChangelog}. + * @memberof google.cloud.dialogflow.cx.v3.Changelogs + * @typedef GetChangelogCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.Changelog} [response] Changelog + */ + + /** + * Calls GetChangelog. + * @function getChangelog + * @memberof google.cloud.dialogflow.cx.v3.Changelogs + * @instance + * @param {google.cloud.dialogflow.cx.v3.IGetChangelogRequest} request GetChangelogRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Changelogs.GetChangelogCallback} callback Node-style callback called with the error, if any, and Changelog + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Changelogs.prototype.getChangelog = function getChangelog(request, callback) { + return this.rpcCall(getChangelog, $root.google.cloud.dialogflow.cx.v3.GetChangelogRequest, $root.google.cloud.dialogflow.cx.v3.Changelog, request, callback); + }, "name", { value: "GetChangelog" }); + + /** + * Calls GetChangelog. + * @function getChangelog + * @memberof google.cloud.dialogflow.cx.v3.Changelogs + * @instance + * @param {google.cloud.dialogflow.cx.v3.IGetChangelogRequest} request GetChangelogRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Changelogs; })(); - v3.GetDeploymentRequest = (function() { + v3.ListChangelogsRequest = (function() { /** - * Properties of a GetDeploymentRequest. + * Properties of a ListChangelogsRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IGetDeploymentRequest - * @property {string|null} [name] GetDeploymentRequest name + * @interface IListChangelogsRequest + * @property {string|null} [parent] ListChangelogsRequest parent + * @property {string|null} [filter] ListChangelogsRequest filter + * @property {number|null} [pageSize] ListChangelogsRequest pageSize + * @property {string|null} [pageToken] ListChangelogsRequest pageToken */ /** - * Constructs a new GetDeploymentRequest. + * Constructs a new ListChangelogsRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a GetDeploymentRequest. - * @implements IGetDeploymentRequest + * @classdesc Represents a ListChangelogsRequest. + * @implements IListChangelogsRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IGetDeploymentRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IListChangelogsRequest=} [properties] Properties to set */ - function GetDeploymentRequest(properties) { + function ListChangelogsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -32038,77 +33009,119 @@ } /** - * GetDeploymentRequest name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.GetDeploymentRequest + * ListChangelogsRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsRequest * @instance */ - GetDeploymentRequest.prototype.name = ""; + ListChangelogsRequest.prototype.parent = ""; /** - * Creates a new GetDeploymentRequest instance using the specified properties. + * ListChangelogsRequest filter. + * @member {string} filter + * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsRequest + * @instance + */ + ListChangelogsRequest.prototype.filter = ""; + + /** + * ListChangelogsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsRequest + * @instance + */ + ListChangelogsRequest.prototype.pageSize = 0; + + /** + * ListChangelogsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsRequest + * @instance + */ + ListChangelogsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListChangelogsRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.GetDeploymentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IGetDeploymentRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.GetDeploymentRequest} GetDeploymentRequest instance + * @param {google.cloud.dialogflow.cx.v3.IListChangelogsRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ListChangelogsRequest} ListChangelogsRequest instance */ - GetDeploymentRequest.create = function create(properties) { - return new GetDeploymentRequest(properties); + ListChangelogsRequest.create = function create(properties) { + return new ListChangelogsRequest(properties); }; /** - * Encodes the specified GetDeploymentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetDeploymentRequest.verify|verify} messages. + * Encodes the specified ListChangelogsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListChangelogsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.GetDeploymentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IGetDeploymentRequest} message GetDeploymentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListChangelogsRequest} message ListChangelogsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetDeploymentRequest.encode = function encode(message, writer) { + ListChangelogsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); return writer; }; /** - * Encodes the specified GetDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetDeploymentRequest.verify|verify} messages. + * Encodes the specified ListChangelogsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListChangelogsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.GetDeploymentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IGetDeploymentRequest} message GetDeploymentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListChangelogsRequest} message ListChangelogsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetDeploymentRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListChangelogsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetDeploymentRequest message from the specified reader or buffer. + * Decodes a ListChangelogsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.GetDeploymentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsRequest * @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.GetDeploymentRequest} GetDeploymentRequest + * @returns {google.cloud.dialogflow.cx.v3.ListChangelogsRequest} ListChangelogsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetDeploymentRequest.decode = function decode(reader, length, error) { + ListChangelogsRequest.decode = function decode(reader, length, error) { 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.GetDeploymentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ListChangelogsRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.parent = reader.string(); + break; + } + case 2: { + message.filter = reader.string(); + break; + } + case 3: { + message.pageSize = reader.int32(); + break; + } + case 4: { + message.pageToken = reader.string(); break; } default: @@ -32120,397 +33133,149 @@ }; /** - * Decodes a GetDeploymentRequest message from the specified reader or buffer, length delimited. + * Decodes a ListChangelogsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.GetDeploymentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.GetDeploymentRequest} GetDeploymentRequest + * @returns {google.cloud.dialogflow.cx.v3.ListChangelogsRequest} ListChangelogsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetDeploymentRequest.decodeDelimited = function decodeDelimited(reader) { + ListChangelogsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetDeploymentRequest message. + * Verifies a ListChangelogsRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.GetDeploymentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetDeploymentRequest.verify = function verify(message) { + ListChangelogsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; return null; }; /** - * Creates a GetDeploymentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListChangelogsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.GetDeploymentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.GetDeploymentRequest} GetDeploymentRequest + * @returns {google.cloud.dialogflow.cx.v3.ListChangelogsRequest} ListChangelogsRequest */ - GetDeploymentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.GetDeploymentRequest) + ListChangelogsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListChangelogsRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.GetDeploymentRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.dialogflow.cx.v3.ListChangelogsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.filter != null) + message.filter = String(object.filter); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); return message; }; /** - * Creates a plain object from a GetDeploymentRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListChangelogsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.GetDeploymentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.GetDeploymentRequest} message GetDeploymentRequest + * @param {google.cloud.dialogflow.cx.v3.ListChangelogsRequest} message ListChangelogsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetDeploymentRequest.toObject = function toObject(message, options) { + ListChangelogsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (options.defaults) { + object.parent = ""; + object.filter = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; return object; }; /** - * Converts this GetDeploymentRequest to JSON. + * Converts this ListChangelogsRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.GetDeploymentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsRequest * @instance * @returns {Object.} JSON object */ - GetDeploymentRequest.prototype.toJSON = function toJSON() { + ListChangelogsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetDeploymentRequest + * Gets the default type url for ListChangelogsRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.GetDeploymentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetDeploymentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListChangelogsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.GetDeploymentRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListChangelogsRequest"; }; - return GetDeploymentRequest; + return ListChangelogsRequest; })(); - v3.EntityTypes = (function() { + v3.ListChangelogsResponse = (function() { /** - * Constructs a new EntityTypes service. + * Properties of a ListChangelogsResponse. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents an EntityTypes - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function EntityTypes(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (EntityTypes.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = EntityTypes; - - /** - * Creates new EntityTypes service using the specified rpc implementation. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.EntityTypes - * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {EntityTypes} RPC service. Useful where requests and/or responses are streamed. - */ - EntityTypes.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.EntityTypes|getEntityType}. - * @memberof google.cloud.dialogflow.cx.v3.EntityTypes - * @typedef GetEntityTypeCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.EntityType} [response] EntityType - */ - - /** - * Calls GetEntityType. - * @function getEntityType - * @memberof google.cloud.dialogflow.cx.v3.EntityTypes - * @instance - * @param {google.cloud.dialogflow.cx.v3.IGetEntityTypeRequest} request GetEntityTypeRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.EntityTypes.GetEntityTypeCallback} callback Node-style callback called with the error, if any, and EntityType - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(EntityTypes.prototype.getEntityType = function getEntityType(request, callback) { - return this.rpcCall(getEntityType, $root.google.cloud.dialogflow.cx.v3.GetEntityTypeRequest, $root.google.cloud.dialogflow.cx.v3.EntityType, request, callback); - }, "name", { value: "GetEntityType" }); - - /** - * Calls GetEntityType. - * @function getEntityType - * @memberof google.cloud.dialogflow.cx.v3.EntityTypes - * @instance - * @param {google.cloud.dialogflow.cx.v3.IGetEntityTypeRequest} request GetEntityTypeRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.EntityTypes|createEntityType}. - * @memberof google.cloud.dialogflow.cx.v3.EntityTypes - * @typedef CreateEntityTypeCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.EntityType} [response] EntityType - */ - - /** - * Calls CreateEntityType. - * @function createEntityType - * @memberof google.cloud.dialogflow.cx.v3.EntityTypes - * @instance - * @param {google.cloud.dialogflow.cx.v3.ICreateEntityTypeRequest} request CreateEntityTypeRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.EntityTypes.CreateEntityTypeCallback} callback Node-style callback called with the error, if any, and EntityType - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(EntityTypes.prototype.createEntityType = function createEntityType(request, callback) { - return this.rpcCall(createEntityType, $root.google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest, $root.google.cloud.dialogflow.cx.v3.EntityType, request, callback); - }, "name", { value: "CreateEntityType" }); - - /** - * Calls CreateEntityType. - * @function createEntityType - * @memberof google.cloud.dialogflow.cx.v3.EntityTypes - * @instance - * @param {google.cloud.dialogflow.cx.v3.ICreateEntityTypeRequest} request CreateEntityTypeRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.EntityTypes|updateEntityType}. - * @memberof google.cloud.dialogflow.cx.v3.EntityTypes - * @typedef UpdateEntityTypeCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.EntityType} [response] EntityType - */ - - /** - * Calls UpdateEntityType. - * @function updateEntityType - * @memberof google.cloud.dialogflow.cx.v3.EntityTypes - * @instance - * @param {google.cloud.dialogflow.cx.v3.IUpdateEntityTypeRequest} request UpdateEntityTypeRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.EntityTypes.UpdateEntityTypeCallback} callback Node-style callback called with the error, if any, and EntityType - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(EntityTypes.prototype.updateEntityType = function updateEntityType(request, callback) { - return this.rpcCall(updateEntityType, $root.google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest, $root.google.cloud.dialogflow.cx.v3.EntityType, request, callback); - }, "name", { value: "UpdateEntityType" }); - - /** - * Calls UpdateEntityType. - * @function updateEntityType - * @memberof google.cloud.dialogflow.cx.v3.EntityTypes - * @instance - * @param {google.cloud.dialogflow.cx.v3.IUpdateEntityTypeRequest} request UpdateEntityTypeRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.EntityTypes|deleteEntityType}. - * @memberof google.cloud.dialogflow.cx.v3.EntityTypes - * @typedef DeleteEntityTypeCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls DeleteEntityType. - * @function deleteEntityType - * @memberof google.cloud.dialogflow.cx.v3.EntityTypes - * @instance - * @param {google.cloud.dialogflow.cx.v3.IDeleteEntityTypeRequest} request DeleteEntityTypeRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.EntityTypes.DeleteEntityTypeCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(EntityTypes.prototype.deleteEntityType = function deleteEntityType(request, callback) { - return this.rpcCall(deleteEntityType, $root.google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteEntityType" }); - - /** - * Calls DeleteEntityType. - * @function deleteEntityType - * @memberof google.cloud.dialogflow.cx.v3.EntityTypes - * @instance - * @param {google.cloud.dialogflow.cx.v3.IDeleteEntityTypeRequest} request DeleteEntityTypeRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.EntityTypes|listEntityTypes}. - * @memberof google.cloud.dialogflow.cx.v3.EntityTypes - * @typedef ListEntityTypesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.ListEntityTypesResponse} [response] ListEntityTypesResponse - */ - - /** - * Calls ListEntityTypes. - * @function listEntityTypes - * @memberof google.cloud.dialogflow.cx.v3.EntityTypes - * @instance - * @param {google.cloud.dialogflow.cx.v3.IListEntityTypesRequest} request ListEntityTypesRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.EntityTypes.ListEntityTypesCallback} callback Node-style callback called with the error, if any, and ListEntityTypesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(EntityTypes.prototype.listEntityTypes = function listEntityTypes(request, callback) { - return this.rpcCall(listEntityTypes, $root.google.cloud.dialogflow.cx.v3.ListEntityTypesRequest, $root.google.cloud.dialogflow.cx.v3.ListEntityTypesResponse, request, callback); - }, "name", { value: "ListEntityTypes" }); - - /** - * Calls ListEntityTypes. - * @function listEntityTypes - * @memberof google.cloud.dialogflow.cx.v3.EntityTypes - * @instance - * @param {google.cloud.dialogflow.cx.v3.IListEntityTypesRequest} request ListEntityTypesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.EntityTypes|exportEntityTypes}. - * @memberof google.cloud.dialogflow.cx.v3.EntityTypes - * @typedef ExportEntityTypesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls ExportEntityTypes. - * @function exportEntityTypes - * @memberof google.cloud.dialogflow.cx.v3.EntityTypes - * @instance - * @param {google.cloud.dialogflow.cx.v3.IExportEntityTypesRequest} request ExportEntityTypesRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.EntityTypes.ExportEntityTypesCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(EntityTypes.prototype.exportEntityTypes = function exportEntityTypes(request, callback) { - return this.rpcCall(exportEntityTypes, $root.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "ExportEntityTypes" }); - - /** - * Calls ExportEntityTypes. - * @function exportEntityTypes - * @memberof google.cloud.dialogflow.cx.v3.EntityTypes - * @instance - * @param {google.cloud.dialogflow.cx.v3.IExportEntityTypesRequest} request ExportEntityTypesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.EntityTypes|importEntityTypes}. - * @memberof google.cloud.dialogflow.cx.v3.EntityTypes - * @typedef ImportEntityTypesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls ImportEntityTypes. - * @function importEntityTypes - * @memberof google.cloud.dialogflow.cx.v3.EntityTypes - * @instance - * @param {google.cloud.dialogflow.cx.v3.IImportEntityTypesRequest} request ImportEntityTypesRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.EntityTypes.ImportEntityTypesCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(EntityTypes.prototype.importEntityTypes = function importEntityTypes(request, callback) { - return this.rpcCall(importEntityTypes, $root.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "ImportEntityTypes" }); - - /** - * Calls ImportEntityTypes. - * @function importEntityTypes - * @memberof google.cloud.dialogflow.cx.v3.EntityTypes - * @instance - * @param {google.cloud.dialogflow.cx.v3.IImportEntityTypesRequest} request ImportEntityTypesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return EntityTypes; - })(); - - v3.EntityType = (function() { - - /** - * Properties of an EntityType. - * @memberof google.cloud.dialogflow.cx.v3 - * @interface IEntityType - * @property {string|null} [name] EntityType name - * @property {string|null} [displayName] EntityType displayName - * @property {google.cloud.dialogflow.cx.v3.EntityType.Kind|null} [kind] EntityType kind - * @property {google.cloud.dialogflow.cx.v3.EntityType.AutoExpansionMode|null} [autoExpansionMode] EntityType autoExpansionMode - * @property {Array.|null} [entities] EntityType entities - * @property {Array.|null} [excludedPhrases] EntityType excludedPhrases - * @property {boolean|null} [enableFuzzyExtraction] EntityType enableFuzzyExtraction - * @property {boolean|null} [redact] EntityType redact + * @interface IListChangelogsResponse + * @property {Array.|null} [changelogs] ListChangelogsResponse changelogs + * @property {string|null} [nextPageToken] ListChangelogsResponse nextPageToken */ /** - * Constructs a new EntityType. + * Constructs a new ListChangelogsResponse. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents an EntityType. - * @implements IEntityType + * @classdesc Represents a ListChangelogsResponse. + * @implements IListChangelogsResponse * @constructor - * @param {google.cloud.dialogflow.cx.v3.IEntityType=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IListChangelogsResponse=} [properties] Properties to set */ - function EntityType(properties) { - this.entities = []; - this.excludedPhrases = []; + function ListChangelogsResponse(properties) { + this.changelogs = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -32518,181 +33283,94 @@ } /** - * EntityType name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.EntityType - * @instance - */ - EntityType.prototype.name = ""; - - /** - * EntityType displayName. - * @member {string} displayName - * @memberof google.cloud.dialogflow.cx.v3.EntityType - * @instance - */ - EntityType.prototype.displayName = ""; - - /** - * EntityType kind. - * @member {google.cloud.dialogflow.cx.v3.EntityType.Kind} kind - * @memberof google.cloud.dialogflow.cx.v3.EntityType - * @instance - */ - EntityType.prototype.kind = 0; - - /** - * EntityType autoExpansionMode. - * @member {google.cloud.dialogflow.cx.v3.EntityType.AutoExpansionMode} autoExpansionMode - * @memberof google.cloud.dialogflow.cx.v3.EntityType - * @instance - */ - EntityType.prototype.autoExpansionMode = 0; - - /** - * EntityType entities. - * @member {Array.} entities - * @memberof google.cloud.dialogflow.cx.v3.EntityType - * @instance - */ - EntityType.prototype.entities = $util.emptyArray; - - /** - * EntityType excludedPhrases. - * @member {Array.} excludedPhrases - * @memberof google.cloud.dialogflow.cx.v3.EntityType - * @instance - */ - EntityType.prototype.excludedPhrases = $util.emptyArray; - - /** - * EntityType enableFuzzyExtraction. - * @member {boolean} enableFuzzyExtraction - * @memberof google.cloud.dialogflow.cx.v3.EntityType + * ListChangelogsResponse changelogs. + * @member {Array.} changelogs + * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsResponse * @instance */ - EntityType.prototype.enableFuzzyExtraction = false; + ListChangelogsResponse.prototype.changelogs = $util.emptyArray; /** - * EntityType redact. - * @member {boolean} redact - * @memberof google.cloud.dialogflow.cx.v3.EntityType + * ListChangelogsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsResponse * @instance */ - EntityType.prototype.redact = false; + ListChangelogsResponse.prototype.nextPageToken = ""; /** - * Creates a new EntityType instance using the specified properties. + * Creates a new ListChangelogsResponse instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.EntityType + * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IEntityType=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.EntityType} EntityType instance + * @param {google.cloud.dialogflow.cx.v3.IListChangelogsResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ListChangelogsResponse} ListChangelogsResponse instance */ - EntityType.create = function create(properties) { - return new EntityType(properties); + ListChangelogsResponse.create = function create(properties) { + return new ListChangelogsResponse(properties); }; /** - * Encodes the specified EntityType message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.EntityType.verify|verify} messages. + * Encodes the specified ListChangelogsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListChangelogsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.EntityType + * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IEntityType} message EntityType message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListChangelogsResponse} message ListChangelogsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EntityType.encode = function encode(message, writer) { + ListChangelogsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.kind); - if (message.autoExpansionMode != null && Object.hasOwnProperty.call(message, "autoExpansionMode")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.autoExpansionMode); - if (message.entities != null && message.entities.length) - for (var i = 0; i < message.entities.length; ++i) - $root.google.cloud.dialogflow.cx.v3.EntityType.Entity.encode(message.entities[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.excludedPhrases != null && message.excludedPhrases.length) - for (var i = 0; i < message.excludedPhrases.length; ++i) - $root.google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase.encode(message.excludedPhrases[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.enableFuzzyExtraction != null && Object.hasOwnProperty.call(message, "enableFuzzyExtraction")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.enableFuzzyExtraction); - if (message.redact != null && Object.hasOwnProperty.call(message, "redact")) - writer.uint32(/* id 9, wireType 0 =*/72).bool(message.redact); + if (message.changelogs != null && message.changelogs.length) + for (var i = 0; i < message.changelogs.length; ++i) + $root.google.cloud.dialogflow.cx.v3.Changelog.encode(message.changelogs[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; /** - * Encodes the specified EntityType message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.EntityType.verify|verify} messages. + * Encodes the specified ListChangelogsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListChangelogsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.EntityType + * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IEntityType} message EntityType message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListChangelogsResponse} message ListChangelogsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EntityType.encodeDelimited = function encodeDelimited(message, writer) { + ListChangelogsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an EntityType message from the specified reader or buffer. + * Decodes a ListChangelogsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.EntityType + * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsResponse * @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.EntityType} EntityType + * @returns {google.cloud.dialogflow.cx.v3.ListChangelogsResponse} ListChangelogsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EntityType.decode = function decode(reader, length, error) { + ListChangelogsResponse.decode = function decode(reader, length, error) { 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.EntityType(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ListChangelogsResponse(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.name = reader.string(); + if (!(message.changelogs && message.changelogs.length)) + message.changelogs = []; + message.changelogs.push($root.google.cloud.dialogflow.cx.v3.Changelog.decode(reader, reader.uint32())); break; } case 2: { - message.displayName = reader.string(); - break; - } - case 3: { - message.kind = reader.int32(); - break; - } - case 4: { - message.autoExpansionMode = reader.int32(); - break; - } - case 5: { - if (!(message.entities && message.entities.length)) - message.entities = []; - message.entities.push($root.google.cloud.dialogflow.cx.v3.EntityType.Entity.decode(reader, reader.uint32())); - break; - } - case 6: { - if (!(message.excludedPhrases && message.excludedPhrases.length)) - message.excludedPhrases = []; - message.excludedPhrases.push($root.google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase.decode(reader, reader.uint32())); - break; - } - case 7: { - message.enableFuzzyExtraction = reader.bool(); - break; - } - case 9: { - message.redact = reader.bool(); + message.nextPageToken = reader.string(); break; } default: @@ -32704,915 +33382,535 @@ }; /** - * Decodes an EntityType message from the specified reader or buffer, length delimited. + * Decodes a ListChangelogsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.EntityType + * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.EntityType} EntityType + * @returns {google.cloud.dialogflow.cx.v3.ListChangelogsResponse} ListChangelogsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EntityType.decodeDelimited = function decodeDelimited(reader) { + ListChangelogsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an EntityType message. + * Verifies a ListChangelogsResponse message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.EntityType + * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - EntityType.verify = function verify(message) { + ListChangelogsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.kind != null && message.hasOwnProperty("kind")) - switch (message.kind) { - default: - return "kind: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.autoExpansionMode != null && message.hasOwnProperty("autoExpansionMode")) - switch (message.autoExpansionMode) { - default: - return "autoExpansionMode: enum value expected"; - case 0: - case 1: - break; - } - if (message.entities != null && message.hasOwnProperty("entities")) { - if (!Array.isArray(message.entities)) - return "entities: array expected"; - for (var i = 0; i < message.entities.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.EntityType.Entity.verify(message.entities[i]); - if (error) - return "entities." + error; - } - } - if (message.excludedPhrases != null && message.hasOwnProperty("excludedPhrases")) { - if (!Array.isArray(message.excludedPhrases)) - return "excludedPhrases: array expected"; - for (var i = 0; i < message.excludedPhrases.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase.verify(message.excludedPhrases[i]); + if (message.changelogs != null && message.hasOwnProperty("changelogs")) { + if (!Array.isArray(message.changelogs)) + return "changelogs: array expected"; + for (var i = 0; i < message.changelogs.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.Changelog.verify(message.changelogs[i]); if (error) - return "excludedPhrases." + error; + return "changelogs." + error; } } - if (message.enableFuzzyExtraction != null && message.hasOwnProperty("enableFuzzyExtraction")) - if (typeof message.enableFuzzyExtraction !== "boolean") - return "enableFuzzyExtraction: boolean expected"; - if (message.redact != null && message.hasOwnProperty("redact")) - if (typeof message.redact !== "boolean") - return "redact: boolean expected"; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates an EntityType message from a plain object. Also converts values to their respective internal types. + * Creates a ListChangelogsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.EntityType + * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.EntityType} EntityType + * @returns {google.cloud.dialogflow.cx.v3.ListChangelogsResponse} ListChangelogsResponse */ - EntityType.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.EntityType) + ListChangelogsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListChangelogsResponse) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.EntityType(); - if (object.name != null) - message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - switch (object.kind) { - default: - if (typeof object.kind === "number") { - message.kind = object.kind; - break; + var message = new $root.google.cloud.dialogflow.cx.v3.ListChangelogsResponse(); + if (object.changelogs) { + if (!Array.isArray(object.changelogs)) + throw TypeError(".google.cloud.dialogflow.cx.v3.ListChangelogsResponse.changelogs: array expected"); + message.changelogs = []; + for (var i = 0; i < object.changelogs.length; ++i) { + if (typeof object.changelogs[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.ListChangelogsResponse.changelogs: object expected"); + message.changelogs[i] = $root.google.cloud.dialogflow.cx.v3.Changelog.fromObject(object.changelogs[i]); } - break; - case "KIND_UNSPECIFIED": - case 0: - message.kind = 0; - break; - case "KIND_MAP": - case 1: - message.kind = 1; - break; - case "KIND_LIST": - case 2: - message.kind = 2; - break; - case "KIND_REGEXP": - case 3: - message.kind = 3; - break; } - switch (object.autoExpansionMode) { - default: - if (typeof object.autoExpansionMode === "number") { - message.autoExpansionMode = object.autoExpansionMode; - break; - } - break; - case "AUTO_EXPANSION_MODE_UNSPECIFIED": - case 0: - message.autoExpansionMode = 0; - break; - case "AUTO_EXPANSION_MODE_DEFAULT": - case 1: - message.autoExpansionMode = 1; - break; + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListChangelogsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsResponse + * @static + * @param {google.cloud.dialogflow.cx.v3.ListChangelogsResponse} message ListChangelogsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListChangelogsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.changelogs = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.changelogs && message.changelogs.length) { + object.changelogs = []; + for (var j = 0; j < message.changelogs.length; ++j) + object.changelogs[j] = $root.google.cloud.dialogflow.cx.v3.Changelog.toObject(message.changelogs[j], options); } - if (object.entities) { - if (!Array.isArray(object.entities)) - throw TypeError(".google.cloud.dialogflow.cx.v3.EntityType.entities: array expected"); - message.entities = []; - for (var i = 0; i < object.entities.length; ++i) { - if (typeof object.entities[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.EntityType.entities: object expected"); - message.entities[i] = $root.google.cloud.dialogflow.cx.v3.EntityType.Entity.fromObject(object.entities[i]); - } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListChangelogsResponse to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsResponse + * @instance + * @returns {Object.} JSON object + */ + ListChangelogsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListChangelogsResponse + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.ListChangelogsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListChangelogsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } - if (object.excludedPhrases) { - if (!Array.isArray(object.excludedPhrases)) - throw TypeError(".google.cloud.dialogflow.cx.v3.EntityType.excludedPhrases: array expected"); - message.excludedPhrases = []; - for (var i = 0; i < object.excludedPhrases.length; ++i) { - if (typeof object.excludedPhrases[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.EntityType.excludedPhrases: object expected"); - message.excludedPhrases[i] = $root.google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase.fromObject(object.excludedPhrases[i]); + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListChangelogsResponse"; + }; + + return ListChangelogsResponse; + })(); + + v3.GetChangelogRequest = (function() { + + /** + * Properties of a GetChangelogRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IGetChangelogRequest + * @property {string|null} [name] GetChangelogRequest name + */ + + /** + * Constructs a new GetChangelogRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a GetChangelogRequest. + * @implements IGetChangelogRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IGetChangelogRequest=} [properties] Properties to set + */ + function GetChangelogRequest(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]]; + } + + /** + * GetChangelogRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.GetChangelogRequest + * @instance + */ + GetChangelogRequest.prototype.name = ""; + + /** + * Creates a new GetChangelogRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.GetChangelogRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IGetChangelogRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.GetChangelogRequest} GetChangelogRequest instance + */ + GetChangelogRequest.create = function create(properties) { + return new GetChangelogRequest(properties); + }; + + /** + * Encodes the specified GetChangelogRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetChangelogRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.GetChangelogRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IGetChangelogRequest} message GetChangelogRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetChangelogRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetChangelogRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetChangelogRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.GetChangelogRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IGetChangelogRequest} message GetChangelogRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetChangelogRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetChangelogRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.GetChangelogRequest + * @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.GetChangelogRequest} GetChangelogRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetChangelogRequest.decode = function decode(reader, length, error) { + 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.GetChangelogRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; } } - if (object.enableFuzzyExtraction != null) - message.enableFuzzyExtraction = Boolean(object.enableFuzzyExtraction); - if (object.redact != null) - message.redact = Boolean(object.redact); return message; }; /** - * Creates a plain object from an EntityType message. Also converts values to other types if specified. + * Decodes a GetChangelogRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.GetChangelogRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.GetChangelogRequest} GetChangelogRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetChangelogRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetChangelogRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.GetChangelogRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetChangelogRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetChangelogRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.GetChangelogRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.GetChangelogRequest} GetChangelogRequest + */ + GetChangelogRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.GetChangelogRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.GetChangelogRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetChangelogRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.EntityType + * @memberof google.cloud.dialogflow.cx.v3.GetChangelogRequest * @static - * @param {google.cloud.dialogflow.cx.v3.EntityType} message EntityType + * @param {google.cloud.dialogflow.cx.v3.GetChangelogRequest} message GetChangelogRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EntityType.toObject = function toObject(message, options) { + GetChangelogRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.entities = []; - object.excludedPhrases = []; - } - if (options.defaults) { + if (options.defaults) object.name = ""; - object.displayName = ""; - object.kind = options.enums === String ? "KIND_UNSPECIFIED" : 0; - object.autoExpansionMode = options.enums === String ? "AUTO_EXPANSION_MODE_UNSPECIFIED" : 0; - object.enableFuzzyExtraction = false; - object.redact = false; - } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.kind != null && message.hasOwnProperty("kind")) - object.kind = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.EntityType.Kind[message.kind] === undefined ? message.kind : $root.google.cloud.dialogflow.cx.v3.EntityType.Kind[message.kind] : message.kind; - if (message.autoExpansionMode != null && message.hasOwnProperty("autoExpansionMode")) - object.autoExpansionMode = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.EntityType.AutoExpansionMode[message.autoExpansionMode] === undefined ? message.autoExpansionMode : $root.google.cloud.dialogflow.cx.v3.EntityType.AutoExpansionMode[message.autoExpansionMode] : message.autoExpansionMode; - if (message.entities && message.entities.length) { - object.entities = []; - for (var j = 0; j < message.entities.length; ++j) - object.entities[j] = $root.google.cloud.dialogflow.cx.v3.EntityType.Entity.toObject(message.entities[j], options); - } - if (message.excludedPhrases && message.excludedPhrases.length) { - object.excludedPhrases = []; - for (var j = 0; j < message.excludedPhrases.length; ++j) - object.excludedPhrases[j] = $root.google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase.toObject(message.excludedPhrases[j], options); - } - if (message.enableFuzzyExtraction != null && message.hasOwnProperty("enableFuzzyExtraction")) - object.enableFuzzyExtraction = message.enableFuzzyExtraction; - if (message.redact != null && message.hasOwnProperty("redact")) - object.redact = message.redact; return object; }; /** - * Converts this EntityType to JSON. + * Converts this GetChangelogRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.EntityType + * @memberof google.cloud.dialogflow.cx.v3.GetChangelogRequest * @instance * @returns {Object.} JSON object */ - EntityType.prototype.toJSON = function toJSON() { + GetChangelogRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for EntityType + * Gets the default type url for GetChangelogRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.EntityType + * @memberof google.cloud.dialogflow.cx.v3.GetChangelogRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - EntityType.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetChangelogRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.EntityType"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.GetChangelogRequest"; }; + return GetChangelogRequest; + })(); + + v3.Changelog = (function() { + /** - * Kind enum. - * @name google.cloud.dialogflow.cx.v3.EntityType.Kind - * @enum {number} - * @property {number} KIND_UNSPECIFIED=0 KIND_UNSPECIFIED value - * @property {number} KIND_MAP=1 KIND_MAP value - * @property {number} KIND_LIST=2 KIND_LIST value - * @property {number} KIND_REGEXP=3 KIND_REGEXP value + * Properties of a Changelog. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IChangelog + * @property {string|null} [name] Changelog name + * @property {string|null} [userEmail] Changelog userEmail + * @property {string|null} [displayName] Changelog displayName + * @property {string|null} [action] Changelog action + * @property {string|null} [type] Changelog type + * @property {string|null} [resource] Changelog resource + * @property {google.protobuf.ITimestamp|null} [createTime] Changelog createTime + * @property {string|null} [languageCode] Changelog languageCode */ - EntityType.Kind = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "KIND_UNSPECIFIED"] = 0; - values[valuesById[1] = "KIND_MAP"] = 1; - values[valuesById[2] = "KIND_LIST"] = 2; - values[valuesById[3] = "KIND_REGEXP"] = 3; - return values; - })(); /** - * AutoExpansionMode enum. - * @name google.cloud.dialogflow.cx.v3.EntityType.AutoExpansionMode - * @enum {number} - * @property {number} AUTO_EXPANSION_MODE_UNSPECIFIED=0 AUTO_EXPANSION_MODE_UNSPECIFIED value - * @property {number} AUTO_EXPANSION_MODE_DEFAULT=1 AUTO_EXPANSION_MODE_DEFAULT value + * Constructs a new Changelog. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a Changelog. + * @implements IChangelog + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IChangelog=} [properties] Properties to set */ - EntityType.AutoExpansionMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "AUTO_EXPANSION_MODE_UNSPECIFIED"] = 0; - values[valuesById[1] = "AUTO_EXPANSION_MODE_DEFAULT"] = 1; - return values; - })(); - - EntityType.Entity = (function() { + function Changelog(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]]; + } - /** - * Properties of an Entity. - * @memberof google.cloud.dialogflow.cx.v3.EntityType - * @interface IEntity - * @property {string|null} [value] Entity value - * @property {Array.|null} [synonyms] Entity synonyms - */ + /** + * Changelog name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.Changelog + * @instance + */ + Changelog.prototype.name = ""; - /** - * Constructs a new Entity. - * @memberof google.cloud.dialogflow.cx.v3.EntityType - * @classdesc Represents an Entity. - * @implements IEntity - * @constructor - * @param {google.cloud.dialogflow.cx.v3.EntityType.IEntity=} [properties] Properties to set - */ - function Entity(properties) { - this.synonyms = []; - 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]]; - } + /** + * Changelog userEmail. + * @member {string} userEmail + * @memberof google.cloud.dialogflow.cx.v3.Changelog + * @instance + */ + Changelog.prototype.userEmail = ""; - /** - * Entity value. - * @member {string} value - * @memberof google.cloud.dialogflow.cx.v3.EntityType.Entity - * @instance - */ - Entity.prototype.value = ""; + /** + * Changelog displayName. + * @member {string} displayName + * @memberof google.cloud.dialogflow.cx.v3.Changelog + * @instance + */ + Changelog.prototype.displayName = ""; - /** - * Entity synonyms. - * @member {Array.} synonyms - * @memberof google.cloud.dialogflow.cx.v3.EntityType.Entity - * @instance - */ - Entity.prototype.synonyms = $util.emptyArray; + /** + * Changelog action. + * @member {string} action + * @memberof google.cloud.dialogflow.cx.v3.Changelog + * @instance + */ + Changelog.prototype.action = ""; - /** - * Creates a new Entity instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.EntityType.Entity - * @static - * @param {google.cloud.dialogflow.cx.v3.EntityType.IEntity=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.EntityType.Entity} Entity instance - */ - Entity.create = function create(properties) { - return new Entity(properties); - }; + /** + * Changelog type. + * @member {string} type + * @memberof google.cloud.dialogflow.cx.v3.Changelog + * @instance + */ + Changelog.prototype.type = ""; - /** - * Encodes the specified Entity message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.EntityType.Entity.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.EntityType.Entity - * @static - * @param {google.cloud.dialogflow.cx.v3.EntityType.IEntity} message Entity message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Entity.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); - if (message.synonyms != null && message.synonyms.length) - for (var i = 0; i < message.synonyms.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.synonyms[i]); - return writer; - }; - - /** - * Encodes the specified Entity message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.EntityType.Entity.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.EntityType.Entity - * @static - * @param {google.cloud.dialogflow.cx.v3.EntityType.IEntity} message Entity message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Entity.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Entity message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.EntityType.Entity - * @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.EntityType.Entity} Entity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Entity.decode = function decode(reader, length, error) { - 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.EntityType.Entity(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.value = reader.string(); - break; - } - case 2: { - if (!(message.synonyms && message.synonyms.length)) - message.synonyms = []; - message.synonyms.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Entity message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.EntityType.Entity - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.EntityType.Entity} Entity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Entity.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Entity message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.EntityType.Entity - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Entity.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isString(message.value)) - return "value: string expected"; - if (message.synonyms != null && message.hasOwnProperty("synonyms")) { - if (!Array.isArray(message.synonyms)) - return "synonyms: array expected"; - for (var i = 0; i < message.synonyms.length; ++i) - if (!$util.isString(message.synonyms[i])) - return "synonyms: string[] expected"; - } - return null; - }; - - /** - * Creates an Entity message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.EntityType.Entity - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.EntityType.Entity} Entity - */ - Entity.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.EntityType.Entity) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.EntityType.Entity(); - if (object.value != null) - message.value = String(object.value); - if (object.synonyms) { - if (!Array.isArray(object.synonyms)) - throw TypeError(".google.cloud.dialogflow.cx.v3.EntityType.Entity.synonyms: array expected"); - message.synonyms = []; - for (var i = 0; i < object.synonyms.length; ++i) - message.synonyms[i] = String(object.synonyms[i]); - } - return message; - }; - - /** - * Creates a plain object from an Entity message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.EntityType.Entity - * @static - * @param {google.cloud.dialogflow.cx.v3.EntityType.Entity} message Entity - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Entity.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.synonyms = []; - if (options.defaults) - object.value = ""; - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; - if (message.synonyms && message.synonyms.length) { - object.synonyms = []; - for (var j = 0; j < message.synonyms.length; ++j) - object.synonyms[j] = message.synonyms[j]; - } - return object; - }; - - /** - * Converts this Entity to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.EntityType.Entity - * @instance - * @returns {Object.} JSON object - */ - Entity.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Entity - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.EntityType.Entity - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Entity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.EntityType.Entity"; - }; - - return Entity; - })(); - - EntityType.ExcludedPhrase = (function() { - - /** - * Properties of an ExcludedPhrase. - * @memberof google.cloud.dialogflow.cx.v3.EntityType - * @interface IExcludedPhrase - * @property {string|null} [value] ExcludedPhrase value - */ - - /** - * Constructs a new ExcludedPhrase. - * @memberof google.cloud.dialogflow.cx.v3.EntityType - * @classdesc Represents an ExcludedPhrase. - * @implements IExcludedPhrase - * @constructor - * @param {google.cloud.dialogflow.cx.v3.EntityType.IExcludedPhrase=} [properties] Properties to set - */ - function ExcludedPhrase(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]]; - } - - /** - * ExcludedPhrase value. - * @member {string} value - * @memberof google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase - * @instance - */ - ExcludedPhrase.prototype.value = ""; - - /** - * Creates a new ExcludedPhrase instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase - * @static - * @param {google.cloud.dialogflow.cx.v3.EntityType.IExcludedPhrase=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase} ExcludedPhrase instance - */ - ExcludedPhrase.create = function create(properties) { - return new ExcludedPhrase(properties); - }; - - /** - * Encodes the specified ExcludedPhrase message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase - * @static - * @param {google.cloud.dialogflow.cx.v3.EntityType.IExcludedPhrase} message ExcludedPhrase message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExcludedPhrase.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); - return writer; - }; - - /** - * Encodes the specified ExcludedPhrase message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase - * @static - * @param {google.cloud.dialogflow.cx.v3.EntityType.IExcludedPhrase} message ExcludedPhrase message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExcludedPhrase.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExcludedPhrase message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase - * @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.EntityType.ExcludedPhrase} ExcludedPhrase - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExcludedPhrase.decode = function decode(reader, length, error) { - 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.EntityType.ExcludedPhrase(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.value = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExcludedPhrase message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase} ExcludedPhrase - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExcludedPhrase.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExcludedPhrase message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExcludedPhrase.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isString(message.value)) - return "value: string expected"; - return null; - }; - - /** - * Creates an ExcludedPhrase message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase} ExcludedPhrase - */ - ExcludedPhrase.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase(); - if (object.value != null) - message.value = String(object.value); - return message; - }; - - /** - * Creates a plain object from an ExcludedPhrase message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase - * @static - * @param {google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase} message ExcludedPhrase - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExcludedPhrase.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.value = ""; - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; - return object; - }; - - /** - * Converts this ExcludedPhrase to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase - * @instance - * @returns {Object.} JSON object - */ - ExcludedPhrase.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ExcludedPhrase - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExcludedPhrase.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase"; - }; - - return ExcludedPhrase; - })(); - - return EntityType; - })(); - - v3.ExportEntityTypesRequest = (function() { - - /** - * Properties of an ExportEntityTypesRequest. - * @memberof google.cloud.dialogflow.cx.v3 - * @interface IExportEntityTypesRequest - * @property {string|null} [parent] ExportEntityTypesRequest parent - * @property {Array.|null} [entityTypes] ExportEntityTypesRequest entityTypes - * @property {string|null} [entityTypesUri] ExportEntityTypesRequest entityTypesUri - * @property {boolean|null} [entityTypesContentInline] ExportEntityTypesRequest entityTypesContentInline - * @property {google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest.DataFormat|null} [dataFormat] ExportEntityTypesRequest dataFormat - * @property {string|null} [languageCode] ExportEntityTypesRequest languageCode - */ - - /** - * Constructs a new ExportEntityTypesRequest. - * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents an ExportEntityTypesRequest. - * @implements IExportEntityTypesRequest - * @constructor - * @param {google.cloud.dialogflow.cx.v3.IExportEntityTypesRequest=} [properties] Properties to set - */ - function ExportEntityTypesRequest(properties) { - this.entityTypes = []; - 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]]; - } - - /** - * ExportEntityTypesRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest - * @instance - */ - ExportEntityTypesRequest.prototype.parent = ""; - - /** - * ExportEntityTypesRequest entityTypes. - * @member {Array.} entityTypes - * @memberof google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest - * @instance - */ - ExportEntityTypesRequest.prototype.entityTypes = $util.emptyArray; - - /** - * ExportEntityTypesRequest entityTypesUri. - * @member {string|null|undefined} entityTypesUri - * @memberof google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest - * @instance - */ - ExportEntityTypesRequest.prototype.entityTypesUri = null; - - /** - * ExportEntityTypesRequest entityTypesContentInline. - * @member {boolean|null|undefined} entityTypesContentInline - * @memberof google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest - * @instance - */ - ExportEntityTypesRequest.prototype.entityTypesContentInline = null; + /** + * Changelog resource. + * @member {string} resource + * @memberof google.cloud.dialogflow.cx.v3.Changelog + * @instance + */ + Changelog.prototype.resource = ""; /** - * ExportEntityTypesRequest dataFormat. - * @member {google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest.DataFormat} dataFormat - * @memberof google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest + * Changelog createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.dialogflow.cx.v3.Changelog * @instance */ - ExportEntityTypesRequest.prototype.dataFormat = 0; + Changelog.prototype.createTime = null; /** - * ExportEntityTypesRequest languageCode. + * Changelog languageCode. * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest - * @instance - */ - ExportEntityTypesRequest.prototype.languageCode = ""; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * ExportEntityTypesRequest destination. - * @member {"entityTypesUri"|"entityTypesContentInline"|undefined} destination - * @memberof google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest + * @memberof google.cloud.dialogflow.cx.v3.Changelog * @instance */ - Object.defineProperty(ExportEntityTypesRequest.prototype, "destination", { - get: $util.oneOfGetter($oneOfFields = ["entityTypesUri", "entityTypesContentInline"]), - set: $util.oneOfSetter($oneOfFields) - }); + Changelog.prototype.languageCode = ""; /** - * Creates a new ExportEntityTypesRequest instance using the specified properties. + * Creates a new Changelog instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest + * @memberof google.cloud.dialogflow.cx.v3.Changelog * @static - * @param {google.cloud.dialogflow.cx.v3.IExportEntityTypesRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest} ExportEntityTypesRequest instance + * @param {google.cloud.dialogflow.cx.v3.IChangelog=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.Changelog} Changelog instance */ - ExportEntityTypesRequest.create = function create(properties) { - return new ExportEntityTypesRequest(properties); + Changelog.create = function create(properties) { + return new Changelog(properties); }; /** - * Encodes the specified ExportEntityTypesRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest.verify|verify} messages. + * Encodes the specified Changelog message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Changelog.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest + * @memberof google.cloud.dialogflow.cx.v3.Changelog * @static - * @param {google.cloud.dialogflow.cx.v3.IExportEntityTypesRequest} message ExportEntityTypesRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IChangelog} message Changelog message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExportEntityTypesRequest.encode = function encode(message, writer) { + Changelog.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.entityTypes != null && message.entityTypes.length) - for (var i = 0; i < message.entityTypes.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.entityTypes[i]); - if (message.entityTypesUri != null && Object.hasOwnProperty.call(message, "entityTypesUri")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.entityTypesUri); - if (message.entityTypesContentInline != null && Object.hasOwnProperty.call(message, "entityTypesContentInline")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.entityTypesContentInline); - if (message.dataFormat != null && Object.hasOwnProperty.call(message, "dataFormat")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.dataFormat); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.userEmail != null && Object.hasOwnProperty.call(message, "userEmail")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.userEmail); + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.resource); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.displayName); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.type); + if (message.action != null && Object.hasOwnProperty.call(message, "action")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.action); if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.languageCode); + writer.uint32(/* id 14, wireType 2 =*/114).string(message.languageCode); return writer; }; /** - * Encodes the specified ExportEntityTypesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest.verify|verify} messages. + * Encodes the specified Changelog message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Changelog.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest + * @memberof google.cloud.dialogflow.cx.v3.Changelog * @static - * @param {google.cloud.dialogflow.cx.v3.IExportEntityTypesRequest} message ExportEntityTypesRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IChangelog} message Changelog message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExportEntityTypesRequest.encodeDelimited = function encodeDelimited(message, writer) { + Changelog.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ExportEntityTypesRequest message from the specified reader or buffer. + * Decodes a Changelog message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest + * @memberof google.cloud.dialogflow.cx.v3.Changelog * @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.ExportEntityTypesRequest} ExportEntityTypesRequest + * @returns {google.cloud.dialogflow.cx.v3.Changelog} Changelog * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExportEntityTypesRequest.decode = function decode(reader, length, error) { + Changelog.decode = function decode(reader, length, error) { 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.ExportEntityTypesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.Changelog(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + message.name = reader.string(); break; } case 2: { - if (!(message.entityTypes && message.entityTypes.length)) - message.entityTypes = []; - message.entityTypes.push(reader.string()); + message.userEmail = reader.string(); break; } - case 3: { - message.entityTypesUri = reader.string(); + case 7: { + message.displayName = reader.string(); break; } - case 4: { - message.entityTypesContentInline = reader.bool(); + case 11: { + message.action = reader.string(); break; } - case 5: { - message.dataFormat = reader.int32(); + case 8: { + message.type = reader.string(); break; } - case 6: { + case 3: { + message.resource = reader.string(); + break; + } + case 4: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 14: { message.languageCode = reader.string(); break; } @@ -33625,64 +33923,55 @@ }; /** - * Decodes an ExportEntityTypesRequest message from the specified reader or buffer, length delimited. + * Decodes a Changelog message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest + * @memberof google.cloud.dialogflow.cx.v3.Changelog * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest} ExportEntityTypesRequest + * @returns {google.cloud.dialogflow.cx.v3.Changelog} Changelog * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExportEntityTypesRequest.decodeDelimited = function decodeDelimited(reader) { + Changelog.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ExportEntityTypesRequest message. + * Verifies a Changelog message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest + * @memberof google.cloud.dialogflow.cx.v3.Changelog * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExportEntityTypesRequest.verify = function verify(message) { + Changelog.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.entityTypes != null && message.hasOwnProperty("entityTypes")) { - if (!Array.isArray(message.entityTypes)) - return "entityTypes: array expected"; - for (var i = 0; i < message.entityTypes.length; ++i) - if (!$util.isString(message.entityTypes[i])) - return "entityTypes: string[] expected"; - } - if (message.entityTypesUri != null && message.hasOwnProperty("entityTypesUri")) { - properties.destination = 1; - if (!$util.isString(message.entityTypesUri)) - return "entityTypesUri: string expected"; - } - if (message.entityTypesContentInline != null && message.hasOwnProperty("entityTypesContentInline")) { - if (properties.destination === 1) - return "destination: multiple values"; - properties.destination = 1; - if (typeof message.entityTypesContentInline !== "boolean") - return "entityTypesContentInline: boolean expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.userEmail != null && message.hasOwnProperty("userEmail")) + if (!$util.isString(message.userEmail)) + return "userEmail: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.action != null && message.hasOwnProperty("action")) + if (!$util.isString(message.action)) + return "action: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.resource != null && message.hasOwnProperty("resource")) + if (!$util.isString(message.resource)) + return "resource: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; } - if (message.dataFormat != null && message.hasOwnProperty("dataFormat")) - switch (message.dataFormat) { - default: - return "dataFormat: enum value expected"; - case 0: - case 1: - case 5: - break; - } if (message.languageCode != null && message.hasOwnProperty("languageCode")) if (!$util.isString(message.languageCode)) return "languageCode: string expected"; @@ -33690,49 +33979,33 @@ }; /** - * Creates an ExportEntityTypesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Changelog message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest + * @memberof google.cloud.dialogflow.cx.v3.Changelog * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest} ExportEntityTypesRequest + * @returns {google.cloud.dialogflow.cx.v3.Changelog} Changelog */ - ExportEntityTypesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest) + Changelog.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.Changelog) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.entityTypes) { - if (!Array.isArray(object.entityTypes)) - throw TypeError(".google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest.entityTypes: array expected"); - message.entityTypes = []; - for (var i = 0; i < object.entityTypes.length; ++i) - message.entityTypes[i] = String(object.entityTypes[i]); - } - if (object.entityTypesUri != null) - message.entityTypesUri = String(object.entityTypesUri); - if (object.entityTypesContentInline != null) - message.entityTypesContentInline = Boolean(object.entityTypesContentInline); - switch (object.dataFormat) { - default: - if (typeof object.dataFormat === "number") { - message.dataFormat = object.dataFormat; - break; - } - break; - case "DATA_FORMAT_UNSPECIFIED": - case 0: - message.dataFormat = 0; - break; - case "BLOB": - case 1: - message.dataFormat = 1; - break; - case "JSON_PACKAGE": - case 5: - message.dataFormat = 5; - break; + var message = new $root.google.cloud.dialogflow.cx.v3.Changelog(); + if (object.name != null) + message.name = String(object.name); + if (object.userEmail != null) + message.userEmail = String(object.userEmail); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.action != null) + message.action = String(object.action); + if (object.type != null) + message.type = String(object.type); + if (object.resource != null) + message.resource = String(object.resource); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Changelog.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); } if (object.languageCode != null) message.languageCode = String(object.languageCode); @@ -33740,113 +34013,94 @@ }; /** - * Creates a plain object from an ExportEntityTypesRequest message. Also converts values to other types if specified. + * Creates a plain object from a Changelog message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest + * @memberof google.cloud.dialogflow.cx.v3.Changelog * @static - * @param {google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest} message ExportEntityTypesRequest + * @param {google.cloud.dialogflow.cx.v3.Changelog} message Changelog * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExportEntityTypesRequest.toObject = function toObject(message, options) { + Changelog.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.entityTypes = []; if (options.defaults) { - object.parent = ""; - object.dataFormat = options.enums === String ? "DATA_FORMAT_UNSPECIFIED" : 0; + object.name = ""; + object.userEmail = ""; + object.resource = ""; + object.createTime = null; + object.displayName = ""; + object.type = ""; + object.action = ""; object.languageCode = ""; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.entityTypes && message.entityTypes.length) { - object.entityTypes = []; - for (var j = 0; j < message.entityTypes.length; ++j) - object.entityTypes[j] = message.entityTypes[j]; - } - if (message.entityTypesUri != null && message.hasOwnProperty("entityTypesUri")) { - object.entityTypesUri = message.entityTypesUri; - if (options.oneofs) - object.destination = "entityTypesUri"; - } - if (message.entityTypesContentInline != null && message.hasOwnProperty("entityTypesContentInline")) { - object.entityTypesContentInline = message.entityTypesContentInline; - if (options.oneofs) - object.destination = "entityTypesContentInline"; - } - if (message.dataFormat != null && message.hasOwnProperty("dataFormat")) - object.dataFormat = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest.DataFormat[message.dataFormat] === undefined ? message.dataFormat : $root.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest.DataFormat[message.dataFormat] : message.dataFormat; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.userEmail != null && message.hasOwnProperty("userEmail")) + object.userEmail = message.userEmail; + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = message.resource; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.action != null && message.hasOwnProperty("action")) + object.action = message.action; if (message.languageCode != null && message.hasOwnProperty("languageCode")) object.languageCode = message.languageCode; return object; }; /** - * Converts this ExportEntityTypesRequest to JSON. + * Converts this Changelog to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest + * @memberof google.cloud.dialogflow.cx.v3.Changelog * @instance * @returns {Object.} JSON object */ - ExportEntityTypesRequest.prototype.toJSON = function toJSON() { + Changelog.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ExportEntityTypesRequest + * Gets the default type url for Changelog * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest + * @memberof google.cloud.dialogflow.cx.v3.Changelog * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ExportEntityTypesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Changelog.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Changelog"; }; - /** - * DataFormat enum. - * @name google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest.DataFormat - * @enum {number} - * @property {number} DATA_FORMAT_UNSPECIFIED=0 DATA_FORMAT_UNSPECIFIED value - * @property {number} BLOB=1 BLOB value - * @property {number} JSON_PACKAGE=5 JSON_PACKAGE value - */ - ExportEntityTypesRequest.DataFormat = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DATA_FORMAT_UNSPECIFIED"] = 0; - values[valuesById[1] = "BLOB"] = 1; - values[valuesById[5] = "JSON_PACKAGE"] = 5; - return values; - })(); - - return ExportEntityTypesRequest; + return Changelog; })(); - v3.ExportEntityTypesResponse = (function() { + v3.CodeBlock = (function() { /** - * Properties of an ExportEntityTypesResponse. + * Properties of a CodeBlock. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IExportEntityTypesResponse - * @property {string|null} [entityTypesUri] ExportEntityTypesResponse entityTypesUri - * @property {google.cloud.dialogflow.cx.v3.IInlineDestination|null} [entityTypesContent] ExportEntityTypesResponse entityTypesContent + * @interface ICodeBlock + * @property {string|null} [code] CodeBlock code */ /** - * Constructs a new ExportEntityTypesResponse. + * Constructs a new CodeBlock. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents an ExportEntityTypesResponse. - * @implements IExportEntityTypesResponse + * @classdesc Represents a CodeBlock. + * @implements ICodeBlock * @constructor - * @param {google.cloud.dialogflow.cx.v3.IExportEntityTypesResponse=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.ICodeBlock=} [properties] Properties to set */ - function ExportEntityTypesResponse(properties) { + function CodeBlock(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -33854,105 +34108,77 @@ } /** - * ExportEntityTypesResponse entityTypesUri. - * @member {string|null|undefined} entityTypesUri - * @memberof google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse - * @instance - */ - ExportEntityTypesResponse.prototype.entityTypesUri = null; - - /** - * ExportEntityTypesResponse entityTypesContent. - * @member {google.cloud.dialogflow.cx.v3.IInlineDestination|null|undefined} entityTypesContent - * @memberof google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse - * @instance - */ - ExportEntityTypesResponse.prototype.entityTypesContent = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * ExportEntityTypesResponse exportedEntityTypes. - * @member {"entityTypesUri"|"entityTypesContent"|undefined} exportedEntityTypes - * @memberof google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse + * CodeBlock code. + * @member {string} code + * @memberof google.cloud.dialogflow.cx.v3.CodeBlock * @instance */ - Object.defineProperty(ExportEntityTypesResponse.prototype, "exportedEntityTypes", { - get: $util.oneOfGetter($oneOfFields = ["entityTypesUri", "entityTypesContent"]), - set: $util.oneOfSetter($oneOfFields) - }); + CodeBlock.prototype.code = ""; /** - * Creates a new ExportEntityTypesResponse instance using the specified properties. + * Creates a new CodeBlock instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse + * @memberof google.cloud.dialogflow.cx.v3.CodeBlock * @static - * @param {google.cloud.dialogflow.cx.v3.IExportEntityTypesResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse} ExportEntityTypesResponse instance + * @param {google.cloud.dialogflow.cx.v3.ICodeBlock=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.CodeBlock} CodeBlock instance */ - ExportEntityTypesResponse.create = function create(properties) { - return new ExportEntityTypesResponse(properties); + CodeBlock.create = function create(properties) { + return new CodeBlock(properties); }; /** - * Encodes the specified ExportEntityTypesResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse.verify|verify} messages. + * Encodes the specified CodeBlock message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CodeBlock.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse + * @memberof google.cloud.dialogflow.cx.v3.CodeBlock * @static - * @param {google.cloud.dialogflow.cx.v3.IExportEntityTypesResponse} message ExportEntityTypesResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ICodeBlock} message CodeBlock message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExportEntityTypesResponse.encode = function encode(message, writer) { + CodeBlock.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.entityTypesUri != null && Object.hasOwnProperty.call(message, "entityTypesUri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.entityTypesUri); - if (message.entityTypesContent != null && Object.hasOwnProperty.call(message, "entityTypesContent")) - $root.google.cloud.dialogflow.cx.v3.InlineDestination.encode(message.entityTypesContent, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.code != null && Object.hasOwnProperty.call(message, "code")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.code); return writer; }; /** - * Encodes the specified ExportEntityTypesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse.verify|verify} messages. + * Encodes the specified CodeBlock message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CodeBlock.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse + * @memberof google.cloud.dialogflow.cx.v3.CodeBlock * @static - * @param {google.cloud.dialogflow.cx.v3.IExportEntityTypesResponse} message ExportEntityTypesResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ICodeBlock} message CodeBlock message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExportEntityTypesResponse.encodeDelimited = function encodeDelimited(message, writer) { + CodeBlock.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ExportEntityTypesResponse message from the specified reader or buffer. + * Decodes a CodeBlock message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse + * @memberof google.cloud.dialogflow.cx.v3.CodeBlock * @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.ExportEntityTypesResponse} ExportEntityTypesResponse + * @returns {google.cloud.dialogflow.cx.v3.CodeBlock} CodeBlock * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExportEntityTypesResponse.decode = function decode(reader, length, error) { + CodeBlock.decode = function decode(reader, length, error) { 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.ExportEntityTypesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.CodeBlock(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.entityTypesUri = reader.string(); - break; - } - case 2: { - message.entityTypesContent = $root.google.cloud.dialogflow.cx.v3.InlineDestination.decode(reader, reader.uint32()); + message.code = reader.string(); break; } default: @@ -33964,327 +34190,228 @@ }; /** - * Decodes an ExportEntityTypesResponse message from the specified reader or buffer, length delimited. + * Decodes a CodeBlock message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse + * @memberof google.cloud.dialogflow.cx.v3.CodeBlock * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse} ExportEntityTypesResponse + * @returns {google.cloud.dialogflow.cx.v3.CodeBlock} CodeBlock * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExportEntityTypesResponse.decodeDelimited = function decodeDelimited(reader) { + CodeBlock.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ExportEntityTypesResponse message. + * Verifies a CodeBlock message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse + * @memberof google.cloud.dialogflow.cx.v3.CodeBlock * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExportEntityTypesResponse.verify = function verify(message) { + CodeBlock.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.entityTypesUri != null && message.hasOwnProperty("entityTypesUri")) { - properties.exportedEntityTypes = 1; - if (!$util.isString(message.entityTypesUri)) - return "entityTypesUri: string expected"; - } - if (message.entityTypesContent != null && message.hasOwnProperty("entityTypesContent")) { - if (properties.exportedEntityTypes === 1) - return "exportedEntityTypes: multiple values"; - properties.exportedEntityTypes = 1; - { - var error = $root.google.cloud.dialogflow.cx.v3.InlineDestination.verify(message.entityTypesContent); - if (error) - return "entityTypesContent." + error; - } - } + if (message.code != null && message.hasOwnProperty("code")) + if (!$util.isString(message.code)) + return "code: string expected"; return null; }; /** - * Creates an ExportEntityTypesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a CodeBlock message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse + * @memberof google.cloud.dialogflow.cx.v3.CodeBlock * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse} ExportEntityTypesResponse + * @returns {google.cloud.dialogflow.cx.v3.CodeBlock} CodeBlock */ - ExportEntityTypesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse) + CodeBlock.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.CodeBlock) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse(); - if (object.entityTypesUri != null) - message.entityTypesUri = String(object.entityTypesUri); - if (object.entityTypesContent != null) { - if (typeof object.entityTypesContent !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse.entityTypesContent: object expected"); - message.entityTypesContent = $root.google.cloud.dialogflow.cx.v3.InlineDestination.fromObject(object.entityTypesContent); - } + var message = new $root.google.cloud.dialogflow.cx.v3.CodeBlock(); + if (object.code != null) + message.code = String(object.code); return message; }; /** - * Creates a plain object from an ExportEntityTypesResponse message. Also converts values to other types if specified. + * Creates a plain object from a CodeBlock message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse + * @memberof google.cloud.dialogflow.cx.v3.CodeBlock * @static - * @param {google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse} message ExportEntityTypesResponse + * @param {google.cloud.dialogflow.cx.v3.CodeBlock} message CodeBlock * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExportEntityTypesResponse.toObject = function toObject(message, options) { + CodeBlock.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.entityTypesUri != null && message.hasOwnProperty("entityTypesUri")) { - object.entityTypesUri = message.entityTypesUri; - if (options.oneofs) - object.exportedEntityTypes = "entityTypesUri"; - } - if (message.entityTypesContent != null && message.hasOwnProperty("entityTypesContent")) { - object.entityTypesContent = $root.google.cloud.dialogflow.cx.v3.InlineDestination.toObject(message.entityTypesContent, options); - if (options.oneofs) - object.exportedEntityTypes = "entityTypesContent"; - } + if (options.defaults) + object.code = ""; + if (message.code != null && message.hasOwnProperty("code")) + object.code = message.code; return object; }; /** - * Converts this ExportEntityTypesResponse to JSON. + * Converts this CodeBlock to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse + * @memberof google.cloud.dialogflow.cx.v3.CodeBlock * @instance * @returns {Object.} JSON object */ - ExportEntityTypesResponse.prototype.toJSON = function toJSON() { + CodeBlock.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ExportEntityTypesResponse + * Gets the default type url for CodeBlock * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse + * @memberof google.cloud.dialogflow.cx.v3.CodeBlock * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ExportEntityTypesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CodeBlock.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.CodeBlock"; }; - return ExportEntityTypesResponse; + return CodeBlock; })(); - v3.ExportEntityTypesMetadata = (function() { - - /** - * Properties of an ExportEntityTypesMetadata. - * @memberof google.cloud.dialogflow.cx.v3 - * @interface IExportEntityTypesMetadata - */ + v3.Deployments = (function() { /** - * Constructs a new ExportEntityTypesMetadata. + * Constructs a new Deployments service. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents an ExportEntityTypesMetadata. - * @implements IExportEntityTypesMetadata + * @classdesc Represents a Deployments + * @extends $protobuf.rpc.Service * @constructor - * @param {google.cloud.dialogflow.cx.v3.IExportEntityTypesMetadata=} [properties] Properties to set + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited */ - function ExportEntityTypesMetadata(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]]; + function Deployments(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); } + (Deployments.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Deployments; + /** - * Creates a new ExportEntityTypesMetadata instance using the specified properties. + * Creates new Deployments service using the specified rpc implementation. * @function create - * @memberof google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata + * @memberof google.cloud.dialogflow.cx.v3.Deployments * @static - * @param {google.cloud.dialogflow.cx.v3.IExportEntityTypesMetadata=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata} ExportEntityTypesMetadata instance + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Deployments} RPC service. Useful where requests and/or responses are streamed. */ - ExportEntityTypesMetadata.create = function create(properties) { - return new ExportEntityTypesMetadata(properties); + Deployments.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); }; /** - * Encodes the specified ExportEntityTypesMetadata message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata - * @static - * @param {google.cloud.dialogflow.cx.v3.IExportEntityTypesMetadata} message ExportEntityTypesMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Deployments|listDeployments}. + * @memberof google.cloud.dialogflow.cx.v3.Deployments + * @typedef ListDeploymentsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.ListDeploymentsResponse} [response] ListDeploymentsResponse */ - ExportEntityTypesMetadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; /** - * Encodes the specified ExportEntityTypesMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata - * @static - * @param {google.cloud.dialogflow.cx.v3.IExportEntityTypesMetadata} message ExportEntityTypesMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls ListDeployments. + * @function listDeployments + * @memberof google.cloud.dialogflow.cx.v3.Deployments + * @instance + * @param {google.cloud.dialogflow.cx.v3.IListDeploymentsRequest} request ListDeploymentsRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Deployments.ListDeploymentsCallback} callback Node-style callback called with the error, if any, and ListDeploymentsResponse + * @returns {undefined} + * @variation 1 */ - ExportEntityTypesMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + Object.defineProperty(Deployments.prototype.listDeployments = function listDeployments(request, callback) { + return this.rpcCall(listDeployments, $root.google.cloud.dialogflow.cx.v3.ListDeploymentsRequest, $root.google.cloud.dialogflow.cx.v3.ListDeploymentsResponse, request, callback); + }, "name", { value: "ListDeployments" }); /** - * Decodes an ExportEntityTypesMetadata message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata - * @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.ExportEntityTypesMetadata} ExportEntityTypesMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExportEntityTypesMetadata.decode = function decode(reader, length, error) { - 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.ExportEntityTypesMetadata(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExportEntityTypesMetadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata} ExportEntityTypesMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExportEntityTypesMetadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExportEntityTypesMetadata message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExportEntityTypesMetadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates an ExportEntityTypesMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata} ExportEntityTypesMetadata + * Calls ListDeployments. + * @function listDeployments + * @memberof google.cloud.dialogflow.cx.v3.Deployments + * @instance + * @param {google.cloud.dialogflow.cx.v3.IListDeploymentsRequest} request ListDeploymentsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ExportEntityTypesMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata) - return object; - return new $root.google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata(); - }; /** - * Creates a plain object from an ExportEntityTypesMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata - * @static - * @param {google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata} message ExportEntityTypesMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Deployments|getDeployment}. + * @memberof google.cloud.dialogflow.cx.v3.Deployments + * @typedef GetDeploymentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.Deployment} [response] Deployment */ - ExportEntityTypesMetadata.toObject = function toObject() { - return {}; - }; /** - * Converts this ExportEntityTypesMetadata to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata + * Calls GetDeployment. + * @function getDeployment + * @memberof google.cloud.dialogflow.cx.v3.Deployments * @instance - * @returns {Object.} JSON object + * @param {google.cloud.dialogflow.cx.v3.IGetDeploymentRequest} request GetDeploymentRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Deployments.GetDeploymentCallback} callback Node-style callback called with the error, if any, and Deployment + * @returns {undefined} + * @variation 1 */ - ExportEntityTypesMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + Object.defineProperty(Deployments.prototype.getDeployment = function getDeployment(request, callback) { + return this.rpcCall(getDeployment, $root.google.cloud.dialogflow.cx.v3.GetDeploymentRequest, $root.google.cloud.dialogflow.cx.v3.Deployment, request, callback); + }, "name", { value: "GetDeployment" }); /** - * Gets the default type url for ExportEntityTypesMetadata - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * Calls GetDeployment. + * @function getDeployment + * @memberof google.cloud.dialogflow.cx.v3.Deployments + * @instance + * @param {google.cloud.dialogflow.cx.v3.IGetDeploymentRequest} request GetDeploymentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ExportEntityTypesMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata"; - }; - return ExportEntityTypesMetadata; + return Deployments; })(); - v3.ImportEntityTypesRequest = (function() { + v3.Deployment = (function() { /** - * Properties of an ImportEntityTypesRequest. + * Properties of a Deployment. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IImportEntityTypesRequest - * @property {string|null} [parent] ImportEntityTypesRequest parent - * @property {string|null} [entityTypesUri] ImportEntityTypesRequest entityTypesUri - * @property {google.cloud.dialogflow.cx.v3.IInlineSource|null} [entityTypesContent] ImportEntityTypesRequest entityTypesContent - * @property {google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.MergeOption|null} [mergeOption] ImportEntityTypesRequest mergeOption - * @property {string|null} [targetEntityType] ImportEntityTypesRequest targetEntityType + * @interface IDeployment + * @property {string|null} [name] Deployment name + * @property {string|null} [flowVersion] Deployment flowVersion + * @property {google.cloud.dialogflow.cx.v3.Deployment.State|null} [state] Deployment state + * @property {google.cloud.dialogflow.cx.v3.Deployment.IResult|null} [result] Deployment result + * @property {google.protobuf.ITimestamp|null} [startTime] Deployment startTime + * @property {google.protobuf.ITimestamp|null} [endTime] Deployment endTime */ /** - * Constructs a new ImportEntityTypesRequest. + * Constructs a new Deployment. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents an ImportEntityTypesRequest. - * @implements IImportEntityTypesRequest + * @classdesc Represents a Deployment. + * @implements IDeployment * @constructor - * @param {google.cloud.dialogflow.cx.v3.IImportEntityTypesRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IDeployment=} [properties] Properties to set */ - function ImportEntityTypesRequest(properties) { + function Deployment(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -34292,147 +34419,147 @@ } /** - * ImportEntityTypesRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest + * Deployment name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.Deployment * @instance */ - ImportEntityTypesRequest.prototype.parent = ""; + Deployment.prototype.name = ""; /** - * ImportEntityTypesRequest entityTypesUri. - * @member {string|null|undefined} entityTypesUri - * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest + * Deployment flowVersion. + * @member {string} flowVersion + * @memberof google.cloud.dialogflow.cx.v3.Deployment * @instance */ - ImportEntityTypesRequest.prototype.entityTypesUri = null; + Deployment.prototype.flowVersion = ""; /** - * ImportEntityTypesRequest entityTypesContent. - * @member {google.cloud.dialogflow.cx.v3.IInlineSource|null|undefined} entityTypesContent - * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest + * Deployment state. + * @member {google.cloud.dialogflow.cx.v3.Deployment.State} state + * @memberof google.cloud.dialogflow.cx.v3.Deployment * @instance */ - ImportEntityTypesRequest.prototype.entityTypesContent = null; + Deployment.prototype.state = 0; /** - * ImportEntityTypesRequest mergeOption. - * @member {google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.MergeOption} mergeOption - * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest + * Deployment result. + * @member {google.cloud.dialogflow.cx.v3.Deployment.IResult|null|undefined} result + * @memberof google.cloud.dialogflow.cx.v3.Deployment * @instance */ - ImportEntityTypesRequest.prototype.mergeOption = 0; + Deployment.prototype.result = null; /** - * ImportEntityTypesRequest targetEntityType. - * @member {string} targetEntityType - * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest + * Deployment startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.cloud.dialogflow.cx.v3.Deployment * @instance */ - ImportEntityTypesRequest.prototype.targetEntityType = ""; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + Deployment.prototype.startTime = null; /** - * ImportEntityTypesRequest entityTypes. - * @member {"entityTypesUri"|"entityTypesContent"|undefined} entityTypes - * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest + * Deployment endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.dialogflow.cx.v3.Deployment * @instance */ - Object.defineProperty(ImportEntityTypesRequest.prototype, "entityTypes", { - get: $util.oneOfGetter($oneOfFields = ["entityTypesUri", "entityTypesContent"]), - set: $util.oneOfSetter($oneOfFields) - }); + Deployment.prototype.endTime = null; /** - * Creates a new ImportEntityTypesRequest instance using the specified properties. + * Creates a new Deployment instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest + * @memberof google.cloud.dialogflow.cx.v3.Deployment * @static - * @param {google.cloud.dialogflow.cx.v3.IImportEntityTypesRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest} ImportEntityTypesRequest instance + * @param {google.cloud.dialogflow.cx.v3.IDeployment=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.Deployment} Deployment instance */ - ImportEntityTypesRequest.create = function create(properties) { - return new ImportEntityTypesRequest(properties); + Deployment.create = function create(properties) { + return new Deployment(properties); }; /** - * Encodes the specified ImportEntityTypesRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.verify|verify} messages. + * Encodes the specified Deployment message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Deployment.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest + * @memberof google.cloud.dialogflow.cx.v3.Deployment * @static - * @param {google.cloud.dialogflow.cx.v3.IImportEntityTypesRequest} message ImportEntityTypesRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IDeployment} message Deployment message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportEntityTypesRequest.encode = function encode(message, writer) { + Deployment.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.entityTypesUri != null && Object.hasOwnProperty.call(message, "entityTypesUri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.entityTypesUri); - if (message.entityTypesContent != null && Object.hasOwnProperty.call(message, "entityTypesContent")) - $root.google.cloud.dialogflow.cx.v3.InlineSource.encode(message.entityTypesContent, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.mergeOption != null && Object.hasOwnProperty.call(message, "mergeOption")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.mergeOption); - if (message.targetEntityType != null && Object.hasOwnProperty.call(message, "targetEntityType")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.targetEntityType); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.flowVersion != null && Object.hasOwnProperty.call(message, "flowVersion")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.flowVersion); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.state); + if (message.result != null && Object.hasOwnProperty.call(message, "result")) + $root.google.cloud.dialogflow.cx.v3.Deployment.Result.encode(message.result, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; /** - * Encodes the specified ImportEntityTypesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.verify|verify} messages. + * Encodes the specified Deployment message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Deployment.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest + * @memberof google.cloud.dialogflow.cx.v3.Deployment * @static - * @param {google.cloud.dialogflow.cx.v3.IImportEntityTypesRequest} message ImportEntityTypesRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IDeployment} message Deployment message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportEntityTypesRequest.encodeDelimited = function encodeDelimited(message, writer) { + Deployment.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ImportEntityTypesRequest message from the specified reader or buffer. + * Decodes a Deployment message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest + * @memberof google.cloud.dialogflow.cx.v3.Deployment * @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.ImportEntityTypesRequest} ImportEntityTypesRequest + * @returns {google.cloud.dialogflow.cx.v3.Deployment} Deployment * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportEntityTypesRequest.decode = function decode(reader, length, error) { + Deployment.decode = function decode(reader, length, error) { 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.ImportEntityTypesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.Deployment(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + message.name = reader.string(); break; } case 2: { - message.entityTypesUri = reader.string(); + message.flowVersion = reader.string(); break; } case 3: { - message.entityTypesContent = $root.google.cloud.dialogflow.cx.v3.InlineSource.decode(reader, reader.uint32()); + message.state = reader.int32(); break; } case 4: { - message.mergeOption = reader.int32(); + message.result = $root.google.cloud.dialogflow.cx.v3.Deployment.Result.decode(reader, reader.uint32()); break; } case 5: { - message.targetEntityType = reader.string(); + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } default: @@ -34444,483 +34571,224 @@ }; /** - * Decodes an ImportEntityTypesRequest message from the specified reader or buffer, length delimited. + * Decodes a Deployment message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest + * @memberof google.cloud.dialogflow.cx.v3.Deployment * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest} ImportEntityTypesRequest + * @returns {google.cloud.dialogflow.cx.v3.Deployment} Deployment * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportEntityTypesRequest.decodeDelimited = function decodeDelimited(reader) { + Deployment.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ImportEntityTypesRequest message. + * Verifies a Deployment message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest + * @memberof google.cloud.dialogflow.cx.v3.Deployment * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ImportEntityTypesRequest.verify = function verify(message) { + Deployment.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.entityTypesUri != null && message.hasOwnProperty("entityTypesUri")) { - properties.entityTypes = 1; - if (!$util.isString(message.entityTypesUri)) - return "entityTypesUri: string expected"; - } - if (message.entityTypesContent != null && message.hasOwnProperty("entityTypesContent")) { - if (properties.entityTypes === 1) - return "entityTypes: multiple values"; - properties.entityTypes = 1; - { - var error = $root.google.cloud.dialogflow.cx.v3.InlineSource.verify(message.entityTypesContent); - if (error) - return "entityTypesContent." + error; - } - } - if (message.mergeOption != null && message.hasOwnProperty("mergeOption")) - switch (message.mergeOption) { + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.flowVersion != null && message.hasOwnProperty("flowVersion")) + if (!$util.isString(message.flowVersion)) + return "flowVersion: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { default: - return "mergeOption: enum value expected"; + return "state: enum value expected"; case 0: case 1: case 2: case 3: - case 4: - case 5: break; } - if (message.targetEntityType != null && message.hasOwnProperty("targetEntityType")) - if (!$util.isString(message.targetEntityType)) - return "targetEntityType: string expected"; + if (message.result != null && message.hasOwnProperty("result")) { + var error = $root.google.cloud.dialogflow.cx.v3.Deployment.Result.verify(message.result); + if (error) + return "result." + error; + } + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } return null; }; /** - * Creates an ImportEntityTypesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Deployment message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest + * @memberof google.cloud.dialogflow.cx.v3.Deployment * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest} ImportEntityTypesRequest + * @returns {google.cloud.dialogflow.cx.v3.Deployment} Deployment */ - ImportEntityTypesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest) + Deployment.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.Deployment) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.entityTypesUri != null) - message.entityTypesUri = String(object.entityTypesUri); - if (object.entityTypesContent != null) { - if (typeof object.entityTypesContent !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.entityTypesContent: object expected"); - message.entityTypesContent = $root.google.cloud.dialogflow.cx.v3.InlineSource.fromObject(object.entityTypesContent); - } - switch (object.mergeOption) { + var message = new $root.google.cloud.dialogflow.cx.v3.Deployment(); + if (object.name != null) + message.name = String(object.name); + if (object.flowVersion != null) + message.flowVersion = String(object.flowVersion); + switch (object.state) { default: - if (typeof object.mergeOption === "number") { - message.mergeOption = object.mergeOption; + if (typeof object.state === "number") { + message.state = object.state; break; } break; - case "MERGE_OPTION_UNSPECIFIED": + case "STATE_UNSPECIFIED": case 0: - message.mergeOption = 0; + message.state = 0; break; - case "REPLACE": + case "RUNNING": case 1: - message.mergeOption = 1; + message.state = 1; break; - case "MERGE": + case "SUCCEEDED": case 2: - message.mergeOption = 2; + message.state = 2; break; - case "RENAME": + case "FAILED": case 3: - message.mergeOption = 3; - break; - case "REPORT_CONFLICT": - case 4: - message.mergeOption = 4; - break; - case "KEEP": - case 5: - message.mergeOption = 5; + message.state = 3; break; } - if (object.targetEntityType != null) - message.targetEntityType = String(object.targetEntityType); + if (object.result != null) { + if (typeof object.result !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Deployment.result: object expected"); + message.result = $root.google.cloud.dialogflow.cx.v3.Deployment.Result.fromObject(object.result); + } + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Deployment.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Deployment.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } return message; }; /** - * Creates a plain object from an ImportEntityTypesRequest message. Also converts values to other types if specified. + * Creates a plain object from a Deployment message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest + * @memberof google.cloud.dialogflow.cx.v3.Deployment * @static - * @param {google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest} message ImportEntityTypesRequest + * @param {google.cloud.dialogflow.cx.v3.Deployment} message Deployment * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ImportEntityTypesRequest.toObject = function toObject(message, options) { + Deployment.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.mergeOption = options.enums === String ? "MERGE_OPTION_UNSPECIFIED" : 0; - object.targetEntityType = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.entityTypesUri != null && message.hasOwnProperty("entityTypesUri")) { - object.entityTypesUri = message.entityTypesUri; - if (options.oneofs) - object.entityTypes = "entityTypesUri"; - } - if (message.entityTypesContent != null && message.hasOwnProperty("entityTypesContent")) { - object.entityTypesContent = $root.google.cloud.dialogflow.cx.v3.InlineSource.toObject(message.entityTypesContent, options); - if (options.oneofs) - object.entityTypes = "entityTypesContent"; + object.name = ""; + object.flowVersion = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.result = null; + object.startTime = null; + object.endTime = null; } - if (message.mergeOption != null && message.hasOwnProperty("mergeOption")) - object.mergeOption = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.MergeOption[message.mergeOption] === undefined ? message.mergeOption : $root.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.MergeOption[message.mergeOption] : message.mergeOption; - if (message.targetEntityType != null && message.hasOwnProperty("targetEntityType")) - object.targetEntityType = message.targetEntityType; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.flowVersion != null && message.hasOwnProperty("flowVersion")) + object.flowVersion = message.flowVersion; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.Deployment.State[message.state] === undefined ? message.state : $root.google.cloud.dialogflow.cx.v3.Deployment.State[message.state] : message.state; + if (message.result != null && message.hasOwnProperty("result")) + object.result = $root.google.cloud.dialogflow.cx.v3.Deployment.Result.toObject(message.result, options); + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); return object; }; /** - * Converts this ImportEntityTypesRequest to JSON. + * Converts this Deployment to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest + * @memberof google.cloud.dialogflow.cx.v3.Deployment * @instance * @returns {Object.} JSON object */ - ImportEntityTypesRequest.prototype.toJSON = function toJSON() { + Deployment.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ImportEntityTypesRequest + * Gets the default type url for Deployment * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest + * @memberof google.cloud.dialogflow.cx.v3.Deployment * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ImportEntityTypesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Deployment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Deployment"; }; /** - * MergeOption enum. - * @name google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.MergeOption + * State enum. + * @name google.cloud.dialogflow.cx.v3.Deployment.State * @enum {number} - * @property {number} MERGE_OPTION_UNSPECIFIED=0 MERGE_OPTION_UNSPECIFIED value - * @property {number} REPLACE=1 REPLACE value - * @property {number} MERGE=2 MERGE value - * @property {number} RENAME=3 RENAME value - * @property {number} REPORT_CONFLICT=4 REPORT_CONFLICT value - * @property {number} KEEP=5 KEEP value + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} RUNNING=1 RUNNING value + * @property {number} SUCCEEDED=2 SUCCEEDED value + * @property {number} FAILED=3 FAILED value */ - ImportEntityTypesRequest.MergeOption = (function() { + Deployment.State = (function() { var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MERGE_OPTION_UNSPECIFIED"] = 0; - values[valuesById[1] = "REPLACE"] = 1; - values[valuesById[2] = "MERGE"] = 2; - values[valuesById[3] = "RENAME"] = 3; - values[valuesById[4] = "REPORT_CONFLICT"] = 4; - values[valuesById[5] = "KEEP"] = 5; + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "RUNNING"] = 1; + values[valuesById[2] = "SUCCEEDED"] = 2; + values[valuesById[3] = "FAILED"] = 3; return values; })(); - return ImportEntityTypesRequest; - })(); + Deployment.Result = (function() { - v3.ImportEntityTypesResponse = (function() { - - /** - * Properties of an ImportEntityTypesResponse. - * @memberof google.cloud.dialogflow.cx.v3 - * @interface IImportEntityTypesResponse - * @property {Array.|null} [entityTypes] ImportEntityTypesResponse entityTypes - * @property {google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.IConflictingResources|null} [conflictingResources] ImportEntityTypesResponse conflictingResources - */ - - /** - * Constructs a new ImportEntityTypesResponse. - * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents an ImportEntityTypesResponse. - * @implements IImportEntityTypesResponse - * @constructor - * @param {google.cloud.dialogflow.cx.v3.IImportEntityTypesResponse=} [properties] Properties to set - */ - function ImportEntityTypesResponse(properties) { - this.entityTypes = []; - 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]]; - } - - /** - * ImportEntityTypesResponse entityTypes. - * @member {Array.} entityTypes - * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse - * @instance - */ - ImportEntityTypesResponse.prototype.entityTypes = $util.emptyArray; - - /** - * ImportEntityTypesResponse conflictingResources. - * @member {google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.IConflictingResources|null|undefined} conflictingResources - * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse - * @instance - */ - ImportEntityTypesResponse.prototype.conflictingResources = null; - - /** - * Creates a new ImportEntityTypesResponse instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse - * @static - * @param {google.cloud.dialogflow.cx.v3.IImportEntityTypesResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse} ImportEntityTypesResponse instance - */ - ImportEntityTypesResponse.create = function create(properties) { - return new ImportEntityTypesResponse(properties); - }; - - /** - * Encodes the specified ImportEntityTypesResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse - * @static - * @param {google.cloud.dialogflow.cx.v3.IImportEntityTypesResponse} message ImportEntityTypesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ImportEntityTypesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.entityTypes != null && message.entityTypes.length) - for (var i = 0; i < message.entityTypes.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.entityTypes[i]); - if (message.conflictingResources != null && Object.hasOwnProperty.call(message, "conflictingResources")) - $root.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources.encode(message.conflictingResources, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ImportEntityTypesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse - * @static - * @param {google.cloud.dialogflow.cx.v3.IImportEntityTypesResponse} message ImportEntityTypesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ImportEntityTypesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ImportEntityTypesResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse - * @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.ImportEntityTypesResponse} ImportEntityTypesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ImportEntityTypesResponse.decode = function decode(reader, length, error) { - 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.ImportEntityTypesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.entityTypes && message.entityTypes.length)) - message.entityTypes = []; - message.entityTypes.push(reader.string()); - break; - } - case 2: { - message.conflictingResources = $root.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ImportEntityTypesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse} ImportEntityTypesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ImportEntityTypesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ImportEntityTypesResponse message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ImportEntityTypesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.entityTypes != null && message.hasOwnProperty("entityTypes")) { - if (!Array.isArray(message.entityTypes)) - return "entityTypes: array expected"; - for (var i = 0; i < message.entityTypes.length; ++i) - if (!$util.isString(message.entityTypes[i])) - return "entityTypes: string[] expected"; - } - if (message.conflictingResources != null && message.hasOwnProperty("conflictingResources")) { - var error = $root.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources.verify(message.conflictingResources); - if (error) - return "conflictingResources." + error; - } - return null; - }; - - /** - * Creates an ImportEntityTypesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse} ImportEntityTypesResponse - */ - ImportEntityTypesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse(); - if (object.entityTypes) { - if (!Array.isArray(object.entityTypes)) - throw TypeError(".google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.entityTypes: array expected"); - message.entityTypes = []; - for (var i = 0; i < object.entityTypes.length; ++i) - message.entityTypes[i] = String(object.entityTypes[i]); - } - if (object.conflictingResources != null) { - if (typeof object.conflictingResources !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.conflictingResources: object expected"); - message.conflictingResources = $root.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources.fromObject(object.conflictingResources); - } - return message; - }; - - /** - * Creates a plain object from an ImportEntityTypesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse - * @static - * @param {google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse} message ImportEntityTypesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ImportEntityTypesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.entityTypes = []; - if (options.defaults) - object.conflictingResources = null; - if (message.entityTypes && message.entityTypes.length) { - object.entityTypes = []; - for (var j = 0; j < message.entityTypes.length; ++j) - object.entityTypes[j] = message.entityTypes[j]; - } - if (message.conflictingResources != null && message.hasOwnProperty("conflictingResources")) - object.conflictingResources = $root.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources.toObject(message.conflictingResources, options); - return object; - }; - - /** - * Converts this ImportEntityTypesResponse to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse - * @instance - * @returns {Object.} JSON object - */ - ImportEntityTypesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ImportEntityTypesResponse - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ImportEntityTypesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse"; - }; - - ImportEntityTypesResponse.ConflictingResources = (function() { - - /** - * Properties of a ConflictingResources. - * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse - * @interface IConflictingResources - * @property {Array.|null} [entityTypeDisplayNames] ConflictingResources entityTypeDisplayNames - * @property {Array.|null} [entityDisplayNames] ConflictingResources entityDisplayNames - */ + /** + * Properties of a Result. + * @memberof google.cloud.dialogflow.cx.v3.Deployment + * @interface IResult + * @property {Array.|null} [deploymentTestResults] Result deploymentTestResults + * @property {string|null} [experiment] Result experiment + */ /** - * Constructs a new ConflictingResources. - * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse - * @classdesc Represents a ConflictingResources. - * @implements IConflictingResources + * Constructs a new Result. + * @memberof google.cloud.dialogflow.cx.v3.Deployment + * @classdesc Represents a Result. + * @implements IResult * @constructor - * @param {google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.IConflictingResources=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.Deployment.IResult=} [properties] Properties to set */ - function ConflictingResources(properties) { - this.entityTypeDisplayNames = []; - this.entityDisplayNames = []; + function Result(properties) { + this.deploymentTestResults = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -34928,97 +34796,94 @@ } /** - * ConflictingResources entityTypeDisplayNames. - * @member {Array.} entityTypeDisplayNames - * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources + * Result deploymentTestResults. + * @member {Array.} deploymentTestResults + * @memberof google.cloud.dialogflow.cx.v3.Deployment.Result * @instance */ - ConflictingResources.prototype.entityTypeDisplayNames = $util.emptyArray; + Result.prototype.deploymentTestResults = $util.emptyArray; /** - * ConflictingResources entityDisplayNames. - * @member {Array.} entityDisplayNames - * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources + * Result experiment. + * @member {string} experiment + * @memberof google.cloud.dialogflow.cx.v3.Deployment.Result * @instance */ - ConflictingResources.prototype.entityDisplayNames = $util.emptyArray; + Result.prototype.experiment = ""; /** - * Creates a new ConflictingResources instance using the specified properties. + * Creates a new Result instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources + * @memberof google.cloud.dialogflow.cx.v3.Deployment.Result * @static - * @param {google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.IConflictingResources=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources} ConflictingResources instance + * @param {google.cloud.dialogflow.cx.v3.Deployment.IResult=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.Deployment.Result} Result instance */ - ConflictingResources.create = function create(properties) { - return new ConflictingResources(properties); + Result.create = function create(properties) { + return new Result(properties); }; /** - * Encodes the specified ConflictingResources message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources.verify|verify} messages. + * Encodes the specified Result message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Deployment.Result.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources + * @memberof google.cloud.dialogflow.cx.v3.Deployment.Result * @static - * @param {google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.IConflictingResources} message ConflictingResources message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.Deployment.IResult} message Result message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ConflictingResources.encode = function encode(message, writer) { + Result.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.entityTypeDisplayNames != null && message.entityTypeDisplayNames.length) - for (var i = 0; i < message.entityTypeDisplayNames.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.entityTypeDisplayNames[i]); - if (message.entityDisplayNames != null && message.entityDisplayNames.length) - for (var i = 0; i < message.entityDisplayNames.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.entityDisplayNames[i]); + if (message.deploymentTestResults != null && message.deploymentTestResults.length) + for (var i = 0; i < message.deploymentTestResults.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.deploymentTestResults[i]); + if (message.experiment != null && Object.hasOwnProperty.call(message, "experiment")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.experiment); return writer; }; /** - * Encodes the specified ConflictingResources message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources.verify|verify} messages. + * Encodes the specified Result message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Deployment.Result.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources + * @memberof google.cloud.dialogflow.cx.v3.Deployment.Result * @static - * @param {google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.IConflictingResources} message ConflictingResources message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.Deployment.IResult} message Result message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ConflictingResources.encodeDelimited = function encodeDelimited(message, writer) { + Result.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ConflictingResources message from the specified reader or buffer. + * Decodes a Result message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources + * @memberof google.cloud.dialogflow.cx.v3.Deployment.Result * @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.ImportEntityTypesResponse.ConflictingResources} ConflictingResources + * @returns {google.cloud.dialogflow.cx.v3.Deployment.Result} Result * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ConflictingResources.decode = function decode(reader, length, error) { + Result.decode = function decode(reader, length, error) { 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.ImportEntityTypesResponse.ConflictingResources(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.Deployment.Result(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - if (!(message.entityTypeDisplayNames && message.entityTypeDisplayNames.length)) - message.entityTypeDisplayNames = []; - message.entityTypeDisplayNames.push(reader.string()); + if (!(message.deploymentTestResults && message.deploymentTestResults.length)) + message.deploymentTestResults = []; + message.deploymentTestResults.push(reader.string()); break; } case 2: { - if (!(message.entityDisplayNames && message.entityDisplayNames.length)) - message.entityDisplayNames = []; - message.entityDisplayNames.push(reader.string()); + message.experiment = reader.string(); break; } default: @@ -35030,157 +34895,148 @@ }; /** - * Decodes a ConflictingResources message from the specified reader or buffer, length delimited. + * Decodes a Result message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources + * @memberof google.cloud.dialogflow.cx.v3.Deployment.Result * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources} ConflictingResources + * @returns {google.cloud.dialogflow.cx.v3.Deployment.Result} Result * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ConflictingResources.decodeDelimited = function decodeDelimited(reader) { + Result.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ConflictingResources message. + * Verifies a Result message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources + * @memberof google.cloud.dialogflow.cx.v3.Deployment.Result * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ConflictingResources.verify = function verify(message) { + Result.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.entityTypeDisplayNames != null && message.hasOwnProperty("entityTypeDisplayNames")) { - if (!Array.isArray(message.entityTypeDisplayNames)) - return "entityTypeDisplayNames: array expected"; - for (var i = 0; i < message.entityTypeDisplayNames.length; ++i) - if (!$util.isString(message.entityTypeDisplayNames[i])) - return "entityTypeDisplayNames: string[] expected"; - } - if (message.entityDisplayNames != null && message.hasOwnProperty("entityDisplayNames")) { - if (!Array.isArray(message.entityDisplayNames)) - return "entityDisplayNames: array expected"; - for (var i = 0; i < message.entityDisplayNames.length; ++i) - if (!$util.isString(message.entityDisplayNames[i])) - return "entityDisplayNames: string[] expected"; + if (message.deploymentTestResults != null && message.hasOwnProperty("deploymentTestResults")) { + if (!Array.isArray(message.deploymentTestResults)) + return "deploymentTestResults: array expected"; + for (var i = 0; i < message.deploymentTestResults.length; ++i) + if (!$util.isString(message.deploymentTestResults[i])) + return "deploymentTestResults: string[] expected"; } + if (message.experiment != null && message.hasOwnProperty("experiment")) + if (!$util.isString(message.experiment)) + return "experiment: string expected"; return null; }; /** - * Creates a ConflictingResources message from a plain object. Also converts values to their respective internal types. + * Creates a Result message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources + * @memberof google.cloud.dialogflow.cx.v3.Deployment.Result * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources} ConflictingResources + * @returns {google.cloud.dialogflow.cx.v3.Deployment.Result} Result */ - ConflictingResources.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources) + Result.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.Deployment.Result) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources(); - if (object.entityTypeDisplayNames) { - if (!Array.isArray(object.entityTypeDisplayNames)) - throw TypeError(".google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources.entityTypeDisplayNames: array expected"); - message.entityTypeDisplayNames = []; - for (var i = 0; i < object.entityTypeDisplayNames.length; ++i) - message.entityTypeDisplayNames[i] = String(object.entityTypeDisplayNames[i]); - } - if (object.entityDisplayNames) { - if (!Array.isArray(object.entityDisplayNames)) - throw TypeError(".google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources.entityDisplayNames: array expected"); - message.entityDisplayNames = []; - for (var i = 0; i < object.entityDisplayNames.length; ++i) - message.entityDisplayNames[i] = String(object.entityDisplayNames[i]); + var message = new $root.google.cloud.dialogflow.cx.v3.Deployment.Result(); + if (object.deploymentTestResults) { + if (!Array.isArray(object.deploymentTestResults)) + throw TypeError(".google.cloud.dialogflow.cx.v3.Deployment.Result.deploymentTestResults: array expected"); + message.deploymentTestResults = []; + for (var i = 0; i < object.deploymentTestResults.length; ++i) + message.deploymentTestResults[i] = String(object.deploymentTestResults[i]); } + if (object.experiment != null) + message.experiment = String(object.experiment); return message; }; /** - * Creates a plain object from a ConflictingResources message. Also converts values to other types if specified. + * Creates a plain object from a Result message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources + * @memberof google.cloud.dialogflow.cx.v3.Deployment.Result * @static - * @param {google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources} message ConflictingResources + * @param {google.cloud.dialogflow.cx.v3.Deployment.Result} message Result * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ConflictingResources.toObject = function toObject(message, options) { + Result.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.entityTypeDisplayNames = []; - object.entityDisplayNames = []; - } - if (message.entityTypeDisplayNames && message.entityTypeDisplayNames.length) { - object.entityTypeDisplayNames = []; - for (var j = 0; j < message.entityTypeDisplayNames.length; ++j) - object.entityTypeDisplayNames[j] = message.entityTypeDisplayNames[j]; - } - if (message.entityDisplayNames && message.entityDisplayNames.length) { - object.entityDisplayNames = []; - for (var j = 0; j < message.entityDisplayNames.length; ++j) - object.entityDisplayNames[j] = message.entityDisplayNames[j]; + if (options.arrays || options.defaults) + object.deploymentTestResults = []; + if (options.defaults) + object.experiment = ""; + if (message.deploymentTestResults && message.deploymentTestResults.length) { + object.deploymentTestResults = []; + for (var j = 0; j < message.deploymentTestResults.length; ++j) + object.deploymentTestResults[j] = message.deploymentTestResults[j]; } + if (message.experiment != null && message.hasOwnProperty("experiment")) + object.experiment = message.experiment; return object; }; /** - * Converts this ConflictingResources to JSON. + * Converts this Result to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources + * @memberof google.cloud.dialogflow.cx.v3.Deployment.Result * @instance * @returns {Object.} JSON object */ - ConflictingResources.prototype.toJSON = function toJSON() { + Result.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ConflictingResources + * Gets the default type url for Result * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources + * @memberof google.cloud.dialogflow.cx.v3.Deployment.Result * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ConflictingResources.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Result.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Deployment.Result"; }; - return ConflictingResources; + return Result; })(); - return ImportEntityTypesResponse; + return Deployment; })(); - v3.ImportEntityTypesMetadata = (function() { + v3.ListDeploymentsRequest = (function() { /** - * Properties of an ImportEntityTypesMetadata. + * Properties of a ListDeploymentsRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IImportEntityTypesMetadata + * @interface IListDeploymentsRequest + * @property {string|null} [parent] ListDeploymentsRequest parent + * @property {number|null} [pageSize] ListDeploymentsRequest pageSize + * @property {string|null} [pageToken] ListDeploymentsRequest pageToken */ /** - * Constructs a new ImportEntityTypesMetadata. + * Constructs a new ListDeploymentsRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents an ImportEntityTypesMetadata. - * @implements IImportEntityTypesMetadata + * @classdesc Represents a ListDeploymentsRequest. + * @implements IListDeploymentsRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IImportEntityTypesMetadata=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IListDeploymentsRequest=} [properties] Properties to set */ - function ImportEntityTypesMetadata(properties) { + function ListDeploymentsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -35188,281 +35044,90 @@ } /** - * Creates a new ImportEntityTypesMetadata instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata - * @static - * @param {google.cloud.dialogflow.cx.v3.IImportEntityTypesMetadata=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata} ImportEntityTypesMetadata instance + * ListDeploymentsRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsRequest + * @instance */ - ImportEntityTypesMetadata.create = function create(properties) { - return new ImportEntityTypesMetadata(properties); - }; + ListDeploymentsRequest.prototype.parent = ""; /** - * Encodes the specified ImportEntityTypesMetadata message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata - * @static - * @param {google.cloud.dialogflow.cx.v3.IImportEntityTypesMetadata} message ImportEntityTypesMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * ListDeploymentsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsRequest + * @instance */ - ImportEntityTypesMetadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; + ListDeploymentsRequest.prototype.pageSize = 0; /** - * Encodes the specified ImportEntityTypesMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata - * @static - * @param {google.cloud.dialogflow.cx.v3.IImportEntityTypesMetadata} message ImportEntityTypesMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ImportEntityTypesMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ImportEntityTypesMetadata message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata - * @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.ImportEntityTypesMetadata} ImportEntityTypesMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ImportEntityTypesMetadata.decode = function decode(reader, length, error) { - 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.ImportEntityTypesMetadata(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ImportEntityTypesMetadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata} ImportEntityTypesMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ImportEntityTypesMetadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ImportEntityTypesMetadata message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ImportEntityTypesMetadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates an ImportEntityTypesMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata} ImportEntityTypesMetadata - */ - ImportEntityTypesMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata) - return object; - return new $root.google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata(); - }; - - /** - * Creates a plain object from an ImportEntityTypesMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata - * @static - * @param {google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata} message ImportEntityTypesMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ImportEntityTypesMetadata.toObject = function toObject() { - return {}; - }; - - /** - * Converts this ImportEntityTypesMetadata to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata - * @instance - * @returns {Object.} JSON object - */ - ImportEntityTypesMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ImportEntityTypesMetadata - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ImportEntityTypesMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata"; - }; - - return ImportEntityTypesMetadata; - })(); - - v3.ListEntityTypesRequest = (function() { - - /** - * Properties of a ListEntityTypesRequest. - * @memberof google.cloud.dialogflow.cx.v3 - * @interface IListEntityTypesRequest - * @property {string|null} [parent] ListEntityTypesRequest parent - * @property {string|null} [languageCode] ListEntityTypesRequest languageCode - * @property {number|null} [pageSize] ListEntityTypesRequest pageSize - * @property {string|null} [pageToken] ListEntityTypesRequest pageToken - */ - - /** - * Constructs a new ListEntityTypesRequest. - * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a ListEntityTypesRequest. - * @implements IListEntityTypesRequest - * @constructor - * @param {google.cloud.dialogflow.cx.v3.IListEntityTypesRequest=} [properties] Properties to set - */ - function ListEntityTypesRequest(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]]; - } - - /** - * ListEntityTypesRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesRequest - * @instance - */ - ListEntityTypesRequest.prototype.parent = ""; - - /** - * ListEntityTypesRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesRequest - * @instance - */ - ListEntityTypesRequest.prototype.languageCode = ""; - - /** - * ListEntityTypesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesRequest - * @instance - */ - ListEntityTypesRequest.prototype.pageSize = 0; - - /** - * ListEntityTypesRequest pageToken. + * ListDeploymentsRequest pageToken. * @member {string} pageToken - * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesRequest + * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsRequest * @instance */ - ListEntityTypesRequest.prototype.pageToken = ""; + ListDeploymentsRequest.prototype.pageToken = ""; /** - * Creates a new ListEntityTypesRequest instance using the specified properties. + * Creates a new ListDeploymentsRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesRequest + * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IListEntityTypesRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ListEntityTypesRequest} ListEntityTypesRequest instance + * @param {google.cloud.dialogflow.cx.v3.IListDeploymentsRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ListDeploymentsRequest} ListDeploymentsRequest instance */ - ListEntityTypesRequest.create = function create(properties) { - return new ListEntityTypesRequest(properties); + ListDeploymentsRequest.create = function create(properties) { + return new ListDeploymentsRequest(properties); }; /** - * Encodes the specified ListEntityTypesRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListEntityTypesRequest.verify|verify} messages. + * Encodes the specified ListDeploymentsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListDeploymentsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesRequest + * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IListEntityTypesRequest} message ListEntityTypesRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListDeploymentsRequest} message ListDeploymentsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListEntityTypesRequest.encode = function encode(message, writer) { + ListDeploymentsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); return writer; }; /** - * Encodes the specified ListEntityTypesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListEntityTypesRequest.verify|verify} messages. + * Encodes the specified ListDeploymentsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListDeploymentsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesRequest + * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IListEntityTypesRequest} message ListEntityTypesRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListDeploymentsRequest} message ListDeploymentsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListEntityTypesRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListDeploymentsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListEntityTypesRequest message from the specified reader or buffer. + * Decodes a ListDeploymentsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesRequest + * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsRequest * @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.ListEntityTypesRequest} ListEntityTypesRequest + * @returns {google.cloud.dialogflow.cx.v3.ListDeploymentsRequest} ListDeploymentsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListEntityTypesRequest.decode = function decode(reader, length, error) { + ListDeploymentsRequest.decode = function decode(reader, length, error) { 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.ListEntityTypesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ListDeploymentsRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -35473,14 +35138,10 @@ break; } case 2: { - message.languageCode = reader.string(); - break; - } - case 3: { message.pageSize = reader.int32(); break; } - case 4: { + case 3: { message.pageToken = reader.string(); break; } @@ -35493,38 +35154,35 @@ }; /** - * Decodes a ListEntityTypesRequest message from the specified reader or buffer, length delimited. + * Decodes a ListDeploymentsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesRequest + * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ListEntityTypesRequest} ListEntityTypesRequest + * @returns {google.cloud.dialogflow.cx.v3.ListDeploymentsRequest} ListDeploymentsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListEntityTypesRequest.decodeDelimited = function decodeDelimited(reader) { + ListDeploymentsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListEntityTypesRequest message. + * Verifies a ListDeploymentsRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesRequest + * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListEntityTypesRequest.verify = function verify(message) { + ListDeploymentsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.parent != null && message.hasOwnProperty("parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; if (message.pageSize != null && message.hasOwnProperty("pageSize")) if (!$util.isInteger(message.pageSize)) return "pageSize: integer expected"; @@ -35535,21 +35193,19 @@ }; /** - * Creates a ListEntityTypesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListDeploymentsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesRequest + * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ListEntityTypesRequest} ListEntityTypesRequest + * @returns {google.cloud.dialogflow.cx.v3.ListDeploymentsRequest} ListDeploymentsRequest */ - ListEntityTypesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListEntityTypesRequest) + ListDeploymentsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListDeploymentsRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.ListEntityTypesRequest(); + var message = new $root.google.cloud.dialogflow.cx.v3.ListDeploymentsRequest(); if (object.parent != null) message.parent = String(object.parent); - if (object.languageCode != null) - message.languageCode = String(object.languageCode); if (object.pageSize != null) message.pageSize = object.pageSize | 0; if (object.pageToken != null) @@ -35558,28 +35214,25 @@ }; /** - * Creates a plain object from a ListEntityTypesRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListDeploymentsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesRequest + * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.ListEntityTypesRequest} message ListEntityTypesRequest + * @param {google.cloud.dialogflow.cx.v3.ListDeploymentsRequest} message ListDeploymentsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListEntityTypesRequest.toObject = function toObject(message, options) { + ListDeploymentsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.parent = ""; - object.languageCode = ""; object.pageSize = 0; object.pageToken = ""; } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; if (message.pageSize != null && message.hasOwnProperty("pageSize")) object.pageSize = message.pageSize; if (message.pageToken != null && message.hasOwnProperty("pageToken")) @@ -35588,54 +35241,54 @@ }; /** - * Converts this ListEntityTypesRequest to JSON. + * Converts this ListDeploymentsRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesRequest + * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsRequest * @instance * @returns {Object.} JSON object */ - ListEntityTypesRequest.prototype.toJSON = function toJSON() { + ListDeploymentsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListEntityTypesRequest + * Gets the default type url for ListDeploymentsRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesRequest + * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListEntityTypesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListDeploymentsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListEntityTypesRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListDeploymentsRequest"; }; - return ListEntityTypesRequest; + return ListDeploymentsRequest; })(); - v3.ListEntityTypesResponse = (function() { + v3.ListDeploymentsResponse = (function() { /** - * Properties of a ListEntityTypesResponse. + * Properties of a ListDeploymentsResponse. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IListEntityTypesResponse - * @property {Array.|null} [entityTypes] ListEntityTypesResponse entityTypes - * @property {string|null} [nextPageToken] ListEntityTypesResponse nextPageToken + * @interface IListDeploymentsResponse + * @property {Array.|null} [deployments] ListDeploymentsResponse deployments + * @property {string|null} [nextPageToken] ListDeploymentsResponse nextPageToken */ /** - * Constructs a new ListEntityTypesResponse. + * Constructs a new ListDeploymentsResponse. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a ListEntityTypesResponse. - * @implements IListEntityTypesResponse + * @classdesc Represents a ListDeploymentsResponse. + * @implements IListDeploymentsResponse * @constructor - * @param {google.cloud.dialogflow.cx.v3.IListEntityTypesResponse=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IListDeploymentsResponse=} [properties] Properties to set */ - function ListEntityTypesResponse(properties) { - this.entityTypes = []; + function ListDeploymentsResponse(properties) { + this.deployments = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -35643,90 +35296,90 @@ } /** - * ListEntityTypesResponse entityTypes. - * @member {Array.} entityTypes - * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesResponse + * ListDeploymentsResponse deployments. + * @member {Array.} deployments + * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsResponse * @instance */ - ListEntityTypesResponse.prototype.entityTypes = $util.emptyArray; + ListDeploymentsResponse.prototype.deployments = $util.emptyArray; /** - * ListEntityTypesResponse nextPageToken. + * ListDeploymentsResponse nextPageToken. * @member {string} nextPageToken - * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesResponse + * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsResponse * @instance */ - ListEntityTypesResponse.prototype.nextPageToken = ""; + ListDeploymentsResponse.prototype.nextPageToken = ""; /** - * Creates a new ListEntityTypesResponse instance using the specified properties. + * Creates a new ListDeploymentsResponse instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesResponse + * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IListEntityTypesResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ListEntityTypesResponse} ListEntityTypesResponse instance + * @param {google.cloud.dialogflow.cx.v3.IListDeploymentsResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ListDeploymentsResponse} ListDeploymentsResponse instance */ - ListEntityTypesResponse.create = function create(properties) { - return new ListEntityTypesResponse(properties); + ListDeploymentsResponse.create = function create(properties) { + return new ListDeploymentsResponse(properties); }; /** - * Encodes the specified ListEntityTypesResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListEntityTypesResponse.verify|verify} messages. + * Encodes the specified ListDeploymentsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListDeploymentsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesResponse + * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IListEntityTypesResponse} message ListEntityTypesResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListDeploymentsResponse} message ListDeploymentsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListEntityTypesResponse.encode = function encode(message, writer) { + ListDeploymentsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.entityTypes != null && message.entityTypes.length) - for (var i = 0; i < message.entityTypes.length; ++i) - $root.google.cloud.dialogflow.cx.v3.EntityType.encode(message.entityTypes[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.deployments != null && message.deployments.length) + for (var i = 0; i < message.deployments.length; ++i) + $root.google.cloud.dialogflow.cx.v3.Deployment.encode(message.deployments[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; /** - * Encodes the specified ListEntityTypesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListEntityTypesResponse.verify|verify} messages. + * Encodes the specified ListDeploymentsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListDeploymentsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesResponse + * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IListEntityTypesResponse} message ListEntityTypesResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListDeploymentsResponse} message ListDeploymentsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListEntityTypesResponse.encodeDelimited = function encodeDelimited(message, writer) { + ListDeploymentsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListEntityTypesResponse message from the specified reader or buffer. + * Decodes a ListDeploymentsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesResponse + * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsResponse * @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.ListEntityTypesResponse} ListEntityTypesResponse + * @returns {google.cloud.dialogflow.cx.v3.ListDeploymentsResponse} ListDeploymentsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListEntityTypesResponse.decode = function decode(reader, length, error) { + ListDeploymentsResponse.decode = function decode(reader, length, error) { 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.ListEntityTypesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ListDeploymentsResponse(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - if (!(message.entityTypes && message.entityTypes.length)) - message.entityTypes = []; - message.entityTypes.push($root.google.cloud.dialogflow.cx.v3.EntityType.decode(reader, reader.uint32())); + if (!(message.deployments && message.deployments.length)) + message.deployments = []; + message.deployments.push($root.google.cloud.dialogflow.cx.v3.Deployment.decode(reader, reader.uint32())); break; } case 2: { @@ -35742,39 +35395,39 @@ }; /** - * Decodes a ListEntityTypesResponse message from the specified reader or buffer, length delimited. + * Decodes a ListDeploymentsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesResponse + * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ListEntityTypesResponse} ListEntityTypesResponse + * @returns {google.cloud.dialogflow.cx.v3.ListDeploymentsResponse} ListDeploymentsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListEntityTypesResponse.decodeDelimited = function decodeDelimited(reader) { + ListDeploymentsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListEntityTypesResponse message. + * Verifies a ListDeploymentsResponse message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesResponse + * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListEntityTypesResponse.verify = function verify(message) { + ListDeploymentsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.entityTypes != null && message.hasOwnProperty("entityTypes")) { - if (!Array.isArray(message.entityTypes)) - return "entityTypes: array expected"; - for (var i = 0; i < message.entityTypes.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.EntityType.verify(message.entityTypes[i]); + if (message.deployments != null && message.hasOwnProperty("deployments")) { + if (!Array.isArray(message.deployments)) + return "deployments: array expected"; + for (var i = 0; i < message.deployments.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.Deployment.verify(message.deployments[i]); if (error) - return "entityTypes." + error; + return "deployments." + error; } } if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) @@ -35784,25 +35437,25 @@ }; /** - * Creates a ListEntityTypesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListDeploymentsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesResponse + * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ListEntityTypesResponse} ListEntityTypesResponse + * @returns {google.cloud.dialogflow.cx.v3.ListDeploymentsResponse} ListDeploymentsResponse */ - ListEntityTypesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListEntityTypesResponse) + ListDeploymentsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListDeploymentsResponse) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.ListEntityTypesResponse(); - if (object.entityTypes) { - if (!Array.isArray(object.entityTypes)) - throw TypeError(".google.cloud.dialogflow.cx.v3.ListEntityTypesResponse.entityTypes: array expected"); - message.entityTypes = []; - for (var i = 0; i < object.entityTypes.length; ++i) { - if (typeof object.entityTypes[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.ListEntityTypesResponse.entityTypes: object expected"); - message.entityTypes[i] = $root.google.cloud.dialogflow.cx.v3.EntityType.fromObject(object.entityTypes[i]); + var message = new $root.google.cloud.dialogflow.cx.v3.ListDeploymentsResponse(); + if (object.deployments) { + if (!Array.isArray(object.deployments)) + throw TypeError(".google.cloud.dialogflow.cx.v3.ListDeploymentsResponse.deployments: array expected"); + message.deployments = []; + for (var i = 0; i < object.deployments.length; ++i) { + if (typeof object.deployments[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.ListDeploymentsResponse.deployments: object expected"); + message.deployments[i] = $root.google.cloud.dialogflow.cx.v3.Deployment.fromObject(object.deployments[i]); } } if (object.nextPageToken != null) @@ -35811,26 +35464,26 @@ }; /** - * Creates a plain object from a ListEntityTypesResponse message. Also converts values to other types if specified. + * Creates a plain object from a ListDeploymentsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesResponse + * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsResponse * @static - * @param {google.cloud.dialogflow.cx.v3.ListEntityTypesResponse} message ListEntityTypesResponse + * @param {google.cloud.dialogflow.cx.v3.ListDeploymentsResponse} message ListDeploymentsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListEntityTypesResponse.toObject = function toObject(message, options) { + ListDeploymentsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.entityTypes = []; + object.deployments = []; if (options.defaults) object.nextPageToken = ""; - if (message.entityTypes && message.entityTypes.length) { - object.entityTypes = []; - for (var j = 0; j < message.entityTypes.length; ++j) - object.entityTypes[j] = $root.google.cloud.dialogflow.cx.v3.EntityType.toObject(message.entityTypes[j], options); + if (message.deployments && message.deployments.length) { + object.deployments = []; + for (var j = 0; j < message.deployments.length; ++j) + object.deployments[j] = $root.google.cloud.dialogflow.cx.v3.Deployment.toObject(message.deployments[j], options); } if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) object.nextPageToken = message.nextPageToken; @@ -35838,53 +35491,52 @@ }; /** - * Converts this ListEntityTypesResponse to JSON. + * Converts this ListDeploymentsResponse to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesResponse + * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsResponse * @instance * @returns {Object.} JSON object */ - ListEntityTypesResponse.prototype.toJSON = function toJSON() { + ListDeploymentsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListEntityTypesResponse + * Gets the default type url for ListDeploymentsResponse * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesResponse + * @memberof google.cloud.dialogflow.cx.v3.ListDeploymentsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListEntityTypesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListDeploymentsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListEntityTypesResponse"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListDeploymentsResponse"; }; - return ListEntityTypesResponse; + return ListDeploymentsResponse; })(); - v3.GetEntityTypeRequest = (function() { + v3.GetDeploymentRequest = (function() { /** - * Properties of a GetEntityTypeRequest. + * Properties of a GetDeploymentRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IGetEntityTypeRequest - * @property {string|null} [name] GetEntityTypeRequest name - * @property {string|null} [languageCode] GetEntityTypeRequest languageCode + * @interface IGetDeploymentRequest + * @property {string|null} [name] GetDeploymentRequest name */ /** - * Constructs a new GetEntityTypeRequest. + * Constructs a new GetDeploymentRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a GetEntityTypeRequest. - * @implements IGetEntityTypeRequest + * @classdesc Represents a GetDeploymentRequest. + * @implements IGetDeploymentRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IGetEntityTypeRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IGetDeploymentRequest=} [properties] Properties to set */ - function GetEntityTypeRequest(properties) { + function GetDeploymentRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -35892,80 +35544,70 @@ } /** - * GetEntityTypeRequest name. + * GetDeploymentRequest name. * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.GetEntityTypeRequest - * @instance - */ - GetEntityTypeRequest.prototype.name = ""; - - /** - * GetEntityTypeRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3.GetEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.GetDeploymentRequest * @instance */ - GetEntityTypeRequest.prototype.languageCode = ""; + GetDeploymentRequest.prototype.name = ""; /** - * Creates a new GetEntityTypeRequest instance using the specified properties. + * Creates a new GetDeploymentRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.GetEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.GetDeploymentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IGetEntityTypeRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.GetEntityTypeRequest} GetEntityTypeRequest instance + * @param {google.cloud.dialogflow.cx.v3.IGetDeploymentRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.GetDeploymentRequest} GetDeploymentRequest instance */ - GetEntityTypeRequest.create = function create(properties) { - return new GetEntityTypeRequest(properties); + GetDeploymentRequest.create = function create(properties) { + return new GetDeploymentRequest(properties); }; /** - * Encodes the specified GetEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetEntityTypeRequest.verify|verify} messages. + * Encodes the specified GetDeploymentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetDeploymentRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.GetEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.GetDeploymentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IGetEntityTypeRequest} message GetEntityTypeRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IGetDeploymentRequest} message GetDeploymentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetEntityTypeRequest.encode = function encode(message, writer) { + GetDeploymentRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); return writer; }; /** - * Encodes the specified GetEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetEntityTypeRequest.verify|verify} messages. + * Encodes the specified GetDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetDeploymentRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.GetEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.GetDeploymentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IGetEntityTypeRequest} message GetEntityTypeRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IGetDeploymentRequest} message GetDeploymentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetEntityTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetDeploymentRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetEntityTypeRequest message from the specified reader or buffer. + * Decodes a GetDeploymentRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.GetEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.GetDeploymentRequest * @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.GetEntityTypeRequest} GetEntityTypeRequest + * @returns {google.cloud.dialogflow.cx.v3.GetDeploymentRequest} GetDeploymentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetEntityTypeRequest.decode = function decode(reader, length, error) { + GetDeploymentRequest.decode = function decode(reader, length, error) { 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.GetEntityTypeRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.GetDeploymentRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -35975,10 +35617,6 @@ message.name = reader.string(); break; } - case 2: { - message.languageCode = reader.string(); - break; - } default: reader.skipType(tag & 7); break; @@ -35988,133 +35626,397 @@ }; /** - * Decodes a GetEntityTypeRequest message from the specified reader or buffer, length delimited. + * Decodes a GetDeploymentRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.GetEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.GetDeploymentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.GetEntityTypeRequest} GetEntityTypeRequest + * @returns {google.cloud.dialogflow.cx.v3.GetDeploymentRequest} GetDeploymentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetEntityTypeRequest.decodeDelimited = function decodeDelimited(reader) { + GetDeploymentRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetEntityTypeRequest message. + * Verifies a GetDeploymentRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.GetEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.GetDeploymentRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetEntityTypeRequest.verify = function verify(message) { + GetDeploymentRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; return null; }; /** - * Creates a GetEntityTypeRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetDeploymentRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.GetEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.GetDeploymentRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.GetEntityTypeRequest} GetEntityTypeRequest + * @returns {google.cloud.dialogflow.cx.v3.GetDeploymentRequest} GetDeploymentRequest */ - GetEntityTypeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.GetEntityTypeRequest) + GetDeploymentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.GetDeploymentRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.GetEntityTypeRequest(); + var message = new $root.google.cloud.dialogflow.cx.v3.GetDeploymentRequest(); if (object.name != null) message.name = String(object.name); - if (object.languageCode != null) - message.languageCode = String(object.languageCode); return message; }; /** - * Creates a plain object from a GetEntityTypeRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetDeploymentRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.GetEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.GetDeploymentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.GetEntityTypeRequest} message GetEntityTypeRequest + * @param {google.cloud.dialogflow.cx.v3.GetDeploymentRequest} message GetDeploymentRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetEntityTypeRequest.toObject = function toObject(message, options) { + GetDeploymentRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { + if (options.defaults) object.name = ""; - object.languageCode = ""; - } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; return object; }; /** - * Converts this GetEntityTypeRequest to JSON. + * Converts this GetDeploymentRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.GetEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.GetDeploymentRequest * @instance * @returns {Object.} JSON object */ - GetEntityTypeRequest.prototype.toJSON = function toJSON() { + GetDeploymentRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetEntityTypeRequest + * Gets the default type url for GetDeploymentRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.GetEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.GetDeploymentRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetEntityTypeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetDeploymentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.GetEntityTypeRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.GetDeploymentRequest"; }; - return GetEntityTypeRequest; + return GetDeploymentRequest; })(); - v3.CreateEntityTypeRequest = (function() { + v3.EntityTypes = (function() { /** - * Properties of a CreateEntityTypeRequest. + * Constructs a new EntityTypes service. * @memberof google.cloud.dialogflow.cx.v3 - * @interface ICreateEntityTypeRequest - * @property {string|null} [parent] CreateEntityTypeRequest parent - * @property {google.cloud.dialogflow.cx.v3.IEntityType|null} [entityType] CreateEntityTypeRequest entityType - * @property {string|null} [languageCode] CreateEntityTypeRequest languageCode + * @classdesc Represents an EntityTypes + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited */ + function EntityTypes(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (EntityTypes.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = EntityTypes; /** - * Constructs a new CreateEntityTypeRequest. + * Creates new EntityTypes service using the specified rpc implementation. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.EntityTypes + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {EntityTypes} RPC service. Useful where requests and/or responses are streamed. + */ + EntityTypes.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.EntityTypes|getEntityType}. + * @memberof google.cloud.dialogflow.cx.v3.EntityTypes + * @typedef GetEntityTypeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.EntityType} [response] EntityType + */ + + /** + * Calls GetEntityType. + * @function getEntityType + * @memberof google.cloud.dialogflow.cx.v3.EntityTypes + * @instance + * @param {google.cloud.dialogflow.cx.v3.IGetEntityTypeRequest} request GetEntityTypeRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.EntityTypes.GetEntityTypeCallback} callback Node-style callback called with the error, if any, and EntityType + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(EntityTypes.prototype.getEntityType = function getEntityType(request, callback) { + return this.rpcCall(getEntityType, $root.google.cloud.dialogflow.cx.v3.GetEntityTypeRequest, $root.google.cloud.dialogflow.cx.v3.EntityType, request, callback); + }, "name", { value: "GetEntityType" }); + + /** + * Calls GetEntityType. + * @function getEntityType + * @memberof google.cloud.dialogflow.cx.v3.EntityTypes + * @instance + * @param {google.cloud.dialogflow.cx.v3.IGetEntityTypeRequest} request GetEntityTypeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.EntityTypes|createEntityType}. + * @memberof google.cloud.dialogflow.cx.v3.EntityTypes + * @typedef CreateEntityTypeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.EntityType} [response] EntityType + */ + + /** + * Calls CreateEntityType. + * @function createEntityType + * @memberof google.cloud.dialogflow.cx.v3.EntityTypes + * @instance + * @param {google.cloud.dialogflow.cx.v3.ICreateEntityTypeRequest} request CreateEntityTypeRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.EntityTypes.CreateEntityTypeCallback} callback Node-style callback called with the error, if any, and EntityType + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(EntityTypes.prototype.createEntityType = function createEntityType(request, callback) { + return this.rpcCall(createEntityType, $root.google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest, $root.google.cloud.dialogflow.cx.v3.EntityType, request, callback); + }, "name", { value: "CreateEntityType" }); + + /** + * Calls CreateEntityType. + * @function createEntityType + * @memberof google.cloud.dialogflow.cx.v3.EntityTypes + * @instance + * @param {google.cloud.dialogflow.cx.v3.ICreateEntityTypeRequest} request CreateEntityTypeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.EntityTypes|updateEntityType}. + * @memberof google.cloud.dialogflow.cx.v3.EntityTypes + * @typedef UpdateEntityTypeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.EntityType} [response] EntityType + */ + + /** + * Calls UpdateEntityType. + * @function updateEntityType + * @memberof google.cloud.dialogflow.cx.v3.EntityTypes + * @instance + * @param {google.cloud.dialogflow.cx.v3.IUpdateEntityTypeRequest} request UpdateEntityTypeRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.EntityTypes.UpdateEntityTypeCallback} callback Node-style callback called with the error, if any, and EntityType + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(EntityTypes.prototype.updateEntityType = function updateEntityType(request, callback) { + return this.rpcCall(updateEntityType, $root.google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest, $root.google.cloud.dialogflow.cx.v3.EntityType, request, callback); + }, "name", { value: "UpdateEntityType" }); + + /** + * Calls UpdateEntityType. + * @function updateEntityType + * @memberof google.cloud.dialogflow.cx.v3.EntityTypes + * @instance + * @param {google.cloud.dialogflow.cx.v3.IUpdateEntityTypeRequest} request UpdateEntityTypeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.EntityTypes|deleteEntityType}. + * @memberof google.cloud.dialogflow.cx.v3.EntityTypes + * @typedef DeleteEntityTypeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteEntityType. + * @function deleteEntityType + * @memberof google.cloud.dialogflow.cx.v3.EntityTypes + * @instance + * @param {google.cloud.dialogflow.cx.v3.IDeleteEntityTypeRequest} request DeleteEntityTypeRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.EntityTypes.DeleteEntityTypeCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(EntityTypes.prototype.deleteEntityType = function deleteEntityType(request, callback) { + return this.rpcCall(deleteEntityType, $root.google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteEntityType" }); + + /** + * Calls DeleteEntityType. + * @function deleteEntityType + * @memberof google.cloud.dialogflow.cx.v3.EntityTypes + * @instance + * @param {google.cloud.dialogflow.cx.v3.IDeleteEntityTypeRequest} request DeleteEntityTypeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.EntityTypes|listEntityTypes}. + * @memberof google.cloud.dialogflow.cx.v3.EntityTypes + * @typedef ListEntityTypesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.ListEntityTypesResponse} [response] ListEntityTypesResponse + */ + + /** + * Calls ListEntityTypes. + * @function listEntityTypes + * @memberof google.cloud.dialogflow.cx.v3.EntityTypes + * @instance + * @param {google.cloud.dialogflow.cx.v3.IListEntityTypesRequest} request ListEntityTypesRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.EntityTypes.ListEntityTypesCallback} callback Node-style callback called with the error, if any, and ListEntityTypesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(EntityTypes.prototype.listEntityTypes = function listEntityTypes(request, callback) { + return this.rpcCall(listEntityTypes, $root.google.cloud.dialogflow.cx.v3.ListEntityTypesRequest, $root.google.cloud.dialogflow.cx.v3.ListEntityTypesResponse, request, callback); + }, "name", { value: "ListEntityTypes" }); + + /** + * Calls ListEntityTypes. + * @function listEntityTypes + * @memberof google.cloud.dialogflow.cx.v3.EntityTypes + * @instance + * @param {google.cloud.dialogflow.cx.v3.IListEntityTypesRequest} request ListEntityTypesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.EntityTypes|exportEntityTypes}. + * @memberof google.cloud.dialogflow.cx.v3.EntityTypes + * @typedef ExportEntityTypesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls ExportEntityTypes. + * @function exportEntityTypes + * @memberof google.cloud.dialogflow.cx.v3.EntityTypes + * @instance + * @param {google.cloud.dialogflow.cx.v3.IExportEntityTypesRequest} request ExportEntityTypesRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.EntityTypes.ExportEntityTypesCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(EntityTypes.prototype.exportEntityTypes = function exportEntityTypes(request, callback) { + return this.rpcCall(exportEntityTypes, $root.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "ExportEntityTypes" }); + + /** + * Calls ExportEntityTypes. + * @function exportEntityTypes + * @memberof google.cloud.dialogflow.cx.v3.EntityTypes + * @instance + * @param {google.cloud.dialogflow.cx.v3.IExportEntityTypesRequest} request ExportEntityTypesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.EntityTypes|importEntityTypes}. + * @memberof google.cloud.dialogflow.cx.v3.EntityTypes + * @typedef ImportEntityTypesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls ImportEntityTypes. + * @function importEntityTypes + * @memberof google.cloud.dialogflow.cx.v3.EntityTypes + * @instance + * @param {google.cloud.dialogflow.cx.v3.IImportEntityTypesRequest} request ImportEntityTypesRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.EntityTypes.ImportEntityTypesCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(EntityTypes.prototype.importEntityTypes = function importEntityTypes(request, callback) { + return this.rpcCall(importEntityTypes, $root.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "ImportEntityTypes" }); + + /** + * Calls ImportEntityTypes. + * @function importEntityTypes + * @memberof google.cloud.dialogflow.cx.v3.EntityTypes + * @instance + * @param {google.cloud.dialogflow.cx.v3.IImportEntityTypesRequest} request ImportEntityTypesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return EntityTypes; + })(); + + v3.EntityType = (function() { + + /** + * Properties of an EntityType. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a CreateEntityTypeRequest. - * @implements ICreateEntityTypeRequest + * @interface IEntityType + * @property {string|null} [name] EntityType name + * @property {string|null} [displayName] EntityType displayName + * @property {google.cloud.dialogflow.cx.v3.EntityType.Kind|null} [kind] EntityType kind + * @property {google.cloud.dialogflow.cx.v3.EntityType.AutoExpansionMode|null} [autoExpansionMode] EntityType autoExpansionMode + * @property {Array.|null} [entities] EntityType entities + * @property {Array.|null} [excludedPhrases] EntityType excludedPhrases + * @property {boolean|null} [enableFuzzyExtraction] EntityType enableFuzzyExtraction + * @property {boolean|null} [redact] EntityType redact + */ + + /** + * Constructs a new EntityType. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents an EntityType. + * @implements IEntityType * @constructor - * @param {google.cloud.dialogflow.cx.v3.ICreateEntityTypeRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IEntityType=} [properties] Properties to set */ - function CreateEntityTypeRequest(properties) { + function EntityType(properties) { + this.entities = []; + this.excludedPhrases = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -36122,105 +36024,181 @@ } /** - * CreateEntityTypeRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest + * EntityType name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.EntityType * @instance */ - CreateEntityTypeRequest.prototype.parent = ""; + EntityType.prototype.name = ""; /** - * CreateEntityTypeRequest entityType. - * @member {google.cloud.dialogflow.cx.v3.IEntityType|null|undefined} entityType - * @memberof google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest + * EntityType displayName. + * @member {string} displayName + * @memberof google.cloud.dialogflow.cx.v3.EntityType * @instance */ - CreateEntityTypeRequest.prototype.entityType = null; + EntityType.prototype.displayName = ""; /** - * CreateEntityTypeRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest + * EntityType kind. + * @member {google.cloud.dialogflow.cx.v3.EntityType.Kind} kind + * @memberof google.cloud.dialogflow.cx.v3.EntityType * @instance */ - CreateEntityTypeRequest.prototype.languageCode = ""; + EntityType.prototype.kind = 0; /** - * Creates a new CreateEntityTypeRequest instance using the specified properties. + * EntityType autoExpansionMode. + * @member {google.cloud.dialogflow.cx.v3.EntityType.AutoExpansionMode} autoExpansionMode + * @memberof google.cloud.dialogflow.cx.v3.EntityType + * @instance + */ + EntityType.prototype.autoExpansionMode = 0; + + /** + * EntityType entities. + * @member {Array.} entities + * @memberof google.cloud.dialogflow.cx.v3.EntityType + * @instance + */ + EntityType.prototype.entities = $util.emptyArray; + + /** + * EntityType excludedPhrases. + * @member {Array.} excludedPhrases + * @memberof google.cloud.dialogflow.cx.v3.EntityType + * @instance + */ + EntityType.prototype.excludedPhrases = $util.emptyArray; + + /** + * EntityType enableFuzzyExtraction. + * @member {boolean} enableFuzzyExtraction + * @memberof google.cloud.dialogflow.cx.v3.EntityType + * @instance + */ + EntityType.prototype.enableFuzzyExtraction = false; + + /** + * EntityType redact. + * @member {boolean} redact + * @memberof google.cloud.dialogflow.cx.v3.EntityType + * @instance + */ + EntityType.prototype.redact = false; + + /** + * Creates a new EntityType instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.EntityType * @static - * @param {google.cloud.dialogflow.cx.v3.ICreateEntityTypeRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest} CreateEntityTypeRequest instance + * @param {google.cloud.dialogflow.cx.v3.IEntityType=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.EntityType} EntityType instance */ - CreateEntityTypeRequest.create = function create(properties) { - return new CreateEntityTypeRequest(properties); + EntityType.create = function create(properties) { + return new EntityType(properties); }; /** - * Encodes the specified CreateEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest.verify|verify} messages. + * Encodes the specified EntityType message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.EntityType.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.EntityType * @static - * @param {google.cloud.dialogflow.cx.v3.ICreateEntityTypeRequest} message CreateEntityTypeRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IEntityType} message EntityType message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateEntityTypeRequest.encode = function encode(message, writer) { + EntityType.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.entityType != null && Object.hasOwnProperty.call(message, "entityType")) - $root.google.cloud.dialogflow.cx.v3.EntityType.encode(message.entityType, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.languageCode); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.kind); + if (message.autoExpansionMode != null && Object.hasOwnProperty.call(message, "autoExpansionMode")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.autoExpansionMode); + if (message.entities != null && message.entities.length) + for (var i = 0; i < message.entities.length; ++i) + $root.google.cloud.dialogflow.cx.v3.EntityType.Entity.encode(message.entities[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.excludedPhrases != null && message.excludedPhrases.length) + for (var i = 0; i < message.excludedPhrases.length; ++i) + $root.google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase.encode(message.excludedPhrases[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.enableFuzzyExtraction != null && Object.hasOwnProperty.call(message, "enableFuzzyExtraction")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.enableFuzzyExtraction); + if (message.redact != null && Object.hasOwnProperty.call(message, "redact")) + writer.uint32(/* id 9, wireType 0 =*/72).bool(message.redact); return writer; }; /** - * Encodes the specified CreateEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest.verify|verify} messages. + * Encodes the specified EntityType message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.EntityType.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.EntityType * @static - * @param {google.cloud.dialogflow.cx.v3.ICreateEntityTypeRequest} message CreateEntityTypeRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IEntityType} message EntityType message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateEntityTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { + EntityType.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateEntityTypeRequest message from the specified reader or buffer. + * Decodes an EntityType message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.EntityType * @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.CreateEntityTypeRequest} CreateEntityTypeRequest + * @returns {google.cloud.dialogflow.cx.v3.EntityType} EntityType * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateEntityTypeRequest.decode = function decode(reader, length, error) { + EntityType.decode = function decode(reader, length, error) { 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.CreateEntityTypeRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.EntityType(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + message.name = reader.string(); break; } case 2: { - message.entityType = $root.google.cloud.dialogflow.cx.v3.EntityType.decode(reader, reader.uint32()); + message.displayName = reader.string(); break; } case 3: { - message.languageCode = reader.string(); + message.kind = reader.int32(); + break; + } + case 4: { + message.autoExpansionMode = reader.int32(); + break; + } + case 5: { + if (!(message.entities && message.entities.length)) + message.entities = []; + message.entities.push($root.google.cloud.dialogflow.cx.v3.EntityType.Entity.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.excludedPhrases && message.excludedPhrases.length)) + message.excludedPhrases = []; + message.excludedPhrases.push($root.google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase.decode(reader, reader.uint32())); + break; + } + case 7: { + message.enableFuzzyExtraction = reader.bool(); + break; + } + case 9: { + message.redact = reader.bool(); break; } default: @@ -36232,407 +36210,751 @@ }; /** - * Decodes a CreateEntityTypeRequest message from the specified reader or buffer, length delimited. + * Decodes an EntityType message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.EntityType * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest} CreateEntityTypeRequest + * @returns {google.cloud.dialogflow.cx.v3.EntityType} EntityType * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateEntityTypeRequest.decodeDelimited = function decodeDelimited(reader) { + EntityType.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateEntityTypeRequest message. + * Verifies an EntityType message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.EntityType * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateEntityTypeRequest.verify = function verify(message) { + EntityType.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.entityType != null && message.hasOwnProperty("entityType")) { - var error = $root.google.cloud.dialogflow.cx.v3.EntityType.verify(message.entityType); - if (error) - return "entityType." + error; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.kind != null && message.hasOwnProperty("kind")) + switch (message.kind) { + default: + return "kind: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.autoExpansionMode != null && message.hasOwnProperty("autoExpansionMode")) + switch (message.autoExpansionMode) { + default: + return "autoExpansionMode: enum value expected"; + case 0: + case 1: + break; + } + if (message.entities != null && message.hasOwnProperty("entities")) { + if (!Array.isArray(message.entities)) + return "entities: array expected"; + for (var i = 0; i < message.entities.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.EntityType.Entity.verify(message.entities[i]); + if (error) + return "entities." + error; + } } - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; + if (message.excludedPhrases != null && message.hasOwnProperty("excludedPhrases")) { + if (!Array.isArray(message.excludedPhrases)) + return "excludedPhrases: array expected"; + for (var i = 0; i < message.excludedPhrases.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase.verify(message.excludedPhrases[i]); + if (error) + return "excludedPhrases." + error; + } + } + if (message.enableFuzzyExtraction != null && message.hasOwnProperty("enableFuzzyExtraction")) + if (typeof message.enableFuzzyExtraction !== "boolean") + return "enableFuzzyExtraction: boolean expected"; + if (message.redact != null && message.hasOwnProperty("redact")) + if (typeof message.redact !== "boolean") + return "redact: boolean expected"; return null; }; /** - * Creates a CreateEntityTypeRequest message from a plain object. Also converts values to their respective internal types. + * Creates an EntityType message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.EntityType * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest} CreateEntityTypeRequest + * @returns {google.cloud.dialogflow.cx.v3.EntityType} EntityType */ - CreateEntityTypeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest) + EntityType.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.EntityType) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.entityType != null) { - if (typeof object.entityType !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest.entityType: object expected"); - message.entityType = $root.google.cloud.dialogflow.cx.v3.EntityType.fromObject(object.entityType); + var message = new $root.google.cloud.dialogflow.cx.v3.EntityType(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + switch (object.kind) { + default: + if (typeof object.kind === "number") { + message.kind = object.kind; + break; + } + break; + case "KIND_UNSPECIFIED": + case 0: + message.kind = 0; + break; + case "KIND_MAP": + case 1: + message.kind = 1; + break; + case "KIND_LIST": + case 2: + message.kind = 2; + break; + case "KIND_REGEXP": + case 3: + message.kind = 3; + break; } - if (object.languageCode != null) - message.languageCode = String(object.languageCode); + switch (object.autoExpansionMode) { + default: + if (typeof object.autoExpansionMode === "number") { + message.autoExpansionMode = object.autoExpansionMode; + break; + } + break; + case "AUTO_EXPANSION_MODE_UNSPECIFIED": + case 0: + message.autoExpansionMode = 0; + break; + case "AUTO_EXPANSION_MODE_DEFAULT": + case 1: + message.autoExpansionMode = 1; + break; + } + if (object.entities) { + if (!Array.isArray(object.entities)) + throw TypeError(".google.cloud.dialogflow.cx.v3.EntityType.entities: array expected"); + message.entities = []; + for (var i = 0; i < object.entities.length; ++i) { + if (typeof object.entities[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.EntityType.entities: object expected"); + message.entities[i] = $root.google.cloud.dialogflow.cx.v3.EntityType.Entity.fromObject(object.entities[i]); + } + } + if (object.excludedPhrases) { + if (!Array.isArray(object.excludedPhrases)) + throw TypeError(".google.cloud.dialogflow.cx.v3.EntityType.excludedPhrases: array expected"); + message.excludedPhrases = []; + for (var i = 0; i < object.excludedPhrases.length; ++i) { + if (typeof object.excludedPhrases[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.EntityType.excludedPhrases: object expected"); + message.excludedPhrases[i] = $root.google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase.fromObject(object.excludedPhrases[i]); + } + } + if (object.enableFuzzyExtraction != null) + message.enableFuzzyExtraction = Boolean(object.enableFuzzyExtraction); + if (object.redact != null) + message.redact = Boolean(object.redact); return message; }; /** - * Creates a plain object from a CreateEntityTypeRequest message. Also converts values to other types if specified. + * Creates a plain object from an EntityType message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.EntityType * @static - * @param {google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest} message CreateEntityTypeRequest + * @param {google.cloud.dialogflow.cx.v3.EntityType} message EntityType * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateEntityTypeRequest.toObject = function toObject(message, options) { + EntityType.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) { + object.entities = []; + object.excludedPhrases = []; + } if (options.defaults) { - object.parent = ""; - object.entityType = null; - object.languageCode = ""; + object.name = ""; + object.displayName = ""; + object.kind = options.enums === String ? "KIND_UNSPECIFIED" : 0; + object.autoExpansionMode = options.enums === String ? "AUTO_EXPANSION_MODE_UNSPECIFIED" : 0; + object.enableFuzzyExtraction = false; + object.redact = false; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.entityType != null && message.hasOwnProperty("entityType")) - object.entityType = $root.google.cloud.dialogflow.cx.v3.EntityType.toObject(message.entityType, options); - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.EntityType.Kind[message.kind] === undefined ? message.kind : $root.google.cloud.dialogflow.cx.v3.EntityType.Kind[message.kind] : message.kind; + if (message.autoExpansionMode != null && message.hasOwnProperty("autoExpansionMode")) + object.autoExpansionMode = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.EntityType.AutoExpansionMode[message.autoExpansionMode] === undefined ? message.autoExpansionMode : $root.google.cloud.dialogflow.cx.v3.EntityType.AutoExpansionMode[message.autoExpansionMode] : message.autoExpansionMode; + if (message.entities && message.entities.length) { + object.entities = []; + for (var j = 0; j < message.entities.length; ++j) + object.entities[j] = $root.google.cloud.dialogflow.cx.v3.EntityType.Entity.toObject(message.entities[j], options); + } + if (message.excludedPhrases && message.excludedPhrases.length) { + object.excludedPhrases = []; + for (var j = 0; j < message.excludedPhrases.length; ++j) + object.excludedPhrases[j] = $root.google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase.toObject(message.excludedPhrases[j], options); + } + if (message.enableFuzzyExtraction != null && message.hasOwnProperty("enableFuzzyExtraction")) + object.enableFuzzyExtraction = message.enableFuzzyExtraction; + if (message.redact != null && message.hasOwnProperty("redact")) + object.redact = message.redact; return object; }; /** - * Converts this CreateEntityTypeRequest to JSON. + * Converts this EntityType to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.EntityType * @instance * @returns {Object.} JSON object */ - CreateEntityTypeRequest.prototype.toJSON = function toJSON() { + EntityType.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateEntityTypeRequest + * Gets the default type url for EntityType * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.EntityType * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateEntityTypeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + EntityType.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.EntityType"; }; - return CreateEntityTypeRequest; - })(); - - v3.UpdateEntityTypeRequest = (function() { - /** - * Properties of an UpdateEntityTypeRequest. - * @memberof google.cloud.dialogflow.cx.v3 - * @interface IUpdateEntityTypeRequest - * @property {google.cloud.dialogflow.cx.v3.IEntityType|null} [entityType] UpdateEntityTypeRequest entityType - * @property {string|null} [languageCode] UpdateEntityTypeRequest languageCode - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateEntityTypeRequest updateMask + * Kind enum. + * @name google.cloud.dialogflow.cx.v3.EntityType.Kind + * @enum {number} + * @property {number} KIND_UNSPECIFIED=0 KIND_UNSPECIFIED value + * @property {number} KIND_MAP=1 KIND_MAP value + * @property {number} KIND_LIST=2 KIND_LIST value + * @property {number} KIND_REGEXP=3 KIND_REGEXP value */ + EntityType.Kind = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "KIND_UNSPECIFIED"] = 0; + values[valuesById[1] = "KIND_MAP"] = 1; + values[valuesById[2] = "KIND_LIST"] = 2; + values[valuesById[3] = "KIND_REGEXP"] = 3; + return values; + })(); /** - * Constructs a new UpdateEntityTypeRequest. - * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents an UpdateEntityTypeRequest. - * @implements IUpdateEntityTypeRequest - * @constructor - * @param {google.cloud.dialogflow.cx.v3.IUpdateEntityTypeRequest=} [properties] Properties to set + * AutoExpansionMode enum. + * @name google.cloud.dialogflow.cx.v3.EntityType.AutoExpansionMode + * @enum {number} + * @property {number} AUTO_EXPANSION_MODE_UNSPECIFIED=0 AUTO_EXPANSION_MODE_UNSPECIFIED value + * @property {number} AUTO_EXPANSION_MODE_DEFAULT=1 AUTO_EXPANSION_MODE_DEFAULT value */ - function UpdateEntityTypeRequest(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]]; - } + EntityType.AutoExpansionMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "AUTO_EXPANSION_MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "AUTO_EXPANSION_MODE_DEFAULT"] = 1; + return values; + })(); - /** - * UpdateEntityTypeRequest entityType. - * @member {google.cloud.dialogflow.cx.v3.IEntityType|null|undefined} entityType - * @memberof google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest - * @instance - */ - UpdateEntityTypeRequest.prototype.entityType = null; + EntityType.Entity = (function() { - /** - * UpdateEntityTypeRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest - * @instance - */ - UpdateEntityTypeRequest.prototype.languageCode = ""; + /** + * Properties of an Entity. + * @memberof google.cloud.dialogflow.cx.v3.EntityType + * @interface IEntity + * @property {string|null} [value] Entity value + * @property {Array.|null} [synonyms] Entity synonyms + */ - /** - * UpdateEntityTypeRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest - * @instance - */ - UpdateEntityTypeRequest.prototype.updateMask = null; + /** + * Constructs a new Entity. + * @memberof google.cloud.dialogflow.cx.v3.EntityType + * @classdesc Represents an Entity. + * @implements IEntity + * @constructor + * @param {google.cloud.dialogflow.cx.v3.EntityType.IEntity=} [properties] Properties to set + */ + function Entity(properties) { + this.synonyms = []; + 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]]; + } - /** - * Creates a new UpdateEntityTypeRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.IUpdateEntityTypeRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest} UpdateEntityTypeRequest instance - */ - UpdateEntityTypeRequest.create = function create(properties) { - return new UpdateEntityTypeRequest(properties); - }; + /** + * Entity value. + * @member {string} value + * @memberof google.cloud.dialogflow.cx.v3.EntityType.Entity + * @instance + */ + Entity.prototype.value = ""; - /** - * Encodes the specified UpdateEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.IUpdateEntityTypeRequest} message UpdateEntityTypeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateEntityTypeRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.entityType != null && Object.hasOwnProperty.call(message, "entityType")) - $root.google.cloud.dialogflow.cx.v3.EntityType.encode(message.entityType, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; + /** + * Entity synonyms. + * @member {Array.} synonyms + * @memberof google.cloud.dialogflow.cx.v3.EntityType.Entity + * @instance + */ + Entity.prototype.synonyms = $util.emptyArray; - /** - * Encodes the specified UpdateEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.IUpdateEntityTypeRequest} message UpdateEntityTypeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateEntityTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a new Entity instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.EntityType.Entity + * @static + * @param {google.cloud.dialogflow.cx.v3.EntityType.IEntity=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.EntityType.Entity} Entity instance + */ + Entity.create = function create(properties) { + return new Entity(properties); + }; - /** - * Decodes an UpdateEntityTypeRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest - * @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.UpdateEntityTypeRequest} UpdateEntityTypeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateEntityTypeRequest.decode = function decode(reader, length, error) { - 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.UpdateEntityTypeRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.entityType = $root.google.cloud.dialogflow.cx.v3.EntityType.decode(reader, reader.uint32()); - break; - } - case 2: { - message.languageCode = reader.string(); + /** + * Encodes the specified Entity message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.EntityType.Entity.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.EntityType.Entity + * @static + * @param {google.cloud.dialogflow.cx.v3.EntityType.IEntity} message Entity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Entity.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); + if (message.synonyms != null && message.synonyms.length) + for (var i = 0; i < message.synonyms.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.synonyms[i]); + return writer; + }; + + /** + * Encodes the specified Entity message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.EntityType.Entity.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.EntityType.Entity + * @static + * @param {google.cloud.dialogflow.cx.v3.EntityType.IEntity} message Entity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Entity.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Entity message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.EntityType.Entity + * @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.EntityType.Entity} Entity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Entity.decode = function decode(reader, length, error) { + 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.EntityType.Entity(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - } - case 3: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + switch (tag >>> 3) { + case 1: { + message.value = reader.string(); + break; + } + case 2: { + if (!(message.synonyms && message.synonyms.length)) + message.synonyms = []; + message.synonyms.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); break; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; + return message; + }; - /** - * Decodes an UpdateEntityTypeRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest} UpdateEntityTypeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateEntityTypeRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes an Entity message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.EntityType.Entity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.EntityType.Entity} Entity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Entity.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies an UpdateEntityTypeRequest message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateEntityTypeRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.entityType != null && message.hasOwnProperty("entityType")) { - var error = $root.google.cloud.dialogflow.cx.v3.EntityType.verify(message.entityType); - if (error) - return "entityType." + error; - } - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - return null; - }; + /** + * Verifies an Entity message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.EntityType.Entity + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Entity.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + if (message.synonyms != null && message.hasOwnProperty("synonyms")) { + if (!Array.isArray(message.synonyms)) + return "synonyms: array expected"; + for (var i = 0; i < message.synonyms.length; ++i) + if (!$util.isString(message.synonyms[i])) + return "synonyms: string[] expected"; + } + return null; + }; - /** - * Creates an UpdateEntityTypeRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest} UpdateEntityTypeRequest - */ - UpdateEntityTypeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest) + /** + * Creates an Entity message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.EntityType.Entity + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.EntityType.Entity} Entity + */ + Entity.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.EntityType.Entity) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.EntityType.Entity(); + if (object.value != null) + message.value = String(object.value); + if (object.synonyms) { + if (!Array.isArray(object.synonyms)) + throw TypeError(".google.cloud.dialogflow.cx.v3.EntityType.Entity.synonyms: array expected"); + message.synonyms = []; + for (var i = 0; i < object.synonyms.length; ++i) + message.synonyms[i] = String(object.synonyms[i]); + } + return message; + }; + + /** + * Creates a plain object from an Entity message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.EntityType.Entity + * @static + * @param {google.cloud.dialogflow.cx.v3.EntityType.Entity} message Entity + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Entity.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.synonyms = []; + if (options.defaults) + object.value = ""; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + if (message.synonyms && message.synonyms.length) { + object.synonyms = []; + for (var j = 0; j < message.synonyms.length; ++j) + object.synonyms[j] = message.synonyms[j]; + } return object; - var message = new $root.google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest(); - if (object.entityType != null) { - if (typeof object.entityType !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest.entityType: object expected"); - message.entityType = $root.google.cloud.dialogflow.cx.v3.EntityType.fromObject(object.entityType); - } - if (object.languageCode != null) - message.languageCode = String(object.languageCode); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - return message; - }; + }; - /** - * Creates a plain object from an UpdateEntityTypeRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest} message UpdateEntityTypeRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateEntityTypeRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.entityType = null; - object.languageCode = ""; - object.updateMask = null; - } - if (message.entityType != null && message.hasOwnProperty("entityType")) - object.entityType = $root.google.cloud.dialogflow.cx.v3.EntityType.toObject(message.entityType, options); - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - return object; - }; + /** + * Converts this Entity to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.EntityType.Entity + * @instance + * @returns {Object.} JSON object + */ + Entity.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this UpdateEntityTypeRequest to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateEntityTypeRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Gets the default type url for Entity + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.EntityType.Entity + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Entity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.EntityType.Entity"; + }; - /** - * Gets the default type url for UpdateEntityTypeRequest - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateEntityTypeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; + return Entity; + })(); + + EntityType.ExcludedPhrase = (function() { + + /** + * Properties of an ExcludedPhrase. + * @memberof google.cloud.dialogflow.cx.v3.EntityType + * @interface IExcludedPhrase + * @property {string|null} [value] ExcludedPhrase value + */ + + /** + * Constructs a new ExcludedPhrase. + * @memberof google.cloud.dialogflow.cx.v3.EntityType + * @classdesc Represents an ExcludedPhrase. + * @implements IExcludedPhrase + * @constructor + * @param {google.cloud.dialogflow.cx.v3.EntityType.IExcludedPhrase=} [properties] Properties to set + */ + function ExcludedPhrase(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]]; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest"; - }; - return UpdateEntityTypeRequest; + /** + * ExcludedPhrase value. + * @member {string} value + * @memberof google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase + * @instance + */ + ExcludedPhrase.prototype.value = ""; + + /** + * Creates a new ExcludedPhrase instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase + * @static + * @param {google.cloud.dialogflow.cx.v3.EntityType.IExcludedPhrase=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase} ExcludedPhrase instance + */ + ExcludedPhrase.create = function create(properties) { + return new ExcludedPhrase(properties); + }; + + /** + * Encodes the specified ExcludedPhrase message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase + * @static + * @param {google.cloud.dialogflow.cx.v3.EntityType.IExcludedPhrase} message ExcludedPhrase message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExcludedPhrase.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); + return writer; + }; + + /** + * Encodes the specified ExcludedPhrase message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase + * @static + * @param {google.cloud.dialogflow.cx.v3.EntityType.IExcludedPhrase} message ExcludedPhrase message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExcludedPhrase.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExcludedPhrase message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase + * @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.EntityType.ExcludedPhrase} ExcludedPhrase + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExcludedPhrase.decode = function decode(reader, length, error) { + 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.EntityType.ExcludedPhrase(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.value = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExcludedPhrase message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase} ExcludedPhrase + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExcludedPhrase.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExcludedPhrase message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExcludedPhrase.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + return null; + }; + + /** + * Creates an ExcludedPhrase message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase} ExcludedPhrase + */ + ExcludedPhrase.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase(); + if (object.value != null) + message.value = String(object.value); + return message; + }; + + /** + * Creates a plain object from an ExcludedPhrase message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase + * @static + * @param {google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase} message ExcludedPhrase + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExcludedPhrase.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = ""; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + return object; + }; + + /** + * Converts this ExcludedPhrase to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase + * @instance + * @returns {Object.} JSON object + */ + ExcludedPhrase.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExcludedPhrase + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExcludedPhrase.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.EntityType.ExcludedPhrase"; + }; + + return ExcludedPhrase; + })(); + + return EntityType; })(); - v3.DeleteEntityTypeRequest = (function() { + v3.ExportEntityTypesRequest = (function() { /** - * Properties of a DeleteEntityTypeRequest. + * Properties of an ExportEntityTypesRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IDeleteEntityTypeRequest - * @property {string|null} [name] DeleteEntityTypeRequest name - * @property {boolean|null} [force] DeleteEntityTypeRequest force + * @interface IExportEntityTypesRequest + * @property {string|null} [parent] ExportEntityTypesRequest parent + * @property {Array.|null} [entityTypes] ExportEntityTypesRequest entityTypes + * @property {string|null} [entityTypesUri] ExportEntityTypesRequest entityTypesUri + * @property {boolean|null} [entityTypesContentInline] ExportEntityTypesRequest entityTypesContentInline + * @property {google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest.DataFormat|null} [dataFormat] ExportEntityTypesRequest dataFormat + * @property {string|null} [languageCode] ExportEntityTypesRequest languageCode */ /** - * Constructs a new DeleteEntityTypeRequest. + * Constructs a new ExportEntityTypesRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a DeleteEntityTypeRequest. - * @implements IDeleteEntityTypeRequest + * @classdesc Represents an ExportEntityTypesRequest. + * @implements IExportEntityTypesRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IDeleteEntityTypeRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IExportEntityTypesRequest=} [properties] Properties to set */ - function DeleteEntityTypeRequest(properties) { + function ExportEntityTypesRequest(properties) { + this.entityTypes = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -36640,91 +36962,164 @@ } /** - * DeleteEntityTypeRequest name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest + * ExportEntityTypesRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest * @instance */ - DeleteEntityTypeRequest.prototype.name = ""; + ExportEntityTypesRequest.prototype.parent = ""; /** - * DeleteEntityTypeRequest force. - * @member {boolean} force - * @memberof google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest + * ExportEntityTypesRequest entityTypes. + * @member {Array.} entityTypes + * @memberof google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest * @instance */ - DeleteEntityTypeRequest.prototype.force = false; + ExportEntityTypesRequest.prototype.entityTypes = $util.emptyArray; /** - * Creates a new DeleteEntityTypeRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.IDeleteEntityTypeRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest} DeleteEntityTypeRequest instance + * ExportEntityTypesRequest entityTypesUri. + * @member {string|null|undefined} entityTypesUri + * @memberof google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest + * @instance */ - DeleteEntityTypeRequest.create = function create(properties) { - return new DeleteEntityTypeRequest(properties); - }; + ExportEntityTypesRequest.prototype.entityTypesUri = null; /** - * Encodes the specified DeleteEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.IDeleteEntityTypeRequest} message DeleteEntityTypeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * ExportEntityTypesRequest entityTypesContentInline. + * @member {boolean|null|undefined} entityTypesContentInline + * @memberof google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest + * @instance */ - DeleteEntityTypeRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.force != null && Object.hasOwnProperty.call(message, "force")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.force); - return writer; - }; + ExportEntityTypesRequest.prototype.entityTypesContentInline = null; /** - * Encodes the specified DeleteEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest + * ExportEntityTypesRequest dataFormat. + * @member {google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest.DataFormat} dataFormat + * @memberof google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest + * @instance + */ + ExportEntityTypesRequest.prototype.dataFormat = 0; + + /** + * ExportEntityTypesRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest + * @instance + */ + ExportEntityTypesRequest.prototype.languageCode = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ExportEntityTypesRequest destination. + * @member {"entityTypesUri"|"entityTypesContentInline"|undefined} destination + * @memberof google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest + * @instance + */ + Object.defineProperty(ExportEntityTypesRequest.prototype, "destination", { + get: $util.oneOfGetter($oneOfFields = ["entityTypesUri", "entityTypesContentInline"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ExportEntityTypesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IDeleteEntityTypeRequest} message DeleteEntityTypeRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IExportEntityTypesRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest} ExportEntityTypesRequest instance + */ + ExportEntityTypesRequest.create = function create(properties) { + return new ExportEntityTypesRequest(properties); + }; + + /** + * Encodes the specified ExportEntityTypesRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IExportEntityTypesRequest} message ExportEntityTypesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteEntityTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { + ExportEntityTypesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.entityTypes != null && message.entityTypes.length) + for (var i = 0; i < message.entityTypes.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.entityTypes[i]); + if (message.entityTypesUri != null && Object.hasOwnProperty.call(message, "entityTypesUri")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.entityTypesUri); + if (message.entityTypesContentInline != null && Object.hasOwnProperty.call(message, "entityTypesContentInline")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.entityTypesContentInline); + if (message.dataFormat != null && Object.hasOwnProperty.call(message, "dataFormat")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.dataFormat); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.languageCode); + return writer; + }; + + /** + * Encodes the specified ExportEntityTypesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IExportEntityTypesRequest} message ExportEntityTypesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportEntityTypesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteEntityTypeRequest message from the specified reader or buffer. + * Decodes an ExportEntityTypesRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest * @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.DeleteEntityTypeRequest} DeleteEntityTypeRequest + * @returns {google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest} ExportEntityTypesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteEntityTypeRequest.decode = function decode(reader, length, error) { + ExportEntityTypesRequest.decode = function decode(reader, length, error) { 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.DeleteEntityTypeRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.parent = reader.string(); break; } case 2: { - message.force = reader.bool(); + if (!(message.entityTypes && message.entityTypes.length)) + message.entityTypes = []; + message.entityTypes.push(reader.string()); + break; + } + case 3: { + message.entityTypesUri = reader.string(); + break; + } + case 4: { + message.entityTypesContentInline = reader.bool(); + break; + } + case 5: { + message.dataFormat = reader.int32(); + break; + } + case 6: { + message.languageCode = reader.string(); break; } default: @@ -36736,131 +37131,228 @@ }; /** - * Decodes a DeleteEntityTypeRequest message from the specified reader or buffer, length delimited. + * Decodes an ExportEntityTypesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest} DeleteEntityTypeRequest + * @returns {google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest} ExportEntityTypesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteEntityTypeRequest.decodeDelimited = function decodeDelimited(reader) { + ExportEntityTypesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteEntityTypeRequest message. + * Verifies an ExportEntityTypesRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteEntityTypeRequest.verify = function verify(message) { + ExportEntityTypesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.force != null && message.hasOwnProperty("force")) - if (typeof message.force !== "boolean") - return "force: boolean expected"; + var properties = {}; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.entityTypes != null && message.hasOwnProperty("entityTypes")) { + if (!Array.isArray(message.entityTypes)) + return "entityTypes: array expected"; + for (var i = 0; i < message.entityTypes.length; ++i) + if (!$util.isString(message.entityTypes[i])) + return "entityTypes: string[] expected"; + } + if (message.entityTypesUri != null && message.hasOwnProperty("entityTypesUri")) { + properties.destination = 1; + if (!$util.isString(message.entityTypesUri)) + return "entityTypesUri: string expected"; + } + if (message.entityTypesContentInline != null && message.hasOwnProperty("entityTypesContentInline")) { + if (properties.destination === 1) + return "destination: multiple values"; + properties.destination = 1; + if (typeof message.entityTypesContentInline !== "boolean") + return "entityTypesContentInline: boolean expected"; + } + if (message.dataFormat != null && message.hasOwnProperty("dataFormat")) + switch (message.dataFormat) { + default: + return "dataFormat: enum value expected"; + case 0: + case 1: + case 5: + break; + } + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; return null; }; /** - * Creates a DeleteEntityTypeRequest message from a plain object. Also converts values to their respective internal types. + * Creates an ExportEntityTypesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest} DeleteEntityTypeRequest + * @returns {google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest} ExportEntityTypesRequest */ - DeleteEntityTypeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest) + ExportEntityTypesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.force != null) - message.force = Boolean(object.force); + var message = new $root.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.entityTypes) { + if (!Array.isArray(object.entityTypes)) + throw TypeError(".google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest.entityTypes: array expected"); + message.entityTypes = []; + for (var i = 0; i < object.entityTypes.length; ++i) + message.entityTypes[i] = String(object.entityTypes[i]); + } + if (object.entityTypesUri != null) + message.entityTypesUri = String(object.entityTypesUri); + if (object.entityTypesContentInline != null) + message.entityTypesContentInline = Boolean(object.entityTypesContentInline); + switch (object.dataFormat) { + default: + if (typeof object.dataFormat === "number") { + message.dataFormat = object.dataFormat; + break; + } + break; + case "DATA_FORMAT_UNSPECIFIED": + case 0: + message.dataFormat = 0; + break; + case "BLOB": + case 1: + message.dataFormat = 1; + break; + case "JSON_PACKAGE": + case 5: + message.dataFormat = 5; + break; + } + if (object.languageCode != null) + message.languageCode = String(object.languageCode); return message; }; /** - * Creates a plain object from a DeleteEntityTypeRequest message. Also converts values to other types if specified. + * Creates a plain object from an ExportEntityTypesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest * @static - * @param {google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest} message DeleteEntityTypeRequest + * @param {google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest} message ExportEntityTypesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteEntityTypeRequest.toObject = function toObject(message, options) { + ExportEntityTypesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.entityTypes = []; if (options.defaults) { - object.name = ""; - object.force = false; + object.parent = ""; + object.dataFormat = options.enums === String ? "DATA_FORMAT_UNSPECIFIED" : 0; + object.languageCode = ""; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.force != null && message.hasOwnProperty("force")) - object.force = message.force; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.entityTypes && message.entityTypes.length) { + object.entityTypes = []; + for (var j = 0; j < message.entityTypes.length; ++j) + object.entityTypes[j] = message.entityTypes[j]; + } + if (message.entityTypesUri != null && message.hasOwnProperty("entityTypesUri")) { + object.entityTypesUri = message.entityTypesUri; + if (options.oneofs) + object.destination = "entityTypesUri"; + } + if (message.entityTypesContentInline != null && message.hasOwnProperty("entityTypesContentInline")) { + object.entityTypesContentInline = message.entityTypesContentInline; + if (options.oneofs) + object.destination = "entityTypesContentInline"; + } + if (message.dataFormat != null && message.hasOwnProperty("dataFormat")) + object.dataFormat = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest.DataFormat[message.dataFormat] === undefined ? message.dataFormat : $root.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest.DataFormat[message.dataFormat] : message.dataFormat; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; return object; }; /** - * Converts this DeleteEntityTypeRequest to JSON. + * Converts this ExportEntityTypesRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest * @instance * @returns {Object.} JSON object */ - DeleteEntityTypeRequest.prototype.toJSON = function toJSON() { + ExportEntityTypesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeleteEntityTypeRequest + * Gets the default type url for ExportEntityTypesRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeleteEntityTypeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ExportEntityTypesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest"; }; - return DeleteEntityTypeRequest; + /** + * DataFormat enum. + * @name google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest.DataFormat + * @enum {number} + * @property {number} DATA_FORMAT_UNSPECIFIED=0 DATA_FORMAT_UNSPECIFIED value + * @property {number} BLOB=1 BLOB value + * @property {number} JSON_PACKAGE=5 JSON_PACKAGE value + */ + ExportEntityTypesRequest.DataFormat = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DATA_FORMAT_UNSPECIFIED"] = 0; + values[valuesById[1] = "BLOB"] = 1; + values[valuesById[5] = "JSON_PACKAGE"] = 5; + return values; + })(); + + return ExportEntityTypesRequest; })(); - v3.InlineDestination = (function() { + v3.ExportEntityTypesResponse = (function() { /** - * Properties of an InlineDestination. + * Properties of an ExportEntityTypesResponse. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IInlineDestination - * @property {Uint8Array|null} [content] InlineDestination content + * @interface IExportEntityTypesResponse + * @property {string|null} [entityTypesUri] ExportEntityTypesResponse entityTypesUri + * @property {google.cloud.dialogflow.cx.v3.IInlineDestination|null} [entityTypesContent] ExportEntityTypesResponse entityTypesContent */ /** - * Constructs a new InlineDestination. + * Constructs a new ExportEntityTypesResponse. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents an InlineDestination. - * @implements IInlineDestination + * @classdesc Represents an ExportEntityTypesResponse. + * @implements IExportEntityTypesResponse * @constructor - * @param {google.cloud.dialogflow.cx.v3.IInlineDestination=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IExportEntityTypesResponse=} [properties] Properties to set */ - function InlineDestination(properties) { + function ExportEntityTypesResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -36868,77 +37360,105 @@ } /** - * InlineDestination content. - * @member {Uint8Array} content - * @memberof google.cloud.dialogflow.cx.v3.InlineDestination + * ExportEntityTypesResponse entityTypesUri. + * @member {string|null|undefined} entityTypesUri + * @memberof google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse * @instance */ - InlineDestination.prototype.content = $util.newBuffer([]); + ExportEntityTypesResponse.prototype.entityTypesUri = null; /** - * Creates a new InlineDestination instance using the specified properties. + * ExportEntityTypesResponse entityTypesContent. + * @member {google.cloud.dialogflow.cx.v3.IInlineDestination|null|undefined} entityTypesContent + * @memberof google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse + * @instance + */ + ExportEntityTypesResponse.prototype.entityTypesContent = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ExportEntityTypesResponse exportedEntityTypes. + * @member {"entityTypesUri"|"entityTypesContent"|undefined} exportedEntityTypes + * @memberof google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse + * @instance + */ + Object.defineProperty(ExportEntityTypesResponse.prototype, "exportedEntityTypes", { + get: $util.oneOfGetter($oneOfFields = ["entityTypesUri", "entityTypesContent"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ExportEntityTypesResponse instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.InlineDestination + * @memberof google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IInlineDestination=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.InlineDestination} InlineDestination instance + * @param {google.cloud.dialogflow.cx.v3.IExportEntityTypesResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse} ExportEntityTypesResponse instance */ - InlineDestination.create = function create(properties) { - return new InlineDestination(properties); + ExportEntityTypesResponse.create = function create(properties) { + return new ExportEntityTypesResponse(properties); }; /** - * Encodes the specified InlineDestination message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.InlineDestination.verify|verify} messages. + * Encodes the specified ExportEntityTypesResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.InlineDestination + * @memberof google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IInlineDestination} message InlineDestination message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IExportEntityTypesResponse} message ExportEntityTypesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - InlineDestination.encode = function encode(message, writer) { + ExportEntityTypesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.content != null && Object.hasOwnProperty.call(message, "content")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.content); + if (message.entityTypesUri != null && Object.hasOwnProperty.call(message, "entityTypesUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.entityTypesUri); + if (message.entityTypesContent != null && Object.hasOwnProperty.call(message, "entityTypesContent")) + $root.google.cloud.dialogflow.cx.v3.InlineDestination.encode(message.entityTypesContent, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified InlineDestination message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.InlineDestination.verify|verify} messages. + * Encodes the specified ExportEntityTypesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.InlineDestination + * @memberof google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IInlineDestination} message InlineDestination message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IExportEntityTypesResponse} message ExportEntityTypesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - InlineDestination.encodeDelimited = function encodeDelimited(message, writer) { + ExportEntityTypesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an InlineDestination message from the specified reader or buffer. + * Decodes an ExportEntityTypesResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.InlineDestination + * @memberof google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse * @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.InlineDestination} InlineDestination + * @returns {google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse} ExportEntityTypesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - InlineDestination.decode = function decode(reader, length, error) { + ExportEntityTypesResponse.decode = function decode(reader, length, error) { 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.InlineDestination(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.content = reader.bytes(); + message.entityTypesUri = reader.string(); + break; + } + case 2: { + message.entityTypesContent = $root.google.cloud.dialogflow.cx.v3.InlineDestination.decode(reader, reader.uint32()); break; } default: @@ -36950,131 +37470,145 @@ }; /** - * Decodes an InlineDestination message from the specified reader or buffer, length delimited. + * Decodes an ExportEntityTypesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.InlineDestination + * @memberof google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.InlineDestination} InlineDestination + * @returns {google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse} ExportEntityTypesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - InlineDestination.decodeDelimited = function decodeDelimited(reader) { + ExportEntityTypesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an InlineDestination message. + * Verifies an ExportEntityTypesResponse message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.InlineDestination + * @memberof google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - InlineDestination.verify = function verify(message) { + ExportEntityTypesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.content != null && message.hasOwnProperty("content")) - if (!(message.content && typeof message.content.length === "number" || $util.isString(message.content))) - return "content: buffer expected"; + var properties = {}; + if (message.entityTypesUri != null && message.hasOwnProperty("entityTypesUri")) { + properties.exportedEntityTypes = 1; + if (!$util.isString(message.entityTypesUri)) + return "entityTypesUri: string expected"; + } + if (message.entityTypesContent != null && message.hasOwnProperty("entityTypesContent")) { + if (properties.exportedEntityTypes === 1) + return "exportedEntityTypes: multiple values"; + properties.exportedEntityTypes = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3.InlineDestination.verify(message.entityTypesContent); + if (error) + return "entityTypesContent." + error; + } + } return null; }; /** - * Creates an InlineDestination message from a plain object. Also converts values to their respective internal types. + * Creates an ExportEntityTypesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.InlineDestination + * @memberof google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.InlineDestination} InlineDestination + * @returns {google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse} ExportEntityTypesResponse */ - InlineDestination.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.InlineDestination) + ExportEntityTypesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.InlineDestination(); - if (object.content != null) - if (typeof object.content === "string") - $util.base64.decode(object.content, message.content = $util.newBuffer($util.base64.length(object.content)), 0); - else if (object.content.length >= 0) - message.content = object.content; + var message = new $root.google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse(); + if (object.entityTypesUri != null) + message.entityTypesUri = String(object.entityTypesUri); + if (object.entityTypesContent != null) { + if (typeof object.entityTypesContent !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse.entityTypesContent: object expected"); + message.entityTypesContent = $root.google.cloud.dialogflow.cx.v3.InlineDestination.fromObject(object.entityTypesContent); + } return message; }; /** - * Creates a plain object from an InlineDestination message. Also converts values to other types if specified. + * Creates a plain object from an ExportEntityTypesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.InlineDestination + * @memberof google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse * @static - * @param {google.cloud.dialogflow.cx.v3.InlineDestination} message InlineDestination + * @param {google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse} message ExportEntityTypesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - InlineDestination.toObject = function toObject(message, options) { + ExportEntityTypesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - if (options.bytes === String) - object.content = ""; - else { - object.content = []; - if (options.bytes !== Array) - object.content = $util.newBuffer(object.content); - } - if (message.content != null && message.hasOwnProperty("content")) - object.content = options.bytes === String ? $util.base64.encode(message.content, 0, message.content.length) : options.bytes === Array ? Array.prototype.slice.call(message.content) : message.content; + if (message.entityTypesUri != null && message.hasOwnProperty("entityTypesUri")) { + object.entityTypesUri = message.entityTypesUri; + if (options.oneofs) + object.exportedEntityTypes = "entityTypesUri"; + } + if (message.entityTypesContent != null && message.hasOwnProperty("entityTypesContent")) { + object.entityTypesContent = $root.google.cloud.dialogflow.cx.v3.InlineDestination.toObject(message.entityTypesContent, options); + if (options.oneofs) + object.exportedEntityTypes = "entityTypesContent"; + } return object; }; /** - * Converts this InlineDestination to JSON. + * Converts this ExportEntityTypesResponse to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.InlineDestination + * @memberof google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse * @instance * @returns {Object.} JSON object */ - InlineDestination.prototype.toJSON = function toJSON() { + ExportEntityTypesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for InlineDestination + * Gets the default type url for ExportEntityTypesResponse * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.InlineDestination + * @memberof google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - InlineDestination.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ExportEntityTypesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.InlineDestination"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse"; }; - return InlineDestination; + return ExportEntityTypesResponse; })(); - v3.InlineSource = (function() { + v3.ExportEntityTypesMetadata = (function() { /** - * Properties of an InlineSource. + * Properties of an ExportEntityTypesMetadata. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IInlineSource - * @property {Uint8Array|null} [content] InlineSource content + * @interface IExportEntityTypesMetadata */ /** - * Constructs a new InlineSource. + * Constructs a new ExportEntityTypesMetadata. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents an InlineSource. - * @implements IInlineSource + * @classdesc Represents an ExportEntityTypesMetadata. + * @implements IExportEntityTypesMetadata * @constructor - * @param {google.cloud.dialogflow.cx.v3.IInlineSource=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IExportEntityTypesMetadata=} [properties] Properties to set */ - function InlineSource(properties) { + function ExportEntityTypesMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -37082,79 +37616,65 @@ } /** - * InlineSource content. - * @member {Uint8Array} content - * @memberof google.cloud.dialogflow.cx.v3.InlineSource - * @instance - */ - InlineSource.prototype.content = $util.newBuffer([]); - - /** - * Creates a new InlineSource instance using the specified properties. + * Creates a new ExportEntityTypesMetadata instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.InlineSource + * @memberof google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata * @static - * @param {google.cloud.dialogflow.cx.v3.IInlineSource=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.InlineSource} InlineSource instance + * @param {google.cloud.dialogflow.cx.v3.IExportEntityTypesMetadata=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata} ExportEntityTypesMetadata instance */ - InlineSource.create = function create(properties) { - return new InlineSource(properties); + ExportEntityTypesMetadata.create = function create(properties) { + return new ExportEntityTypesMetadata(properties); }; /** - * Encodes the specified InlineSource message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.InlineSource.verify|verify} messages. + * Encodes the specified ExportEntityTypesMetadata message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.InlineSource + * @memberof google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata * @static - * @param {google.cloud.dialogflow.cx.v3.IInlineSource} message InlineSource message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IExportEntityTypesMetadata} message ExportEntityTypesMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - InlineSource.encode = function encode(message, writer) { + ExportEntityTypesMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.content != null && Object.hasOwnProperty.call(message, "content")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.content); return writer; }; /** - * Encodes the specified InlineSource message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.InlineSource.verify|verify} messages. + * Encodes the specified ExportEntityTypesMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.InlineSource + * @memberof google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata * @static - * @param {google.cloud.dialogflow.cx.v3.IInlineSource} message InlineSource message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IExportEntityTypesMetadata} message ExportEntityTypesMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - InlineSource.encodeDelimited = function encodeDelimited(message, writer) { + ExportEntityTypesMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an InlineSource message from the specified reader or buffer. + * Decodes an ExportEntityTypesMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.InlineSource + * @memberof google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata * @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.InlineSource} InlineSource + * @returns {google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata} ExportEntityTypesMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - InlineSource.decode = function decode(reader, length, error) { + ExportEntityTypesMetadata.decode = function decode(reader, length, error) { 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.InlineSource(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { - case 1: { - message.content = reader.bytes(); - break; - } default: reader.skipType(tag & 7); break; @@ -37164,470 +37684,501 @@ }; /** - * Decodes an InlineSource message from the specified reader or buffer, length delimited. + * Decodes an ExportEntityTypesMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.InlineSource + * @memberof google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.InlineSource} InlineSource + * @returns {google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata} ExportEntityTypesMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - InlineSource.decodeDelimited = function decodeDelimited(reader) { + ExportEntityTypesMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an InlineSource message. + * Verifies an ExportEntityTypesMetadata message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.InlineSource + * @memberof google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - InlineSource.verify = function verify(message) { + ExportEntityTypesMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.content != null && message.hasOwnProperty("content")) - if (!(message.content && typeof message.content.length === "number" || $util.isString(message.content))) - return "content: buffer expected"; return null; }; /** - * Creates an InlineSource message from a plain object. Also converts values to their respective internal types. + * Creates an ExportEntityTypesMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.InlineSource + * @memberof google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.InlineSource} InlineSource + * @returns {google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata} ExportEntityTypesMetadata */ - InlineSource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.InlineSource) + ExportEntityTypesMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.InlineSource(); - if (object.content != null) - if (typeof object.content === "string") - $util.base64.decode(object.content, message.content = $util.newBuffer($util.base64.length(object.content)), 0); - else if (object.content.length >= 0) - message.content = object.content; - return message; + return new $root.google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata(); }; /** - * Creates a plain object from an InlineSource message. Also converts values to other types if specified. + * Creates a plain object from an ExportEntityTypesMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.InlineSource + * @memberof google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata * @static - * @param {google.cloud.dialogflow.cx.v3.InlineSource} message InlineSource + * @param {google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata} message ExportEntityTypesMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - InlineSource.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - if (options.bytes === String) - object.content = ""; - else { - object.content = []; - if (options.bytes !== Array) - object.content = $util.newBuffer(object.content); - } - if (message.content != null && message.hasOwnProperty("content")) - object.content = options.bytes === String ? $util.base64.encode(message.content, 0, message.content.length) : options.bytes === Array ? Array.prototype.slice.call(message.content) : message.content; - return object; + ExportEntityTypesMetadata.toObject = function toObject() { + return {}; }; /** - * Converts this InlineSource to JSON. + * Converts this ExportEntityTypesMetadata to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.InlineSource + * @memberof google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata * @instance * @returns {Object.} JSON object */ - InlineSource.prototype.toJSON = function toJSON() { + ExportEntityTypesMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for InlineSource + * Gets the default type url for ExportEntityTypesMetadata * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.InlineSource + * @memberof google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - InlineSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ExportEntityTypesMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.InlineSource"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata"; }; - return InlineSource; + return ExportEntityTypesMetadata; })(); - v3.Environments = (function() { + v3.ImportEntityTypesRequest = (function() { /** - * Constructs a new Environments service. + * Properties of an ImportEntityTypesRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents an Environments - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function Environments(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (Environments.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Environments; - - /** - * Creates new Environments service using the specified rpc implementation. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.Environments - * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {Environments} RPC service. Useful where requests and/or responses are streamed. + * @interface IImportEntityTypesRequest + * @property {string|null} [parent] ImportEntityTypesRequest parent + * @property {string|null} [entityTypesUri] ImportEntityTypesRequest entityTypesUri + * @property {google.cloud.dialogflow.cx.v3.IInlineSource|null} [entityTypesContent] ImportEntityTypesRequest entityTypesContent + * @property {google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.MergeOption|null} [mergeOption] ImportEntityTypesRequest mergeOption + * @property {string|null} [targetEntityType] ImportEntityTypesRequest targetEntityType */ - Environments.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Environments|listEnvironments}. - * @memberof google.cloud.dialogflow.cx.v3.Environments - * @typedef ListEnvironmentsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.ListEnvironmentsResponse} [response] ListEnvironmentsResponse + * Constructs a new ImportEntityTypesRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents an ImportEntityTypesRequest. + * @implements IImportEntityTypesRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IImportEntityTypesRequest=} [properties] Properties to set */ + function ImportEntityTypesRequest(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]]; + } /** - * Calls ListEnvironments. - * @function listEnvironments - * @memberof google.cloud.dialogflow.cx.v3.Environments + * ImportEntityTypesRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest * @instance - * @param {google.cloud.dialogflow.cx.v3.IListEnvironmentsRequest} request ListEnvironmentsRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Environments.ListEnvironmentsCallback} callback Node-style callback called with the error, if any, and ListEnvironmentsResponse - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(Environments.prototype.listEnvironments = function listEnvironments(request, callback) { - return this.rpcCall(listEnvironments, $root.google.cloud.dialogflow.cx.v3.ListEnvironmentsRequest, $root.google.cloud.dialogflow.cx.v3.ListEnvironmentsResponse, request, callback); - }, "name", { value: "ListEnvironments" }); + ImportEntityTypesRequest.prototype.parent = ""; /** - * Calls ListEnvironments. - * @function listEnvironments - * @memberof google.cloud.dialogflow.cx.v3.Environments + * ImportEntityTypesRequest entityTypesUri. + * @member {string|null|undefined} entityTypesUri + * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest * @instance - * @param {google.cloud.dialogflow.cx.v3.IListEnvironmentsRequest} request ListEnvironmentsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + ImportEntityTypesRequest.prototype.entityTypesUri = null; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Environments|getEnvironment}. - * @memberof google.cloud.dialogflow.cx.v3.Environments - * @typedef GetEnvironmentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.Environment} [response] Environment + * ImportEntityTypesRequest entityTypesContent. + * @member {google.cloud.dialogflow.cx.v3.IInlineSource|null|undefined} entityTypesContent + * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest + * @instance */ + ImportEntityTypesRequest.prototype.entityTypesContent = null; /** - * Calls GetEnvironment. - * @function getEnvironment - * @memberof google.cloud.dialogflow.cx.v3.Environments + * ImportEntityTypesRequest mergeOption. + * @member {google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.MergeOption} mergeOption + * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest * @instance - * @param {google.cloud.dialogflow.cx.v3.IGetEnvironmentRequest} request GetEnvironmentRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Environments.GetEnvironmentCallback} callback Node-style callback called with the error, if any, and Environment - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(Environments.prototype.getEnvironment = function getEnvironment(request, callback) { - return this.rpcCall(getEnvironment, $root.google.cloud.dialogflow.cx.v3.GetEnvironmentRequest, $root.google.cloud.dialogflow.cx.v3.Environment, request, callback); - }, "name", { value: "GetEnvironment" }); + ImportEntityTypesRequest.prototype.mergeOption = 0; /** - * Calls GetEnvironment. - * @function getEnvironment - * @memberof google.cloud.dialogflow.cx.v3.Environments + * ImportEntityTypesRequest targetEntityType. + * @member {string} targetEntityType + * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest * @instance - * @param {google.cloud.dialogflow.cx.v3.IGetEnvironmentRequest} request GetEnvironmentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + ImportEntityTypesRequest.prototype.targetEntityType = ""; - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Environments|createEnvironment}. - * @memberof google.cloud.dialogflow.cx.v3.Environments - * @typedef CreateEnvironmentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * Calls CreateEnvironment. - * @function createEnvironment - * @memberof google.cloud.dialogflow.cx.v3.Environments + * ImportEntityTypesRequest entityTypes. + * @member {"entityTypesUri"|"entityTypesContent"|undefined} entityTypes + * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest * @instance - * @param {google.cloud.dialogflow.cx.v3.ICreateEnvironmentRequest} request CreateEnvironmentRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Environments.CreateEnvironmentCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(Environments.prototype.createEnvironment = function createEnvironment(request, callback) { - return this.rpcCall(createEnvironment, $root.google.cloud.dialogflow.cx.v3.CreateEnvironmentRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateEnvironment" }); + Object.defineProperty(ImportEntityTypesRequest.prototype, "entityTypes", { + get: $util.oneOfGetter($oneOfFields = ["entityTypesUri", "entityTypesContent"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Calls CreateEnvironment. - * @function createEnvironment - * @memberof google.cloud.dialogflow.cx.v3.Environments - * @instance - * @param {google.cloud.dialogflow.cx.v3.ICreateEnvironmentRequest} request CreateEnvironmentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a new ImportEntityTypesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IImportEntityTypesRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest} ImportEntityTypesRequest instance */ + ImportEntityTypesRequest.create = function create(properties) { + return new ImportEntityTypesRequest(properties); + }; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Environments|updateEnvironment}. - * @memberof google.cloud.dialogflow.cx.v3.Environments - * @typedef UpdateEnvironmentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Encodes the specified ImportEntityTypesRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IImportEntityTypesRequest} message ImportEntityTypesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + ImportEntityTypesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.entityTypesUri != null && Object.hasOwnProperty.call(message, "entityTypesUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.entityTypesUri); + if (message.entityTypesContent != null && Object.hasOwnProperty.call(message, "entityTypesContent")) + $root.google.cloud.dialogflow.cx.v3.InlineSource.encode(message.entityTypesContent, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.mergeOption != null && Object.hasOwnProperty.call(message, "mergeOption")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.mergeOption); + if (message.targetEntityType != null && Object.hasOwnProperty.call(message, "targetEntityType")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.targetEntityType); + return writer; + }; /** - * Calls UpdateEnvironment. - * @function updateEnvironment - * @memberof google.cloud.dialogflow.cx.v3.Environments - * @instance - * @param {google.cloud.dialogflow.cx.v3.IUpdateEnvironmentRequest} request UpdateEnvironmentRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Environments.UpdateEnvironmentCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 + * Encodes the specified ImportEntityTypesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IImportEntityTypesRequest} message ImportEntityTypesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(Environments.prototype.updateEnvironment = function updateEnvironment(request, callback) { - return this.rpcCall(updateEnvironment, $root.google.cloud.dialogflow.cx.v3.UpdateEnvironmentRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UpdateEnvironment" }); + ImportEntityTypesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Calls UpdateEnvironment. - * @function updateEnvironment - * @memberof google.cloud.dialogflow.cx.v3.Environments - * @instance - * @param {google.cloud.dialogflow.cx.v3.IUpdateEnvironmentRequest} request UpdateEnvironmentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Decodes an ImportEntityTypesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest + * @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.ImportEntityTypesRequest} ImportEntityTypesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + ImportEntityTypesRequest.decode = function decode(reader, length, error) { + 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.ImportEntityTypesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.entityTypesUri = reader.string(); + break; + } + case 3: { + message.entityTypesContent = $root.google.cloud.dialogflow.cx.v3.InlineSource.decode(reader, reader.uint32()); + break; + } + case 4: { + message.mergeOption = reader.int32(); + break; + } + case 5: { + message.targetEntityType = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Environments|deleteEnvironment}. - * @memberof google.cloud.dialogflow.cx.v3.Environments - * @typedef DeleteEnvironmentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty + * Decodes an ImportEntityTypesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest} ImportEntityTypesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + ImportEntityTypesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls DeleteEnvironment. - * @function deleteEnvironment - * @memberof google.cloud.dialogflow.cx.v3.Environments - * @instance - * @param {google.cloud.dialogflow.cx.v3.IDeleteEnvironmentRequest} request DeleteEnvironmentRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Environments.DeleteEnvironmentCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 + * Verifies an ImportEntityTypesRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Object.defineProperty(Environments.prototype.deleteEnvironment = function deleteEnvironment(request, callback) { - return this.rpcCall(deleteEnvironment, $root.google.cloud.dialogflow.cx.v3.DeleteEnvironmentRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteEnvironment" }); + ImportEntityTypesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.entityTypesUri != null && message.hasOwnProperty("entityTypesUri")) { + properties.entityTypes = 1; + if (!$util.isString(message.entityTypesUri)) + return "entityTypesUri: string expected"; + } + if (message.entityTypesContent != null && message.hasOwnProperty("entityTypesContent")) { + if (properties.entityTypes === 1) + return "entityTypes: multiple values"; + properties.entityTypes = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3.InlineSource.verify(message.entityTypesContent); + if (error) + return "entityTypesContent." + error; + } + } + if (message.mergeOption != null && message.hasOwnProperty("mergeOption")) + switch (message.mergeOption) { + default: + return "mergeOption: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.targetEntityType != null && message.hasOwnProperty("targetEntityType")) + if (!$util.isString(message.targetEntityType)) + return "targetEntityType: string expected"; + return null; + }; /** - * Calls DeleteEnvironment. - * @function deleteEnvironment - * @memberof google.cloud.dialogflow.cx.v3.Environments - * @instance - * @param {google.cloud.dialogflow.cx.v3.IDeleteEnvironmentRequest} request DeleteEnvironmentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates an ImportEntityTypesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest} ImportEntityTypesRequest */ + ImportEntityTypesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.entityTypesUri != null) + message.entityTypesUri = String(object.entityTypesUri); + if (object.entityTypesContent != null) { + if (typeof object.entityTypesContent !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.entityTypesContent: object expected"); + message.entityTypesContent = $root.google.cloud.dialogflow.cx.v3.InlineSource.fromObject(object.entityTypesContent); + } + switch (object.mergeOption) { + default: + if (typeof object.mergeOption === "number") { + message.mergeOption = object.mergeOption; + break; + } + break; + case "MERGE_OPTION_UNSPECIFIED": + case 0: + message.mergeOption = 0; + break; + case "REPLACE": + case 1: + message.mergeOption = 1; + break; + case "MERGE": + case 2: + message.mergeOption = 2; + break; + case "RENAME": + case 3: + message.mergeOption = 3; + break; + case "REPORT_CONFLICT": + case 4: + message.mergeOption = 4; + break; + case "KEEP": + case 5: + message.mergeOption = 5; + break; + } + if (object.targetEntityType != null) + message.targetEntityType = String(object.targetEntityType); + return message; + }; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Environments|lookupEnvironmentHistory}. - * @memberof google.cloud.dialogflow.cx.v3.Environments - * @typedef LookupEnvironmentHistoryCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryResponse} [response] LookupEnvironmentHistoryResponse - */ - - /** - * Calls LookupEnvironmentHistory. - * @function lookupEnvironmentHistory - * @memberof google.cloud.dialogflow.cx.v3.Environments - * @instance - * @param {google.cloud.dialogflow.cx.v3.ILookupEnvironmentHistoryRequest} request LookupEnvironmentHistoryRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Environments.LookupEnvironmentHistoryCallback} callback Node-style callback called with the error, if any, and LookupEnvironmentHistoryResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Environments.prototype.lookupEnvironmentHistory = function lookupEnvironmentHistory(request, callback) { - return this.rpcCall(lookupEnvironmentHistory, $root.google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryRequest, $root.google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryResponse, request, callback); - }, "name", { value: "LookupEnvironmentHistory" }); - - /** - * Calls LookupEnvironmentHistory. - * @function lookupEnvironmentHistory - * @memberof google.cloud.dialogflow.cx.v3.Environments - * @instance - * @param {google.cloud.dialogflow.cx.v3.ILookupEnvironmentHistoryRequest} request LookupEnvironmentHistoryRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Environments|runContinuousTest}. - * @memberof google.cloud.dialogflow.cx.v3.Environments - * @typedef RunContinuousTestCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls RunContinuousTest. - * @function runContinuousTest - * @memberof google.cloud.dialogflow.cx.v3.Environments - * @instance - * @param {google.cloud.dialogflow.cx.v3.IRunContinuousTestRequest} request RunContinuousTestRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Environments.RunContinuousTestCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Environments.prototype.runContinuousTest = function runContinuousTest(request, callback) { - return this.rpcCall(runContinuousTest, $root.google.cloud.dialogflow.cx.v3.RunContinuousTestRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "RunContinuousTest" }); - - /** - * Calls RunContinuousTest. - * @function runContinuousTest - * @memberof google.cloud.dialogflow.cx.v3.Environments - * @instance - * @param {google.cloud.dialogflow.cx.v3.IRunContinuousTestRequest} request RunContinuousTestRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Environments|listContinuousTestResults}. - * @memberof google.cloud.dialogflow.cx.v3.Environments - * @typedef ListContinuousTestResultsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.ListContinuousTestResultsResponse} [response] ListContinuousTestResultsResponse - */ - - /** - * Calls ListContinuousTestResults. - * @function listContinuousTestResults - * @memberof google.cloud.dialogflow.cx.v3.Environments - * @instance - * @param {google.cloud.dialogflow.cx.v3.IListContinuousTestResultsRequest} request ListContinuousTestResultsRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Environments.ListContinuousTestResultsCallback} callback Node-style callback called with the error, if any, and ListContinuousTestResultsResponse - * @returns {undefined} - * @variation 1 + * Creates a plain object from an ImportEntityTypesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest} message ImportEntityTypesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Object.defineProperty(Environments.prototype.listContinuousTestResults = function listContinuousTestResults(request, callback) { - return this.rpcCall(listContinuousTestResults, $root.google.cloud.dialogflow.cx.v3.ListContinuousTestResultsRequest, $root.google.cloud.dialogflow.cx.v3.ListContinuousTestResultsResponse, request, callback); - }, "name", { value: "ListContinuousTestResults" }); + ImportEntityTypesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.mergeOption = options.enums === String ? "MERGE_OPTION_UNSPECIFIED" : 0; + object.targetEntityType = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.entityTypesUri != null && message.hasOwnProperty("entityTypesUri")) { + object.entityTypesUri = message.entityTypesUri; + if (options.oneofs) + object.entityTypes = "entityTypesUri"; + } + if (message.entityTypesContent != null && message.hasOwnProperty("entityTypesContent")) { + object.entityTypesContent = $root.google.cloud.dialogflow.cx.v3.InlineSource.toObject(message.entityTypesContent, options); + if (options.oneofs) + object.entityTypes = "entityTypesContent"; + } + if (message.mergeOption != null && message.hasOwnProperty("mergeOption")) + object.mergeOption = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.MergeOption[message.mergeOption] === undefined ? message.mergeOption : $root.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.MergeOption[message.mergeOption] : message.mergeOption; + if (message.targetEntityType != null && message.hasOwnProperty("targetEntityType")) + object.targetEntityType = message.targetEntityType; + return object; + }; /** - * Calls ListContinuousTestResults. - * @function listContinuousTestResults - * @memberof google.cloud.dialogflow.cx.v3.Environments + * Converts this ImportEntityTypesRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest * @instance - * @param {google.cloud.dialogflow.cx.v3.IListContinuousTestResultsRequest} request ListContinuousTestResultsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Environments|deployFlow}. - * @memberof google.cloud.dialogflow.cx.v3.Environments - * @typedef DeployFlowCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * @returns {Object.} JSON object */ + ImportEntityTypesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Calls DeployFlow. - * @function deployFlow - * @memberof google.cloud.dialogflow.cx.v3.Environments - * @instance - * @param {google.cloud.dialogflow.cx.v3.IDeployFlowRequest} request DeployFlowRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Environments.DeployFlowCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 + * Gets the default type url for ImportEntityTypesRequest + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - Object.defineProperty(Environments.prototype.deployFlow = function deployFlow(request, callback) { - return this.rpcCall(deployFlow, $root.google.cloud.dialogflow.cx.v3.DeployFlowRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeployFlow" }); + ImportEntityTypesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest"; + }; /** - * Calls DeployFlow. - * @function deployFlow - * @memberof google.cloud.dialogflow.cx.v3.Environments - * @instance - * @param {google.cloud.dialogflow.cx.v3.IDeployFlowRequest} request DeployFlowRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * MergeOption enum. + * @name google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.MergeOption + * @enum {number} + * @property {number} MERGE_OPTION_UNSPECIFIED=0 MERGE_OPTION_UNSPECIFIED value + * @property {number} REPLACE=1 REPLACE value + * @property {number} MERGE=2 MERGE value + * @property {number} RENAME=3 RENAME value + * @property {number} REPORT_CONFLICT=4 REPORT_CONFLICT value + * @property {number} KEEP=5 KEEP value */ + ImportEntityTypesRequest.MergeOption = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MERGE_OPTION_UNSPECIFIED"] = 0; + values[valuesById[1] = "REPLACE"] = 1; + values[valuesById[2] = "MERGE"] = 2; + values[valuesById[3] = "RENAME"] = 3; + values[valuesById[4] = "REPORT_CONFLICT"] = 4; + values[valuesById[5] = "KEEP"] = 5; + return values; + })(); - return Environments; + return ImportEntityTypesRequest; })(); - v3.Environment = (function() { + v3.ImportEntityTypesResponse = (function() { /** - * Properties of an Environment. + * Properties of an ImportEntityTypesResponse. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IEnvironment - * @property {string|null} [name] Environment name - * @property {string|null} [displayName] Environment displayName - * @property {string|null} [description] Environment description - * @property {Array.|null} [versionConfigs] Environment versionConfigs - * @property {google.protobuf.ITimestamp|null} [updateTime] Environment updateTime - * @property {google.cloud.dialogflow.cx.v3.Environment.ITestCasesConfig|null} [testCasesConfig] Environment testCasesConfig - * @property {google.cloud.dialogflow.cx.v3.Environment.IWebhookConfig|null} [webhookConfig] Environment webhookConfig + * @interface IImportEntityTypesResponse + * @property {Array.|null} [entityTypes] ImportEntityTypesResponse entityTypes + * @property {google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.IConflictingResources|null} [conflictingResources] ImportEntityTypesResponse conflictingResources */ /** - * Constructs a new Environment. + * Constructs a new ImportEntityTypesResponse. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents an Environment. - * @implements IEnvironment + * @classdesc Represents an ImportEntityTypesResponse. + * @implements IImportEntityTypesResponse * @constructor - * @param {google.cloud.dialogflow.cx.v3.IEnvironment=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IImportEntityTypesResponse=} [properties] Properties to set */ - function Environment(properties) { - this.versionConfigs = []; + function ImportEntityTypesResponse(properties) { + this.entityTypes = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -37635,164 +38186,94 @@ } /** - * Environment name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.Environment - * @instance - */ - Environment.prototype.name = ""; - - /** - * Environment displayName. - * @member {string} displayName - * @memberof google.cloud.dialogflow.cx.v3.Environment - * @instance - */ - Environment.prototype.displayName = ""; - - /** - * Environment description. - * @member {string} description - * @memberof google.cloud.dialogflow.cx.v3.Environment - * @instance - */ - Environment.prototype.description = ""; - - /** - * Environment versionConfigs. - * @member {Array.} versionConfigs - * @memberof google.cloud.dialogflow.cx.v3.Environment - * @instance - */ - Environment.prototype.versionConfigs = $util.emptyArray; - - /** - * Environment updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.dialogflow.cx.v3.Environment - * @instance - */ - Environment.prototype.updateTime = null; - - /** - * Environment testCasesConfig. - * @member {google.cloud.dialogflow.cx.v3.Environment.ITestCasesConfig|null|undefined} testCasesConfig - * @memberof google.cloud.dialogflow.cx.v3.Environment + * ImportEntityTypesResponse entityTypes. + * @member {Array.} entityTypes + * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse * @instance */ - Environment.prototype.testCasesConfig = null; + ImportEntityTypesResponse.prototype.entityTypes = $util.emptyArray; /** - * Environment webhookConfig. - * @member {google.cloud.dialogflow.cx.v3.Environment.IWebhookConfig|null|undefined} webhookConfig - * @memberof google.cloud.dialogflow.cx.v3.Environment + * ImportEntityTypesResponse conflictingResources. + * @member {google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.IConflictingResources|null|undefined} conflictingResources + * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse * @instance */ - Environment.prototype.webhookConfig = null; + ImportEntityTypesResponse.prototype.conflictingResources = null; /** - * Creates a new Environment instance using the specified properties. + * Creates a new ImportEntityTypesResponse instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.Environment + * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IEnvironment=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.Environment} Environment instance + * @param {google.cloud.dialogflow.cx.v3.IImportEntityTypesResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse} ImportEntityTypesResponse instance */ - Environment.create = function create(properties) { - return new Environment(properties); + ImportEntityTypesResponse.create = function create(properties) { + return new ImportEntityTypesResponse(properties); }; /** - * Encodes the specified Environment message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Environment.verify|verify} messages. + * Encodes the specified ImportEntityTypesResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.Environment + * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IEnvironment} message Environment message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IImportEntityTypesResponse} message ImportEntityTypesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Environment.encode = function encode(message, writer) { + ImportEntityTypesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.versionConfigs != null && message.versionConfigs.length) - for (var i = 0; i < message.versionConfigs.length; ++i) - $root.google.cloud.dialogflow.cx.v3.Environment.VersionConfig.encode(message.versionConfigs[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.testCasesConfig != null && Object.hasOwnProperty.call(message, "testCasesConfig")) - $root.google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig.encode(message.testCasesConfig, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.webhookConfig != null && Object.hasOwnProperty.call(message, "webhookConfig")) - $root.google.cloud.dialogflow.cx.v3.Environment.WebhookConfig.encode(message.webhookConfig, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.entityTypes != null && message.entityTypes.length) + for (var i = 0; i < message.entityTypes.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.entityTypes[i]); + if (message.conflictingResources != null && Object.hasOwnProperty.call(message, "conflictingResources")) + $root.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources.encode(message.conflictingResources, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified Environment message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Environment.verify|verify} messages. + * Encodes the specified ImportEntityTypesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Environment + * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IEnvironment} message Environment message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IImportEntityTypesResponse} message ImportEntityTypesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Environment.encodeDelimited = function encodeDelimited(message, writer) { + ImportEntityTypesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Environment message from the specified reader or buffer. + * Decodes an ImportEntityTypesResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.Environment + * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse * @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.Environment} Environment + * @returns {google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse} ImportEntityTypesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Environment.decode = function decode(reader, length, error) { + ImportEntityTypesResponse.decode = function decode(reader, length, error) { 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.Environment(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.name = reader.string(); + if (!(message.entityTypes && message.entityTypes.length)) + message.entityTypes = []; + message.entityTypes.push(reader.string()); break; } case 2: { - message.displayName = reader.string(); - break; - } - case 3: { - message.description = reader.string(); - break; - } - case 6: { - if (!(message.versionConfigs && message.versionConfigs.length)) - message.versionConfigs = []; - message.versionConfigs.push($root.google.cloud.dialogflow.cx.v3.Environment.VersionConfig.decode(reader, reader.uint32())); - break; - } - case 5: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 7: { - message.testCasesConfig = $root.google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig.decode(reader, reader.uint32()); - break; - } - case 10: { - message.webhookConfig = $root.google.cloud.dialogflow.cx.v3.Environment.WebhookConfig.decode(reader, reader.uint32()); + message.conflictingResources = $root.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources.decode(reader, reader.uint32()); break; } default: @@ -37804,409 +38285,148 @@ }; /** - * Decodes an Environment message from the specified reader or buffer, length delimited. + * Decodes an ImportEntityTypesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Environment + * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.Environment} Environment + * @returns {google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse} ImportEntityTypesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Environment.decodeDelimited = function decodeDelimited(reader) { + ImportEntityTypesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Environment message. + * Verifies an ImportEntityTypesResponse message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.Environment + * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Environment.verify = function verify(message) { + ImportEntityTypesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.versionConfigs != null && message.hasOwnProperty("versionConfigs")) { - if (!Array.isArray(message.versionConfigs)) - return "versionConfigs: array expected"; - for (var i = 0; i < message.versionConfigs.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.Environment.VersionConfig.verify(message.versionConfigs[i]); - if (error) - return "versionConfigs." + error; - } - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - if (message.testCasesConfig != null && message.hasOwnProperty("testCasesConfig")) { - var error = $root.google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig.verify(message.testCasesConfig); - if (error) - return "testCasesConfig." + error; + if (message.entityTypes != null && message.hasOwnProperty("entityTypes")) { + if (!Array.isArray(message.entityTypes)) + return "entityTypes: array expected"; + for (var i = 0; i < message.entityTypes.length; ++i) + if (!$util.isString(message.entityTypes[i])) + return "entityTypes: string[] expected"; } - if (message.webhookConfig != null && message.hasOwnProperty("webhookConfig")) { - var error = $root.google.cloud.dialogflow.cx.v3.Environment.WebhookConfig.verify(message.webhookConfig); + if (message.conflictingResources != null && message.hasOwnProperty("conflictingResources")) { + var error = $root.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources.verify(message.conflictingResources); if (error) - return "webhookConfig." + error; + return "conflictingResources." + error; } return null; }; /** - * Creates an Environment message from a plain object. Also converts values to their respective internal types. + * Creates an ImportEntityTypesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.Environment + * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.Environment} Environment + * @returns {google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse} ImportEntityTypesResponse */ - Environment.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.Environment) + ImportEntityTypesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.Environment(); - if (object.name != null) - message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.description != null) - message.description = String(object.description); - if (object.versionConfigs) { - if (!Array.isArray(object.versionConfigs)) - throw TypeError(".google.cloud.dialogflow.cx.v3.Environment.versionConfigs: array expected"); - message.versionConfigs = []; - for (var i = 0; i < object.versionConfigs.length; ++i) { - if (typeof object.versionConfigs[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.Environment.versionConfigs: object expected"); - message.versionConfigs[i] = $root.google.cloud.dialogflow.cx.v3.Environment.VersionConfig.fromObject(object.versionConfigs[i]); - } - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.Environment.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.testCasesConfig != null) { - if (typeof object.testCasesConfig !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.Environment.testCasesConfig: object expected"); - message.testCasesConfig = $root.google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig.fromObject(object.testCasesConfig); + var message = new $root.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse(); + if (object.entityTypes) { + if (!Array.isArray(object.entityTypes)) + throw TypeError(".google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.entityTypes: array expected"); + message.entityTypes = []; + for (var i = 0; i < object.entityTypes.length; ++i) + message.entityTypes[i] = String(object.entityTypes[i]); } - if (object.webhookConfig != null) { - if (typeof object.webhookConfig !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.Environment.webhookConfig: object expected"); - message.webhookConfig = $root.google.cloud.dialogflow.cx.v3.Environment.WebhookConfig.fromObject(object.webhookConfig); + if (object.conflictingResources != null) { + if (typeof object.conflictingResources !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.conflictingResources: object expected"); + message.conflictingResources = $root.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources.fromObject(object.conflictingResources); } return message; }; /** - * Creates a plain object from an Environment message. Also converts values to other types if specified. + * Creates a plain object from an ImportEntityTypesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.Environment + * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse * @static - * @param {google.cloud.dialogflow.cx.v3.Environment} message Environment + * @param {google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse} message ImportEntityTypesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Environment.toObject = function toObject(message, options) { + ImportEntityTypesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.versionConfigs = []; - if (options.defaults) { - object.name = ""; - object.displayName = ""; - object.description = ""; - object.updateTime = null; - object.testCasesConfig = null; - object.webhookConfig = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (message.versionConfigs && message.versionConfigs.length) { - object.versionConfigs = []; - for (var j = 0; j < message.versionConfigs.length; ++j) - object.versionConfigs[j] = $root.google.cloud.dialogflow.cx.v3.Environment.VersionConfig.toObject(message.versionConfigs[j], options); + object.entityTypes = []; + if (options.defaults) + object.conflictingResources = null; + if (message.entityTypes && message.entityTypes.length) { + object.entityTypes = []; + for (var j = 0; j < message.entityTypes.length; ++j) + object.entityTypes[j] = message.entityTypes[j]; } - if (message.testCasesConfig != null && message.hasOwnProperty("testCasesConfig")) - object.testCasesConfig = $root.google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig.toObject(message.testCasesConfig, options); - if (message.webhookConfig != null && message.hasOwnProperty("webhookConfig")) - object.webhookConfig = $root.google.cloud.dialogflow.cx.v3.Environment.WebhookConfig.toObject(message.webhookConfig, options); + if (message.conflictingResources != null && message.hasOwnProperty("conflictingResources")) + object.conflictingResources = $root.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources.toObject(message.conflictingResources, options); return object; }; /** - * Converts this Environment to JSON. + * Converts this ImportEntityTypesResponse to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.Environment + * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse * @instance * @returns {Object.} JSON object */ - Environment.prototype.toJSON = function toJSON() { + ImportEntityTypesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Environment + * Gets the default type url for ImportEntityTypesResponse * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.Environment + * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Environment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ImportEntityTypesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Environment"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse"; }; - Environment.VersionConfig = (function() { - - /** - * Properties of a VersionConfig. - * @memberof google.cloud.dialogflow.cx.v3.Environment - * @interface IVersionConfig - * @property {string|null} [version] VersionConfig version - */ - - /** - * Constructs a new VersionConfig. - * @memberof google.cloud.dialogflow.cx.v3.Environment - * @classdesc Represents a VersionConfig. - * @implements IVersionConfig - * @constructor - * @param {google.cloud.dialogflow.cx.v3.Environment.IVersionConfig=} [properties] Properties to set - */ - function VersionConfig(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]]; - } - - /** - * VersionConfig version. - * @member {string} version - * @memberof google.cloud.dialogflow.cx.v3.Environment.VersionConfig - * @instance - */ - VersionConfig.prototype.version = ""; - - /** - * Creates a new VersionConfig instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.Environment.VersionConfig - * @static - * @param {google.cloud.dialogflow.cx.v3.Environment.IVersionConfig=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.Environment.VersionConfig} VersionConfig instance - */ - VersionConfig.create = function create(properties) { - return new VersionConfig(properties); - }; - - /** - * Encodes the specified VersionConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Environment.VersionConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.Environment.VersionConfig - * @static - * @param {google.cloud.dialogflow.cx.v3.Environment.IVersionConfig} message VersionConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VersionConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); - return writer; - }; - - /** - * Encodes the specified VersionConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Environment.VersionConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Environment.VersionConfig - * @static - * @param {google.cloud.dialogflow.cx.v3.Environment.IVersionConfig} message VersionConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VersionConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a VersionConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.Environment.VersionConfig - * @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.Environment.VersionConfig} VersionConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VersionConfig.decode = function decode(reader, length, error) { - 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.Environment.VersionConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.version = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a VersionConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Environment.VersionConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.Environment.VersionConfig} VersionConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VersionConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a VersionConfig message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.Environment.VersionConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - VersionConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.version != null && message.hasOwnProperty("version")) - if (!$util.isString(message.version)) - return "version: string expected"; - return null; - }; - - /** - * Creates a VersionConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.Environment.VersionConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.Environment.VersionConfig} VersionConfig - */ - VersionConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.Environment.VersionConfig) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.Environment.VersionConfig(); - if (object.version != null) - message.version = String(object.version); - return message; - }; - - /** - * Creates a plain object from a VersionConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.Environment.VersionConfig - * @static - * @param {google.cloud.dialogflow.cx.v3.Environment.VersionConfig} message VersionConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - VersionConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.version = ""; - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - return object; - }; - - /** - * Converts this VersionConfig to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.Environment.VersionConfig - * @instance - * @returns {Object.} JSON object - */ - VersionConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for VersionConfig - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.Environment.VersionConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - VersionConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Environment.VersionConfig"; - }; - - return VersionConfig; - })(); - - Environment.TestCasesConfig = (function() { + ImportEntityTypesResponse.ConflictingResources = (function() { /** - * Properties of a TestCasesConfig. - * @memberof google.cloud.dialogflow.cx.v3.Environment - * @interface ITestCasesConfig - * @property {Array.|null} [testCases] TestCasesConfig testCases - * @property {boolean|null} [enableContinuousRun] TestCasesConfig enableContinuousRun - * @property {boolean|null} [enablePredeploymentRun] TestCasesConfig enablePredeploymentRun + * Properties of a ConflictingResources. + * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse + * @interface IConflictingResources + * @property {Array.|null} [entityTypeDisplayNames] ConflictingResources entityTypeDisplayNames + * @property {Array.|null} [entityDisplayNames] ConflictingResources entityDisplayNames */ /** - * Constructs a new TestCasesConfig. - * @memberof google.cloud.dialogflow.cx.v3.Environment - * @classdesc Represents a TestCasesConfig. - * @implements ITestCasesConfig + * Constructs a new ConflictingResources. + * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse + * @classdesc Represents a ConflictingResources. + * @implements IConflictingResources * @constructor - * @param {google.cloud.dialogflow.cx.v3.Environment.ITestCasesConfig=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.IConflictingResources=} [properties] Properties to set */ - function TestCasesConfig(properties) { - this.testCases = []; + function ConflictingResources(properties) { + this.entityTypeDisplayNames = []; + this.entityDisplayNames = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -38214,108 +38434,97 @@ } /** - * TestCasesConfig testCases. - * @member {Array.} testCases - * @memberof google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig - * @instance - */ - TestCasesConfig.prototype.testCases = $util.emptyArray; - - /** - * TestCasesConfig enableContinuousRun. - * @member {boolean} enableContinuousRun - * @memberof google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig + * ConflictingResources entityTypeDisplayNames. + * @member {Array.} entityTypeDisplayNames + * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources * @instance */ - TestCasesConfig.prototype.enableContinuousRun = false; + ConflictingResources.prototype.entityTypeDisplayNames = $util.emptyArray; /** - * TestCasesConfig enablePredeploymentRun. - * @member {boolean} enablePredeploymentRun - * @memberof google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig + * ConflictingResources entityDisplayNames. + * @member {Array.} entityDisplayNames + * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources * @instance */ - TestCasesConfig.prototype.enablePredeploymentRun = false; + ConflictingResources.prototype.entityDisplayNames = $util.emptyArray; /** - * Creates a new TestCasesConfig instance using the specified properties. + * Creates a new ConflictingResources instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig + * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources * @static - * @param {google.cloud.dialogflow.cx.v3.Environment.ITestCasesConfig=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig} TestCasesConfig instance + * @param {google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.IConflictingResources=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources} ConflictingResources instance */ - TestCasesConfig.create = function create(properties) { - return new TestCasesConfig(properties); + ConflictingResources.create = function create(properties) { + return new ConflictingResources(properties); }; /** - * Encodes the specified TestCasesConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig.verify|verify} messages. + * Encodes the specified ConflictingResources message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig + * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources * @static - * @param {google.cloud.dialogflow.cx.v3.Environment.ITestCasesConfig} message TestCasesConfig message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.IConflictingResources} message ConflictingResources message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TestCasesConfig.encode = function encode(message, writer) { + ConflictingResources.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.testCases != null && message.testCases.length) - for (var i = 0; i < message.testCases.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.testCases[i]); - if (message.enableContinuousRun != null && Object.hasOwnProperty.call(message, "enableContinuousRun")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.enableContinuousRun); - if (message.enablePredeploymentRun != null && Object.hasOwnProperty.call(message, "enablePredeploymentRun")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.enablePredeploymentRun); + if (message.entityTypeDisplayNames != null && message.entityTypeDisplayNames.length) + for (var i = 0; i < message.entityTypeDisplayNames.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.entityTypeDisplayNames[i]); + if (message.entityDisplayNames != null && message.entityDisplayNames.length) + for (var i = 0; i < message.entityDisplayNames.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.entityDisplayNames[i]); return writer; }; /** - * Encodes the specified TestCasesConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig.verify|verify} messages. + * Encodes the specified ConflictingResources message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig + * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources * @static - * @param {google.cloud.dialogflow.cx.v3.Environment.ITestCasesConfig} message TestCasesConfig message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.IConflictingResources} message ConflictingResources message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TestCasesConfig.encodeDelimited = function encodeDelimited(message, writer) { + ConflictingResources.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TestCasesConfig message from the specified reader or buffer. + * Decodes a ConflictingResources message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig + * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources * @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.Environment.TestCasesConfig} TestCasesConfig + * @returns {google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources} ConflictingResources * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TestCasesConfig.decode = function decode(reader, length, error) { + ConflictingResources.decode = function decode(reader, length, error) { 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.Environment.TestCasesConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - if (!(message.testCases && message.testCases.length)) - message.testCases = []; - message.testCases.push(reader.string()); + if (!(message.entityTypeDisplayNames && message.entityTypeDisplayNames.length)) + message.entityTypeDisplayNames = []; + message.entityTypeDisplayNames.push(reader.string()); break; } case 2: { - message.enableContinuousRun = reader.bool(); - break; - } - case 3: { - message.enablePredeploymentRun = reader.bool(); + if (!(message.entityDisplayNames && message.entityDisplayNames.length)) + message.entityDisplayNames = []; + message.entityDisplayNames.push(reader.string()); break; } default: @@ -38327,383 +38536,338 @@ }; /** - * Decodes a TestCasesConfig message from the specified reader or buffer, length delimited. + * Decodes a ConflictingResources message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig + * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig} TestCasesConfig + * @returns {google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources} ConflictingResources * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TestCasesConfig.decodeDelimited = function decodeDelimited(reader) { + ConflictingResources.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TestCasesConfig message. + * Verifies a ConflictingResources message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig + * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TestCasesConfig.verify = function verify(message) { + ConflictingResources.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.testCases != null && message.hasOwnProperty("testCases")) { - if (!Array.isArray(message.testCases)) - return "testCases: array expected"; - for (var i = 0; i < message.testCases.length; ++i) - if (!$util.isString(message.testCases[i])) - return "testCases: string[] expected"; + if (message.entityTypeDisplayNames != null && message.hasOwnProperty("entityTypeDisplayNames")) { + if (!Array.isArray(message.entityTypeDisplayNames)) + return "entityTypeDisplayNames: array expected"; + for (var i = 0; i < message.entityTypeDisplayNames.length; ++i) + if (!$util.isString(message.entityTypeDisplayNames[i])) + return "entityTypeDisplayNames: string[] expected"; + } + if (message.entityDisplayNames != null && message.hasOwnProperty("entityDisplayNames")) { + if (!Array.isArray(message.entityDisplayNames)) + return "entityDisplayNames: array expected"; + for (var i = 0; i < message.entityDisplayNames.length; ++i) + if (!$util.isString(message.entityDisplayNames[i])) + return "entityDisplayNames: string[] expected"; } - if (message.enableContinuousRun != null && message.hasOwnProperty("enableContinuousRun")) - if (typeof message.enableContinuousRun !== "boolean") - return "enableContinuousRun: boolean expected"; - if (message.enablePredeploymentRun != null && message.hasOwnProperty("enablePredeploymentRun")) - if (typeof message.enablePredeploymentRun !== "boolean") - return "enablePredeploymentRun: boolean expected"; return null; }; /** - * Creates a TestCasesConfig message from a plain object. Also converts values to their respective internal types. + * Creates a ConflictingResources message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig + * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig} TestCasesConfig + * @returns {google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources} ConflictingResources */ - TestCasesConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig) + ConflictingResources.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig(); - if (object.testCases) { - if (!Array.isArray(object.testCases)) - throw TypeError(".google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig.testCases: array expected"); - message.testCases = []; - for (var i = 0; i < object.testCases.length; ++i) - message.testCases[i] = String(object.testCases[i]); + var message = new $root.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources(); + if (object.entityTypeDisplayNames) { + if (!Array.isArray(object.entityTypeDisplayNames)) + throw TypeError(".google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources.entityTypeDisplayNames: array expected"); + message.entityTypeDisplayNames = []; + for (var i = 0; i < object.entityTypeDisplayNames.length; ++i) + message.entityTypeDisplayNames[i] = String(object.entityTypeDisplayNames[i]); + } + if (object.entityDisplayNames) { + if (!Array.isArray(object.entityDisplayNames)) + throw TypeError(".google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources.entityDisplayNames: array expected"); + message.entityDisplayNames = []; + for (var i = 0; i < object.entityDisplayNames.length; ++i) + message.entityDisplayNames[i] = String(object.entityDisplayNames[i]); } - if (object.enableContinuousRun != null) - message.enableContinuousRun = Boolean(object.enableContinuousRun); - if (object.enablePredeploymentRun != null) - message.enablePredeploymentRun = Boolean(object.enablePredeploymentRun); return message; }; /** - * Creates a plain object from a TestCasesConfig message. Also converts values to other types if specified. + * Creates a plain object from a ConflictingResources message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig + * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources * @static - * @param {google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig} message TestCasesConfig + * @param {google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources} message ConflictingResources * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TestCasesConfig.toObject = function toObject(message, options) { + ConflictingResources.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.testCases = []; - if (options.defaults) { - object.enableContinuousRun = false; - object.enablePredeploymentRun = false; + if (options.arrays || options.defaults) { + object.entityTypeDisplayNames = []; + object.entityDisplayNames = []; } - if (message.testCases && message.testCases.length) { - object.testCases = []; - for (var j = 0; j < message.testCases.length; ++j) - object.testCases[j] = message.testCases[j]; + if (message.entityTypeDisplayNames && message.entityTypeDisplayNames.length) { + object.entityTypeDisplayNames = []; + for (var j = 0; j < message.entityTypeDisplayNames.length; ++j) + object.entityTypeDisplayNames[j] = message.entityTypeDisplayNames[j]; + } + if (message.entityDisplayNames && message.entityDisplayNames.length) { + object.entityDisplayNames = []; + for (var j = 0; j < message.entityDisplayNames.length; ++j) + object.entityDisplayNames[j] = message.entityDisplayNames[j]; } - if (message.enableContinuousRun != null && message.hasOwnProperty("enableContinuousRun")) - object.enableContinuousRun = message.enableContinuousRun; - if (message.enablePredeploymentRun != null && message.hasOwnProperty("enablePredeploymentRun")) - object.enablePredeploymentRun = message.enablePredeploymentRun; return object; }; /** - * Converts this TestCasesConfig to JSON. + * Converts this ConflictingResources to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig + * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources * @instance * @returns {Object.} JSON object */ - TestCasesConfig.prototype.toJSON = function toJSON() { + ConflictingResources.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for TestCasesConfig + * Gets the default type url for ConflictingResources * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig + * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - TestCasesConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ConflictingResources.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources"; }; - return TestCasesConfig; + return ConflictingResources; })(); - Environment.WebhookConfig = (function() { + return ImportEntityTypesResponse; + })(); - /** - * Properties of a WebhookConfig. - * @memberof google.cloud.dialogflow.cx.v3.Environment - * @interface IWebhookConfig - * @property {Array.|null} [webhookOverrides] WebhookConfig webhookOverrides - */ + v3.ImportEntityTypesMetadata = (function() { - /** - * Constructs a new WebhookConfig. - * @memberof google.cloud.dialogflow.cx.v3.Environment - * @classdesc Represents a WebhookConfig. - * @implements IWebhookConfig - * @constructor - * @param {google.cloud.dialogflow.cx.v3.Environment.IWebhookConfig=} [properties] Properties to set - */ - function WebhookConfig(properties) { - this.webhookOverrides = []; - 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]]; - } + /** + * Properties of an ImportEntityTypesMetadata. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IImportEntityTypesMetadata + */ - /** - * WebhookConfig webhookOverrides. - * @member {Array.} webhookOverrides - * @memberof google.cloud.dialogflow.cx.v3.Environment.WebhookConfig - * @instance - */ - WebhookConfig.prototype.webhookOverrides = $util.emptyArray; + /** + * Constructs a new ImportEntityTypesMetadata. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents an ImportEntityTypesMetadata. + * @implements IImportEntityTypesMetadata + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IImportEntityTypesMetadata=} [properties] Properties to set + */ + function ImportEntityTypesMetadata(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]]; + } - /** - * Creates a new WebhookConfig instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.Environment.WebhookConfig - * @static - * @param {google.cloud.dialogflow.cx.v3.Environment.IWebhookConfig=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.Environment.WebhookConfig} WebhookConfig instance - */ - WebhookConfig.create = function create(properties) { - return new WebhookConfig(properties); - }; + /** + * Creates a new ImportEntityTypesMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata + * @static + * @param {google.cloud.dialogflow.cx.v3.IImportEntityTypesMetadata=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata} ImportEntityTypesMetadata instance + */ + ImportEntityTypesMetadata.create = function create(properties) { + return new ImportEntityTypesMetadata(properties); + }; - /** - * Encodes the specified WebhookConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Environment.WebhookConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.Environment.WebhookConfig - * @static - * @param {google.cloud.dialogflow.cx.v3.Environment.IWebhookConfig} message WebhookConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WebhookConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.webhookOverrides != null && message.webhookOverrides.length) - for (var i = 0; i < message.webhookOverrides.length; ++i) - $root.google.cloud.dialogflow.cx.v3.Webhook.encode(message.webhookOverrides[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; + /** + * Encodes the specified ImportEntityTypesMetadata message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata + * @static + * @param {google.cloud.dialogflow.cx.v3.IImportEntityTypesMetadata} message ImportEntityTypesMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImportEntityTypesMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; - /** - * Encodes the specified WebhookConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Environment.WebhookConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Environment.WebhookConfig - * @static - * @param {google.cloud.dialogflow.cx.v3.Environment.IWebhookConfig} message WebhookConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WebhookConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified ImportEntityTypesMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata + * @static + * @param {google.cloud.dialogflow.cx.v3.IImportEntityTypesMetadata} message ImportEntityTypesMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImportEntityTypesMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a WebhookConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.Environment.WebhookConfig - * @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.Environment.WebhookConfig} WebhookConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WebhookConfig.decode = function decode(reader, length, error) { - 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.Environment.WebhookConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.webhookOverrides && message.webhookOverrides.length)) - message.webhookOverrides = []; - message.webhookOverrides.push($root.google.cloud.dialogflow.cx.v3.Webhook.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } + /** + * Decodes an ImportEntityTypesMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata + * @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.ImportEntityTypesMetadata} ImportEntityTypesMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImportEntityTypesMetadata.decode = function decode(reader, length, error) { + 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.ImportEntityTypesMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; } - return message; - }; - - /** - * Decodes a WebhookConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Environment.WebhookConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.Environment.WebhookConfig} WebhookConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WebhookConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + } + return message; + }; - /** - * Verifies a WebhookConfig message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.Environment.WebhookConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - WebhookConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.webhookOverrides != null && message.hasOwnProperty("webhookOverrides")) { - if (!Array.isArray(message.webhookOverrides)) - return "webhookOverrides: array expected"; - for (var i = 0; i < message.webhookOverrides.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.Webhook.verify(message.webhookOverrides[i]); - if (error) - return "webhookOverrides." + error; - } - } - return null; - }; + /** + * Decodes an ImportEntityTypesMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata} ImportEntityTypesMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImportEntityTypesMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a WebhookConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.Environment.WebhookConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.Environment.WebhookConfig} WebhookConfig - */ - WebhookConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.Environment.WebhookConfig) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.Environment.WebhookConfig(); - if (object.webhookOverrides) { - if (!Array.isArray(object.webhookOverrides)) - throw TypeError(".google.cloud.dialogflow.cx.v3.Environment.WebhookConfig.webhookOverrides: array expected"); - message.webhookOverrides = []; - for (var i = 0; i < object.webhookOverrides.length; ++i) { - if (typeof object.webhookOverrides[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.Environment.WebhookConfig.webhookOverrides: object expected"); - message.webhookOverrides[i] = $root.google.cloud.dialogflow.cx.v3.Webhook.fromObject(object.webhookOverrides[i]); - } - } - return message; - }; + /** + * Verifies an ImportEntityTypesMetadata message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ImportEntityTypesMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; - /** - * Creates a plain object from a WebhookConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.Environment.WebhookConfig - * @static - * @param {google.cloud.dialogflow.cx.v3.Environment.WebhookConfig} message WebhookConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - WebhookConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.webhookOverrides = []; - if (message.webhookOverrides && message.webhookOverrides.length) { - object.webhookOverrides = []; - for (var j = 0; j < message.webhookOverrides.length; ++j) - object.webhookOverrides[j] = $root.google.cloud.dialogflow.cx.v3.Webhook.toObject(message.webhookOverrides[j], options); - } + /** + * Creates an ImportEntityTypesMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata} ImportEntityTypesMetadata + */ + ImportEntityTypesMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata) return object; - }; + return new $root.google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata(); + }; - /** - * Converts this WebhookConfig to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.Environment.WebhookConfig - * @instance - * @returns {Object.} JSON object - */ - WebhookConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from an ImportEntityTypesMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata + * @static + * @param {google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata} message ImportEntityTypesMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ImportEntityTypesMetadata.toObject = function toObject() { + return {}; + }; - /** - * Gets the default type url for WebhookConfig - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.Environment.WebhookConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - WebhookConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Environment.WebhookConfig"; - }; + /** + * Converts this ImportEntityTypesMetadata to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata + * @instance + * @returns {Object.} JSON object + */ + ImportEntityTypesMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return WebhookConfig; - })(); + /** + * Gets the default type url for ImportEntityTypesMetadata + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ImportEntityTypesMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata"; + }; - return Environment; + return ImportEntityTypesMetadata; })(); - v3.ListEnvironmentsRequest = (function() { + v3.ListEntityTypesRequest = (function() { /** - * Properties of a ListEnvironmentsRequest. + * Properties of a ListEntityTypesRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IListEnvironmentsRequest - * @property {string|null} [parent] ListEnvironmentsRequest parent - * @property {number|null} [pageSize] ListEnvironmentsRequest pageSize - * @property {string|null} [pageToken] ListEnvironmentsRequest pageToken + * @interface IListEntityTypesRequest + * @property {string|null} [parent] ListEntityTypesRequest parent + * @property {string|null} [languageCode] ListEntityTypesRequest languageCode + * @property {number|null} [pageSize] ListEntityTypesRequest pageSize + * @property {string|null} [pageToken] ListEntityTypesRequest pageToken */ /** - * Constructs a new ListEnvironmentsRequest. + * Constructs a new ListEntityTypesRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a ListEnvironmentsRequest. - * @implements IListEnvironmentsRequest + * @classdesc Represents a ListEntityTypesRequest. + * @implements IListEntityTypesRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IListEnvironmentsRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IListEntityTypesRequest=} [properties] Properties to set */ - function ListEnvironmentsRequest(properties) { + function ListEntityTypesRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -38711,90 +38875,100 @@ } /** - * ListEnvironmentsRequest parent. + * ListEntityTypesRequest parent. * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3.ListEnvironmentsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesRequest * @instance */ - ListEnvironmentsRequest.prototype.parent = ""; + ListEntityTypesRequest.prototype.parent = ""; /** - * ListEnvironmentsRequest pageSize. + * ListEntityTypesRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesRequest + * @instance + */ + ListEntityTypesRequest.prototype.languageCode = ""; + + /** + * ListEntityTypesRequest pageSize. * @member {number} pageSize - * @memberof google.cloud.dialogflow.cx.v3.ListEnvironmentsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesRequest * @instance */ - ListEnvironmentsRequest.prototype.pageSize = 0; + ListEntityTypesRequest.prototype.pageSize = 0; /** - * ListEnvironmentsRequest pageToken. + * ListEntityTypesRequest pageToken. * @member {string} pageToken - * @memberof google.cloud.dialogflow.cx.v3.ListEnvironmentsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesRequest * @instance */ - ListEnvironmentsRequest.prototype.pageToken = ""; + ListEntityTypesRequest.prototype.pageToken = ""; /** - * Creates a new ListEnvironmentsRequest instance using the specified properties. + * Creates a new ListEntityTypesRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.ListEnvironmentsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IListEnvironmentsRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ListEnvironmentsRequest} ListEnvironmentsRequest instance + * @param {google.cloud.dialogflow.cx.v3.IListEntityTypesRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ListEntityTypesRequest} ListEntityTypesRequest instance */ - ListEnvironmentsRequest.create = function create(properties) { - return new ListEnvironmentsRequest(properties); + ListEntityTypesRequest.create = function create(properties) { + return new ListEntityTypesRequest(properties); }; /** - * Encodes the specified ListEnvironmentsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListEnvironmentsRequest.verify|verify} messages. + * Encodes the specified ListEntityTypesRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListEntityTypesRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ListEnvironmentsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IListEnvironmentsRequest} message ListEnvironmentsRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListEntityTypesRequest} message ListEntityTypesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListEnvironmentsRequest.encode = function encode(message, writer) { + ListEntityTypesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); return writer; }; /** - * Encodes the specified ListEnvironmentsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListEnvironmentsRequest.verify|verify} messages. + * Encodes the specified ListEntityTypesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListEntityTypesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListEnvironmentsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IListEnvironmentsRequest} message ListEnvironmentsRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListEntityTypesRequest} message ListEntityTypesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListEnvironmentsRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListEntityTypesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListEnvironmentsRequest message from the specified reader or buffer. + * Decodes a ListEntityTypesRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ListEnvironmentsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesRequest * @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.ListEnvironmentsRequest} ListEnvironmentsRequest + * @returns {google.cloud.dialogflow.cx.v3.ListEntityTypesRequest} ListEntityTypesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListEnvironmentsRequest.decode = function decode(reader, length, error) { + ListEntityTypesRequest.decode = function decode(reader, length, error) { 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.ListEnvironmentsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ListEntityTypesRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -38805,10 +38979,14 @@ break; } case 2: { - message.pageSize = reader.int32(); + message.languageCode = reader.string(); break; } case 3: { + message.pageSize = reader.int32(); + break; + } + case 4: { message.pageToken = reader.string(); break; } @@ -38821,35 +38999,38 @@ }; /** - * Decodes a ListEnvironmentsRequest message from the specified reader or buffer, length delimited. + * Decodes a ListEntityTypesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListEnvironmentsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ListEnvironmentsRequest} ListEnvironmentsRequest + * @returns {google.cloud.dialogflow.cx.v3.ListEntityTypesRequest} ListEntityTypesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListEnvironmentsRequest.decodeDelimited = function decodeDelimited(reader) { + ListEntityTypesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListEnvironmentsRequest message. + * Verifies a ListEntityTypesRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ListEnvironmentsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListEnvironmentsRequest.verify = function verify(message) { + ListEntityTypesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.parent != null && message.hasOwnProperty("parent")) if (!$util.isString(message.parent)) return "parent: string expected"; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; if (message.pageSize != null && message.hasOwnProperty("pageSize")) if (!$util.isInteger(message.pageSize)) return "pageSize: integer expected"; @@ -38860,19 +39041,21 @@ }; /** - * Creates a ListEnvironmentsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListEntityTypesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ListEnvironmentsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ListEnvironmentsRequest} ListEnvironmentsRequest + * @returns {google.cloud.dialogflow.cx.v3.ListEntityTypesRequest} ListEntityTypesRequest */ - ListEnvironmentsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListEnvironmentsRequest) + ListEntityTypesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListEntityTypesRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.ListEnvironmentsRequest(); + var message = new $root.google.cloud.dialogflow.cx.v3.ListEntityTypesRequest(); if (object.parent != null) message.parent = String(object.parent); + if (object.languageCode != null) + message.languageCode = String(object.languageCode); if (object.pageSize != null) message.pageSize = object.pageSize | 0; if (object.pageToken != null) @@ -38881,25 +39064,28 @@ }; /** - * Creates a plain object from a ListEnvironmentsRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListEntityTypesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ListEnvironmentsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesRequest * @static - * @param {google.cloud.dialogflow.cx.v3.ListEnvironmentsRequest} message ListEnvironmentsRequest + * @param {google.cloud.dialogflow.cx.v3.ListEntityTypesRequest} message ListEntityTypesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListEnvironmentsRequest.toObject = function toObject(message, options) { + ListEntityTypesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.parent = ""; + object.languageCode = ""; object.pageSize = 0; object.pageToken = ""; } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; if (message.pageSize != null && message.hasOwnProperty("pageSize")) object.pageSize = message.pageSize; if (message.pageToken != null && message.hasOwnProperty("pageToken")) @@ -38908,54 +39094,54 @@ }; /** - * Converts this ListEnvironmentsRequest to JSON. + * Converts this ListEntityTypesRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ListEnvironmentsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesRequest * @instance * @returns {Object.} JSON object */ - ListEnvironmentsRequest.prototype.toJSON = function toJSON() { + ListEntityTypesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListEnvironmentsRequest + * Gets the default type url for ListEntityTypesRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.ListEnvironmentsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListEnvironmentsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListEntityTypesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListEnvironmentsRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListEntityTypesRequest"; }; - return ListEnvironmentsRequest; + return ListEntityTypesRequest; })(); - v3.ListEnvironmentsResponse = (function() { + v3.ListEntityTypesResponse = (function() { /** - * Properties of a ListEnvironmentsResponse. + * Properties of a ListEntityTypesResponse. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IListEnvironmentsResponse - * @property {Array.|null} [environments] ListEnvironmentsResponse environments - * @property {string|null} [nextPageToken] ListEnvironmentsResponse nextPageToken + * @interface IListEntityTypesResponse + * @property {Array.|null} [entityTypes] ListEntityTypesResponse entityTypes + * @property {string|null} [nextPageToken] ListEntityTypesResponse nextPageToken */ /** - * Constructs a new ListEnvironmentsResponse. + * Constructs a new ListEntityTypesResponse. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a ListEnvironmentsResponse. - * @implements IListEnvironmentsResponse + * @classdesc Represents a ListEntityTypesResponse. + * @implements IListEntityTypesResponse * @constructor - * @param {google.cloud.dialogflow.cx.v3.IListEnvironmentsResponse=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IListEntityTypesResponse=} [properties] Properties to set */ - function ListEnvironmentsResponse(properties) { - this.environments = []; + function ListEntityTypesResponse(properties) { + this.entityTypes = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -38963,90 +39149,90 @@ } /** - * ListEnvironmentsResponse environments. - * @member {Array.} environments - * @memberof google.cloud.dialogflow.cx.v3.ListEnvironmentsResponse + * ListEntityTypesResponse entityTypes. + * @member {Array.} entityTypes + * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesResponse * @instance */ - ListEnvironmentsResponse.prototype.environments = $util.emptyArray; + ListEntityTypesResponse.prototype.entityTypes = $util.emptyArray; /** - * ListEnvironmentsResponse nextPageToken. + * ListEntityTypesResponse nextPageToken. * @member {string} nextPageToken - * @memberof google.cloud.dialogflow.cx.v3.ListEnvironmentsResponse + * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesResponse * @instance */ - ListEnvironmentsResponse.prototype.nextPageToken = ""; + ListEntityTypesResponse.prototype.nextPageToken = ""; /** - * Creates a new ListEnvironmentsResponse instance using the specified properties. + * Creates a new ListEntityTypesResponse instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.ListEnvironmentsResponse + * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IListEnvironmentsResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ListEnvironmentsResponse} ListEnvironmentsResponse instance + * @param {google.cloud.dialogflow.cx.v3.IListEntityTypesResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ListEntityTypesResponse} ListEntityTypesResponse instance */ - ListEnvironmentsResponse.create = function create(properties) { - return new ListEnvironmentsResponse(properties); + ListEntityTypesResponse.create = function create(properties) { + return new ListEntityTypesResponse(properties); }; /** - * Encodes the specified ListEnvironmentsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListEnvironmentsResponse.verify|verify} messages. + * Encodes the specified ListEntityTypesResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListEntityTypesResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ListEnvironmentsResponse + * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IListEnvironmentsResponse} message ListEnvironmentsResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListEntityTypesResponse} message ListEntityTypesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListEnvironmentsResponse.encode = function encode(message, writer) { + ListEntityTypesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.environments != null && message.environments.length) - for (var i = 0; i < message.environments.length; ++i) - $root.google.cloud.dialogflow.cx.v3.Environment.encode(message.environments[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.entityTypes != null && message.entityTypes.length) + for (var i = 0; i < message.entityTypes.length; ++i) + $root.google.cloud.dialogflow.cx.v3.EntityType.encode(message.entityTypes[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; /** - * Encodes the specified ListEnvironmentsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListEnvironmentsResponse.verify|verify} messages. + * Encodes the specified ListEntityTypesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListEntityTypesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListEnvironmentsResponse + * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IListEnvironmentsResponse} message ListEnvironmentsResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListEntityTypesResponse} message ListEntityTypesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListEnvironmentsResponse.encodeDelimited = function encodeDelimited(message, writer) { + ListEntityTypesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListEnvironmentsResponse message from the specified reader or buffer. + * Decodes a ListEntityTypesResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ListEnvironmentsResponse + * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesResponse * @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.ListEnvironmentsResponse} ListEnvironmentsResponse + * @returns {google.cloud.dialogflow.cx.v3.ListEntityTypesResponse} ListEntityTypesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListEnvironmentsResponse.decode = function decode(reader, length, error) { + ListEntityTypesResponse.decode = function decode(reader, length, error) { 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.ListEnvironmentsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ListEntityTypesResponse(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - if (!(message.environments && message.environments.length)) - message.environments = []; - message.environments.push($root.google.cloud.dialogflow.cx.v3.Environment.decode(reader, reader.uint32())); + if (!(message.entityTypes && message.entityTypes.length)) + message.entityTypes = []; + message.entityTypes.push($root.google.cloud.dialogflow.cx.v3.EntityType.decode(reader, reader.uint32())); break; } case 2: { @@ -39062,39 +39248,39 @@ }; /** - * Decodes a ListEnvironmentsResponse message from the specified reader or buffer, length delimited. + * Decodes a ListEntityTypesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListEnvironmentsResponse + * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ListEnvironmentsResponse} ListEnvironmentsResponse + * @returns {google.cloud.dialogflow.cx.v3.ListEntityTypesResponse} ListEntityTypesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListEnvironmentsResponse.decodeDelimited = function decodeDelimited(reader) { + ListEntityTypesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListEnvironmentsResponse message. + * Verifies a ListEntityTypesResponse message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ListEnvironmentsResponse + * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListEnvironmentsResponse.verify = function verify(message) { + ListEntityTypesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.environments != null && message.hasOwnProperty("environments")) { - if (!Array.isArray(message.environments)) - return "environments: array expected"; - for (var i = 0; i < message.environments.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.Environment.verify(message.environments[i]); + if (message.entityTypes != null && message.hasOwnProperty("entityTypes")) { + if (!Array.isArray(message.entityTypes)) + return "entityTypes: array expected"; + for (var i = 0; i < message.entityTypes.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.EntityType.verify(message.entityTypes[i]); if (error) - return "environments." + error; + return "entityTypes." + error; } } if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) @@ -39104,25 +39290,25 @@ }; /** - * Creates a ListEnvironmentsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListEntityTypesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ListEnvironmentsResponse + * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ListEnvironmentsResponse} ListEnvironmentsResponse + * @returns {google.cloud.dialogflow.cx.v3.ListEntityTypesResponse} ListEntityTypesResponse */ - ListEnvironmentsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListEnvironmentsResponse) + ListEntityTypesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListEntityTypesResponse) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.ListEnvironmentsResponse(); - if (object.environments) { - if (!Array.isArray(object.environments)) - throw TypeError(".google.cloud.dialogflow.cx.v3.ListEnvironmentsResponse.environments: array expected"); - message.environments = []; - for (var i = 0; i < object.environments.length; ++i) { - if (typeof object.environments[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.ListEnvironmentsResponse.environments: object expected"); - message.environments[i] = $root.google.cloud.dialogflow.cx.v3.Environment.fromObject(object.environments[i]); + var message = new $root.google.cloud.dialogflow.cx.v3.ListEntityTypesResponse(); + if (object.entityTypes) { + if (!Array.isArray(object.entityTypes)) + throw TypeError(".google.cloud.dialogflow.cx.v3.ListEntityTypesResponse.entityTypes: array expected"); + message.entityTypes = []; + for (var i = 0; i < object.entityTypes.length; ++i) { + if (typeof object.entityTypes[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.ListEntityTypesResponse.entityTypes: object expected"); + message.entityTypes[i] = $root.google.cloud.dialogflow.cx.v3.EntityType.fromObject(object.entityTypes[i]); } } if (object.nextPageToken != null) @@ -39131,26 +39317,26 @@ }; /** - * Creates a plain object from a ListEnvironmentsResponse message. Also converts values to other types if specified. + * Creates a plain object from a ListEntityTypesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ListEnvironmentsResponse + * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesResponse * @static - * @param {google.cloud.dialogflow.cx.v3.ListEnvironmentsResponse} message ListEnvironmentsResponse + * @param {google.cloud.dialogflow.cx.v3.ListEntityTypesResponse} message ListEntityTypesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListEnvironmentsResponse.toObject = function toObject(message, options) { + ListEntityTypesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.environments = []; + object.entityTypes = []; if (options.defaults) object.nextPageToken = ""; - if (message.environments && message.environments.length) { - object.environments = []; - for (var j = 0; j < message.environments.length; ++j) - object.environments[j] = $root.google.cloud.dialogflow.cx.v3.Environment.toObject(message.environments[j], options); + if (message.entityTypes && message.entityTypes.length) { + object.entityTypes = []; + for (var j = 0; j < message.entityTypes.length; ++j) + object.entityTypes[j] = $root.google.cloud.dialogflow.cx.v3.EntityType.toObject(message.entityTypes[j], options); } if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) object.nextPageToken = message.nextPageToken; @@ -39158,52 +39344,53 @@ }; /** - * Converts this ListEnvironmentsResponse to JSON. + * Converts this ListEntityTypesResponse to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ListEnvironmentsResponse + * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesResponse * @instance * @returns {Object.} JSON object */ - ListEnvironmentsResponse.prototype.toJSON = function toJSON() { + ListEntityTypesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListEnvironmentsResponse + * Gets the default type url for ListEntityTypesResponse * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.ListEnvironmentsResponse + * @memberof google.cloud.dialogflow.cx.v3.ListEntityTypesResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListEnvironmentsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListEntityTypesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListEnvironmentsResponse"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListEntityTypesResponse"; }; - return ListEnvironmentsResponse; + return ListEntityTypesResponse; })(); - v3.GetEnvironmentRequest = (function() { + v3.GetEntityTypeRequest = (function() { /** - * Properties of a GetEnvironmentRequest. + * Properties of a GetEntityTypeRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IGetEnvironmentRequest - * @property {string|null} [name] GetEnvironmentRequest name + * @interface IGetEntityTypeRequest + * @property {string|null} [name] GetEntityTypeRequest name + * @property {string|null} [languageCode] GetEntityTypeRequest languageCode */ /** - * Constructs a new GetEnvironmentRequest. + * Constructs a new GetEntityTypeRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a GetEnvironmentRequest. - * @implements IGetEnvironmentRequest + * @classdesc Represents a GetEntityTypeRequest. + * @implements IGetEntityTypeRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IGetEnvironmentRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IGetEntityTypeRequest=} [properties] Properties to set */ - function GetEnvironmentRequest(properties) { + function GetEntityTypeRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -39211,70 +39398,80 @@ } /** - * GetEnvironmentRequest name. + * GetEntityTypeRequest name. * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.GetEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3.GetEntityTypeRequest * @instance */ - GetEnvironmentRequest.prototype.name = ""; + GetEntityTypeRequest.prototype.name = ""; /** - * Creates a new GetEnvironmentRequest instance using the specified properties. + * GetEntityTypeRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3.GetEntityTypeRequest + * @instance + */ + GetEntityTypeRequest.prototype.languageCode = ""; + + /** + * Creates a new GetEntityTypeRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.GetEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3.GetEntityTypeRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IGetEnvironmentRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.GetEnvironmentRequest} GetEnvironmentRequest instance + * @param {google.cloud.dialogflow.cx.v3.IGetEntityTypeRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.GetEntityTypeRequest} GetEntityTypeRequest instance */ - GetEnvironmentRequest.create = function create(properties) { - return new GetEnvironmentRequest(properties); + GetEntityTypeRequest.create = function create(properties) { + return new GetEntityTypeRequest(properties); }; /** - * Encodes the specified GetEnvironmentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetEnvironmentRequest.verify|verify} messages. + * Encodes the specified GetEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetEntityTypeRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.GetEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3.GetEntityTypeRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IGetEnvironmentRequest} message GetEnvironmentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IGetEntityTypeRequest} message GetEntityTypeRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetEnvironmentRequest.encode = function encode(message, writer) { + GetEntityTypeRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); return writer; }; /** - * Encodes the specified GetEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetEnvironmentRequest.verify|verify} messages. + * Encodes the specified GetEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetEntityTypeRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.GetEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3.GetEntityTypeRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IGetEnvironmentRequest} message GetEnvironmentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IGetEntityTypeRequest} message GetEntityTypeRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetEnvironmentRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetEntityTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetEnvironmentRequest message from the specified reader or buffer. + * Decodes a GetEntityTypeRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.GetEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3.GetEntityTypeRequest * @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.GetEnvironmentRequest} GetEnvironmentRequest + * @returns {google.cloud.dialogflow.cx.v3.GetEntityTypeRequest} GetEntityTypeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetEnvironmentRequest.decode = function decode(reader, length, error) { + GetEntityTypeRequest.decode = function decode(reader, length, error) { 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.GetEnvironmentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.GetEntityTypeRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -39284,6 +39481,10 @@ message.name = reader.string(); break; } + case 2: { + message.languageCode = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -39293,123 +39494,133 @@ }; /** - * Decodes a GetEnvironmentRequest message from the specified reader or buffer, length delimited. + * Decodes a GetEntityTypeRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.GetEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3.GetEntityTypeRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.GetEnvironmentRequest} GetEnvironmentRequest + * @returns {google.cloud.dialogflow.cx.v3.GetEntityTypeRequest} GetEntityTypeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetEnvironmentRequest.decodeDelimited = function decodeDelimited(reader) { + GetEntityTypeRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetEnvironmentRequest message. + * Verifies a GetEntityTypeRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.GetEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3.GetEntityTypeRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetEnvironmentRequest.verify = function verify(message) { + GetEntityTypeRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; return null; }; /** - * Creates a GetEnvironmentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetEntityTypeRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.GetEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3.GetEntityTypeRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.GetEnvironmentRequest} GetEnvironmentRequest + * @returns {google.cloud.dialogflow.cx.v3.GetEntityTypeRequest} GetEntityTypeRequest */ - GetEnvironmentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.GetEnvironmentRequest) + GetEntityTypeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.GetEntityTypeRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.GetEnvironmentRequest(); + var message = new $root.google.cloud.dialogflow.cx.v3.GetEntityTypeRequest(); if (object.name != null) message.name = String(object.name); + if (object.languageCode != null) + message.languageCode = String(object.languageCode); return message; }; /** - * Creates a plain object from a GetEnvironmentRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetEntityTypeRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.GetEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3.GetEntityTypeRequest * @static - * @param {google.cloud.dialogflow.cx.v3.GetEnvironmentRequest} message GetEnvironmentRequest + * @param {google.cloud.dialogflow.cx.v3.GetEntityTypeRequest} message GetEntityTypeRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetEnvironmentRequest.toObject = function toObject(message, options) { + GetEntityTypeRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { object.name = ""; + object.languageCode = ""; + } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; return object; }; /** - * Converts this GetEnvironmentRequest to JSON. + * Converts this GetEntityTypeRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.GetEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3.GetEntityTypeRequest * @instance * @returns {Object.} JSON object */ - GetEnvironmentRequest.prototype.toJSON = function toJSON() { + GetEntityTypeRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetEnvironmentRequest + * Gets the default type url for GetEntityTypeRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.GetEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3.GetEntityTypeRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetEnvironmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetEntityTypeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.GetEnvironmentRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.GetEntityTypeRequest"; }; - return GetEnvironmentRequest; + return GetEntityTypeRequest; })(); - v3.CreateEnvironmentRequest = (function() { + v3.CreateEntityTypeRequest = (function() { /** - * Properties of a CreateEnvironmentRequest. + * Properties of a CreateEntityTypeRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface ICreateEnvironmentRequest - * @property {string|null} [parent] CreateEnvironmentRequest parent - * @property {google.cloud.dialogflow.cx.v3.IEnvironment|null} [environment] CreateEnvironmentRequest environment + * @interface ICreateEntityTypeRequest + * @property {string|null} [parent] CreateEntityTypeRequest parent + * @property {google.cloud.dialogflow.cx.v3.IEntityType|null} [entityType] CreateEntityTypeRequest entityType + * @property {string|null} [languageCode] CreateEntityTypeRequest languageCode */ /** - * Constructs a new CreateEnvironmentRequest. + * Constructs a new CreateEntityTypeRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a CreateEnvironmentRequest. - * @implements ICreateEnvironmentRequest + * @classdesc Represents a CreateEntityTypeRequest. + * @implements ICreateEntityTypeRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.ICreateEnvironmentRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.ICreateEntityTypeRequest=} [properties] Properties to set */ - function CreateEnvironmentRequest(properties) { + function CreateEntityTypeRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -39417,80 +39628,90 @@ } /** - * CreateEnvironmentRequest parent. + * CreateEntityTypeRequest parent. * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3.CreateEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest * @instance */ - CreateEnvironmentRequest.prototype.parent = ""; + CreateEntityTypeRequest.prototype.parent = ""; /** - * CreateEnvironmentRequest environment. - * @member {google.cloud.dialogflow.cx.v3.IEnvironment|null|undefined} environment - * @memberof google.cloud.dialogflow.cx.v3.CreateEnvironmentRequest + * CreateEntityTypeRequest entityType. + * @member {google.cloud.dialogflow.cx.v3.IEntityType|null|undefined} entityType + * @memberof google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest * @instance */ - CreateEnvironmentRequest.prototype.environment = null; + CreateEntityTypeRequest.prototype.entityType = null; /** - * Creates a new CreateEnvironmentRequest instance using the specified properties. + * CreateEntityTypeRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest + * @instance + */ + CreateEntityTypeRequest.prototype.languageCode = ""; + + /** + * Creates a new CreateEntityTypeRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.CreateEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest * @static - * @param {google.cloud.dialogflow.cx.v3.ICreateEnvironmentRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.CreateEnvironmentRequest} CreateEnvironmentRequest instance + * @param {google.cloud.dialogflow.cx.v3.ICreateEntityTypeRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest} CreateEntityTypeRequest instance */ - CreateEnvironmentRequest.create = function create(properties) { - return new CreateEnvironmentRequest(properties); + CreateEntityTypeRequest.create = function create(properties) { + return new CreateEntityTypeRequest(properties); }; /** - * Encodes the specified CreateEnvironmentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateEnvironmentRequest.verify|verify} messages. + * Encodes the specified CreateEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.CreateEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest * @static - * @param {google.cloud.dialogflow.cx.v3.ICreateEnvironmentRequest} message CreateEnvironmentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ICreateEntityTypeRequest} message CreateEntityTypeRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateEnvironmentRequest.encode = function encode(message, writer) { + CreateEntityTypeRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) - $root.google.cloud.dialogflow.cx.v3.Environment.encode(message.environment, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.entityType != null && Object.hasOwnProperty.call(message, "entityType")) + $root.google.cloud.dialogflow.cx.v3.EntityType.encode(message.entityType, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.languageCode); return writer; }; /** - * Encodes the specified CreateEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateEnvironmentRequest.verify|verify} messages. + * Encodes the specified CreateEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.CreateEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest * @static - * @param {google.cloud.dialogflow.cx.v3.ICreateEnvironmentRequest} message CreateEnvironmentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ICreateEntityTypeRequest} message CreateEntityTypeRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateEnvironmentRequest.encodeDelimited = function encodeDelimited(message, writer) { + CreateEntityTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateEnvironmentRequest message from the specified reader or buffer. + * Decodes a CreateEntityTypeRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.CreateEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest * @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.CreateEnvironmentRequest} CreateEnvironmentRequest + * @returns {google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest} CreateEntityTypeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateEnvironmentRequest.decode = function decode(reader, length, error) { + CreateEntityTypeRequest.decode = function decode(reader, length, error) { 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.CreateEnvironmentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -39501,7 +39722,11 @@ break; } case 2: { - message.environment = $root.google.cloud.dialogflow.cx.v3.Environment.decode(reader, reader.uint32()); + message.entityType = $root.google.cloud.dialogflow.cx.v3.EntityType.decode(reader, reader.uint32()); + break; + } + case 3: { + message.languageCode = reader.string(); break; } default: @@ -39513,137 +39738,146 @@ }; /** - * Decodes a CreateEnvironmentRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateEntityTypeRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.CreateEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.CreateEnvironmentRequest} CreateEnvironmentRequest + * @returns {google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest} CreateEntityTypeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateEnvironmentRequest.decodeDelimited = function decodeDelimited(reader) { + CreateEntityTypeRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateEnvironmentRequest message. + * Verifies a CreateEntityTypeRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.CreateEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateEnvironmentRequest.verify = function verify(message) { + CreateEntityTypeRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.parent != null && message.hasOwnProperty("parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.environment != null && message.hasOwnProperty("environment")) { - var error = $root.google.cloud.dialogflow.cx.v3.Environment.verify(message.environment); + if (message.entityType != null && message.hasOwnProperty("entityType")) { + var error = $root.google.cloud.dialogflow.cx.v3.EntityType.verify(message.entityType); if (error) - return "environment." + error; + return "entityType." + error; } + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; return null; }; /** - * Creates a CreateEnvironmentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateEntityTypeRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.CreateEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.CreateEnvironmentRequest} CreateEnvironmentRequest + * @returns {google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest} CreateEntityTypeRequest */ - CreateEnvironmentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.CreateEnvironmentRequest) + CreateEntityTypeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.CreateEnvironmentRequest(); + var message = new $root.google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest(); if (object.parent != null) message.parent = String(object.parent); - if (object.environment != null) { - if (typeof object.environment !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.CreateEnvironmentRequest.environment: object expected"); - message.environment = $root.google.cloud.dialogflow.cx.v3.Environment.fromObject(object.environment); + if (object.entityType != null) { + if (typeof object.entityType !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest.entityType: object expected"); + message.entityType = $root.google.cloud.dialogflow.cx.v3.EntityType.fromObject(object.entityType); } + if (object.languageCode != null) + message.languageCode = String(object.languageCode); return message; }; /** - * Creates a plain object from a CreateEnvironmentRequest message. Also converts values to other types if specified. + * Creates a plain object from a CreateEntityTypeRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.CreateEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest * @static - * @param {google.cloud.dialogflow.cx.v3.CreateEnvironmentRequest} message CreateEnvironmentRequest + * @param {google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest} message CreateEntityTypeRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateEnvironmentRequest.toObject = function toObject(message, options) { + CreateEntityTypeRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.parent = ""; - object.environment = null; + object.entityType = null; + object.languageCode = ""; } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; - if (message.environment != null && message.hasOwnProperty("environment")) - object.environment = $root.google.cloud.dialogflow.cx.v3.Environment.toObject(message.environment, options); + if (message.entityType != null && message.hasOwnProperty("entityType")) + object.entityType = $root.google.cloud.dialogflow.cx.v3.EntityType.toObject(message.entityType, options); + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; return object; }; /** - * Converts this CreateEnvironmentRequest to JSON. + * Converts this CreateEntityTypeRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.CreateEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest * @instance * @returns {Object.} JSON object */ - CreateEnvironmentRequest.prototype.toJSON = function toJSON() { + CreateEntityTypeRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateEnvironmentRequest + * Gets the default type url for CreateEntityTypeRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.CreateEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateEnvironmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateEntityTypeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.CreateEnvironmentRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest"; }; - return CreateEnvironmentRequest; + return CreateEntityTypeRequest; })(); - v3.UpdateEnvironmentRequest = (function() { + v3.UpdateEntityTypeRequest = (function() { /** - * Properties of an UpdateEnvironmentRequest. + * Properties of an UpdateEntityTypeRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IUpdateEnvironmentRequest - * @property {google.cloud.dialogflow.cx.v3.IEnvironment|null} [environment] UpdateEnvironmentRequest environment - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateEnvironmentRequest updateMask + * @interface IUpdateEntityTypeRequest + * @property {google.cloud.dialogflow.cx.v3.IEntityType|null} [entityType] UpdateEntityTypeRequest entityType + * @property {string|null} [languageCode] UpdateEntityTypeRequest languageCode + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateEntityTypeRequest updateMask */ /** - * Constructs a new UpdateEnvironmentRequest. + * Constructs a new UpdateEntityTypeRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents an UpdateEnvironmentRequest. - * @implements IUpdateEnvironmentRequest + * @classdesc Represents an UpdateEntityTypeRequest. + * @implements IUpdateEntityTypeRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IUpdateEnvironmentRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IUpdateEntityTypeRequest=} [properties] Properties to set */ - function UpdateEnvironmentRequest(properties) { + function UpdateEntityTypeRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -39651,90 +39885,104 @@ } /** - * UpdateEnvironmentRequest environment. - * @member {google.cloud.dialogflow.cx.v3.IEnvironment|null|undefined} environment - * @memberof google.cloud.dialogflow.cx.v3.UpdateEnvironmentRequest + * UpdateEntityTypeRequest entityType. + * @member {google.cloud.dialogflow.cx.v3.IEntityType|null|undefined} entityType + * @memberof google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest * @instance */ - UpdateEnvironmentRequest.prototype.environment = null; + UpdateEntityTypeRequest.prototype.entityType = null; /** - * UpdateEnvironmentRequest updateMask. + * UpdateEntityTypeRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest + * @instance + */ + UpdateEntityTypeRequest.prototype.languageCode = ""; + + /** + * UpdateEntityTypeRequest updateMask. * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.dialogflow.cx.v3.UpdateEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest * @instance */ - UpdateEnvironmentRequest.prototype.updateMask = null; + UpdateEntityTypeRequest.prototype.updateMask = null; /** - * Creates a new UpdateEnvironmentRequest instance using the specified properties. + * Creates a new UpdateEntityTypeRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.UpdateEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IUpdateEnvironmentRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.UpdateEnvironmentRequest} UpdateEnvironmentRequest instance + * @param {google.cloud.dialogflow.cx.v3.IUpdateEntityTypeRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest} UpdateEntityTypeRequest instance */ - UpdateEnvironmentRequest.create = function create(properties) { - return new UpdateEnvironmentRequest(properties); + UpdateEntityTypeRequest.create = function create(properties) { + return new UpdateEntityTypeRequest(properties); }; /** - * Encodes the specified UpdateEnvironmentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateEnvironmentRequest.verify|verify} messages. + * Encodes the specified UpdateEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.UpdateEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IUpdateEnvironmentRequest} message UpdateEnvironmentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IUpdateEntityTypeRequest} message UpdateEntityTypeRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateEnvironmentRequest.encode = function encode(message, writer) { + UpdateEntityTypeRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) - $root.google.cloud.dialogflow.cx.v3.Environment.encode(message.environment, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.entityType != null && Object.hasOwnProperty.call(message, "entityType")) + $root.google.cloud.dialogflow.cx.v3.EntityType.encode(message.entityType, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified UpdateEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateEnvironmentRequest.verify|verify} messages. + * Encodes the specified UpdateEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.UpdateEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IUpdateEnvironmentRequest} message UpdateEnvironmentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IUpdateEntityTypeRequest} message UpdateEntityTypeRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateEnvironmentRequest.encodeDelimited = function encodeDelimited(message, writer) { + UpdateEntityTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateEnvironmentRequest message from the specified reader or buffer. + * Decodes an UpdateEntityTypeRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.UpdateEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest * @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.UpdateEnvironmentRequest} UpdateEnvironmentRequest + * @returns {google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest} UpdateEntityTypeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateEnvironmentRequest.decode = function decode(reader, length, error) { + UpdateEntityTypeRequest.decode = function decode(reader, length, error) { 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.UpdateEnvironmentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.environment = $root.google.cloud.dialogflow.cx.v3.Environment.decode(reader, reader.uint32()); + message.entityType = $root.google.cloud.dialogflow.cx.v3.EntityType.decode(reader, reader.uint32()); break; } case 2: { + message.languageCode = reader.string(); + break; + } + case 3: { message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; } @@ -39747,37 +39995,40 @@ }; /** - * Decodes an UpdateEnvironmentRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateEntityTypeRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.UpdateEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.UpdateEnvironmentRequest} UpdateEnvironmentRequest + * @returns {google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest} UpdateEntityTypeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateEnvironmentRequest.decodeDelimited = function decodeDelimited(reader) { + UpdateEntityTypeRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateEnvironmentRequest message. + * Verifies an UpdateEntityTypeRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.UpdateEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateEnvironmentRequest.verify = function verify(message) { + UpdateEntityTypeRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.environment != null && message.hasOwnProperty("environment")) { - var error = $root.google.cloud.dialogflow.cx.v3.Environment.verify(message.environment); + if (message.entityType != null && message.hasOwnProperty("entityType")) { + var error = $root.google.cloud.dialogflow.cx.v3.EntityType.verify(message.entityType); if (error) - return "environment." + error; + return "entityType." + error; } + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; if (message.updateMask != null && message.hasOwnProperty("updateMask")) { var error = $root.google.protobuf.FieldMask.verify(message.updateMask); if (error) @@ -39787,101 +40038,107 @@ }; /** - * Creates an UpdateEnvironmentRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateEntityTypeRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.UpdateEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.UpdateEnvironmentRequest} UpdateEnvironmentRequest + * @returns {google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest} UpdateEntityTypeRequest */ - UpdateEnvironmentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.UpdateEnvironmentRequest) + UpdateEntityTypeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.UpdateEnvironmentRequest(); - if (object.environment != null) { - if (typeof object.environment !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.UpdateEnvironmentRequest.environment: object expected"); - message.environment = $root.google.cloud.dialogflow.cx.v3.Environment.fromObject(object.environment); + var message = new $root.google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest(); + if (object.entityType != null) { + if (typeof object.entityType !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest.entityType: object expected"); + message.entityType = $root.google.cloud.dialogflow.cx.v3.EntityType.fromObject(object.entityType); } + if (object.languageCode != null) + message.languageCode = String(object.languageCode); if (object.updateMask != null) { if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.UpdateEnvironmentRequest.updateMask: object expected"); + throw TypeError(".google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest.updateMask: object expected"); message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } return message; }; /** - * Creates a plain object from an UpdateEnvironmentRequest message. Also converts values to other types if specified. + * Creates a plain object from an UpdateEntityTypeRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.UpdateEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest * @static - * @param {google.cloud.dialogflow.cx.v3.UpdateEnvironmentRequest} message UpdateEnvironmentRequest + * @param {google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest} message UpdateEntityTypeRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateEnvironmentRequest.toObject = function toObject(message, options) { + UpdateEntityTypeRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.environment = null; + object.entityType = null; + object.languageCode = ""; object.updateMask = null; } - if (message.environment != null && message.hasOwnProperty("environment")) - object.environment = $root.google.cloud.dialogflow.cx.v3.Environment.toObject(message.environment, options); + if (message.entityType != null && message.hasOwnProperty("entityType")) + object.entityType = $root.google.cloud.dialogflow.cx.v3.EntityType.toObject(message.entityType, options); + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; if (message.updateMask != null && message.hasOwnProperty("updateMask")) object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; /** - * Converts this UpdateEnvironmentRequest to JSON. + * Converts this UpdateEntityTypeRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.UpdateEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest * @instance * @returns {Object.} JSON object */ - UpdateEnvironmentRequest.prototype.toJSON = function toJSON() { + UpdateEntityTypeRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UpdateEnvironmentRequest + * Gets the default type url for UpdateEntityTypeRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.UpdateEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UpdateEnvironmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UpdateEntityTypeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.UpdateEnvironmentRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest"; }; - return UpdateEnvironmentRequest; + return UpdateEntityTypeRequest; })(); - v3.DeleteEnvironmentRequest = (function() { + v3.DeleteEntityTypeRequest = (function() { /** - * Properties of a DeleteEnvironmentRequest. + * Properties of a DeleteEntityTypeRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IDeleteEnvironmentRequest - * @property {string|null} [name] DeleteEnvironmentRequest name + * @interface IDeleteEntityTypeRequest + * @property {string|null} [name] DeleteEntityTypeRequest name + * @property {boolean|null} [force] DeleteEntityTypeRequest force */ /** - * Constructs a new DeleteEnvironmentRequest. + * Constructs a new DeleteEntityTypeRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a DeleteEnvironmentRequest. - * @implements IDeleteEnvironmentRequest + * @classdesc Represents a DeleteEntityTypeRequest. + * @implements IDeleteEntityTypeRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IDeleteEnvironmentRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IDeleteEntityTypeRequest=} [properties] Properties to set */ - function DeleteEnvironmentRequest(properties) { + function DeleteEntityTypeRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -39889,70 +40146,80 @@ } /** - * DeleteEnvironmentRequest name. + * DeleteEntityTypeRequest name. * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.DeleteEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest * @instance */ - DeleteEnvironmentRequest.prototype.name = ""; + DeleteEntityTypeRequest.prototype.name = ""; /** - * Creates a new DeleteEnvironmentRequest instance using the specified properties. + * DeleteEntityTypeRequest force. + * @member {boolean} force + * @memberof google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest + * @instance + */ + DeleteEntityTypeRequest.prototype.force = false; + + /** + * Creates a new DeleteEntityTypeRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.DeleteEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IDeleteEnvironmentRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.DeleteEnvironmentRequest} DeleteEnvironmentRequest instance + * @param {google.cloud.dialogflow.cx.v3.IDeleteEntityTypeRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest} DeleteEntityTypeRequest instance */ - DeleteEnvironmentRequest.create = function create(properties) { - return new DeleteEnvironmentRequest(properties); + DeleteEntityTypeRequest.create = function create(properties) { + return new DeleteEntityTypeRequest(properties); }; /** - * Encodes the specified DeleteEnvironmentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteEnvironmentRequest.verify|verify} messages. + * Encodes the specified DeleteEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.DeleteEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IDeleteEnvironmentRequest} message DeleteEnvironmentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IDeleteEntityTypeRequest} message DeleteEntityTypeRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteEnvironmentRequest.encode = function encode(message, writer) { + DeleteEntityTypeRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.force != null && Object.hasOwnProperty.call(message, "force")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.force); return writer; }; /** - * Encodes the specified DeleteEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteEnvironmentRequest.verify|verify} messages. + * Encodes the specified DeleteEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.DeleteEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IDeleteEnvironmentRequest} message DeleteEnvironmentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IDeleteEntityTypeRequest} message DeleteEntityTypeRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteEnvironmentRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeleteEntityTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteEnvironmentRequest message from the specified reader or buffer. + * Decodes a DeleteEntityTypeRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.DeleteEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest * @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.DeleteEnvironmentRequest} DeleteEnvironmentRequest + * @returns {google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest} DeleteEntityTypeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteEnvironmentRequest.decode = function decode(reader, length, error) { + DeleteEntityTypeRequest.decode = function decode(reader, length, error) { 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.DeleteEnvironmentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -39962,6 +40229,10 @@ message.name = reader.string(); break; } + case 2: { + message.force = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -39971,124 +40242,131 @@ }; /** - * Decodes a DeleteEnvironmentRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteEntityTypeRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.DeleteEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.DeleteEnvironmentRequest} DeleteEnvironmentRequest + * @returns {google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest} DeleteEntityTypeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteEnvironmentRequest.decodeDelimited = function decodeDelimited(reader) { + DeleteEntityTypeRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteEnvironmentRequest message. + * Verifies a DeleteEntityTypeRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.DeleteEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteEnvironmentRequest.verify = function verify(message) { + DeleteEntityTypeRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; + if (message.force != null && message.hasOwnProperty("force")) + if (typeof message.force !== "boolean") + return "force: boolean expected"; return null; }; /** - * Creates a DeleteEnvironmentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteEntityTypeRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.DeleteEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.DeleteEnvironmentRequest} DeleteEnvironmentRequest + * @returns {google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest} DeleteEntityTypeRequest */ - DeleteEnvironmentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.DeleteEnvironmentRequest) + DeleteEntityTypeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.DeleteEnvironmentRequest(); + var message = new $root.google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest(); if (object.name != null) message.name = String(object.name); + if (object.force != null) + message.force = Boolean(object.force); return message; }; /** - * Creates a plain object from a DeleteEnvironmentRequest message. Also converts values to other types if specified. + * Creates a plain object from a DeleteEntityTypeRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.DeleteEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest * @static - * @param {google.cloud.dialogflow.cx.v3.DeleteEnvironmentRequest} message DeleteEnvironmentRequest + * @param {google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest} message DeleteEntityTypeRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteEnvironmentRequest.toObject = function toObject(message, options) { + DeleteEntityTypeRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { object.name = ""; + object.force = false; + } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; + if (message.force != null && message.hasOwnProperty("force")) + object.force = message.force; return object; }; /** - * Converts this DeleteEnvironmentRequest to JSON. + * Converts this DeleteEntityTypeRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.DeleteEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest * @instance * @returns {Object.} JSON object */ - DeleteEnvironmentRequest.prototype.toJSON = function toJSON() { + DeleteEntityTypeRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeleteEnvironmentRequest + * Gets the default type url for DeleteEntityTypeRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.DeleteEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeleteEnvironmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeleteEntityTypeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.DeleteEnvironmentRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest"; }; - return DeleteEnvironmentRequest; + return DeleteEntityTypeRequest; })(); - v3.LookupEnvironmentHistoryRequest = (function() { + v3.InlineDestination = (function() { /** - * Properties of a LookupEnvironmentHistoryRequest. + * Properties of an InlineDestination. * @memberof google.cloud.dialogflow.cx.v3 - * @interface ILookupEnvironmentHistoryRequest - * @property {string|null} [name] LookupEnvironmentHistoryRequest name - * @property {number|null} [pageSize] LookupEnvironmentHistoryRequest pageSize - * @property {string|null} [pageToken] LookupEnvironmentHistoryRequest pageToken + * @interface IInlineDestination + * @property {Uint8Array|null} [content] InlineDestination content */ /** - * Constructs a new LookupEnvironmentHistoryRequest. + * Constructs a new InlineDestination. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a LookupEnvironmentHistoryRequest. - * @implements ILookupEnvironmentHistoryRequest + * @classdesc Represents an InlineDestination. + * @implements IInlineDestination * @constructor - * @param {google.cloud.dialogflow.cx.v3.ILookupEnvironmentHistoryRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IInlineDestination=} [properties] Properties to set */ - function LookupEnvironmentHistoryRequest(properties) { + function InlineDestination(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -40096,105 +40374,77 @@ } /** - * LookupEnvironmentHistoryRequest name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryRequest - * @instance - */ - LookupEnvironmentHistoryRequest.prototype.name = ""; - - /** - * LookupEnvironmentHistoryRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryRequest - * @instance - */ - LookupEnvironmentHistoryRequest.prototype.pageSize = 0; - - /** - * LookupEnvironmentHistoryRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryRequest + * InlineDestination content. + * @member {Uint8Array} content + * @memberof google.cloud.dialogflow.cx.v3.InlineDestination * @instance */ - LookupEnvironmentHistoryRequest.prototype.pageToken = ""; + InlineDestination.prototype.content = $util.newBuffer([]); /** - * Creates a new LookupEnvironmentHistoryRequest instance using the specified properties. + * Creates a new InlineDestination instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryRequest + * @memberof google.cloud.dialogflow.cx.v3.InlineDestination * @static - * @param {google.cloud.dialogflow.cx.v3.ILookupEnvironmentHistoryRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryRequest} LookupEnvironmentHistoryRequest instance + * @param {google.cloud.dialogflow.cx.v3.IInlineDestination=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.InlineDestination} InlineDestination instance */ - LookupEnvironmentHistoryRequest.create = function create(properties) { - return new LookupEnvironmentHistoryRequest(properties); + InlineDestination.create = function create(properties) { + return new InlineDestination(properties); }; /** - * Encodes the specified LookupEnvironmentHistoryRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryRequest.verify|verify} messages. + * Encodes the specified InlineDestination message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.InlineDestination.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryRequest + * @memberof google.cloud.dialogflow.cx.v3.InlineDestination * @static - * @param {google.cloud.dialogflow.cx.v3.ILookupEnvironmentHistoryRequest} message LookupEnvironmentHistoryRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IInlineDestination} message InlineDestination message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LookupEnvironmentHistoryRequest.encode = function encode(message, writer) { + InlineDestination.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.content != null && Object.hasOwnProperty.call(message, "content")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.content); return writer; }; /** - * Encodes the specified LookupEnvironmentHistoryRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryRequest.verify|verify} messages. + * Encodes the specified InlineDestination message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.InlineDestination.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryRequest + * @memberof google.cloud.dialogflow.cx.v3.InlineDestination * @static - * @param {google.cloud.dialogflow.cx.v3.ILookupEnvironmentHistoryRequest} message LookupEnvironmentHistoryRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IInlineDestination} message InlineDestination message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LookupEnvironmentHistoryRequest.encodeDelimited = function encodeDelimited(message, writer) { + InlineDestination.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a LookupEnvironmentHistoryRequest message from the specified reader or buffer. + * Decodes an InlineDestination message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryRequest + * @memberof google.cloud.dialogflow.cx.v3.InlineDestination * @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.LookupEnvironmentHistoryRequest} LookupEnvironmentHistoryRequest + * @returns {google.cloud.dialogflow.cx.v3.InlineDestination} InlineDestination * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LookupEnvironmentHistoryRequest.decode = function decode(reader, length, error) { + InlineDestination.decode = function decode(reader, length, error) { 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.LookupEnvironmentHistoryRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.InlineDestination(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); + message.content = reader.bytes(); break; } default: @@ -40206,141 +40456,131 @@ }; /** - * Decodes a LookupEnvironmentHistoryRequest message from the specified reader or buffer, length delimited. + * Decodes an InlineDestination message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryRequest + * @memberof google.cloud.dialogflow.cx.v3.InlineDestination * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryRequest} LookupEnvironmentHistoryRequest + * @returns {google.cloud.dialogflow.cx.v3.InlineDestination} InlineDestination * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LookupEnvironmentHistoryRequest.decodeDelimited = function decodeDelimited(reader) { + InlineDestination.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a LookupEnvironmentHistoryRequest message. + * Verifies an InlineDestination message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryRequest + * @memberof google.cloud.dialogflow.cx.v3.InlineDestination * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - LookupEnvironmentHistoryRequest.verify = function verify(message) { + InlineDestination.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; + if (message.content != null && message.hasOwnProperty("content")) + if (!(message.content && typeof message.content.length === "number" || $util.isString(message.content))) + return "content: buffer expected"; return null; }; /** - * Creates a LookupEnvironmentHistoryRequest message from a plain object. Also converts values to their respective internal types. + * Creates an InlineDestination message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryRequest + * @memberof google.cloud.dialogflow.cx.v3.InlineDestination * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryRequest} LookupEnvironmentHistoryRequest + * @returns {google.cloud.dialogflow.cx.v3.InlineDestination} InlineDestination */ - LookupEnvironmentHistoryRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryRequest) + InlineDestination.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.InlineDestination) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); + var message = new $root.google.cloud.dialogflow.cx.v3.InlineDestination(); + if (object.content != null) + if (typeof object.content === "string") + $util.base64.decode(object.content, message.content = $util.newBuffer($util.base64.length(object.content)), 0); + else if (object.content.length >= 0) + message.content = object.content; return message; }; /** - * Creates a plain object from a LookupEnvironmentHistoryRequest message. Also converts values to other types if specified. + * Creates a plain object from an InlineDestination message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryRequest + * @memberof google.cloud.dialogflow.cx.v3.InlineDestination * @static - * @param {google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryRequest} message LookupEnvironmentHistoryRequest + * @param {google.cloud.dialogflow.cx.v3.InlineDestination} message InlineDestination * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LookupEnvironmentHistoryRequest.toObject = function toObject(message, options) { + InlineDestination.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - object.pageSize = 0; - object.pageToken = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; + if (options.defaults) + if (options.bytes === String) + object.content = ""; + else { + object.content = []; + if (options.bytes !== Array) + object.content = $util.newBuffer(object.content); + } + if (message.content != null && message.hasOwnProperty("content")) + object.content = options.bytes === String ? $util.base64.encode(message.content, 0, message.content.length) : options.bytes === Array ? Array.prototype.slice.call(message.content) : message.content; return object; }; /** - * Converts this LookupEnvironmentHistoryRequest to JSON. + * Converts this InlineDestination to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryRequest + * @memberof google.cloud.dialogflow.cx.v3.InlineDestination * @instance * @returns {Object.} JSON object */ - LookupEnvironmentHistoryRequest.prototype.toJSON = function toJSON() { + InlineDestination.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for LookupEnvironmentHistoryRequest + * Gets the default type url for InlineDestination * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryRequest + * @memberof google.cloud.dialogflow.cx.v3.InlineDestination * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - LookupEnvironmentHistoryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + InlineDestination.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.InlineDestination"; }; - return LookupEnvironmentHistoryRequest; + return InlineDestination; })(); - v3.LookupEnvironmentHistoryResponse = (function() { + v3.InlineSource = (function() { /** - * Properties of a LookupEnvironmentHistoryResponse. + * Properties of an InlineSource. * @memberof google.cloud.dialogflow.cx.v3 - * @interface ILookupEnvironmentHistoryResponse - * @property {Array.|null} [environments] LookupEnvironmentHistoryResponse environments - * @property {string|null} [nextPageToken] LookupEnvironmentHistoryResponse nextPageToken + * @interface IInlineSource + * @property {Uint8Array|null} [content] InlineSource content */ /** - * Constructs a new LookupEnvironmentHistoryResponse. + * Constructs a new InlineSource. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a LookupEnvironmentHistoryResponse. - * @implements ILookupEnvironmentHistoryResponse + * @classdesc Represents an InlineSource. + * @implements IInlineSource * @constructor - * @param {google.cloud.dialogflow.cx.v3.ILookupEnvironmentHistoryResponse=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IInlineSource=} [properties] Properties to set */ - function LookupEnvironmentHistoryResponse(properties) { - this.environments = []; + function InlineSource(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -40348,94 +40588,77 @@ } /** - * LookupEnvironmentHistoryResponse environments. - * @member {Array.} environments - * @memberof google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryResponse - * @instance - */ - LookupEnvironmentHistoryResponse.prototype.environments = $util.emptyArray; - - /** - * LookupEnvironmentHistoryResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryResponse + * InlineSource content. + * @member {Uint8Array} content + * @memberof google.cloud.dialogflow.cx.v3.InlineSource * @instance */ - LookupEnvironmentHistoryResponse.prototype.nextPageToken = ""; + InlineSource.prototype.content = $util.newBuffer([]); /** - * Creates a new LookupEnvironmentHistoryResponse instance using the specified properties. + * Creates a new InlineSource instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryResponse + * @memberof google.cloud.dialogflow.cx.v3.InlineSource * @static - * @param {google.cloud.dialogflow.cx.v3.ILookupEnvironmentHistoryResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryResponse} LookupEnvironmentHistoryResponse instance + * @param {google.cloud.dialogflow.cx.v3.IInlineSource=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.InlineSource} InlineSource instance */ - LookupEnvironmentHistoryResponse.create = function create(properties) { - return new LookupEnvironmentHistoryResponse(properties); + InlineSource.create = function create(properties) { + return new InlineSource(properties); }; /** - * Encodes the specified LookupEnvironmentHistoryResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryResponse.verify|verify} messages. + * Encodes the specified InlineSource message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.InlineSource.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryResponse + * @memberof google.cloud.dialogflow.cx.v3.InlineSource * @static - * @param {google.cloud.dialogflow.cx.v3.ILookupEnvironmentHistoryResponse} message LookupEnvironmentHistoryResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IInlineSource} message InlineSource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LookupEnvironmentHistoryResponse.encode = function encode(message, writer) { + InlineSource.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.environments != null && message.environments.length) - for (var i = 0; i < message.environments.length; ++i) - $root.google.cloud.dialogflow.cx.v3.Environment.encode(message.environments[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.content != null && Object.hasOwnProperty.call(message, "content")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.content); return writer; }; /** - * Encodes the specified LookupEnvironmentHistoryResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryResponse.verify|verify} messages. + * Encodes the specified InlineSource message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.InlineSource.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryResponse + * @memberof google.cloud.dialogflow.cx.v3.InlineSource * @static - * @param {google.cloud.dialogflow.cx.v3.ILookupEnvironmentHistoryResponse} message LookupEnvironmentHistoryResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IInlineSource} message InlineSource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LookupEnvironmentHistoryResponse.encodeDelimited = function encodeDelimited(message, writer) { + InlineSource.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a LookupEnvironmentHistoryResponse message from the specified reader or buffer. + * Decodes an InlineSource message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryResponse + * @memberof google.cloud.dialogflow.cx.v3.InlineSource * @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.LookupEnvironmentHistoryResponse} LookupEnvironmentHistoryResponse + * @returns {google.cloud.dialogflow.cx.v3.InlineSource} InlineSource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LookupEnvironmentHistoryResponse.decode = function decode(reader, length, error) { + InlineSource.decode = function decode(reader, length, error) { 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.LookupEnvironmentHistoryResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.InlineSource(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - if (!(message.environments && message.environments.length)) - message.environments = []; - message.environments.push($root.google.cloud.dialogflow.cx.v3.Environment.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); + message.content = reader.bytes(); break; } default: @@ -40447,690 +40670,470 @@ }; /** - * Decodes a LookupEnvironmentHistoryResponse message from the specified reader or buffer, length delimited. + * Decodes an InlineSource message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryResponse + * @memberof google.cloud.dialogflow.cx.v3.InlineSource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryResponse} LookupEnvironmentHistoryResponse + * @returns {google.cloud.dialogflow.cx.v3.InlineSource} InlineSource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LookupEnvironmentHistoryResponse.decodeDelimited = function decodeDelimited(reader) { + InlineSource.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a LookupEnvironmentHistoryResponse message. + * Verifies an InlineSource message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryResponse + * @memberof google.cloud.dialogflow.cx.v3.InlineSource * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - LookupEnvironmentHistoryResponse.verify = function verify(message) { + InlineSource.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.environments != null && message.hasOwnProperty("environments")) { - if (!Array.isArray(message.environments)) - return "environments: array expected"; - for (var i = 0; i < message.environments.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.Environment.verify(message.environments[i]); - if (error) - return "environments." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; + if (message.content != null && message.hasOwnProperty("content")) + if (!(message.content && typeof message.content.length === "number" || $util.isString(message.content))) + return "content: buffer expected"; return null; }; /** - * Creates a LookupEnvironmentHistoryResponse message from a plain object. Also converts values to their respective internal types. + * Creates an InlineSource message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryResponse + * @memberof google.cloud.dialogflow.cx.v3.InlineSource * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryResponse} LookupEnvironmentHistoryResponse + * @returns {google.cloud.dialogflow.cx.v3.InlineSource} InlineSource */ - LookupEnvironmentHistoryResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryResponse) + InlineSource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.InlineSource) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryResponse(); - if (object.environments) { - if (!Array.isArray(object.environments)) - throw TypeError(".google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryResponse.environments: array expected"); - message.environments = []; - for (var i = 0; i < object.environments.length; ++i) { - if (typeof object.environments[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryResponse.environments: object expected"); - message.environments[i] = $root.google.cloud.dialogflow.cx.v3.Environment.fromObject(object.environments[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); + var message = new $root.google.cloud.dialogflow.cx.v3.InlineSource(); + if (object.content != null) + if (typeof object.content === "string") + $util.base64.decode(object.content, message.content = $util.newBuffer($util.base64.length(object.content)), 0); + else if (object.content.length >= 0) + message.content = object.content; return message; }; /** - * Creates a plain object from a LookupEnvironmentHistoryResponse message. Also converts values to other types if specified. + * Creates a plain object from an InlineSource message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryResponse + * @memberof google.cloud.dialogflow.cx.v3.InlineSource * @static - * @param {google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryResponse} message LookupEnvironmentHistoryResponse + * @param {google.cloud.dialogflow.cx.v3.InlineSource} message InlineSource * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LookupEnvironmentHistoryResponse.toObject = function toObject(message, options) { + InlineSource.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.environments = []; if (options.defaults) - object.nextPageToken = ""; - if (message.environments && message.environments.length) { - object.environments = []; - for (var j = 0; j < message.environments.length; ++j) - object.environments[j] = $root.google.cloud.dialogflow.cx.v3.Environment.toObject(message.environments[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + if (options.bytes === String) + object.content = ""; + else { + object.content = []; + if (options.bytes !== Array) + object.content = $util.newBuffer(object.content); + } + if (message.content != null && message.hasOwnProperty("content")) + object.content = options.bytes === String ? $util.base64.encode(message.content, 0, message.content.length) : options.bytes === Array ? Array.prototype.slice.call(message.content) : message.content; return object; }; /** - * Converts this LookupEnvironmentHistoryResponse to JSON. + * Converts this InlineSource to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryResponse + * @memberof google.cloud.dialogflow.cx.v3.InlineSource * @instance * @returns {Object.} JSON object */ - LookupEnvironmentHistoryResponse.prototype.toJSON = function toJSON() { + InlineSource.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for LookupEnvironmentHistoryResponse + * Gets the default type url for InlineSource * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryResponse + * @memberof google.cloud.dialogflow.cx.v3.InlineSource * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - LookupEnvironmentHistoryResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + InlineSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryResponse"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.InlineSource"; }; - return LookupEnvironmentHistoryResponse; + return InlineSource; })(); - v3.ContinuousTestResult = (function() { - - /** - * Properties of a ContinuousTestResult. - * @memberof google.cloud.dialogflow.cx.v3 - * @interface IContinuousTestResult - * @property {string|null} [name] ContinuousTestResult name - * @property {google.cloud.dialogflow.cx.v3.ContinuousTestResult.AggregatedTestResult|null} [result] ContinuousTestResult result - * @property {Array.|null} [testCaseResults] ContinuousTestResult testCaseResults - * @property {google.protobuf.ITimestamp|null} [runTime] ContinuousTestResult runTime - */ + v3.Environments = (function() { /** - * Constructs a new ContinuousTestResult. + * Constructs a new Environments service. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a ContinuousTestResult. - * @implements IContinuousTestResult + * @classdesc Represents an Environments + * @extends $protobuf.rpc.Service * @constructor - * @param {google.cloud.dialogflow.cx.v3.IContinuousTestResult=} [properties] Properties to set + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited */ - function ContinuousTestResult(properties) { - this.testCaseResults = []; - 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]]; + function Environments(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); } + (Environments.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Environments; + /** - * ContinuousTestResult name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.ContinuousTestResult - * @instance + * Creates new Environments service using the specified rpc implementation. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.Environments + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Environments} RPC service. Useful where requests and/or responses are streamed. */ - ContinuousTestResult.prototype.name = ""; + Environments.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; /** - * ContinuousTestResult result. - * @member {google.cloud.dialogflow.cx.v3.ContinuousTestResult.AggregatedTestResult} result - * @memberof google.cloud.dialogflow.cx.v3.ContinuousTestResult - * @instance + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Environments|listEnvironments}. + * @memberof google.cloud.dialogflow.cx.v3.Environments + * @typedef ListEnvironmentsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.ListEnvironmentsResponse} [response] ListEnvironmentsResponse */ - ContinuousTestResult.prototype.result = 0; /** - * ContinuousTestResult testCaseResults. - * @member {Array.} testCaseResults - * @memberof google.cloud.dialogflow.cx.v3.ContinuousTestResult + * Calls ListEnvironments. + * @function listEnvironments + * @memberof google.cloud.dialogflow.cx.v3.Environments * @instance + * @param {google.cloud.dialogflow.cx.v3.IListEnvironmentsRequest} request ListEnvironmentsRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Environments.ListEnvironmentsCallback} callback Node-style callback called with the error, if any, and ListEnvironmentsResponse + * @returns {undefined} + * @variation 1 */ - ContinuousTestResult.prototype.testCaseResults = $util.emptyArray; + Object.defineProperty(Environments.prototype.listEnvironments = function listEnvironments(request, callback) { + return this.rpcCall(listEnvironments, $root.google.cloud.dialogflow.cx.v3.ListEnvironmentsRequest, $root.google.cloud.dialogflow.cx.v3.ListEnvironmentsResponse, request, callback); + }, "name", { value: "ListEnvironments" }); /** - * ContinuousTestResult runTime. - * @member {google.protobuf.ITimestamp|null|undefined} runTime - * @memberof google.cloud.dialogflow.cx.v3.ContinuousTestResult + * Calls ListEnvironments. + * @function listEnvironments + * @memberof google.cloud.dialogflow.cx.v3.Environments * @instance + * @param {google.cloud.dialogflow.cx.v3.IListEnvironmentsRequest} request ListEnvironmentsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ContinuousTestResult.prototype.runTime = null; /** - * Creates a new ContinuousTestResult instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.ContinuousTestResult - * @static - * @param {google.cloud.dialogflow.cx.v3.IContinuousTestResult=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ContinuousTestResult} ContinuousTestResult instance + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Environments|getEnvironment}. + * @memberof google.cloud.dialogflow.cx.v3.Environments + * @typedef GetEnvironmentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.Environment} [response] Environment */ - ContinuousTestResult.create = function create(properties) { - return new ContinuousTestResult(properties); - }; /** - * Encodes the specified ContinuousTestResult message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ContinuousTestResult.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ContinuousTestResult - * @static - * @param {google.cloud.dialogflow.cx.v3.IContinuousTestResult} message ContinuousTestResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls GetEnvironment. + * @function getEnvironment + * @memberof google.cloud.dialogflow.cx.v3.Environments + * @instance + * @param {google.cloud.dialogflow.cx.v3.IGetEnvironmentRequest} request GetEnvironmentRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Environments.GetEnvironmentCallback} callback Node-style callback called with the error, if any, and Environment + * @returns {undefined} + * @variation 1 */ - ContinuousTestResult.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.result != null && Object.hasOwnProperty.call(message, "result")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.result); - if (message.testCaseResults != null && message.testCaseResults.length) - for (var i = 0; i < message.testCaseResults.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.testCaseResults[i]); - if (message.runTime != null && Object.hasOwnProperty.call(message, "runTime")) - $root.google.protobuf.Timestamp.encode(message.runTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; + Object.defineProperty(Environments.prototype.getEnvironment = function getEnvironment(request, callback) { + return this.rpcCall(getEnvironment, $root.google.cloud.dialogflow.cx.v3.GetEnvironmentRequest, $root.google.cloud.dialogflow.cx.v3.Environment, request, callback); + }, "name", { value: "GetEnvironment" }); /** - * Encodes the specified ContinuousTestResult message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ContinuousTestResult.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ContinuousTestResult - * @static - * @param {google.cloud.dialogflow.cx.v3.IContinuousTestResult} message ContinuousTestResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls GetEnvironment. + * @function getEnvironment + * @memberof google.cloud.dialogflow.cx.v3.Environments + * @instance + * @param {google.cloud.dialogflow.cx.v3.IGetEnvironmentRequest} request GetEnvironmentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ContinuousTestResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; /** - * Decodes a ContinuousTestResult message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ContinuousTestResult - * @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.ContinuousTestResult} ContinuousTestResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Environments|createEnvironment}. + * @memberof google.cloud.dialogflow.cx.v3.Environments + * @typedef CreateEnvironmentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ - ContinuousTestResult.decode = function decode(reader, length, error) { - 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.ContinuousTestResult(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.result = reader.int32(); - break; - } - case 3: { - if (!(message.testCaseResults && message.testCaseResults.length)) - message.testCaseResults = []; - message.testCaseResults.push(reader.string()); - break; - } - case 4: { - message.runTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes a ContinuousTestResult message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ContinuousTestResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ContinuousTestResult} ContinuousTestResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls CreateEnvironment. + * @function createEnvironment + * @memberof google.cloud.dialogflow.cx.v3.Environments + * @instance + * @param {google.cloud.dialogflow.cx.v3.ICreateEnvironmentRequest} request CreateEnvironmentRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Environments.CreateEnvironmentCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - ContinuousTestResult.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + Object.defineProperty(Environments.prototype.createEnvironment = function createEnvironment(request, callback) { + return this.rpcCall(createEnvironment, $root.google.cloud.dialogflow.cx.v3.CreateEnvironmentRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateEnvironment" }); /** - * Verifies a ContinuousTestResult message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ContinuousTestResult - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls CreateEnvironment. + * @function createEnvironment + * @memberof google.cloud.dialogflow.cx.v3.Environments + * @instance + * @param {google.cloud.dialogflow.cx.v3.ICreateEnvironmentRequest} request CreateEnvironmentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ContinuousTestResult.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.result != null && message.hasOwnProperty("result")) - switch (message.result) { - default: - return "result: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.testCaseResults != null && message.hasOwnProperty("testCaseResults")) { - if (!Array.isArray(message.testCaseResults)) - return "testCaseResults: array expected"; - for (var i = 0; i < message.testCaseResults.length; ++i) - if (!$util.isString(message.testCaseResults[i])) - return "testCaseResults: string[] expected"; - } - if (message.runTime != null && message.hasOwnProperty("runTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.runTime); - if (error) - return "runTime." + error; - } - return null; - }; /** - * Creates a ContinuousTestResult message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ContinuousTestResult - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ContinuousTestResult} ContinuousTestResult + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Environments|updateEnvironment}. + * @memberof google.cloud.dialogflow.cx.v3.Environments + * @typedef UpdateEnvironmentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ - ContinuousTestResult.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ContinuousTestResult) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.ContinuousTestResult(); - if (object.name != null) - message.name = String(object.name); - switch (object.result) { - default: - if (typeof object.result === "number") { - message.result = object.result; - break; - } - break; - case "AGGREGATED_TEST_RESULT_UNSPECIFIED": - case 0: - message.result = 0; - break; - case "PASSED": - case 1: - message.result = 1; - break; - case "FAILED": - case 2: - message.result = 2; - break; - } - if (object.testCaseResults) { - if (!Array.isArray(object.testCaseResults)) - throw TypeError(".google.cloud.dialogflow.cx.v3.ContinuousTestResult.testCaseResults: array expected"); - message.testCaseResults = []; - for (var i = 0; i < object.testCaseResults.length; ++i) - message.testCaseResults[i] = String(object.testCaseResults[i]); - } - if (object.runTime != null) { - if (typeof object.runTime !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.ContinuousTestResult.runTime: object expected"); - message.runTime = $root.google.protobuf.Timestamp.fromObject(object.runTime); - } - return message; - }; /** - * Creates a plain object from a ContinuousTestResult message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ContinuousTestResult - * @static - * @param {google.cloud.dialogflow.cx.v3.ContinuousTestResult} message ContinuousTestResult - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Calls UpdateEnvironment. + * @function updateEnvironment + * @memberof google.cloud.dialogflow.cx.v3.Environments + * @instance + * @param {google.cloud.dialogflow.cx.v3.IUpdateEnvironmentRequest} request UpdateEnvironmentRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Environments.UpdateEnvironmentCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - ContinuousTestResult.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.testCaseResults = []; - if (options.defaults) { - object.name = ""; - object.result = options.enums === String ? "AGGREGATED_TEST_RESULT_UNSPECIFIED" : 0; - object.runTime = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.result != null && message.hasOwnProperty("result")) - object.result = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.ContinuousTestResult.AggregatedTestResult[message.result] === undefined ? message.result : $root.google.cloud.dialogflow.cx.v3.ContinuousTestResult.AggregatedTestResult[message.result] : message.result; - if (message.testCaseResults && message.testCaseResults.length) { - object.testCaseResults = []; - for (var j = 0; j < message.testCaseResults.length; ++j) - object.testCaseResults[j] = message.testCaseResults[j]; - } - if (message.runTime != null && message.hasOwnProperty("runTime")) - object.runTime = $root.google.protobuf.Timestamp.toObject(message.runTime, options); - return object; - }; + Object.defineProperty(Environments.prototype.updateEnvironment = function updateEnvironment(request, callback) { + return this.rpcCall(updateEnvironment, $root.google.cloud.dialogflow.cx.v3.UpdateEnvironmentRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateEnvironment" }); /** - * Converts this ContinuousTestResult to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ContinuousTestResult + * Calls UpdateEnvironment. + * @function updateEnvironment + * @memberof google.cloud.dialogflow.cx.v3.Environments * @instance - * @returns {Object.} JSON object + * @param {google.cloud.dialogflow.cx.v3.IUpdateEnvironmentRequest} request UpdateEnvironmentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ContinuousTestResult.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; /** - * Gets the default type url for ContinuousTestResult - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.ContinuousTestResult - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Environments|deleteEnvironment}. + * @memberof google.cloud.dialogflow.cx.v3.Environments + * @typedef DeleteEnvironmentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty */ - ContinuousTestResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ContinuousTestResult"; - }; /** - * AggregatedTestResult enum. - * @name google.cloud.dialogflow.cx.v3.ContinuousTestResult.AggregatedTestResult - * @enum {number} - * @property {number} AGGREGATED_TEST_RESULT_UNSPECIFIED=0 AGGREGATED_TEST_RESULT_UNSPECIFIED value - * @property {number} PASSED=1 PASSED value - * @property {number} FAILED=2 FAILED value - */ - ContinuousTestResult.AggregatedTestResult = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "AGGREGATED_TEST_RESULT_UNSPECIFIED"] = 0; - values[valuesById[1] = "PASSED"] = 1; - values[valuesById[2] = "FAILED"] = 2; - return values; - })(); - - return ContinuousTestResult; - })(); - - v3.RunContinuousTestRequest = (function() { + * Calls DeleteEnvironment. + * @function deleteEnvironment + * @memberof google.cloud.dialogflow.cx.v3.Environments + * @instance + * @param {google.cloud.dialogflow.cx.v3.IDeleteEnvironmentRequest} request DeleteEnvironmentRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Environments.DeleteEnvironmentCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Environments.prototype.deleteEnvironment = function deleteEnvironment(request, callback) { + return this.rpcCall(deleteEnvironment, $root.google.cloud.dialogflow.cx.v3.DeleteEnvironmentRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteEnvironment" }); /** - * Properties of a RunContinuousTestRequest. - * @memberof google.cloud.dialogflow.cx.v3 - * @interface IRunContinuousTestRequest - * @property {string|null} [environment] RunContinuousTestRequest environment + * Calls DeleteEnvironment. + * @function deleteEnvironment + * @memberof google.cloud.dialogflow.cx.v3.Environments + * @instance + * @param {google.cloud.dialogflow.cx.v3.IDeleteEnvironmentRequest} request DeleteEnvironmentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ /** - * Constructs a new RunContinuousTestRequest. - * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a RunContinuousTestRequest. - * @implements IRunContinuousTestRequest - * @constructor - * @param {google.cloud.dialogflow.cx.v3.IRunContinuousTestRequest=} [properties] Properties to set + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Environments|lookupEnvironmentHistory}. + * @memberof google.cloud.dialogflow.cx.v3.Environments + * @typedef LookupEnvironmentHistoryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryResponse} [response] LookupEnvironmentHistoryResponse */ - function RunContinuousTestRequest(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]]; - } /** - * RunContinuousTestRequest environment. - * @member {string} environment - * @memberof google.cloud.dialogflow.cx.v3.RunContinuousTestRequest + * Calls LookupEnvironmentHistory. + * @function lookupEnvironmentHistory + * @memberof google.cloud.dialogflow.cx.v3.Environments * @instance + * @param {google.cloud.dialogflow.cx.v3.ILookupEnvironmentHistoryRequest} request LookupEnvironmentHistoryRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Environments.LookupEnvironmentHistoryCallback} callback Node-style callback called with the error, if any, and LookupEnvironmentHistoryResponse + * @returns {undefined} + * @variation 1 */ - RunContinuousTestRequest.prototype.environment = ""; + Object.defineProperty(Environments.prototype.lookupEnvironmentHistory = function lookupEnvironmentHistory(request, callback) { + return this.rpcCall(lookupEnvironmentHistory, $root.google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryRequest, $root.google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryResponse, request, callback); + }, "name", { value: "LookupEnvironmentHistory" }); /** - * Creates a new RunContinuousTestRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.RunContinuousTestRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.IRunContinuousTestRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.RunContinuousTestRequest} RunContinuousTestRequest instance + * Calls LookupEnvironmentHistory. + * @function lookupEnvironmentHistory + * @memberof google.cloud.dialogflow.cx.v3.Environments + * @instance + * @param {google.cloud.dialogflow.cx.v3.ILookupEnvironmentHistoryRequest} request LookupEnvironmentHistoryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - RunContinuousTestRequest.create = function create(properties) { - return new RunContinuousTestRequest(properties); - }; /** - * Encodes the specified RunContinuousTestRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.RunContinuousTestRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.RunContinuousTestRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.IRunContinuousTestRequest} message RunContinuousTestRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Environments|runContinuousTest}. + * @memberof google.cloud.dialogflow.cx.v3.Environments + * @typedef RunContinuousTestCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ - RunContinuousTestRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.environment); - return writer; - }; /** - * Encodes the specified RunContinuousTestRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.RunContinuousTestRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.RunContinuousTestRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.IRunContinuousTestRequest} message RunContinuousTestRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls RunContinuousTest. + * @function runContinuousTest + * @memberof google.cloud.dialogflow.cx.v3.Environments + * @instance + * @param {google.cloud.dialogflow.cx.v3.IRunContinuousTestRequest} request RunContinuousTestRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Environments.RunContinuousTestCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - RunContinuousTestRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + Object.defineProperty(Environments.prototype.runContinuousTest = function runContinuousTest(request, callback) { + return this.rpcCall(runContinuousTest, $root.google.cloud.dialogflow.cx.v3.RunContinuousTestRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "RunContinuousTest" }); /** - * Decodes a RunContinuousTestRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.RunContinuousTestRequest - * @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.RunContinuousTestRequest} RunContinuousTestRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls RunContinuousTest. + * @function runContinuousTest + * @memberof google.cloud.dialogflow.cx.v3.Environments + * @instance + * @param {google.cloud.dialogflow.cx.v3.IRunContinuousTestRequest} request RunContinuousTestRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - RunContinuousTestRequest.decode = function decode(reader, length, error) { - 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.RunContinuousTestRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.environment = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes a RunContinuousTestRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.RunContinuousTestRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.RunContinuousTestRequest} RunContinuousTestRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Environments|listContinuousTestResults}. + * @memberof google.cloud.dialogflow.cx.v3.Environments + * @typedef ListContinuousTestResultsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.ListContinuousTestResultsResponse} [response] ListContinuousTestResultsResponse */ - RunContinuousTestRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; /** - * Verifies a RunContinuousTestRequest message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.RunContinuousTestRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls ListContinuousTestResults. + * @function listContinuousTestResults + * @memberof google.cloud.dialogflow.cx.v3.Environments + * @instance + * @param {google.cloud.dialogflow.cx.v3.IListContinuousTestResultsRequest} request ListContinuousTestResultsRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Environments.ListContinuousTestResultsCallback} callback Node-style callback called with the error, if any, and ListContinuousTestResultsResponse + * @returns {undefined} + * @variation 1 */ - RunContinuousTestRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.environment != null && message.hasOwnProperty("environment")) - if (!$util.isString(message.environment)) - return "environment: string expected"; - return null; - }; + Object.defineProperty(Environments.prototype.listContinuousTestResults = function listContinuousTestResults(request, callback) { + return this.rpcCall(listContinuousTestResults, $root.google.cloud.dialogflow.cx.v3.ListContinuousTestResultsRequest, $root.google.cloud.dialogflow.cx.v3.ListContinuousTestResultsResponse, request, callback); + }, "name", { value: "ListContinuousTestResults" }); /** - * Creates a RunContinuousTestRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.RunContinuousTestRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.RunContinuousTestRequest} RunContinuousTestRequest + * Calls ListContinuousTestResults. + * @function listContinuousTestResults + * @memberof google.cloud.dialogflow.cx.v3.Environments + * @instance + * @param {google.cloud.dialogflow.cx.v3.IListContinuousTestResultsRequest} request ListContinuousTestResultsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - RunContinuousTestRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.RunContinuousTestRequest) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.RunContinuousTestRequest(); - if (object.environment != null) - message.environment = String(object.environment); - return message; - }; /** - * Creates a plain object from a RunContinuousTestRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.RunContinuousTestRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.RunContinuousTestRequest} message RunContinuousTestRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Environments|deployFlow}. + * @memberof google.cloud.dialogflow.cx.v3.Environments + * @typedef DeployFlowCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ - RunContinuousTestRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.environment = ""; - if (message.environment != null && message.hasOwnProperty("environment")) - object.environment = message.environment; - return object; - }; /** - * Converts this RunContinuousTestRequest to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.RunContinuousTestRequest + * Calls DeployFlow. + * @function deployFlow + * @memberof google.cloud.dialogflow.cx.v3.Environments * @instance - * @returns {Object.} JSON object + * @param {google.cloud.dialogflow.cx.v3.IDeployFlowRequest} request DeployFlowRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Environments.DeployFlowCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - RunContinuousTestRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + Object.defineProperty(Environments.prototype.deployFlow = function deployFlow(request, callback) { + return this.rpcCall(deployFlow, $root.google.cloud.dialogflow.cx.v3.DeployFlowRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeployFlow" }); /** - * Gets the default type url for RunContinuousTestRequest - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.RunContinuousTestRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * Calls DeployFlow. + * @function deployFlow + * @memberof google.cloud.dialogflow.cx.v3.Environments + * @instance + * @param {google.cloud.dialogflow.cx.v3.IDeployFlowRequest} request DeployFlowRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - RunContinuousTestRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.RunContinuousTestRequest"; - }; - return RunContinuousTestRequest; + return Environments; })(); - v3.RunContinuousTestResponse = (function() { + v3.Environment = (function() { /** - * Properties of a RunContinuousTestResponse. + * Properties of an Environment. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IRunContinuousTestResponse - * @property {google.cloud.dialogflow.cx.v3.IContinuousTestResult|null} [continuousTestResult] RunContinuousTestResponse continuousTestResult + * @interface IEnvironment + * @property {string|null} [name] Environment name + * @property {string|null} [displayName] Environment displayName + * @property {string|null} [description] Environment description + * @property {Array.|null} [versionConfigs] Environment versionConfigs + * @property {google.protobuf.ITimestamp|null} [updateTime] Environment updateTime + * @property {google.cloud.dialogflow.cx.v3.Environment.ITestCasesConfig|null} [testCasesConfig] Environment testCasesConfig + * @property {google.cloud.dialogflow.cx.v3.Environment.IWebhookConfig|null} [webhookConfig] Environment webhookConfig */ /** - * Constructs a new RunContinuousTestResponse. + * Constructs a new Environment. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a RunContinuousTestResponse. - * @implements IRunContinuousTestResponse + * @classdesc Represents an Environment. + * @implements IEnvironment * @constructor - * @param {google.cloud.dialogflow.cx.v3.IRunContinuousTestResponse=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IEnvironment=} [properties] Properties to set */ - function RunContinuousTestResponse(properties) { + function Environment(properties) { + this.versionConfigs = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -41138,77 +41141,164 @@ } /** - * RunContinuousTestResponse continuousTestResult. - * @member {google.cloud.dialogflow.cx.v3.IContinuousTestResult|null|undefined} continuousTestResult - * @memberof google.cloud.dialogflow.cx.v3.RunContinuousTestResponse + * Environment name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.Environment * @instance */ - RunContinuousTestResponse.prototype.continuousTestResult = null; + Environment.prototype.name = ""; /** - * Creates a new RunContinuousTestResponse instance using the specified properties. + * Environment displayName. + * @member {string} displayName + * @memberof google.cloud.dialogflow.cx.v3.Environment + * @instance + */ + Environment.prototype.displayName = ""; + + /** + * Environment description. + * @member {string} description + * @memberof google.cloud.dialogflow.cx.v3.Environment + * @instance + */ + Environment.prototype.description = ""; + + /** + * Environment versionConfigs. + * @member {Array.} versionConfigs + * @memberof google.cloud.dialogflow.cx.v3.Environment + * @instance + */ + Environment.prototype.versionConfigs = $util.emptyArray; + + /** + * Environment updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.dialogflow.cx.v3.Environment + * @instance + */ + Environment.prototype.updateTime = null; + + /** + * Environment testCasesConfig. + * @member {google.cloud.dialogflow.cx.v3.Environment.ITestCasesConfig|null|undefined} testCasesConfig + * @memberof google.cloud.dialogflow.cx.v3.Environment + * @instance + */ + Environment.prototype.testCasesConfig = null; + + /** + * Environment webhookConfig. + * @member {google.cloud.dialogflow.cx.v3.Environment.IWebhookConfig|null|undefined} webhookConfig + * @memberof google.cloud.dialogflow.cx.v3.Environment + * @instance + */ + Environment.prototype.webhookConfig = null; + + /** + * Creates a new Environment instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.RunContinuousTestResponse + * @memberof google.cloud.dialogflow.cx.v3.Environment * @static - * @param {google.cloud.dialogflow.cx.v3.IRunContinuousTestResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.RunContinuousTestResponse} RunContinuousTestResponse instance + * @param {google.cloud.dialogflow.cx.v3.IEnvironment=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.Environment} Environment instance */ - RunContinuousTestResponse.create = function create(properties) { - return new RunContinuousTestResponse(properties); + Environment.create = function create(properties) { + return new Environment(properties); }; /** - * Encodes the specified RunContinuousTestResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.RunContinuousTestResponse.verify|verify} messages. + * Encodes the specified Environment message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Environment.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.RunContinuousTestResponse + * @memberof google.cloud.dialogflow.cx.v3.Environment * @static - * @param {google.cloud.dialogflow.cx.v3.IRunContinuousTestResponse} message RunContinuousTestResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IEnvironment} message Environment message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RunContinuousTestResponse.encode = function encode(message, writer) { + Environment.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.continuousTestResult != null && Object.hasOwnProperty.call(message, "continuousTestResult")) - $root.google.cloud.dialogflow.cx.v3.ContinuousTestResult.encode(message.continuousTestResult, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.versionConfigs != null && message.versionConfigs.length) + for (var i = 0; i < message.versionConfigs.length; ++i) + $root.google.cloud.dialogflow.cx.v3.Environment.VersionConfig.encode(message.versionConfigs[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.testCasesConfig != null && Object.hasOwnProperty.call(message, "testCasesConfig")) + $root.google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig.encode(message.testCasesConfig, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.webhookConfig != null && Object.hasOwnProperty.call(message, "webhookConfig")) + $root.google.cloud.dialogflow.cx.v3.Environment.WebhookConfig.encode(message.webhookConfig, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); return writer; }; /** - * Encodes the specified RunContinuousTestResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.RunContinuousTestResponse.verify|verify} messages. + * Encodes the specified Environment message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Environment.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.RunContinuousTestResponse + * @memberof google.cloud.dialogflow.cx.v3.Environment * @static - * @param {google.cloud.dialogflow.cx.v3.IRunContinuousTestResponse} message RunContinuousTestResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IEnvironment} message Environment message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RunContinuousTestResponse.encodeDelimited = function encodeDelimited(message, writer) { + Environment.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RunContinuousTestResponse message from the specified reader or buffer. + * Decodes an Environment message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.RunContinuousTestResponse + * @memberof google.cloud.dialogflow.cx.v3.Environment * @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.RunContinuousTestResponse} RunContinuousTestResponse + * @returns {google.cloud.dialogflow.cx.v3.Environment} Environment * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RunContinuousTestResponse.decode = function decode(reader, length, error) { + Environment.decode = function decode(reader, length, error) { 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.RunContinuousTestResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.Environment(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.continuousTestResult = $root.google.cloud.dialogflow.cx.v3.ContinuousTestResult.decode(reader, reader.uint32()); + message.name = reader.string(); + break; + } + case 2: { + message.displayName = reader.string(); + break; + } + case 3: { + message.description = reader.string(); + break; + } + case 6: { + if (!(message.versionConfigs && message.versionConfigs.length)) + message.versionConfigs = []; + message.versionConfigs.push($root.google.cloud.dialogflow.cx.v3.Environment.VersionConfig.decode(reader, reader.uint32())); + break; + } + case 5: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 7: { + message.testCasesConfig = $root.google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig.decode(reader, reader.uint32()); + break; + } + case 10: { + message.webhookConfig = $root.google.cloud.dialogflow.cx.v3.Environment.WebhookConfig.decode(reader, reader.uint32()); break; } default: @@ -41220,355 +41310,906 @@ }; /** - * Decodes a RunContinuousTestResponse message from the specified reader or buffer, length delimited. + * Decodes an Environment message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.RunContinuousTestResponse + * @memberof google.cloud.dialogflow.cx.v3.Environment * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.RunContinuousTestResponse} RunContinuousTestResponse + * @returns {google.cloud.dialogflow.cx.v3.Environment} Environment * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RunContinuousTestResponse.decodeDelimited = function decodeDelimited(reader) { + Environment.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RunContinuousTestResponse message. + * Verifies an Environment message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.RunContinuousTestResponse + * @memberof google.cloud.dialogflow.cx.v3.Environment * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RunContinuousTestResponse.verify = function verify(message) { + Environment.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.continuousTestResult != null && message.hasOwnProperty("continuousTestResult")) { - var error = $root.google.cloud.dialogflow.cx.v3.ContinuousTestResult.verify(message.continuousTestResult); + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.versionConfigs != null && message.hasOwnProperty("versionConfigs")) { + if (!Array.isArray(message.versionConfigs)) + return "versionConfigs: array expected"; + for (var i = 0; i < message.versionConfigs.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.Environment.VersionConfig.verify(message.versionConfigs[i]); + if (error) + return "versionConfigs." + error; + } + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); if (error) - return "continuousTestResult." + error; + return "updateTime." + error; + } + if (message.testCasesConfig != null && message.hasOwnProperty("testCasesConfig")) { + var error = $root.google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig.verify(message.testCasesConfig); + if (error) + return "testCasesConfig." + error; + } + if (message.webhookConfig != null && message.hasOwnProperty("webhookConfig")) { + var error = $root.google.cloud.dialogflow.cx.v3.Environment.WebhookConfig.verify(message.webhookConfig); + if (error) + return "webhookConfig." + error; } return null; }; /** - * Creates a RunContinuousTestResponse message from a plain object. Also converts values to their respective internal types. + * Creates an Environment message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.RunContinuousTestResponse + * @memberof google.cloud.dialogflow.cx.v3.Environment * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.RunContinuousTestResponse} RunContinuousTestResponse + * @returns {google.cloud.dialogflow.cx.v3.Environment} Environment */ - RunContinuousTestResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.RunContinuousTestResponse) + Environment.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.Environment) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.RunContinuousTestResponse(); - if (object.continuousTestResult != null) { - if (typeof object.continuousTestResult !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.RunContinuousTestResponse.continuousTestResult: object expected"); - message.continuousTestResult = $root.google.cloud.dialogflow.cx.v3.ContinuousTestResult.fromObject(object.continuousTestResult); - } + var message = new $root.google.cloud.dialogflow.cx.v3.Environment(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.description != null) + message.description = String(object.description); + if (object.versionConfigs) { + if (!Array.isArray(object.versionConfigs)) + throw TypeError(".google.cloud.dialogflow.cx.v3.Environment.versionConfigs: array expected"); + message.versionConfigs = []; + for (var i = 0; i < object.versionConfigs.length; ++i) { + if (typeof object.versionConfigs[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Environment.versionConfigs: object expected"); + message.versionConfigs[i] = $root.google.cloud.dialogflow.cx.v3.Environment.VersionConfig.fromObject(object.versionConfigs[i]); + } + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Environment.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.testCasesConfig != null) { + if (typeof object.testCasesConfig !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Environment.testCasesConfig: object expected"); + message.testCasesConfig = $root.google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig.fromObject(object.testCasesConfig); + } + if (object.webhookConfig != null) { + if (typeof object.webhookConfig !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Environment.webhookConfig: object expected"); + message.webhookConfig = $root.google.cloud.dialogflow.cx.v3.Environment.WebhookConfig.fromObject(object.webhookConfig); + } return message; }; /** - * Creates a plain object from a RunContinuousTestResponse message. Also converts values to other types if specified. + * Creates a plain object from an Environment message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.RunContinuousTestResponse + * @memberof google.cloud.dialogflow.cx.v3.Environment * @static - * @param {google.cloud.dialogflow.cx.v3.RunContinuousTestResponse} message RunContinuousTestResponse + * @param {google.cloud.dialogflow.cx.v3.Environment} message Environment * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RunContinuousTestResponse.toObject = function toObject(message, options) { + Environment.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.continuousTestResult = null; - if (message.continuousTestResult != null && message.hasOwnProperty("continuousTestResult")) - object.continuousTestResult = $root.google.cloud.dialogflow.cx.v3.ContinuousTestResult.toObject(message.continuousTestResult, options); + if (options.arrays || options.defaults) + object.versionConfigs = []; + if (options.defaults) { + object.name = ""; + object.displayName = ""; + object.description = ""; + object.updateTime = null; + object.testCasesConfig = null; + object.webhookConfig = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.versionConfigs && message.versionConfigs.length) { + object.versionConfigs = []; + for (var j = 0; j < message.versionConfigs.length; ++j) + object.versionConfigs[j] = $root.google.cloud.dialogflow.cx.v3.Environment.VersionConfig.toObject(message.versionConfigs[j], options); + } + if (message.testCasesConfig != null && message.hasOwnProperty("testCasesConfig")) + object.testCasesConfig = $root.google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig.toObject(message.testCasesConfig, options); + if (message.webhookConfig != null && message.hasOwnProperty("webhookConfig")) + object.webhookConfig = $root.google.cloud.dialogflow.cx.v3.Environment.WebhookConfig.toObject(message.webhookConfig, options); return object; }; /** - * Converts this RunContinuousTestResponse to JSON. + * Converts this Environment to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.RunContinuousTestResponse + * @memberof google.cloud.dialogflow.cx.v3.Environment * @instance * @returns {Object.} JSON object */ - RunContinuousTestResponse.prototype.toJSON = function toJSON() { + Environment.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for RunContinuousTestResponse + * Gets the default type url for Environment * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.RunContinuousTestResponse + * @memberof google.cloud.dialogflow.cx.v3.Environment * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - RunContinuousTestResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Environment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.RunContinuousTestResponse"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Environment"; }; - return RunContinuousTestResponse; - })(); - - v3.RunContinuousTestMetadata = (function() { + Environment.VersionConfig = (function() { - /** - * Properties of a RunContinuousTestMetadata. - * @memberof google.cloud.dialogflow.cx.v3 - * @interface IRunContinuousTestMetadata - * @property {Array.|null} [errors] RunContinuousTestMetadata errors - */ + /** + * Properties of a VersionConfig. + * @memberof google.cloud.dialogflow.cx.v3.Environment + * @interface IVersionConfig + * @property {string|null} [version] VersionConfig version + */ - /** - * Constructs a new RunContinuousTestMetadata. - * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a RunContinuousTestMetadata. - * @implements IRunContinuousTestMetadata - * @constructor - * @param {google.cloud.dialogflow.cx.v3.IRunContinuousTestMetadata=} [properties] Properties to set - */ - function RunContinuousTestMetadata(properties) { - this.errors = []; - 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]]; - } + /** + * Constructs a new VersionConfig. + * @memberof google.cloud.dialogflow.cx.v3.Environment + * @classdesc Represents a VersionConfig. + * @implements IVersionConfig + * @constructor + * @param {google.cloud.dialogflow.cx.v3.Environment.IVersionConfig=} [properties] Properties to set + */ + function VersionConfig(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]]; + } - /** - * RunContinuousTestMetadata errors. - * @member {Array.} errors - * @memberof google.cloud.dialogflow.cx.v3.RunContinuousTestMetadata - * @instance - */ - RunContinuousTestMetadata.prototype.errors = $util.emptyArray; + /** + * VersionConfig version. + * @member {string} version + * @memberof google.cloud.dialogflow.cx.v3.Environment.VersionConfig + * @instance + */ + VersionConfig.prototype.version = ""; - /** - * Creates a new RunContinuousTestMetadata instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.RunContinuousTestMetadata - * @static - * @param {google.cloud.dialogflow.cx.v3.IRunContinuousTestMetadata=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.RunContinuousTestMetadata} RunContinuousTestMetadata instance - */ - RunContinuousTestMetadata.create = function create(properties) { - return new RunContinuousTestMetadata(properties); - }; + /** + * Creates a new VersionConfig instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.Environment.VersionConfig + * @static + * @param {google.cloud.dialogflow.cx.v3.Environment.IVersionConfig=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.Environment.VersionConfig} VersionConfig instance + */ + VersionConfig.create = function create(properties) { + return new VersionConfig(properties); + }; - /** - * Encodes the specified RunContinuousTestMetadata message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.RunContinuousTestMetadata.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.RunContinuousTestMetadata - * @static - * @param {google.cloud.dialogflow.cx.v3.IRunContinuousTestMetadata} message RunContinuousTestMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RunContinuousTestMetadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.errors != null && message.errors.length) - for (var i = 0; i < message.errors.length; ++i) - $root.google.cloud.dialogflow.cx.v3.TestError.encode(message.errors[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; + /** + * Encodes the specified VersionConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Environment.VersionConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.Environment.VersionConfig + * @static + * @param {google.cloud.dialogflow.cx.v3.Environment.IVersionConfig} message VersionConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VersionConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); + return writer; + }; - /** - * Encodes the specified RunContinuousTestMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.RunContinuousTestMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.RunContinuousTestMetadata - * @static - * @param {google.cloud.dialogflow.cx.v3.IRunContinuousTestMetadata} message RunContinuousTestMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RunContinuousTestMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified VersionConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Environment.VersionConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Environment.VersionConfig + * @static + * @param {google.cloud.dialogflow.cx.v3.Environment.IVersionConfig} message VersionConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VersionConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a RunContinuousTestMetadata message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.RunContinuousTestMetadata - * @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.RunContinuousTestMetadata} RunContinuousTestMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RunContinuousTestMetadata.decode = function decode(reader, length, error) { - 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.RunContinuousTestMetadata(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.errors && message.errors.length)) - message.errors = []; - message.errors.push($root.google.cloud.dialogflow.cx.v3.TestError.decode(reader, reader.uint32())); + /** + * Decodes a VersionConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.Environment.VersionConfig + * @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.Environment.VersionConfig} VersionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VersionConfig.decode = function decode(reader, length, error) { + 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.Environment.VersionConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.version = reader.string(); + break; + } + default: + reader.skipType(tag & 7); break; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; + return message; + }; - /** - * Decodes a RunContinuousTestMetadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.RunContinuousTestMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.RunContinuousTestMetadata} RunContinuousTestMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RunContinuousTestMetadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a VersionConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Environment.VersionConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.Environment.VersionConfig} VersionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VersionConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a RunContinuousTestMetadata message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.RunContinuousTestMetadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RunContinuousTestMetadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.errors != null && message.hasOwnProperty("errors")) { - if (!Array.isArray(message.errors)) - return "errors: array expected"; - for (var i = 0; i < message.errors.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.TestError.verify(message.errors[i]); - if (error) - return "errors." + error; - } - } - return null; - }; + /** + * Verifies a VersionConfig message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.Environment.VersionConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VersionConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + return null; + }; - /** - * Creates a RunContinuousTestMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.RunContinuousTestMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.RunContinuousTestMetadata} RunContinuousTestMetadata - */ - RunContinuousTestMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.RunContinuousTestMetadata) + /** + * Creates a VersionConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.Environment.VersionConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.Environment.VersionConfig} VersionConfig + */ + VersionConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.Environment.VersionConfig) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.Environment.VersionConfig(); + if (object.version != null) + message.version = String(object.version); + return message; + }; + + /** + * Creates a plain object from a VersionConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.Environment.VersionConfig + * @static + * @param {google.cloud.dialogflow.cx.v3.Environment.VersionConfig} message VersionConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VersionConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.version = ""; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; return object; - var message = new $root.google.cloud.dialogflow.cx.v3.RunContinuousTestMetadata(); - if (object.errors) { - if (!Array.isArray(object.errors)) - throw TypeError(".google.cloud.dialogflow.cx.v3.RunContinuousTestMetadata.errors: array expected"); - message.errors = []; - for (var i = 0; i < object.errors.length; ++i) { - if (typeof object.errors[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.RunContinuousTestMetadata.errors: object expected"); - message.errors[i] = $root.google.cloud.dialogflow.cx.v3.TestError.fromObject(object.errors[i]); + }; + + /** + * Converts this VersionConfig to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.Environment.VersionConfig + * @instance + * @returns {Object.} JSON object + */ + VersionConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VersionConfig + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.Environment.VersionConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VersionConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } - } - return message; - }; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Environment.VersionConfig"; + }; - /** - * Creates a plain object from a RunContinuousTestMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.RunContinuousTestMetadata - * @static - * @param {google.cloud.dialogflow.cx.v3.RunContinuousTestMetadata} message RunContinuousTestMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RunContinuousTestMetadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.errors = []; - if (message.errors && message.errors.length) { - object.errors = []; - for (var j = 0; j < message.errors.length; ++j) - object.errors[j] = $root.google.cloud.dialogflow.cx.v3.TestError.toObject(message.errors[j], options); - } - return object; - }; + return VersionConfig; + })(); - /** - * Converts this RunContinuousTestMetadata to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.RunContinuousTestMetadata - * @instance - * @returns {Object.} JSON object - */ - RunContinuousTestMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + Environment.TestCasesConfig = (function() { - /** - * Gets the default type url for RunContinuousTestMetadata - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.RunContinuousTestMetadata - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RunContinuousTestMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; + /** + * Properties of a TestCasesConfig. + * @memberof google.cloud.dialogflow.cx.v3.Environment + * @interface ITestCasesConfig + * @property {Array.|null} [testCases] TestCasesConfig testCases + * @property {boolean|null} [enableContinuousRun] TestCasesConfig enableContinuousRun + * @property {boolean|null} [enablePredeploymentRun] TestCasesConfig enablePredeploymentRun + */ + + /** + * Constructs a new TestCasesConfig. + * @memberof google.cloud.dialogflow.cx.v3.Environment + * @classdesc Represents a TestCasesConfig. + * @implements ITestCasesConfig + * @constructor + * @param {google.cloud.dialogflow.cx.v3.Environment.ITestCasesConfig=} [properties] Properties to set + */ + function TestCasesConfig(properties) { + this.testCases = []; + 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]]; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.RunContinuousTestMetadata"; - }; - return RunContinuousTestMetadata; - })(); + /** + * TestCasesConfig testCases. + * @member {Array.} testCases + * @memberof google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig + * @instance + */ + TestCasesConfig.prototype.testCases = $util.emptyArray; - v3.ListContinuousTestResultsRequest = (function() { + /** + * TestCasesConfig enableContinuousRun. + * @member {boolean} enableContinuousRun + * @memberof google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig + * @instance + */ + TestCasesConfig.prototype.enableContinuousRun = false; + + /** + * TestCasesConfig enablePredeploymentRun. + * @member {boolean} enablePredeploymentRun + * @memberof google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig + * @instance + */ + TestCasesConfig.prototype.enablePredeploymentRun = false; + + /** + * Creates a new TestCasesConfig instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig + * @static + * @param {google.cloud.dialogflow.cx.v3.Environment.ITestCasesConfig=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig} TestCasesConfig instance + */ + TestCasesConfig.create = function create(properties) { + return new TestCasesConfig(properties); + }; + + /** + * Encodes the specified TestCasesConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig + * @static + * @param {google.cloud.dialogflow.cx.v3.Environment.ITestCasesConfig} message TestCasesConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TestCasesConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.testCases != null && message.testCases.length) + for (var i = 0; i < message.testCases.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.testCases[i]); + if (message.enableContinuousRun != null && Object.hasOwnProperty.call(message, "enableContinuousRun")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.enableContinuousRun); + if (message.enablePredeploymentRun != null && Object.hasOwnProperty.call(message, "enablePredeploymentRun")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.enablePredeploymentRun); + return writer; + }; + + /** + * Encodes the specified TestCasesConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig + * @static + * @param {google.cloud.dialogflow.cx.v3.Environment.ITestCasesConfig} message TestCasesConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TestCasesConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TestCasesConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig + * @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.Environment.TestCasesConfig} TestCasesConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TestCasesConfig.decode = function decode(reader, length, error) { + 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.Environment.TestCasesConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.testCases && message.testCases.length)) + message.testCases = []; + message.testCases.push(reader.string()); + break; + } + case 2: { + message.enableContinuousRun = reader.bool(); + break; + } + case 3: { + message.enablePredeploymentRun = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TestCasesConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig} TestCasesConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TestCasesConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TestCasesConfig message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TestCasesConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.testCases != null && message.hasOwnProperty("testCases")) { + if (!Array.isArray(message.testCases)) + return "testCases: array expected"; + for (var i = 0; i < message.testCases.length; ++i) + if (!$util.isString(message.testCases[i])) + return "testCases: string[] expected"; + } + if (message.enableContinuousRun != null && message.hasOwnProperty("enableContinuousRun")) + if (typeof message.enableContinuousRun !== "boolean") + return "enableContinuousRun: boolean expected"; + if (message.enablePredeploymentRun != null && message.hasOwnProperty("enablePredeploymentRun")) + if (typeof message.enablePredeploymentRun !== "boolean") + return "enablePredeploymentRun: boolean expected"; + return null; + }; + + /** + * Creates a TestCasesConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig} TestCasesConfig + */ + TestCasesConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig(); + if (object.testCases) { + if (!Array.isArray(object.testCases)) + throw TypeError(".google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig.testCases: array expected"); + message.testCases = []; + for (var i = 0; i < object.testCases.length; ++i) + message.testCases[i] = String(object.testCases[i]); + } + if (object.enableContinuousRun != null) + message.enableContinuousRun = Boolean(object.enableContinuousRun); + if (object.enablePredeploymentRun != null) + message.enablePredeploymentRun = Boolean(object.enablePredeploymentRun); + return message; + }; + + /** + * Creates a plain object from a TestCasesConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig + * @static + * @param {google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig} message TestCasesConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TestCasesConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.testCases = []; + if (options.defaults) { + object.enableContinuousRun = false; + object.enablePredeploymentRun = false; + } + if (message.testCases && message.testCases.length) { + object.testCases = []; + for (var j = 0; j < message.testCases.length; ++j) + object.testCases[j] = message.testCases[j]; + } + if (message.enableContinuousRun != null && message.hasOwnProperty("enableContinuousRun")) + object.enableContinuousRun = message.enableContinuousRun; + if (message.enablePredeploymentRun != null && message.hasOwnProperty("enablePredeploymentRun")) + object.enablePredeploymentRun = message.enablePredeploymentRun; + return object; + }; + + /** + * Converts this TestCasesConfig to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig + * @instance + * @returns {Object.} JSON object + */ + TestCasesConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TestCasesConfig + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TestCasesConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig"; + }; + + return TestCasesConfig; + })(); + + Environment.WebhookConfig = (function() { + + /** + * Properties of a WebhookConfig. + * @memberof google.cloud.dialogflow.cx.v3.Environment + * @interface IWebhookConfig + * @property {Array.|null} [webhookOverrides] WebhookConfig webhookOverrides + */ + + /** + * Constructs a new WebhookConfig. + * @memberof google.cloud.dialogflow.cx.v3.Environment + * @classdesc Represents a WebhookConfig. + * @implements IWebhookConfig + * @constructor + * @param {google.cloud.dialogflow.cx.v3.Environment.IWebhookConfig=} [properties] Properties to set + */ + function WebhookConfig(properties) { + this.webhookOverrides = []; + 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]]; + } + + /** + * WebhookConfig webhookOverrides. + * @member {Array.} webhookOverrides + * @memberof google.cloud.dialogflow.cx.v3.Environment.WebhookConfig + * @instance + */ + WebhookConfig.prototype.webhookOverrides = $util.emptyArray; + + /** + * Creates a new WebhookConfig instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.Environment.WebhookConfig + * @static + * @param {google.cloud.dialogflow.cx.v3.Environment.IWebhookConfig=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.Environment.WebhookConfig} WebhookConfig instance + */ + WebhookConfig.create = function create(properties) { + return new WebhookConfig(properties); + }; + + /** + * Encodes the specified WebhookConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Environment.WebhookConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.Environment.WebhookConfig + * @static + * @param {google.cloud.dialogflow.cx.v3.Environment.IWebhookConfig} message WebhookConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WebhookConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.webhookOverrides != null && message.webhookOverrides.length) + for (var i = 0; i < message.webhookOverrides.length; ++i) + $root.google.cloud.dialogflow.cx.v3.Webhook.encode(message.webhookOverrides[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified WebhookConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Environment.WebhookConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Environment.WebhookConfig + * @static + * @param {google.cloud.dialogflow.cx.v3.Environment.IWebhookConfig} message WebhookConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WebhookConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WebhookConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.Environment.WebhookConfig + * @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.Environment.WebhookConfig} WebhookConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WebhookConfig.decode = function decode(reader, length, error) { + 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.Environment.WebhookConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.webhookOverrides && message.webhookOverrides.length)) + message.webhookOverrides = []; + message.webhookOverrides.push($root.google.cloud.dialogflow.cx.v3.Webhook.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WebhookConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Environment.WebhookConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.Environment.WebhookConfig} WebhookConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WebhookConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WebhookConfig message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.Environment.WebhookConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WebhookConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.webhookOverrides != null && message.hasOwnProperty("webhookOverrides")) { + if (!Array.isArray(message.webhookOverrides)) + return "webhookOverrides: array expected"; + for (var i = 0; i < message.webhookOverrides.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.Webhook.verify(message.webhookOverrides[i]); + if (error) + return "webhookOverrides." + error; + } + } + return null; + }; + + /** + * Creates a WebhookConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.Environment.WebhookConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.Environment.WebhookConfig} WebhookConfig + */ + WebhookConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.Environment.WebhookConfig) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.Environment.WebhookConfig(); + if (object.webhookOverrides) { + if (!Array.isArray(object.webhookOverrides)) + throw TypeError(".google.cloud.dialogflow.cx.v3.Environment.WebhookConfig.webhookOverrides: array expected"); + message.webhookOverrides = []; + for (var i = 0; i < object.webhookOverrides.length; ++i) { + if (typeof object.webhookOverrides[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Environment.WebhookConfig.webhookOverrides: object expected"); + message.webhookOverrides[i] = $root.google.cloud.dialogflow.cx.v3.Webhook.fromObject(object.webhookOverrides[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a WebhookConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.Environment.WebhookConfig + * @static + * @param {google.cloud.dialogflow.cx.v3.Environment.WebhookConfig} message WebhookConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WebhookConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.webhookOverrides = []; + if (message.webhookOverrides && message.webhookOverrides.length) { + object.webhookOverrides = []; + for (var j = 0; j < message.webhookOverrides.length; ++j) + object.webhookOverrides[j] = $root.google.cloud.dialogflow.cx.v3.Webhook.toObject(message.webhookOverrides[j], options); + } + return object; + }; + + /** + * Converts this WebhookConfig to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.Environment.WebhookConfig + * @instance + * @returns {Object.} JSON object + */ + WebhookConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WebhookConfig + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.Environment.WebhookConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WebhookConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Environment.WebhookConfig"; + }; + + return WebhookConfig; + })(); + + return Environment; + })(); + + v3.ListEnvironmentsRequest = (function() { /** - * Properties of a ListContinuousTestResultsRequest. + * Properties of a ListEnvironmentsRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IListContinuousTestResultsRequest - * @property {string|null} [parent] ListContinuousTestResultsRequest parent - * @property {number|null} [pageSize] ListContinuousTestResultsRequest pageSize - * @property {string|null} [pageToken] ListContinuousTestResultsRequest pageToken + * @interface IListEnvironmentsRequest + * @property {string|null} [parent] ListEnvironmentsRequest parent + * @property {number|null} [pageSize] ListEnvironmentsRequest pageSize + * @property {string|null} [pageToken] ListEnvironmentsRequest pageToken */ /** - * Constructs a new ListContinuousTestResultsRequest. + * Constructs a new ListEnvironmentsRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a ListContinuousTestResultsRequest. - * @implements IListContinuousTestResultsRequest + * @classdesc Represents a ListEnvironmentsRequest. + * @implements IListEnvironmentsRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IListContinuousTestResultsRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IListEnvironmentsRequest=} [properties] Properties to set */ - function ListContinuousTestResultsRequest(properties) { + function ListEnvironmentsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -41576,51 +42217,51 @@ } /** - * ListContinuousTestResultsRequest parent. + * ListEnvironmentsRequest parent. * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3.ListContinuousTestResultsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListEnvironmentsRequest * @instance */ - ListContinuousTestResultsRequest.prototype.parent = ""; + ListEnvironmentsRequest.prototype.parent = ""; /** - * ListContinuousTestResultsRequest pageSize. + * ListEnvironmentsRequest pageSize. * @member {number} pageSize - * @memberof google.cloud.dialogflow.cx.v3.ListContinuousTestResultsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListEnvironmentsRequest * @instance */ - ListContinuousTestResultsRequest.prototype.pageSize = 0; + ListEnvironmentsRequest.prototype.pageSize = 0; /** - * ListContinuousTestResultsRequest pageToken. + * ListEnvironmentsRequest pageToken. * @member {string} pageToken - * @memberof google.cloud.dialogflow.cx.v3.ListContinuousTestResultsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListEnvironmentsRequest * @instance */ - ListContinuousTestResultsRequest.prototype.pageToken = ""; + ListEnvironmentsRequest.prototype.pageToken = ""; /** - * Creates a new ListContinuousTestResultsRequest instance using the specified properties. + * Creates a new ListEnvironmentsRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.ListContinuousTestResultsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListEnvironmentsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IListContinuousTestResultsRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ListContinuousTestResultsRequest} ListContinuousTestResultsRequest instance + * @param {google.cloud.dialogflow.cx.v3.IListEnvironmentsRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ListEnvironmentsRequest} ListEnvironmentsRequest instance */ - ListContinuousTestResultsRequest.create = function create(properties) { - return new ListContinuousTestResultsRequest(properties); + ListEnvironmentsRequest.create = function create(properties) { + return new ListEnvironmentsRequest(properties); }; /** - * Encodes the specified ListContinuousTestResultsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListContinuousTestResultsRequest.verify|verify} messages. + * Encodes the specified ListEnvironmentsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListEnvironmentsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ListContinuousTestResultsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListEnvironmentsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IListContinuousTestResultsRequest} message ListContinuousTestResultsRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListEnvironmentsRequest} message ListEnvironmentsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListContinuousTestResultsRequest.encode = function encode(message, writer) { + ListEnvironmentsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) @@ -41633,33 +42274,33 @@ }; /** - * Encodes the specified ListContinuousTestResultsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListContinuousTestResultsRequest.verify|verify} messages. + * Encodes the specified ListEnvironmentsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListEnvironmentsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListContinuousTestResultsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListEnvironmentsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IListContinuousTestResultsRequest} message ListContinuousTestResultsRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListEnvironmentsRequest} message ListEnvironmentsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListContinuousTestResultsRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListEnvironmentsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListContinuousTestResultsRequest message from the specified reader or buffer. + * Decodes a ListEnvironmentsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ListContinuousTestResultsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListEnvironmentsRequest * @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.ListContinuousTestResultsRequest} ListContinuousTestResultsRequest + * @returns {google.cloud.dialogflow.cx.v3.ListEnvironmentsRequest} ListEnvironmentsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListContinuousTestResultsRequest.decode = function decode(reader, length, error) { + ListEnvironmentsRequest.decode = function decode(reader, length, error) { 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.ListContinuousTestResultsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ListEnvironmentsRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -41686,30 +42327,30 @@ }; /** - * Decodes a ListContinuousTestResultsRequest message from the specified reader or buffer, length delimited. + * Decodes a ListEnvironmentsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListContinuousTestResultsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListEnvironmentsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ListContinuousTestResultsRequest} ListContinuousTestResultsRequest + * @returns {google.cloud.dialogflow.cx.v3.ListEnvironmentsRequest} ListEnvironmentsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListContinuousTestResultsRequest.decodeDelimited = function decodeDelimited(reader) { + ListEnvironmentsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListContinuousTestResultsRequest message. + * Verifies a ListEnvironmentsRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ListContinuousTestResultsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListEnvironmentsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListContinuousTestResultsRequest.verify = function verify(message) { + ListEnvironmentsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.parent != null && message.hasOwnProperty("parent")) @@ -41725,17 +42366,17 @@ }; /** - * Creates a ListContinuousTestResultsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListEnvironmentsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ListContinuousTestResultsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListEnvironmentsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ListContinuousTestResultsRequest} ListContinuousTestResultsRequest + * @returns {google.cloud.dialogflow.cx.v3.ListEnvironmentsRequest} ListEnvironmentsRequest */ - ListContinuousTestResultsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListContinuousTestResultsRequest) + ListEnvironmentsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListEnvironmentsRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.ListContinuousTestResultsRequest(); + var message = new $root.google.cloud.dialogflow.cx.v3.ListEnvironmentsRequest(); if (object.parent != null) message.parent = String(object.parent); if (object.pageSize != null) @@ -41746,15 +42387,15 @@ }; /** - * Creates a plain object from a ListContinuousTestResultsRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListEnvironmentsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ListContinuousTestResultsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListEnvironmentsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.ListContinuousTestResultsRequest} message ListContinuousTestResultsRequest + * @param {google.cloud.dialogflow.cx.v3.ListEnvironmentsRequest} message ListEnvironmentsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListContinuousTestResultsRequest.toObject = function toObject(message, options) { + ListEnvironmentsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -41773,54 +42414,54 @@ }; /** - * Converts this ListContinuousTestResultsRequest to JSON. + * Converts this ListEnvironmentsRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ListContinuousTestResultsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListEnvironmentsRequest * @instance * @returns {Object.} JSON object */ - ListContinuousTestResultsRequest.prototype.toJSON = function toJSON() { + ListEnvironmentsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListContinuousTestResultsRequest + * Gets the default type url for ListEnvironmentsRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.ListContinuousTestResultsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListEnvironmentsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListContinuousTestResultsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListEnvironmentsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListContinuousTestResultsRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListEnvironmentsRequest"; }; - return ListContinuousTestResultsRequest; + return ListEnvironmentsRequest; })(); - v3.ListContinuousTestResultsResponse = (function() { + v3.ListEnvironmentsResponse = (function() { /** - * Properties of a ListContinuousTestResultsResponse. + * Properties of a ListEnvironmentsResponse. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IListContinuousTestResultsResponse - * @property {Array.|null} [continuousTestResults] ListContinuousTestResultsResponse continuousTestResults - * @property {string|null} [nextPageToken] ListContinuousTestResultsResponse nextPageToken + * @interface IListEnvironmentsResponse + * @property {Array.|null} [environments] ListEnvironmentsResponse environments + * @property {string|null} [nextPageToken] ListEnvironmentsResponse nextPageToken */ /** - * Constructs a new ListContinuousTestResultsResponse. + * Constructs a new ListEnvironmentsResponse. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a ListContinuousTestResultsResponse. - * @implements IListContinuousTestResultsResponse + * @classdesc Represents a ListEnvironmentsResponse. + * @implements IListEnvironmentsResponse * @constructor - * @param {google.cloud.dialogflow.cx.v3.IListContinuousTestResultsResponse=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IListEnvironmentsResponse=} [properties] Properties to set */ - function ListContinuousTestResultsResponse(properties) { - this.continuousTestResults = []; + function ListEnvironmentsResponse(properties) { + this.environments = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -41828,90 +42469,90 @@ } /** - * ListContinuousTestResultsResponse continuousTestResults. - * @member {Array.} continuousTestResults - * @memberof google.cloud.dialogflow.cx.v3.ListContinuousTestResultsResponse + * ListEnvironmentsResponse environments. + * @member {Array.} environments + * @memberof google.cloud.dialogflow.cx.v3.ListEnvironmentsResponse * @instance */ - ListContinuousTestResultsResponse.prototype.continuousTestResults = $util.emptyArray; + ListEnvironmentsResponse.prototype.environments = $util.emptyArray; /** - * ListContinuousTestResultsResponse nextPageToken. + * ListEnvironmentsResponse nextPageToken. * @member {string} nextPageToken - * @memberof google.cloud.dialogflow.cx.v3.ListContinuousTestResultsResponse + * @memberof google.cloud.dialogflow.cx.v3.ListEnvironmentsResponse * @instance */ - ListContinuousTestResultsResponse.prototype.nextPageToken = ""; + ListEnvironmentsResponse.prototype.nextPageToken = ""; /** - * Creates a new ListContinuousTestResultsResponse instance using the specified properties. + * Creates a new ListEnvironmentsResponse instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.ListContinuousTestResultsResponse + * @memberof google.cloud.dialogflow.cx.v3.ListEnvironmentsResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IListContinuousTestResultsResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ListContinuousTestResultsResponse} ListContinuousTestResultsResponse instance + * @param {google.cloud.dialogflow.cx.v3.IListEnvironmentsResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ListEnvironmentsResponse} ListEnvironmentsResponse instance */ - ListContinuousTestResultsResponse.create = function create(properties) { - return new ListContinuousTestResultsResponse(properties); + ListEnvironmentsResponse.create = function create(properties) { + return new ListEnvironmentsResponse(properties); }; /** - * Encodes the specified ListContinuousTestResultsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListContinuousTestResultsResponse.verify|verify} messages. + * Encodes the specified ListEnvironmentsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListEnvironmentsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ListContinuousTestResultsResponse + * @memberof google.cloud.dialogflow.cx.v3.ListEnvironmentsResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IListContinuousTestResultsResponse} message ListContinuousTestResultsResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListEnvironmentsResponse} message ListEnvironmentsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListContinuousTestResultsResponse.encode = function encode(message, writer) { + ListEnvironmentsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.continuousTestResults != null && message.continuousTestResults.length) - for (var i = 0; i < message.continuousTestResults.length; ++i) - $root.google.cloud.dialogflow.cx.v3.ContinuousTestResult.encode(message.continuousTestResults[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.environments != null && message.environments.length) + for (var i = 0; i < message.environments.length; ++i) + $root.google.cloud.dialogflow.cx.v3.Environment.encode(message.environments[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; /** - * Encodes the specified ListContinuousTestResultsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListContinuousTestResultsResponse.verify|verify} messages. + * Encodes the specified ListEnvironmentsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListEnvironmentsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListContinuousTestResultsResponse + * @memberof google.cloud.dialogflow.cx.v3.ListEnvironmentsResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IListContinuousTestResultsResponse} message ListContinuousTestResultsResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListEnvironmentsResponse} message ListEnvironmentsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListContinuousTestResultsResponse.encodeDelimited = function encodeDelimited(message, writer) { + ListEnvironmentsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListContinuousTestResultsResponse message from the specified reader or buffer. + * Decodes a ListEnvironmentsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ListContinuousTestResultsResponse + * @memberof google.cloud.dialogflow.cx.v3.ListEnvironmentsResponse * @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.ListContinuousTestResultsResponse} ListContinuousTestResultsResponse + * @returns {google.cloud.dialogflow.cx.v3.ListEnvironmentsResponse} ListEnvironmentsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListContinuousTestResultsResponse.decode = function decode(reader, length, error) { + ListEnvironmentsResponse.decode = function decode(reader, length, error) { 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.ListContinuousTestResultsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ListEnvironmentsResponse(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - if (!(message.continuousTestResults && message.continuousTestResults.length)) - message.continuousTestResults = []; - message.continuousTestResults.push($root.google.cloud.dialogflow.cx.v3.ContinuousTestResult.decode(reader, reader.uint32())); + if (!(message.environments && message.environments.length)) + message.environments = []; + message.environments.push($root.google.cloud.dialogflow.cx.v3.Environment.decode(reader, reader.uint32())); break; } case 2: { @@ -41927,39 +42568,39 @@ }; /** - * Decodes a ListContinuousTestResultsResponse message from the specified reader or buffer, length delimited. + * Decodes a ListEnvironmentsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListContinuousTestResultsResponse + * @memberof google.cloud.dialogflow.cx.v3.ListEnvironmentsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ListContinuousTestResultsResponse} ListContinuousTestResultsResponse + * @returns {google.cloud.dialogflow.cx.v3.ListEnvironmentsResponse} ListEnvironmentsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListContinuousTestResultsResponse.decodeDelimited = function decodeDelimited(reader) { + ListEnvironmentsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListContinuousTestResultsResponse message. + * Verifies a ListEnvironmentsResponse message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ListContinuousTestResultsResponse + * @memberof google.cloud.dialogflow.cx.v3.ListEnvironmentsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListContinuousTestResultsResponse.verify = function verify(message) { + ListEnvironmentsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.continuousTestResults != null && message.hasOwnProperty("continuousTestResults")) { - if (!Array.isArray(message.continuousTestResults)) - return "continuousTestResults: array expected"; - for (var i = 0; i < message.continuousTestResults.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.ContinuousTestResult.verify(message.continuousTestResults[i]); + if (message.environments != null && message.hasOwnProperty("environments")) { + if (!Array.isArray(message.environments)) + return "environments: array expected"; + for (var i = 0; i < message.environments.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.Environment.verify(message.environments[i]); if (error) - return "continuousTestResults." + error; + return "environments." + error; } } if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) @@ -41969,25 +42610,25 @@ }; /** - * Creates a ListContinuousTestResultsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListEnvironmentsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ListContinuousTestResultsResponse + * @memberof google.cloud.dialogflow.cx.v3.ListEnvironmentsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ListContinuousTestResultsResponse} ListContinuousTestResultsResponse + * @returns {google.cloud.dialogflow.cx.v3.ListEnvironmentsResponse} ListEnvironmentsResponse */ - ListContinuousTestResultsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListContinuousTestResultsResponse) + ListEnvironmentsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListEnvironmentsResponse) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.ListContinuousTestResultsResponse(); - if (object.continuousTestResults) { - if (!Array.isArray(object.continuousTestResults)) - throw TypeError(".google.cloud.dialogflow.cx.v3.ListContinuousTestResultsResponse.continuousTestResults: array expected"); - message.continuousTestResults = []; - for (var i = 0; i < object.continuousTestResults.length; ++i) { - if (typeof object.continuousTestResults[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.ListContinuousTestResultsResponse.continuousTestResults: object expected"); - message.continuousTestResults[i] = $root.google.cloud.dialogflow.cx.v3.ContinuousTestResult.fromObject(object.continuousTestResults[i]); + var message = new $root.google.cloud.dialogflow.cx.v3.ListEnvironmentsResponse(); + if (object.environments) { + if (!Array.isArray(object.environments)) + throw TypeError(".google.cloud.dialogflow.cx.v3.ListEnvironmentsResponse.environments: array expected"); + message.environments = []; + for (var i = 0; i < object.environments.length; ++i) { + if (typeof object.environments[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.ListEnvironmentsResponse.environments: object expected"); + message.environments[i] = $root.google.cloud.dialogflow.cx.v3.Environment.fromObject(object.environments[i]); } } if (object.nextPageToken != null) @@ -41996,26 +42637,26 @@ }; /** - * Creates a plain object from a ListContinuousTestResultsResponse message. Also converts values to other types if specified. + * Creates a plain object from a ListEnvironmentsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ListContinuousTestResultsResponse + * @memberof google.cloud.dialogflow.cx.v3.ListEnvironmentsResponse * @static - * @param {google.cloud.dialogflow.cx.v3.ListContinuousTestResultsResponse} message ListContinuousTestResultsResponse + * @param {google.cloud.dialogflow.cx.v3.ListEnvironmentsResponse} message ListEnvironmentsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListContinuousTestResultsResponse.toObject = function toObject(message, options) { + ListEnvironmentsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.continuousTestResults = []; + object.environments = []; if (options.defaults) object.nextPageToken = ""; - if (message.continuousTestResults && message.continuousTestResults.length) { - object.continuousTestResults = []; - for (var j = 0; j < message.continuousTestResults.length; ++j) - object.continuousTestResults[j] = $root.google.cloud.dialogflow.cx.v3.ContinuousTestResult.toObject(message.continuousTestResults[j], options); + if (message.environments && message.environments.length) { + object.environments = []; + for (var j = 0; j < message.environments.length; ++j) + object.environments[j] = $root.google.cloud.dialogflow.cx.v3.Environment.toObject(message.environments[j], options); } if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) object.nextPageToken = message.nextPageToken; @@ -42023,53 +42664,52 @@ }; /** - * Converts this ListContinuousTestResultsResponse to JSON. + * Converts this ListEnvironmentsResponse to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ListContinuousTestResultsResponse + * @memberof google.cloud.dialogflow.cx.v3.ListEnvironmentsResponse * @instance * @returns {Object.} JSON object */ - ListContinuousTestResultsResponse.prototype.toJSON = function toJSON() { + ListEnvironmentsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListContinuousTestResultsResponse + * Gets the default type url for ListEnvironmentsResponse * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.ListContinuousTestResultsResponse + * @memberof google.cloud.dialogflow.cx.v3.ListEnvironmentsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListContinuousTestResultsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListEnvironmentsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListContinuousTestResultsResponse"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListEnvironmentsResponse"; }; - return ListContinuousTestResultsResponse; + return ListEnvironmentsResponse; })(); - v3.DeployFlowRequest = (function() { + v3.GetEnvironmentRequest = (function() { /** - * Properties of a DeployFlowRequest. + * Properties of a GetEnvironmentRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IDeployFlowRequest - * @property {string|null} [environment] DeployFlowRequest environment - * @property {string|null} [flowVersion] DeployFlowRequest flowVersion + * @interface IGetEnvironmentRequest + * @property {string|null} [name] GetEnvironmentRequest name */ /** - * Constructs a new DeployFlowRequest. + * Constructs a new GetEnvironmentRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a DeployFlowRequest. - * @implements IDeployFlowRequest + * @classdesc Represents a GetEnvironmentRequest. + * @implements IGetEnvironmentRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IDeployFlowRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IGetEnvironmentRequest=} [properties] Properties to set */ - function DeployFlowRequest(properties) { + function GetEnvironmentRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -42077,91 +42717,77 @@ } /** - * DeployFlowRequest environment. - * @member {string} environment - * @memberof google.cloud.dialogflow.cx.v3.DeployFlowRequest - * @instance - */ - DeployFlowRequest.prototype.environment = ""; - - /** - * DeployFlowRequest flowVersion. - * @member {string} flowVersion - * @memberof google.cloud.dialogflow.cx.v3.DeployFlowRequest + * GetEnvironmentRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.GetEnvironmentRequest * @instance */ - DeployFlowRequest.prototype.flowVersion = ""; + GetEnvironmentRequest.prototype.name = ""; /** - * Creates a new DeployFlowRequest instance using the specified properties. + * Creates a new GetEnvironmentRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.DeployFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.GetEnvironmentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IDeployFlowRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.DeployFlowRequest} DeployFlowRequest instance + * @param {google.cloud.dialogflow.cx.v3.IGetEnvironmentRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.GetEnvironmentRequest} GetEnvironmentRequest instance */ - DeployFlowRequest.create = function create(properties) { - return new DeployFlowRequest(properties); + GetEnvironmentRequest.create = function create(properties) { + return new GetEnvironmentRequest(properties); }; /** - * Encodes the specified DeployFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeployFlowRequest.verify|verify} messages. + * Encodes the specified GetEnvironmentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetEnvironmentRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.DeployFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.GetEnvironmentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IDeployFlowRequest} message DeployFlowRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IGetEnvironmentRequest} message GetEnvironmentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeployFlowRequest.encode = function encode(message, writer) { + GetEnvironmentRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.environment); - if (message.flowVersion != null && Object.hasOwnProperty.call(message, "flowVersion")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.flowVersion); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified DeployFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeployFlowRequest.verify|verify} messages. + * Encodes the specified GetEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetEnvironmentRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.DeployFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.GetEnvironmentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IDeployFlowRequest} message DeployFlowRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IGetEnvironmentRequest} message GetEnvironmentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeployFlowRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetEnvironmentRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeployFlowRequest message from the specified reader or buffer. + * Decodes a GetEnvironmentRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.DeployFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.GetEnvironmentRequest * @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.DeployFlowRequest} DeployFlowRequest + * @returns {google.cloud.dialogflow.cx.v3.GetEnvironmentRequest} GetEnvironmentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeployFlowRequest.decode = function decode(reader, length, error) { + GetEnvironmentRequest.decode = function decode(reader, length, error) { 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.DeployFlowRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.GetEnvironmentRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.environment = reader.string(); - break; - } - case 2: { - message.flowVersion = reader.string(); + message.name = reader.string(); break; } default: @@ -42173,132 +42799,123 @@ }; /** - * Decodes a DeployFlowRequest message from the specified reader or buffer, length delimited. + * Decodes a GetEnvironmentRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.DeployFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.GetEnvironmentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.DeployFlowRequest} DeployFlowRequest + * @returns {google.cloud.dialogflow.cx.v3.GetEnvironmentRequest} GetEnvironmentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeployFlowRequest.decodeDelimited = function decodeDelimited(reader) { + GetEnvironmentRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeployFlowRequest message. + * Verifies a GetEnvironmentRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.DeployFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.GetEnvironmentRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeployFlowRequest.verify = function verify(message) { + GetEnvironmentRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.environment != null && message.hasOwnProperty("environment")) - if (!$util.isString(message.environment)) - return "environment: string expected"; - if (message.flowVersion != null && message.hasOwnProperty("flowVersion")) - if (!$util.isString(message.flowVersion)) - return "flowVersion: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a DeployFlowRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetEnvironmentRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.DeployFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.GetEnvironmentRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.DeployFlowRequest} DeployFlowRequest + * @returns {google.cloud.dialogflow.cx.v3.GetEnvironmentRequest} GetEnvironmentRequest */ - DeployFlowRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.DeployFlowRequest) + GetEnvironmentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.GetEnvironmentRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.DeployFlowRequest(); - if (object.environment != null) - message.environment = String(object.environment); - if (object.flowVersion != null) - message.flowVersion = String(object.flowVersion); + var message = new $root.google.cloud.dialogflow.cx.v3.GetEnvironmentRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a DeployFlowRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetEnvironmentRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.DeployFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.GetEnvironmentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.DeployFlowRequest} message DeployFlowRequest + * @param {google.cloud.dialogflow.cx.v3.GetEnvironmentRequest} message GetEnvironmentRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeployFlowRequest.toObject = function toObject(message, options) { + GetEnvironmentRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.environment = ""; - object.flowVersion = ""; - } - if (message.environment != null && message.hasOwnProperty("environment")) - object.environment = message.environment; - if (message.flowVersion != null && message.hasOwnProperty("flowVersion")) - object.flowVersion = message.flowVersion; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this DeployFlowRequest to JSON. + * Converts this GetEnvironmentRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.DeployFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.GetEnvironmentRequest * @instance * @returns {Object.} JSON object */ - DeployFlowRequest.prototype.toJSON = function toJSON() { + GetEnvironmentRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeployFlowRequest + * Gets the default type url for GetEnvironmentRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.DeployFlowRequest + * @memberof google.cloud.dialogflow.cx.v3.GetEnvironmentRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeployFlowRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetEnvironmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.DeployFlowRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.GetEnvironmentRequest"; }; - return DeployFlowRequest; + return GetEnvironmentRequest; })(); - v3.DeployFlowResponse = (function() { + v3.CreateEnvironmentRequest = (function() { /** - * Properties of a DeployFlowResponse. + * Properties of a CreateEnvironmentRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IDeployFlowResponse - * @property {google.cloud.dialogflow.cx.v3.IEnvironment|null} [environment] DeployFlowResponse environment - * @property {string|null} [deployment] DeployFlowResponse deployment + * @interface ICreateEnvironmentRequest + * @property {string|null} [parent] CreateEnvironmentRequest parent + * @property {google.cloud.dialogflow.cx.v3.IEnvironment|null} [environment] CreateEnvironmentRequest environment */ /** - * Constructs a new DeployFlowResponse. + * Constructs a new CreateEnvironmentRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a DeployFlowResponse. - * @implements IDeployFlowResponse + * @classdesc Represents a CreateEnvironmentRequest. + * @implements ICreateEnvironmentRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IDeployFlowResponse=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.ICreateEnvironmentRequest=} [properties] Properties to set */ - function DeployFlowResponse(properties) { + function CreateEnvironmentRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -42306,91 +42923,91 @@ } /** - * DeployFlowResponse environment. - * @member {google.cloud.dialogflow.cx.v3.IEnvironment|null|undefined} environment - * @memberof google.cloud.dialogflow.cx.v3.DeployFlowResponse + * CreateEnvironmentRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.cx.v3.CreateEnvironmentRequest * @instance */ - DeployFlowResponse.prototype.environment = null; + CreateEnvironmentRequest.prototype.parent = ""; /** - * DeployFlowResponse deployment. - * @member {string} deployment - * @memberof google.cloud.dialogflow.cx.v3.DeployFlowResponse + * CreateEnvironmentRequest environment. + * @member {google.cloud.dialogflow.cx.v3.IEnvironment|null|undefined} environment + * @memberof google.cloud.dialogflow.cx.v3.CreateEnvironmentRequest * @instance */ - DeployFlowResponse.prototype.deployment = ""; + CreateEnvironmentRequest.prototype.environment = null; /** - * Creates a new DeployFlowResponse instance using the specified properties. + * Creates a new CreateEnvironmentRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.DeployFlowResponse + * @memberof google.cloud.dialogflow.cx.v3.CreateEnvironmentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IDeployFlowResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.DeployFlowResponse} DeployFlowResponse instance + * @param {google.cloud.dialogflow.cx.v3.ICreateEnvironmentRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.CreateEnvironmentRequest} CreateEnvironmentRequest instance */ - DeployFlowResponse.create = function create(properties) { - return new DeployFlowResponse(properties); + CreateEnvironmentRequest.create = function create(properties) { + return new CreateEnvironmentRequest(properties); }; /** - * Encodes the specified DeployFlowResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeployFlowResponse.verify|verify} messages. + * Encodes the specified CreateEnvironmentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateEnvironmentRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.DeployFlowResponse + * @memberof google.cloud.dialogflow.cx.v3.CreateEnvironmentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IDeployFlowResponse} message DeployFlowResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ICreateEnvironmentRequest} message CreateEnvironmentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeployFlowResponse.encode = function encode(message, writer) { + CreateEnvironmentRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) - $root.google.cloud.dialogflow.cx.v3.Environment.encode(message.environment, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.deployment != null && Object.hasOwnProperty.call(message, "deployment")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.deployment); + $root.google.cloud.dialogflow.cx.v3.Environment.encode(message.environment, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified DeployFlowResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeployFlowResponse.verify|verify} messages. + * Encodes the specified CreateEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateEnvironmentRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.DeployFlowResponse + * @memberof google.cloud.dialogflow.cx.v3.CreateEnvironmentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IDeployFlowResponse} message DeployFlowResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ICreateEnvironmentRequest} message CreateEnvironmentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeployFlowResponse.encodeDelimited = function encodeDelimited(message, writer) { + CreateEnvironmentRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeployFlowResponse message from the specified reader or buffer. + * Decodes a CreateEnvironmentRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.DeployFlowResponse + * @memberof google.cloud.dialogflow.cx.v3.CreateEnvironmentRequest * @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.DeployFlowResponse} DeployFlowResponse + * @returns {google.cloud.dialogflow.cx.v3.CreateEnvironmentRequest} CreateEnvironmentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeployFlowResponse.decode = function decode(reader, length, error) { + CreateEnvironmentRequest.decode = function decode(reader, length, error) { 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.DeployFlowResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.CreateEnvironmentRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.environment = $root.google.cloud.dialogflow.cx.v3.Environment.decode(reader, reader.uint32()); + message.parent = reader.string(); break; } case 2: { - message.deployment = reader.string(); + message.environment = $root.google.cloud.dialogflow.cx.v3.Environment.decode(reader, reader.uint32()); break; } default: @@ -42402,137 +43019,137 @@ }; /** - * Decodes a DeployFlowResponse message from the specified reader or buffer, length delimited. + * Decodes a CreateEnvironmentRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.DeployFlowResponse + * @memberof google.cloud.dialogflow.cx.v3.CreateEnvironmentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.DeployFlowResponse} DeployFlowResponse + * @returns {google.cloud.dialogflow.cx.v3.CreateEnvironmentRequest} CreateEnvironmentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeployFlowResponse.decodeDelimited = function decodeDelimited(reader) { + CreateEnvironmentRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeployFlowResponse message. + * Verifies a CreateEnvironmentRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.DeployFlowResponse + * @memberof google.cloud.dialogflow.cx.v3.CreateEnvironmentRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeployFlowResponse.verify = function verify(message) { + CreateEnvironmentRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; if (message.environment != null && message.hasOwnProperty("environment")) { var error = $root.google.cloud.dialogflow.cx.v3.Environment.verify(message.environment); if (error) return "environment." + error; } - if (message.deployment != null && message.hasOwnProperty("deployment")) - if (!$util.isString(message.deployment)) - return "deployment: string expected"; return null; }; /** - * Creates a DeployFlowResponse message from a plain object. Also converts values to their respective internal types. + * Creates a CreateEnvironmentRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.DeployFlowResponse + * @memberof google.cloud.dialogflow.cx.v3.CreateEnvironmentRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.DeployFlowResponse} DeployFlowResponse + * @returns {google.cloud.dialogflow.cx.v3.CreateEnvironmentRequest} CreateEnvironmentRequest */ - DeployFlowResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.DeployFlowResponse) + CreateEnvironmentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.CreateEnvironmentRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.DeployFlowResponse(); + var message = new $root.google.cloud.dialogflow.cx.v3.CreateEnvironmentRequest(); + if (object.parent != null) + message.parent = String(object.parent); if (object.environment != null) { if (typeof object.environment !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.DeployFlowResponse.environment: object expected"); + throw TypeError(".google.cloud.dialogflow.cx.v3.CreateEnvironmentRequest.environment: object expected"); message.environment = $root.google.cloud.dialogflow.cx.v3.Environment.fromObject(object.environment); } - if (object.deployment != null) - message.deployment = String(object.deployment); return message; }; /** - * Creates a plain object from a DeployFlowResponse message. Also converts values to other types if specified. + * Creates a plain object from a CreateEnvironmentRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.DeployFlowResponse + * @memberof google.cloud.dialogflow.cx.v3.CreateEnvironmentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.DeployFlowResponse} message DeployFlowResponse + * @param {google.cloud.dialogflow.cx.v3.CreateEnvironmentRequest} message CreateEnvironmentRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeployFlowResponse.toObject = function toObject(message, options) { + CreateEnvironmentRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { + object.parent = ""; object.environment = null; - object.deployment = ""; } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; if (message.environment != null && message.hasOwnProperty("environment")) object.environment = $root.google.cloud.dialogflow.cx.v3.Environment.toObject(message.environment, options); - if (message.deployment != null && message.hasOwnProperty("deployment")) - object.deployment = message.deployment; return object; }; /** - * Converts this DeployFlowResponse to JSON. + * Converts this CreateEnvironmentRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.DeployFlowResponse + * @memberof google.cloud.dialogflow.cx.v3.CreateEnvironmentRequest * @instance * @returns {Object.} JSON object */ - DeployFlowResponse.prototype.toJSON = function toJSON() { + CreateEnvironmentRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeployFlowResponse + * Gets the default type url for CreateEnvironmentRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.DeployFlowResponse + * @memberof google.cloud.dialogflow.cx.v3.CreateEnvironmentRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeployFlowResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateEnvironmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.DeployFlowResponse"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.CreateEnvironmentRequest"; }; - return DeployFlowResponse; + return CreateEnvironmentRequest; })(); - v3.DeployFlowMetadata = (function() { + v3.UpdateEnvironmentRequest = (function() { /** - * Properties of a DeployFlowMetadata. + * Properties of an UpdateEnvironmentRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IDeployFlowMetadata - * @property {Array.|null} [testErrors] DeployFlowMetadata testErrors + * @interface IUpdateEnvironmentRequest + * @property {google.cloud.dialogflow.cx.v3.IEnvironment|null} [environment] UpdateEnvironmentRequest environment + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateEnvironmentRequest updateMask */ /** - * Constructs a new DeployFlowMetadata. + * Constructs a new UpdateEnvironmentRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a DeployFlowMetadata. - * @implements IDeployFlowMetadata + * @classdesc Represents an UpdateEnvironmentRequest. + * @implements IUpdateEnvironmentRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IDeployFlowMetadata=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IUpdateEnvironmentRequest=} [properties] Properties to set */ - function DeployFlowMetadata(properties) { - this.testErrors = []; + function UpdateEnvironmentRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -42540,80 +43157,91 @@ } /** - * DeployFlowMetadata testErrors. - * @member {Array.} testErrors - * @memberof google.cloud.dialogflow.cx.v3.DeployFlowMetadata + * UpdateEnvironmentRequest environment. + * @member {google.cloud.dialogflow.cx.v3.IEnvironment|null|undefined} environment + * @memberof google.cloud.dialogflow.cx.v3.UpdateEnvironmentRequest * @instance */ - DeployFlowMetadata.prototype.testErrors = $util.emptyArray; + UpdateEnvironmentRequest.prototype.environment = null; /** - * Creates a new DeployFlowMetadata instance using the specified properties. + * UpdateEnvironmentRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dialogflow.cx.v3.UpdateEnvironmentRequest + * @instance + */ + UpdateEnvironmentRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateEnvironmentRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.DeployFlowMetadata + * @memberof google.cloud.dialogflow.cx.v3.UpdateEnvironmentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IDeployFlowMetadata=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.DeployFlowMetadata} DeployFlowMetadata instance + * @param {google.cloud.dialogflow.cx.v3.IUpdateEnvironmentRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.UpdateEnvironmentRequest} UpdateEnvironmentRequest instance */ - DeployFlowMetadata.create = function create(properties) { - return new DeployFlowMetadata(properties); + UpdateEnvironmentRequest.create = function create(properties) { + return new UpdateEnvironmentRequest(properties); }; /** - * Encodes the specified DeployFlowMetadata message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeployFlowMetadata.verify|verify} messages. + * Encodes the specified UpdateEnvironmentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateEnvironmentRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.DeployFlowMetadata + * @memberof google.cloud.dialogflow.cx.v3.UpdateEnvironmentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IDeployFlowMetadata} message DeployFlowMetadata message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IUpdateEnvironmentRequest} message UpdateEnvironmentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeployFlowMetadata.encode = function encode(message, writer) { + UpdateEnvironmentRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.testErrors != null && message.testErrors.length) - for (var i = 0; i < message.testErrors.length; ++i) - $root.google.cloud.dialogflow.cx.v3.TestError.encode(message.testErrors[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) + $root.google.cloud.dialogflow.cx.v3.Environment.encode(message.environment, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified DeployFlowMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeployFlowMetadata.verify|verify} messages. + * Encodes the specified UpdateEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateEnvironmentRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.DeployFlowMetadata + * @memberof google.cloud.dialogflow.cx.v3.UpdateEnvironmentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IDeployFlowMetadata} message DeployFlowMetadata message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IUpdateEnvironmentRequest} message UpdateEnvironmentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeployFlowMetadata.encodeDelimited = function encodeDelimited(message, writer) { + UpdateEnvironmentRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeployFlowMetadata message from the specified reader or buffer. + * Decodes an UpdateEnvironmentRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.DeployFlowMetadata + * @memberof google.cloud.dialogflow.cx.v3.UpdateEnvironmentRequest * @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.DeployFlowMetadata} DeployFlowMetadata + * @returns {google.cloud.dialogflow.cx.v3.UpdateEnvironmentRequest} UpdateEnvironmentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeployFlowMetadata.decode = function decode(reader, length, error) { + UpdateEnvironmentRequest.decode = function decode(reader, length, error) { 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.DeployFlowMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.UpdateEnvironmentRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - if (!(message.testErrors && message.testErrors.length)) - message.testErrors = []; - message.testErrors.push($root.google.cloud.dialogflow.cx.v3.TestError.decode(reader, reader.uint32())); + message.environment = $root.google.cloud.dialogflow.cx.v3.Environment.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; } default: @@ -42625,579 +43253,348 @@ }; /** - * Decodes a DeployFlowMetadata message from the specified reader or buffer, length delimited. + * Decodes an UpdateEnvironmentRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.DeployFlowMetadata + * @memberof google.cloud.dialogflow.cx.v3.UpdateEnvironmentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.DeployFlowMetadata} DeployFlowMetadata + * @returns {google.cloud.dialogflow.cx.v3.UpdateEnvironmentRequest} UpdateEnvironmentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeployFlowMetadata.decodeDelimited = function decodeDelimited(reader) { + UpdateEnvironmentRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeployFlowMetadata message. + * Verifies an UpdateEnvironmentRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.DeployFlowMetadata + * @memberof google.cloud.dialogflow.cx.v3.UpdateEnvironmentRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeployFlowMetadata.verify = function verify(message) { + UpdateEnvironmentRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.testErrors != null && message.hasOwnProperty("testErrors")) { - if (!Array.isArray(message.testErrors)) - return "testErrors: array expected"; - for (var i = 0; i < message.testErrors.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.TestError.verify(message.testErrors[i]); - if (error) - return "testErrors." + error; - } + if (message.environment != null && message.hasOwnProperty("environment")) { + var error = $root.google.cloud.dialogflow.cx.v3.Environment.verify(message.environment); + if (error) + return "environment." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; } return null; }; /** - * Creates a DeployFlowMetadata message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateEnvironmentRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.DeployFlowMetadata + * @memberof google.cloud.dialogflow.cx.v3.UpdateEnvironmentRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.DeployFlowMetadata} DeployFlowMetadata + * @returns {google.cloud.dialogflow.cx.v3.UpdateEnvironmentRequest} UpdateEnvironmentRequest */ - DeployFlowMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.DeployFlowMetadata) + UpdateEnvironmentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.UpdateEnvironmentRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.DeployFlowMetadata(); - if (object.testErrors) { - if (!Array.isArray(object.testErrors)) - throw TypeError(".google.cloud.dialogflow.cx.v3.DeployFlowMetadata.testErrors: array expected"); - message.testErrors = []; - for (var i = 0; i < object.testErrors.length; ++i) { - if (typeof object.testErrors[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.DeployFlowMetadata.testErrors: object expected"); - message.testErrors[i] = $root.google.cloud.dialogflow.cx.v3.TestError.fromObject(object.testErrors[i]); - } + var message = new $root.google.cloud.dialogflow.cx.v3.UpdateEnvironmentRequest(); + if (object.environment != null) { + if (typeof object.environment !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.UpdateEnvironmentRequest.environment: object expected"); + message.environment = $root.google.cloud.dialogflow.cx.v3.Environment.fromObject(object.environment); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.UpdateEnvironmentRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } return message; }; /** - * Creates a plain object from a DeployFlowMetadata message. Also converts values to other types if specified. + * Creates a plain object from an UpdateEnvironmentRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.DeployFlowMetadata + * @memberof google.cloud.dialogflow.cx.v3.UpdateEnvironmentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.DeployFlowMetadata} message DeployFlowMetadata + * @param {google.cloud.dialogflow.cx.v3.UpdateEnvironmentRequest} message UpdateEnvironmentRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeployFlowMetadata.toObject = function toObject(message, options) { + UpdateEnvironmentRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.testErrors = []; - if (message.testErrors && message.testErrors.length) { - object.testErrors = []; - for (var j = 0; j < message.testErrors.length; ++j) - object.testErrors[j] = $root.google.cloud.dialogflow.cx.v3.TestError.toObject(message.testErrors[j], options); + if (options.defaults) { + object.environment = null; + object.updateMask = null; } + if (message.environment != null && message.hasOwnProperty("environment")) + object.environment = $root.google.cloud.dialogflow.cx.v3.Environment.toObject(message.environment, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; /** - * Converts this DeployFlowMetadata to JSON. + * Converts this UpdateEnvironmentRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.DeployFlowMetadata + * @memberof google.cloud.dialogflow.cx.v3.UpdateEnvironmentRequest * @instance * @returns {Object.} JSON object */ - DeployFlowMetadata.prototype.toJSON = function toJSON() { + UpdateEnvironmentRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeployFlowMetadata + * Gets the default type url for UpdateEnvironmentRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.DeployFlowMetadata + * @memberof google.cloud.dialogflow.cx.v3.UpdateEnvironmentRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeployFlowMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UpdateEnvironmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.DeployFlowMetadata"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.UpdateEnvironmentRequest"; }; - return DeployFlowMetadata; + return UpdateEnvironmentRequest; })(); - v3.TestCases = (function() { + v3.DeleteEnvironmentRequest = (function() { /** - * Constructs a new TestCases service. + * Properties of a DeleteEnvironmentRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a TestCases - * @extends $protobuf.rpc.Service + * @interface IDeleteEnvironmentRequest + * @property {string|null} [name] DeleteEnvironmentRequest name + */ + + /** + * Constructs a new DeleteEnvironmentRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a DeleteEnvironmentRequest. + * @implements IDeleteEnvironmentRequest * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @param {google.cloud.dialogflow.cx.v3.IDeleteEnvironmentRequest=} [properties] Properties to set */ - function TestCases(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + function DeleteEnvironmentRequest(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]]; } - (TestCases.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = TestCases; + /** + * DeleteEnvironmentRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.DeleteEnvironmentRequest + * @instance + */ + DeleteEnvironmentRequest.prototype.name = ""; /** - * Creates new TestCases service using the specified rpc implementation. + * Creates a new DeleteEnvironmentRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.TestCases + * @memberof google.cloud.dialogflow.cx.v3.DeleteEnvironmentRequest * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {TestCases} RPC service. Useful where requests and/or responses are streamed. + * @param {google.cloud.dialogflow.cx.v3.IDeleteEnvironmentRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.DeleteEnvironmentRequest} DeleteEnvironmentRequest instance */ - TestCases.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); + DeleteEnvironmentRequest.create = function create(properties) { + return new DeleteEnvironmentRequest(properties); }; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.TestCases|listTestCases}. - * @memberof google.cloud.dialogflow.cx.v3.TestCases - * @typedef ListTestCasesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.ListTestCasesResponse} [response] ListTestCasesResponse + * Encodes the specified DeleteEnvironmentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteEnvironmentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.DeleteEnvironmentRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IDeleteEnvironmentRequest} message DeleteEnvironmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + DeleteEnvironmentRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; /** - * Calls ListTestCases. - * @function listTestCases - * @memberof google.cloud.dialogflow.cx.v3.TestCases - * @instance - * @param {google.cloud.dialogflow.cx.v3.IListTestCasesRequest} request ListTestCasesRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.TestCases.ListTestCasesCallback} callback Node-style callback called with the error, if any, and ListTestCasesResponse - * @returns {undefined} - * @variation 1 + * Encodes the specified DeleteEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteEnvironmentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.DeleteEnvironmentRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IDeleteEnvironmentRequest} message DeleteEnvironmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(TestCases.prototype.listTestCases = function listTestCases(request, callback) { - return this.rpcCall(listTestCases, $root.google.cloud.dialogflow.cx.v3.ListTestCasesRequest, $root.google.cloud.dialogflow.cx.v3.ListTestCasesResponse, request, callback); - }, "name", { value: "ListTestCases" }); + DeleteEnvironmentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Calls ListTestCases. - * @function listTestCases - * @memberof google.cloud.dialogflow.cx.v3.TestCases - * @instance - * @param {google.cloud.dialogflow.cx.v3.IListTestCasesRequest} request ListTestCasesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Decodes a DeleteEnvironmentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.DeleteEnvironmentRequest + * @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.DeleteEnvironmentRequest} DeleteEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + DeleteEnvironmentRequest.decode = function decode(reader, length, error) { + 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.DeleteEnvironmentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.TestCases|batchDeleteTestCases}. - * @memberof google.cloud.dialogflow.cx.v3.TestCases - * @typedef BatchDeleteTestCasesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty + * Decodes a DeleteEnvironmentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.DeleteEnvironmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.DeleteEnvironmentRequest} DeleteEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + DeleteEnvironmentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls BatchDeleteTestCases. - * @function batchDeleteTestCases - * @memberof google.cloud.dialogflow.cx.v3.TestCases - * @instance - * @param {google.cloud.dialogflow.cx.v3.IBatchDeleteTestCasesRequest} request BatchDeleteTestCasesRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.TestCases.BatchDeleteTestCasesCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 + * Verifies a DeleteEnvironmentRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.DeleteEnvironmentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Object.defineProperty(TestCases.prototype.batchDeleteTestCases = function batchDeleteTestCases(request, callback) { - return this.rpcCall(batchDeleteTestCases, $root.google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "BatchDeleteTestCases" }); + DeleteEnvironmentRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; /** - * Calls BatchDeleteTestCases. - * @function batchDeleteTestCases - * @memberof google.cloud.dialogflow.cx.v3.TestCases - * @instance - * @param {google.cloud.dialogflow.cx.v3.IBatchDeleteTestCasesRequest} request BatchDeleteTestCasesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a DeleteEnvironmentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.DeleteEnvironmentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.DeleteEnvironmentRequest} DeleteEnvironmentRequest */ + DeleteEnvironmentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.DeleteEnvironmentRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.DeleteEnvironmentRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.TestCases|getTestCase}. - * @memberof google.cloud.dialogflow.cx.v3.TestCases - * @typedef GetTestCaseCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.TestCase} [response] TestCase + * Creates a plain object from a DeleteEnvironmentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.DeleteEnvironmentRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.DeleteEnvironmentRequest} message DeleteEnvironmentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ + DeleteEnvironmentRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; /** - * Calls GetTestCase. - * @function getTestCase - * @memberof google.cloud.dialogflow.cx.v3.TestCases + * Converts this DeleteEnvironmentRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.DeleteEnvironmentRequest * @instance - * @param {google.cloud.dialogflow.cx.v3.IGetTestCaseRequest} request GetTestCaseRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.TestCases.GetTestCaseCallback} callback Node-style callback called with the error, if any, and TestCase - * @returns {undefined} - * @variation 1 + * @returns {Object.} JSON object */ - Object.defineProperty(TestCases.prototype.getTestCase = function getTestCase(request, callback) { - return this.rpcCall(getTestCase, $root.google.cloud.dialogflow.cx.v3.GetTestCaseRequest, $root.google.cloud.dialogflow.cx.v3.TestCase, request, callback); - }, "name", { value: "GetTestCase" }); + DeleteEnvironmentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Calls GetTestCase. - * @function getTestCase - * @memberof google.cloud.dialogflow.cx.v3.TestCases - * @instance - * @param {google.cloud.dialogflow.cx.v3.IGetTestCaseRequest} request GetTestCaseRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Gets the default type url for DeleteEnvironmentRequest + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.DeleteEnvironmentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ + DeleteEnvironmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.DeleteEnvironmentRequest"; + }; + + return DeleteEnvironmentRequest; + })(); + + v3.LookupEnvironmentHistoryRequest = (function() { /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.TestCases|createTestCase}. - * @memberof google.cloud.dialogflow.cx.v3.TestCases - * @typedef CreateTestCaseCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.TestCase} [response] TestCase + * Properties of a LookupEnvironmentHistoryRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface ILookupEnvironmentHistoryRequest + * @property {string|null} [name] LookupEnvironmentHistoryRequest name + * @property {number|null} [pageSize] LookupEnvironmentHistoryRequest pageSize + * @property {string|null} [pageToken] LookupEnvironmentHistoryRequest pageToken */ /** - * Calls CreateTestCase. - * @function createTestCase - * @memberof google.cloud.dialogflow.cx.v3.TestCases - * @instance - * @param {google.cloud.dialogflow.cx.v3.ICreateTestCaseRequest} request CreateTestCaseRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.TestCases.CreateTestCaseCallback} callback Node-style callback called with the error, if any, and TestCase - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(TestCases.prototype.createTestCase = function createTestCase(request, callback) { - return this.rpcCall(createTestCase, $root.google.cloud.dialogflow.cx.v3.CreateTestCaseRequest, $root.google.cloud.dialogflow.cx.v3.TestCase, request, callback); - }, "name", { value: "CreateTestCase" }); - - /** - * Calls CreateTestCase. - * @function createTestCase - * @memberof google.cloud.dialogflow.cx.v3.TestCases - * @instance - * @param {google.cloud.dialogflow.cx.v3.ICreateTestCaseRequest} request CreateTestCaseRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.TestCases|updateTestCase}. - * @memberof google.cloud.dialogflow.cx.v3.TestCases - * @typedef UpdateTestCaseCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.TestCase} [response] TestCase - */ - - /** - * Calls UpdateTestCase. - * @function updateTestCase - * @memberof google.cloud.dialogflow.cx.v3.TestCases - * @instance - * @param {google.cloud.dialogflow.cx.v3.IUpdateTestCaseRequest} request UpdateTestCaseRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.TestCases.UpdateTestCaseCallback} callback Node-style callback called with the error, if any, and TestCase - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(TestCases.prototype.updateTestCase = function updateTestCase(request, callback) { - return this.rpcCall(updateTestCase, $root.google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest, $root.google.cloud.dialogflow.cx.v3.TestCase, request, callback); - }, "name", { value: "UpdateTestCase" }); - - /** - * Calls UpdateTestCase. - * @function updateTestCase - * @memberof google.cloud.dialogflow.cx.v3.TestCases - * @instance - * @param {google.cloud.dialogflow.cx.v3.IUpdateTestCaseRequest} request UpdateTestCaseRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.TestCases|runTestCase}. - * @memberof google.cloud.dialogflow.cx.v3.TestCases - * @typedef RunTestCaseCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls RunTestCase. - * @function runTestCase - * @memberof google.cloud.dialogflow.cx.v3.TestCases - * @instance - * @param {google.cloud.dialogflow.cx.v3.IRunTestCaseRequest} request RunTestCaseRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.TestCases.RunTestCaseCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(TestCases.prototype.runTestCase = function runTestCase(request, callback) { - return this.rpcCall(runTestCase, $root.google.cloud.dialogflow.cx.v3.RunTestCaseRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "RunTestCase" }); - - /** - * Calls RunTestCase. - * @function runTestCase - * @memberof google.cloud.dialogflow.cx.v3.TestCases - * @instance - * @param {google.cloud.dialogflow.cx.v3.IRunTestCaseRequest} request RunTestCaseRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.TestCases|batchRunTestCases}. - * @memberof google.cloud.dialogflow.cx.v3.TestCases - * @typedef BatchRunTestCasesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls BatchRunTestCases. - * @function batchRunTestCases - * @memberof google.cloud.dialogflow.cx.v3.TestCases - * @instance - * @param {google.cloud.dialogflow.cx.v3.IBatchRunTestCasesRequest} request BatchRunTestCasesRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.TestCases.BatchRunTestCasesCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(TestCases.prototype.batchRunTestCases = function batchRunTestCases(request, callback) { - return this.rpcCall(batchRunTestCases, $root.google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "BatchRunTestCases" }); - - /** - * Calls BatchRunTestCases. - * @function batchRunTestCases - * @memberof google.cloud.dialogflow.cx.v3.TestCases - * @instance - * @param {google.cloud.dialogflow.cx.v3.IBatchRunTestCasesRequest} request BatchRunTestCasesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.TestCases|calculateCoverage}. - * @memberof google.cloud.dialogflow.cx.v3.TestCases - * @typedef CalculateCoverageCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.CalculateCoverageResponse} [response] CalculateCoverageResponse - */ - - /** - * Calls CalculateCoverage. - * @function calculateCoverage - * @memberof google.cloud.dialogflow.cx.v3.TestCases - * @instance - * @param {google.cloud.dialogflow.cx.v3.ICalculateCoverageRequest} request CalculateCoverageRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.TestCases.CalculateCoverageCallback} callback Node-style callback called with the error, if any, and CalculateCoverageResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(TestCases.prototype.calculateCoverage = function calculateCoverage(request, callback) { - return this.rpcCall(calculateCoverage, $root.google.cloud.dialogflow.cx.v3.CalculateCoverageRequest, $root.google.cloud.dialogflow.cx.v3.CalculateCoverageResponse, request, callback); - }, "name", { value: "CalculateCoverage" }); - - /** - * Calls CalculateCoverage. - * @function calculateCoverage - * @memberof google.cloud.dialogflow.cx.v3.TestCases - * @instance - * @param {google.cloud.dialogflow.cx.v3.ICalculateCoverageRequest} request CalculateCoverageRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.TestCases|importTestCases}. - * @memberof google.cloud.dialogflow.cx.v3.TestCases - * @typedef ImportTestCasesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls ImportTestCases. - * @function importTestCases - * @memberof google.cloud.dialogflow.cx.v3.TestCases - * @instance - * @param {google.cloud.dialogflow.cx.v3.IImportTestCasesRequest} request ImportTestCasesRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.TestCases.ImportTestCasesCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(TestCases.prototype.importTestCases = function importTestCases(request, callback) { - return this.rpcCall(importTestCases, $root.google.cloud.dialogflow.cx.v3.ImportTestCasesRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "ImportTestCases" }); - - /** - * Calls ImportTestCases. - * @function importTestCases - * @memberof google.cloud.dialogflow.cx.v3.TestCases - * @instance - * @param {google.cloud.dialogflow.cx.v3.IImportTestCasesRequest} request ImportTestCasesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.TestCases|exportTestCases}. - * @memberof google.cloud.dialogflow.cx.v3.TestCases - * @typedef ExportTestCasesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls ExportTestCases. - * @function exportTestCases - * @memberof google.cloud.dialogflow.cx.v3.TestCases - * @instance - * @param {google.cloud.dialogflow.cx.v3.IExportTestCasesRequest} request ExportTestCasesRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.TestCases.ExportTestCasesCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(TestCases.prototype.exportTestCases = function exportTestCases(request, callback) { - return this.rpcCall(exportTestCases, $root.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "ExportTestCases" }); - - /** - * Calls ExportTestCases. - * @function exportTestCases - * @memberof google.cloud.dialogflow.cx.v3.TestCases - * @instance - * @param {google.cloud.dialogflow.cx.v3.IExportTestCasesRequest} request ExportTestCasesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.TestCases|listTestCaseResults}. - * @memberof google.cloud.dialogflow.cx.v3.TestCases - * @typedef ListTestCaseResultsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse} [response] ListTestCaseResultsResponse - */ - - /** - * Calls ListTestCaseResults. - * @function listTestCaseResults - * @memberof google.cloud.dialogflow.cx.v3.TestCases - * @instance - * @param {google.cloud.dialogflow.cx.v3.IListTestCaseResultsRequest} request ListTestCaseResultsRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.TestCases.ListTestCaseResultsCallback} callback Node-style callback called with the error, if any, and ListTestCaseResultsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(TestCases.prototype.listTestCaseResults = function listTestCaseResults(request, callback) { - return this.rpcCall(listTestCaseResults, $root.google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest, $root.google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse, request, callback); - }, "name", { value: "ListTestCaseResults" }); - - /** - * Calls ListTestCaseResults. - * @function listTestCaseResults - * @memberof google.cloud.dialogflow.cx.v3.TestCases - * @instance - * @param {google.cloud.dialogflow.cx.v3.IListTestCaseResultsRequest} request ListTestCaseResultsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.TestCases|getTestCaseResult}. - * @memberof google.cloud.dialogflow.cx.v3.TestCases - * @typedef GetTestCaseResultCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.TestCaseResult} [response] TestCaseResult - */ - - /** - * Calls GetTestCaseResult. - * @function getTestCaseResult - * @memberof google.cloud.dialogflow.cx.v3.TestCases - * @instance - * @param {google.cloud.dialogflow.cx.v3.IGetTestCaseResultRequest} request GetTestCaseResultRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.TestCases.GetTestCaseResultCallback} callback Node-style callback called with the error, if any, and TestCaseResult - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(TestCases.prototype.getTestCaseResult = function getTestCaseResult(request, callback) { - return this.rpcCall(getTestCaseResult, $root.google.cloud.dialogflow.cx.v3.GetTestCaseResultRequest, $root.google.cloud.dialogflow.cx.v3.TestCaseResult, request, callback); - }, "name", { value: "GetTestCaseResult" }); - - /** - * Calls GetTestCaseResult. - * @function getTestCaseResult - * @memberof google.cloud.dialogflow.cx.v3.TestCases - * @instance - * @param {google.cloud.dialogflow.cx.v3.IGetTestCaseResultRequest} request GetTestCaseResultRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return TestCases; - })(); - - v3.TestCase = (function() { - - /** - * Properties of a TestCase. - * @memberof google.cloud.dialogflow.cx.v3 - * @interface ITestCase - * @property {string|null} [name] TestCase name - * @property {Array.|null} [tags] TestCase tags - * @property {string|null} [displayName] TestCase displayName - * @property {string|null} [notes] TestCase notes - * @property {google.cloud.dialogflow.cx.v3.ITestConfig|null} [testConfig] TestCase testConfig - * @property {Array.|null} [testCaseConversationTurns] TestCase testCaseConversationTurns - * @property {google.protobuf.ITimestamp|null} [creationTime] TestCase creationTime - * @property {google.cloud.dialogflow.cx.v3.ITestCaseResult|null} [lastTestResult] TestCase lastTestResult - */ - - /** - * Constructs a new TestCase. + * Constructs a new LookupEnvironmentHistoryRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a TestCase. - * @implements ITestCase + * @classdesc Represents a LookupEnvironmentHistoryRequest. + * @implements ILookupEnvironmentHistoryRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.ITestCase=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.ILookupEnvironmentHistoryRequest=} [properties] Properties to set */ - function TestCase(properties) { - this.tags = []; - this.testCaseConversationTurns = []; + function LookupEnvironmentHistoryRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -43205,142 +43602,90 @@ } /** - * TestCase name. + * LookupEnvironmentHistoryRequest name. * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.TestCase - * @instance - */ - TestCase.prototype.name = ""; - - /** - * TestCase tags. - * @member {Array.} tags - * @memberof google.cloud.dialogflow.cx.v3.TestCase - * @instance - */ - TestCase.prototype.tags = $util.emptyArray; - - /** - * TestCase displayName. - * @member {string} displayName - * @memberof google.cloud.dialogflow.cx.v3.TestCase - * @instance - */ - TestCase.prototype.displayName = ""; - - /** - * TestCase notes. - * @member {string} notes - * @memberof google.cloud.dialogflow.cx.v3.TestCase - * @instance - */ - TestCase.prototype.notes = ""; - - /** - * TestCase testConfig. - * @member {google.cloud.dialogflow.cx.v3.ITestConfig|null|undefined} testConfig - * @memberof google.cloud.dialogflow.cx.v3.TestCase - * @instance - */ - TestCase.prototype.testConfig = null; - - /** - * TestCase testCaseConversationTurns. - * @member {Array.} testCaseConversationTurns - * @memberof google.cloud.dialogflow.cx.v3.TestCase + * @memberof google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryRequest * @instance */ - TestCase.prototype.testCaseConversationTurns = $util.emptyArray; + LookupEnvironmentHistoryRequest.prototype.name = ""; /** - * TestCase creationTime. - * @member {google.protobuf.ITimestamp|null|undefined} creationTime - * @memberof google.cloud.dialogflow.cx.v3.TestCase + * LookupEnvironmentHistoryRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryRequest * @instance */ - TestCase.prototype.creationTime = null; + LookupEnvironmentHistoryRequest.prototype.pageSize = 0; /** - * TestCase lastTestResult. - * @member {google.cloud.dialogflow.cx.v3.ITestCaseResult|null|undefined} lastTestResult - * @memberof google.cloud.dialogflow.cx.v3.TestCase + * LookupEnvironmentHistoryRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryRequest * @instance */ - TestCase.prototype.lastTestResult = null; + LookupEnvironmentHistoryRequest.prototype.pageToken = ""; /** - * Creates a new TestCase instance using the specified properties. + * Creates a new LookupEnvironmentHistoryRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.TestCase + * @memberof google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryRequest * @static - * @param {google.cloud.dialogflow.cx.v3.ITestCase=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.TestCase} TestCase instance + * @param {google.cloud.dialogflow.cx.v3.ILookupEnvironmentHistoryRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryRequest} LookupEnvironmentHistoryRequest instance */ - TestCase.create = function create(properties) { - return new TestCase(properties); + LookupEnvironmentHistoryRequest.create = function create(properties) { + return new LookupEnvironmentHistoryRequest(properties); }; /** - * Encodes the specified TestCase message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TestCase.verify|verify} messages. + * Encodes the specified LookupEnvironmentHistoryRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.TestCase + * @memberof google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryRequest * @static - * @param {google.cloud.dialogflow.cx.v3.ITestCase} message TestCase message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ILookupEnvironmentHistoryRequest} message LookupEnvironmentHistoryRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TestCase.encode = function encode(message, writer) { + LookupEnvironmentHistoryRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.tags != null && message.tags.length) - for (var i = 0; i < message.tags.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.tags[i]); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.displayName); - if (message.notes != null && Object.hasOwnProperty.call(message, "notes")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.notes); - if (message.testCaseConversationTurns != null && message.testCaseConversationTurns.length) - for (var i = 0; i < message.testCaseConversationTurns.length; ++i) - $root.google.cloud.dialogflow.cx.v3.ConversationTurn.encode(message.testCaseConversationTurns[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.creationTime != null && Object.hasOwnProperty.call(message, "creationTime")) - $root.google.protobuf.Timestamp.encode(message.creationTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.lastTestResult != null && Object.hasOwnProperty.call(message, "lastTestResult")) - $root.google.cloud.dialogflow.cx.v3.TestCaseResult.encode(message.lastTestResult, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.testConfig != null && Object.hasOwnProperty.call(message, "testConfig")) - $root.google.cloud.dialogflow.cx.v3.TestConfig.encode(message.testConfig, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); return writer; }; /** - * Encodes the specified TestCase message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TestCase.verify|verify} messages. + * Encodes the specified LookupEnvironmentHistoryRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.TestCase + * @memberof google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryRequest * @static - * @param {google.cloud.dialogflow.cx.v3.ITestCase} message TestCase message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ILookupEnvironmentHistoryRequest} message LookupEnvironmentHistoryRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TestCase.encodeDelimited = function encodeDelimited(message, writer) { + LookupEnvironmentHistoryRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TestCase message from the specified reader or buffer. + * Decodes a LookupEnvironmentHistoryRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.TestCase + * @memberof google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryRequest * @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.TestCase} TestCase + * @returns {google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryRequest} LookupEnvironmentHistoryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TestCase.decode = function decode(reader, length, error) { + LookupEnvironmentHistoryRequest.decode = function decode(reader, length, error) { 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.TestCase(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -43351,35 +43696,11 @@ break; } case 2: { - if (!(message.tags && message.tags.length)) - message.tags = []; - message.tags.push(reader.string()); + message.pageSize = reader.int32(); break; } case 3: { - message.displayName = reader.string(); - break; - } - case 4: { - message.notes = reader.string(); - break; - } - case 13: { - message.testConfig = $root.google.cloud.dialogflow.cx.v3.TestConfig.decode(reader, reader.uint32()); - break; - } - case 5: { - if (!(message.testCaseConversationTurns && message.testCaseConversationTurns.length)) - message.testCaseConversationTurns = []; - message.testCaseConversationTurns.push($root.google.cloud.dialogflow.cx.v3.ConversationTurn.decode(reader, reader.uint32())); - break; - } - case 10: { - message.creationTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 12: { - message.lastTestResult = $root.google.cloud.dialogflow.cx.v3.TestCaseResult.decode(reader, reader.uint32()); + message.pageToken = reader.string(); break; } default: @@ -43391,230 +43712,141 @@ }; /** - * Decodes a TestCase message from the specified reader or buffer, length delimited. + * Decodes a LookupEnvironmentHistoryRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.TestCase + * @memberof google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.TestCase} TestCase + * @returns {google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryRequest} LookupEnvironmentHistoryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TestCase.decodeDelimited = function decodeDelimited(reader) { + LookupEnvironmentHistoryRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TestCase message. + * Verifies a LookupEnvironmentHistoryRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.TestCase + * @memberof google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TestCase.verify = function verify(message) { + LookupEnvironmentHistoryRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.tags != null && message.hasOwnProperty("tags")) { - if (!Array.isArray(message.tags)) - return "tags: array expected"; - for (var i = 0; i < message.tags.length; ++i) - if (!$util.isString(message.tags[i])) - return "tags: string[] expected"; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.notes != null && message.hasOwnProperty("notes")) - if (!$util.isString(message.notes)) - return "notes: string expected"; - if (message.testConfig != null && message.hasOwnProperty("testConfig")) { - var error = $root.google.cloud.dialogflow.cx.v3.TestConfig.verify(message.testConfig); - if (error) - return "testConfig." + error; - } - if (message.testCaseConversationTurns != null && message.hasOwnProperty("testCaseConversationTurns")) { - if (!Array.isArray(message.testCaseConversationTurns)) - return "testCaseConversationTurns: array expected"; - for (var i = 0; i < message.testCaseConversationTurns.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.ConversationTurn.verify(message.testCaseConversationTurns[i]); - if (error) - return "testCaseConversationTurns." + error; - } - } - if (message.creationTime != null && message.hasOwnProperty("creationTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.creationTime); - if (error) - return "creationTime." + error; - } - if (message.lastTestResult != null && message.hasOwnProperty("lastTestResult")) { - var error = $root.google.cloud.dialogflow.cx.v3.TestCaseResult.verify(message.lastTestResult); - if (error) - return "lastTestResult." + error; - } + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; return null; }; /** - * Creates a TestCase message from a plain object. Also converts values to their respective internal types. + * Creates a LookupEnvironmentHistoryRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.TestCase + * @memberof google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.TestCase} TestCase + * @returns {google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryRequest} LookupEnvironmentHistoryRequest */ - TestCase.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.TestCase) + LookupEnvironmentHistoryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.TestCase(); + var message = new $root.google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryRequest(); if (object.name != null) message.name = String(object.name); - if (object.tags) { - if (!Array.isArray(object.tags)) - throw TypeError(".google.cloud.dialogflow.cx.v3.TestCase.tags: array expected"); - message.tags = []; - for (var i = 0; i < object.tags.length; ++i) - message.tags[i] = String(object.tags[i]); - } - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.notes != null) - message.notes = String(object.notes); - if (object.testConfig != null) { - if (typeof object.testConfig !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.TestCase.testConfig: object expected"); - message.testConfig = $root.google.cloud.dialogflow.cx.v3.TestConfig.fromObject(object.testConfig); - } - if (object.testCaseConversationTurns) { - if (!Array.isArray(object.testCaseConversationTurns)) - throw TypeError(".google.cloud.dialogflow.cx.v3.TestCase.testCaseConversationTurns: array expected"); - message.testCaseConversationTurns = []; - for (var i = 0; i < object.testCaseConversationTurns.length; ++i) { - if (typeof object.testCaseConversationTurns[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.TestCase.testCaseConversationTurns: object expected"); - message.testCaseConversationTurns[i] = $root.google.cloud.dialogflow.cx.v3.ConversationTurn.fromObject(object.testCaseConversationTurns[i]); - } - } - if (object.creationTime != null) { - if (typeof object.creationTime !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.TestCase.creationTime: object expected"); - message.creationTime = $root.google.protobuf.Timestamp.fromObject(object.creationTime); - } - if (object.lastTestResult != null) { - if (typeof object.lastTestResult !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.TestCase.lastTestResult: object expected"); - message.lastTestResult = $root.google.cloud.dialogflow.cx.v3.TestCaseResult.fromObject(object.lastTestResult); - } + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); return message; }; /** - * Creates a plain object from a TestCase message. Also converts values to other types if specified. + * Creates a plain object from a LookupEnvironmentHistoryRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.TestCase + * @memberof google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryRequest * @static - * @param {google.cloud.dialogflow.cx.v3.TestCase} message TestCase + * @param {google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryRequest} message LookupEnvironmentHistoryRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TestCase.toObject = function toObject(message, options) { + LookupEnvironmentHistoryRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.tags = []; - object.testCaseConversationTurns = []; - } if (options.defaults) { object.name = ""; - object.displayName = ""; - object.notes = ""; - object.creationTime = null; - object.lastTestResult = null; - object.testConfig = null; + object.pageSize = 0; + object.pageToken = ""; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.tags && message.tags.length) { - object.tags = []; - for (var j = 0; j < message.tags.length; ++j) - object.tags[j] = message.tags[j]; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.notes != null && message.hasOwnProperty("notes")) - object.notes = message.notes; - if (message.testCaseConversationTurns && message.testCaseConversationTurns.length) { - object.testCaseConversationTurns = []; - for (var j = 0; j < message.testCaseConversationTurns.length; ++j) - object.testCaseConversationTurns[j] = $root.google.cloud.dialogflow.cx.v3.ConversationTurn.toObject(message.testCaseConversationTurns[j], options); - } - if (message.creationTime != null && message.hasOwnProperty("creationTime")) - object.creationTime = $root.google.protobuf.Timestamp.toObject(message.creationTime, options); - if (message.lastTestResult != null && message.hasOwnProperty("lastTestResult")) - object.lastTestResult = $root.google.cloud.dialogflow.cx.v3.TestCaseResult.toObject(message.lastTestResult, options); - if (message.testConfig != null && message.hasOwnProperty("testConfig")) - object.testConfig = $root.google.cloud.dialogflow.cx.v3.TestConfig.toObject(message.testConfig, options); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; return object; }; /** - * Converts this TestCase to JSON. + * Converts this LookupEnvironmentHistoryRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.TestCase + * @memberof google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryRequest * @instance * @returns {Object.} JSON object */ - TestCase.prototype.toJSON = function toJSON() { + LookupEnvironmentHistoryRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for TestCase + * Gets the default type url for LookupEnvironmentHistoryRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.TestCase + * @memberof google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - TestCase.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + LookupEnvironmentHistoryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.TestCase"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryRequest"; }; - return TestCase; + return LookupEnvironmentHistoryRequest; })(); - v3.TestCaseResult = (function() { + v3.LookupEnvironmentHistoryResponse = (function() { /** - * Properties of a TestCaseResult. + * Properties of a LookupEnvironmentHistoryResponse. * @memberof google.cloud.dialogflow.cx.v3 - * @interface ITestCaseResult - * @property {string|null} [name] TestCaseResult name - * @property {string|null} [environment] TestCaseResult environment - * @property {Array.|null} [conversationTurns] TestCaseResult conversationTurns - * @property {google.cloud.dialogflow.cx.v3.TestResult|null} [testResult] TestCaseResult testResult - * @property {google.protobuf.ITimestamp|null} [testTime] TestCaseResult testTime + * @interface ILookupEnvironmentHistoryResponse + * @property {Array.|null} [environments] LookupEnvironmentHistoryResponse environments + * @property {string|null} [nextPageToken] LookupEnvironmentHistoryResponse nextPageToken */ /** - * Constructs a new TestCaseResult. + * Constructs a new LookupEnvironmentHistoryResponse. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a TestCaseResult. - * @implements ITestCaseResult + * @classdesc Represents a LookupEnvironmentHistoryResponse. + * @implements ILookupEnvironmentHistoryResponse * @constructor - * @param {google.cloud.dialogflow.cx.v3.ITestCaseResult=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.ILookupEnvironmentHistoryResponse=} [properties] Properties to set */ - function TestCaseResult(properties) { - this.conversationTurns = []; + function LookupEnvironmentHistoryResponse(properties) { + this.environments = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -43622,136 +43854,94 @@ } /** - * TestCaseResult name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.TestCaseResult - * @instance - */ - TestCaseResult.prototype.name = ""; - - /** - * TestCaseResult environment. - * @member {string} environment - * @memberof google.cloud.dialogflow.cx.v3.TestCaseResult - * @instance - */ - TestCaseResult.prototype.environment = ""; - - /** - * TestCaseResult conversationTurns. - * @member {Array.} conversationTurns - * @memberof google.cloud.dialogflow.cx.v3.TestCaseResult - * @instance - */ - TestCaseResult.prototype.conversationTurns = $util.emptyArray; - - /** - * TestCaseResult testResult. - * @member {google.cloud.dialogflow.cx.v3.TestResult} testResult - * @memberof google.cloud.dialogflow.cx.v3.TestCaseResult + * LookupEnvironmentHistoryResponse environments. + * @member {Array.} environments + * @memberof google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryResponse * @instance */ - TestCaseResult.prototype.testResult = 0; + LookupEnvironmentHistoryResponse.prototype.environments = $util.emptyArray; /** - * TestCaseResult testTime. - * @member {google.protobuf.ITimestamp|null|undefined} testTime - * @memberof google.cloud.dialogflow.cx.v3.TestCaseResult + * LookupEnvironmentHistoryResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryResponse * @instance */ - TestCaseResult.prototype.testTime = null; + LookupEnvironmentHistoryResponse.prototype.nextPageToken = ""; /** - * Creates a new TestCaseResult instance using the specified properties. + * Creates a new LookupEnvironmentHistoryResponse instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.TestCaseResult + * @memberof google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryResponse * @static - * @param {google.cloud.dialogflow.cx.v3.ITestCaseResult=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.TestCaseResult} TestCaseResult instance + * @param {google.cloud.dialogflow.cx.v3.ILookupEnvironmentHistoryResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryResponse} LookupEnvironmentHistoryResponse instance */ - TestCaseResult.create = function create(properties) { - return new TestCaseResult(properties); + LookupEnvironmentHistoryResponse.create = function create(properties) { + return new LookupEnvironmentHistoryResponse(properties); }; /** - * Encodes the specified TestCaseResult message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TestCaseResult.verify|verify} messages. + * Encodes the specified LookupEnvironmentHistoryResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.TestCaseResult + * @memberof google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryResponse * @static - * @param {google.cloud.dialogflow.cx.v3.ITestCaseResult} message TestCaseResult message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ILookupEnvironmentHistoryResponse} message LookupEnvironmentHistoryResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TestCaseResult.encode = function encode(message, writer) { + LookupEnvironmentHistoryResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.environment); - if (message.conversationTurns != null && message.conversationTurns.length) - for (var i = 0; i < message.conversationTurns.length; ++i) - $root.google.cloud.dialogflow.cx.v3.ConversationTurn.encode(message.conversationTurns[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.testResult != null && Object.hasOwnProperty.call(message, "testResult")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.testResult); - if (message.testTime != null && Object.hasOwnProperty.call(message, "testTime")) - $root.google.protobuf.Timestamp.encode(message.testTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.environments != null && message.environments.length) + for (var i = 0; i < message.environments.length; ++i) + $root.google.cloud.dialogflow.cx.v3.Environment.encode(message.environments[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; /** - * Encodes the specified TestCaseResult message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TestCaseResult.verify|verify} messages. + * Encodes the specified LookupEnvironmentHistoryResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.TestCaseResult + * @memberof google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryResponse * @static - * @param {google.cloud.dialogflow.cx.v3.ITestCaseResult} message TestCaseResult message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ILookupEnvironmentHistoryResponse} message LookupEnvironmentHistoryResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TestCaseResult.encodeDelimited = function encodeDelimited(message, writer) { + LookupEnvironmentHistoryResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TestCaseResult message from the specified reader or buffer. + * Decodes a LookupEnvironmentHistoryResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.TestCaseResult + * @memberof google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryResponse * @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.TestCaseResult} TestCaseResult + * @returns {google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryResponse} LookupEnvironmentHistoryResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TestCaseResult.decode = function decode(reader, length, error) { + LookupEnvironmentHistoryResponse.decode = function decode(reader, length, error) { 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.TestCaseResult(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryResponse(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.name = reader.string(); + if (!(message.environments && message.environments.length)) + message.environments = []; + message.environments.push($root.google.cloud.dialogflow.cx.v3.Environment.decode(reader, reader.uint32())); break; } case 2: { - message.environment = reader.string(); - break; - } - case 3: { - if (!(message.conversationTurns && message.conversationTurns.length)) - message.conversationTurns = []; - message.conversationTurns.push($root.google.cloud.dialogflow.cx.v3.ConversationTurn.decode(reader, reader.uint32())); - break; - } - case 4: { - message.testResult = reader.int32(); - break; - } - case 5: { - message.testTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.nextPageToken = reader.string(); break; } default: @@ -43763,205 +43953,152 @@ }; /** - * Decodes a TestCaseResult message from the specified reader or buffer, length delimited. + * Decodes a LookupEnvironmentHistoryResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.TestCaseResult + * @memberof google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.TestCaseResult} TestCaseResult + * @returns {google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryResponse} LookupEnvironmentHistoryResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TestCaseResult.decodeDelimited = function decodeDelimited(reader) { + LookupEnvironmentHistoryResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TestCaseResult message. + * Verifies a LookupEnvironmentHistoryResponse message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.TestCaseResult + * @memberof google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TestCaseResult.verify = function verify(message) { + LookupEnvironmentHistoryResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.environment != null && message.hasOwnProperty("environment")) - if (!$util.isString(message.environment)) - return "environment: string expected"; - if (message.conversationTurns != null && message.hasOwnProperty("conversationTurns")) { - if (!Array.isArray(message.conversationTurns)) - return "conversationTurns: array expected"; - for (var i = 0; i < message.conversationTurns.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.ConversationTurn.verify(message.conversationTurns[i]); + if (message.environments != null && message.hasOwnProperty("environments")) { + if (!Array.isArray(message.environments)) + return "environments: array expected"; + for (var i = 0; i < message.environments.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.Environment.verify(message.environments[i]); if (error) - return "conversationTurns." + error; - } - } - if (message.testResult != null && message.hasOwnProperty("testResult")) - switch (message.testResult) { - default: - return "testResult: enum value expected"; - case 0: - case 1: - case 2: - break; + return "environments." + error; } - if (message.testTime != null && message.hasOwnProperty("testTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.testTime); - if (error) - return "testTime." + error; } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a TestCaseResult message from a plain object. Also converts values to their respective internal types. + * Creates a LookupEnvironmentHistoryResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.TestCaseResult + * @memberof google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.TestCaseResult} TestCaseResult + * @returns {google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryResponse} LookupEnvironmentHistoryResponse */ - TestCaseResult.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.TestCaseResult) + LookupEnvironmentHistoryResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryResponse) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.TestCaseResult(); - if (object.name != null) - message.name = String(object.name); - if (object.environment != null) - message.environment = String(object.environment); - if (object.conversationTurns) { - if (!Array.isArray(object.conversationTurns)) - throw TypeError(".google.cloud.dialogflow.cx.v3.TestCaseResult.conversationTurns: array expected"); - message.conversationTurns = []; - for (var i = 0; i < object.conversationTurns.length; ++i) { - if (typeof object.conversationTurns[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.TestCaseResult.conversationTurns: object expected"); - message.conversationTurns[i] = $root.google.cloud.dialogflow.cx.v3.ConversationTurn.fromObject(object.conversationTurns[i]); - } - } - switch (object.testResult) { - default: - if (typeof object.testResult === "number") { - message.testResult = object.testResult; - break; + var message = new $root.google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryResponse(); + if (object.environments) { + if (!Array.isArray(object.environments)) + throw TypeError(".google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryResponse.environments: array expected"); + message.environments = []; + for (var i = 0; i < object.environments.length; ++i) { + if (typeof object.environments[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryResponse.environments: object expected"); + message.environments[i] = $root.google.cloud.dialogflow.cx.v3.Environment.fromObject(object.environments[i]); } - break; - case "TEST_RESULT_UNSPECIFIED": - case 0: - message.testResult = 0; - break; - case "PASSED": - case 1: - message.testResult = 1; - break; - case "FAILED": - case 2: - message.testResult = 2; - break; - } - if (object.testTime != null) { - if (typeof object.testTime !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.TestCaseResult.testTime: object expected"); - message.testTime = $root.google.protobuf.Timestamp.fromObject(object.testTime); } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a TestCaseResult message. Also converts values to other types if specified. + * Creates a plain object from a LookupEnvironmentHistoryResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.TestCaseResult + * @memberof google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryResponse * @static - * @param {google.cloud.dialogflow.cx.v3.TestCaseResult} message TestCaseResult + * @param {google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryResponse} message LookupEnvironmentHistoryResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TestCaseResult.toObject = function toObject(message, options) { + LookupEnvironmentHistoryResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.conversationTurns = []; - if (options.defaults) { - object.name = ""; - object.environment = ""; - object.testResult = options.enums === String ? "TEST_RESULT_UNSPECIFIED" : 0; - object.testTime = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.environment != null && message.hasOwnProperty("environment")) - object.environment = message.environment; - if (message.conversationTurns && message.conversationTurns.length) { - object.conversationTurns = []; - for (var j = 0; j < message.conversationTurns.length; ++j) - object.conversationTurns[j] = $root.google.cloud.dialogflow.cx.v3.ConversationTurn.toObject(message.conversationTurns[j], options); + object.environments = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.environments && message.environments.length) { + object.environments = []; + for (var j = 0; j < message.environments.length; ++j) + object.environments[j] = $root.google.cloud.dialogflow.cx.v3.Environment.toObject(message.environments[j], options); } - if (message.testResult != null && message.hasOwnProperty("testResult")) - object.testResult = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.TestResult[message.testResult] === undefined ? message.testResult : $root.google.cloud.dialogflow.cx.v3.TestResult[message.testResult] : message.testResult; - if (message.testTime != null && message.hasOwnProperty("testTime")) - object.testTime = $root.google.protobuf.Timestamp.toObject(message.testTime, options); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this TestCaseResult to JSON. + * Converts this LookupEnvironmentHistoryResponse to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.TestCaseResult + * @memberof google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryResponse * @instance * @returns {Object.} JSON object */ - TestCaseResult.prototype.toJSON = function toJSON() { + LookupEnvironmentHistoryResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for TestCaseResult + * Gets the default type url for LookupEnvironmentHistoryResponse * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.TestCaseResult + * @memberof google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - TestCaseResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + LookupEnvironmentHistoryResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.TestCaseResult"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryResponse"; }; - return TestCaseResult; + return LookupEnvironmentHistoryResponse; })(); - v3.TestConfig = (function() { + v3.ContinuousTestResult = (function() { /** - * Properties of a TestConfig. + * Properties of a ContinuousTestResult. * @memberof google.cloud.dialogflow.cx.v3 - * @interface ITestConfig - * @property {Array.|null} [trackingParameters] TestConfig trackingParameters - * @property {string|null} [flow] TestConfig flow - * @property {string|null} [page] TestConfig page + * @interface IContinuousTestResult + * @property {string|null} [name] ContinuousTestResult name + * @property {google.cloud.dialogflow.cx.v3.ContinuousTestResult.AggregatedTestResult|null} [result] ContinuousTestResult result + * @property {Array.|null} [testCaseResults] ContinuousTestResult testCaseResults + * @property {google.protobuf.ITimestamp|null} [runTime] ContinuousTestResult runTime */ /** - * Constructs a new TestConfig. + * Constructs a new ContinuousTestResult. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a TestConfig. - * @implements ITestConfig + * @classdesc Represents a ContinuousTestResult. + * @implements IContinuousTestResult * @constructor - * @param {google.cloud.dialogflow.cx.v3.ITestConfig=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IContinuousTestResult=} [properties] Properties to set */ - function TestConfig(properties) { - this.trackingParameters = []; + function ContinuousTestResult(properties) { + this.testCaseResults = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -43969,108 +44106,122 @@ } /** - * TestConfig trackingParameters. - * @member {Array.} trackingParameters - * @memberof google.cloud.dialogflow.cx.v3.TestConfig + * ContinuousTestResult name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.ContinuousTestResult * @instance */ - TestConfig.prototype.trackingParameters = $util.emptyArray; + ContinuousTestResult.prototype.name = ""; /** - * TestConfig flow. - * @member {string} flow - * @memberof google.cloud.dialogflow.cx.v3.TestConfig + * ContinuousTestResult result. + * @member {google.cloud.dialogflow.cx.v3.ContinuousTestResult.AggregatedTestResult} result + * @memberof google.cloud.dialogflow.cx.v3.ContinuousTestResult * @instance */ - TestConfig.prototype.flow = ""; + ContinuousTestResult.prototype.result = 0; /** - * TestConfig page. - * @member {string} page - * @memberof google.cloud.dialogflow.cx.v3.TestConfig + * ContinuousTestResult testCaseResults. + * @member {Array.} testCaseResults + * @memberof google.cloud.dialogflow.cx.v3.ContinuousTestResult * @instance */ - TestConfig.prototype.page = ""; + ContinuousTestResult.prototype.testCaseResults = $util.emptyArray; /** - * Creates a new TestConfig instance using the specified properties. + * ContinuousTestResult runTime. + * @member {google.protobuf.ITimestamp|null|undefined} runTime + * @memberof google.cloud.dialogflow.cx.v3.ContinuousTestResult + * @instance + */ + ContinuousTestResult.prototype.runTime = null; + + /** + * Creates a new ContinuousTestResult instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.TestConfig + * @memberof google.cloud.dialogflow.cx.v3.ContinuousTestResult * @static - * @param {google.cloud.dialogflow.cx.v3.ITestConfig=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.TestConfig} TestConfig instance + * @param {google.cloud.dialogflow.cx.v3.IContinuousTestResult=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ContinuousTestResult} ContinuousTestResult instance */ - TestConfig.create = function create(properties) { - return new TestConfig(properties); + ContinuousTestResult.create = function create(properties) { + return new ContinuousTestResult(properties); }; /** - * Encodes the specified TestConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TestConfig.verify|verify} messages. + * Encodes the specified ContinuousTestResult message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ContinuousTestResult.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.TestConfig + * @memberof google.cloud.dialogflow.cx.v3.ContinuousTestResult * @static - * @param {google.cloud.dialogflow.cx.v3.ITestConfig} message TestConfig message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IContinuousTestResult} message ContinuousTestResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TestConfig.encode = function encode(message, writer) { + ContinuousTestResult.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.trackingParameters != null && message.trackingParameters.length) - for (var i = 0; i < message.trackingParameters.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.trackingParameters[i]); - if (message.flow != null && Object.hasOwnProperty.call(message, "flow")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.flow); - if (message.page != null && Object.hasOwnProperty.call(message, "page")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.page); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.result != null && Object.hasOwnProperty.call(message, "result")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.result); + if (message.testCaseResults != null && message.testCaseResults.length) + for (var i = 0; i < message.testCaseResults.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.testCaseResults[i]); + if (message.runTime != null && Object.hasOwnProperty.call(message, "runTime")) + $root.google.protobuf.Timestamp.encode(message.runTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified TestConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TestConfig.verify|verify} messages. + * Encodes the specified ContinuousTestResult message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ContinuousTestResult.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.TestConfig + * @memberof google.cloud.dialogflow.cx.v3.ContinuousTestResult * @static - * @param {google.cloud.dialogflow.cx.v3.ITestConfig} message TestConfig message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IContinuousTestResult} message ContinuousTestResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TestConfig.encodeDelimited = function encodeDelimited(message, writer) { + ContinuousTestResult.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TestConfig message from the specified reader or buffer. + * Decodes a ContinuousTestResult message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.TestConfig + * @memberof google.cloud.dialogflow.cx.v3.ContinuousTestResult * @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.TestConfig} TestConfig + * @returns {google.cloud.dialogflow.cx.v3.ContinuousTestResult} ContinuousTestResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TestConfig.decode = function decode(reader, length, error) { + ContinuousTestResult.decode = function decode(reader, length, error) { 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.TestConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ContinuousTestResult(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - if (!(message.trackingParameters && message.trackingParameters.length)) - message.trackingParameters = []; - message.trackingParameters.push(reader.string()); + message.name = reader.string(); break; } case 2: { - message.flow = reader.string(); + message.result = reader.int32(); break; } case 3: { - message.page = reader.string(); + if (!(message.testCaseResults && message.testCaseResults.length)) + message.testCaseResults = []; + message.testCaseResults.push(reader.string()); + break; + } + case 4: { + message.runTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } default: @@ -44082,153 +44233,205 @@ }; /** - * Decodes a TestConfig message from the specified reader or buffer, length delimited. + * Decodes a ContinuousTestResult message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.TestConfig + * @memberof google.cloud.dialogflow.cx.v3.ContinuousTestResult * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.TestConfig} TestConfig + * @returns {google.cloud.dialogflow.cx.v3.ContinuousTestResult} ContinuousTestResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TestConfig.decodeDelimited = function decodeDelimited(reader) { + ContinuousTestResult.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TestConfig message. + * Verifies a ContinuousTestResult message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.TestConfig + * @memberof google.cloud.dialogflow.cx.v3.ContinuousTestResult * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TestConfig.verify = function verify(message) { + ContinuousTestResult.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.trackingParameters != null && message.hasOwnProperty("trackingParameters")) { - if (!Array.isArray(message.trackingParameters)) - return "trackingParameters: array expected"; - for (var i = 0; i < message.trackingParameters.length; ++i) - if (!$util.isString(message.trackingParameters[i])) - return "trackingParameters: string[] expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.result != null && message.hasOwnProperty("result")) + switch (message.result) { + default: + return "result: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.testCaseResults != null && message.hasOwnProperty("testCaseResults")) { + if (!Array.isArray(message.testCaseResults)) + return "testCaseResults: array expected"; + for (var i = 0; i < message.testCaseResults.length; ++i) + if (!$util.isString(message.testCaseResults[i])) + return "testCaseResults: string[] expected"; + } + if (message.runTime != null && message.hasOwnProperty("runTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.runTime); + if (error) + return "runTime." + error; } - if (message.flow != null && message.hasOwnProperty("flow")) - if (!$util.isString(message.flow)) - return "flow: string expected"; - if (message.page != null && message.hasOwnProperty("page")) - if (!$util.isString(message.page)) - return "page: string expected"; return null; }; /** - * Creates a TestConfig message from a plain object. Also converts values to their respective internal types. + * Creates a ContinuousTestResult message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.TestConfig + * @memberof google.cloud.dialogflow.cx.v3.ContinuousTestResult * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.TestConfig} TestConfig + * @returns {google.cloud.dialogflow.cx.v3.ContinuousTestResult} ContinuousTestResult */ - TestConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.TestConfig) + ContinuousTestResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ContinuousTestResult) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.TestConfig(); - if (object.trackingParameters) { - if (!Array.isArray(object.trackingParameters)) - throw TypeError(".google.cloud.dialogflow.cx.v3.TestConfig.trackingParameters: array expected"); - message.trackingParameters = []; - for (var i = 0; i < object.trackingParameters.length; ++i) - message.trackingParameters[i] = String(object.trackingParameters[i]); + var message = new $root.google.cloud.dialogflow.cx.v3.ContinuousTestResult(); + if (object.name != null) + message.name = String(object.name); + switch (object.result) { + default: + if (typeof object.result === "number") { + message.result = object.result; + break; + } + break; + case "AGGREGATED_TEST_RESULT_UNSPECIFIED": + case 0: + message.result = 0; + break; + case "PASSED": + case 1: + message.result = 1; + break; + case "FAILED": + case 2: + message.result = 2; + break; + } + if (object.testCaseResults) { + if (!Array.isArray(object.testCaseResults)) + throw TypeError(".google.cloud.dialogflow.cx.v3.ContinuousTestResult.testCaseResults: array expected"); + message.testCaseResults = []; + for (var i = 0; i < object.testCaseResults.length; ++i) + message.testCaseResults[i] = String(object.testCaseResults[i]); + } + if (object.runTime != null) { + if (typeof object.runTime !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.ContinuousTestResult.runTime: object expected"); + message.runTime = $root.google.protobuf.Timestamp.fromObject(object.runTime); } - if (object.flow != null) - message.flow = String(object.flow); - if (object.page != null) - message.page = String(object.page); return message; }; /** - * Creates a plain object from a TestConfig message. Also converts values to other types if specified. + * Creates a plain object from a ContinuousTestResult message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.TestConfig + * @memberof google.cloud.dialogflow.cx.v3.ContinuousTestResult * @static - * @param {google.cloud.dialogflow.cx.v3.TestConfig} message TestConfig + * @param {google.cloud.dialogflow.cx.v3.ContinuousTestResult} message ContinuousTestResult * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TestConfig.toObject = function toObject(message, options) { + ContinuousTestResult.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.trackingParameters = []; + object.testCaseResults = []; if (options.defaults) { - object.flow = ""; - object.page = ""; + object.name = ""; + object.result = options.enums === String ? "AGGREGATED_TEST_RESULT_UNSPECIFIED" : 0; + object.runTime = null; } - if (message.trackingParameters && message.trackingParameters.length) { - object.trackingParameters = []; - for (var j = 0; j < message.trackingParameters.length; ++j) - object.trackingParameters[j] = message.trackingParameters[j]; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.result != null && message.hasOwnProperty("result")) + object.result = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.ContinuousTestResult.AggregatedTestResult[message.result] === undefined ? message.result : $root.google.cloud.dialogflow.cx.v3.ContinuousTestResult.AggregatedTestResult[message.result] : message.result; + if (message.testCaseResults && message.testCaseResults.length) { + object.testCaseResults = []; + for (var j = 0; j < message.testCaseResults.length; ++j) + object.testCaseResults[j] = message.testCaseResults[j]; } - if (message.flow != null && message.hasOwnProperty("flow")) - object.flow = message.flow; - if (message.page != null && message.hasOwnProperty("page")) - object.page = message.page; + if (message.runTime != null && message.hasOwnProperty("runTime")) + object.runTime = $root.google.protobuf.Timestamp.toObject(message.runTime, options); return object; }; /** - * Converts this TestConfig to JSON. + * Converts this ContinuousTestResult to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.TestConfig + * @memberof google.cloud.dialogflow.cx.v3.ContinuousTestResult * @instance * @returns {Object.} JSON object */ - TestConfig.prototype.toJSON = function toJSON() { + ContinuousTestResult.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for TestConfig + * Gets the default type url for ContinuousTestResult * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.TestConfig + * @memberof google.cloud.dialogflow.cx.v3.ContinuousTestResult * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - TestConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ContinuousTestResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.TestConfig"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ContinuousTestResult"; }; - return TestConfig; + /** + * AggregatedTestResult enum. + * @name google.cloud.dialogflow.cx.v3.ContinuousTestResult.AggregatedTestResult + * @enum {number} + * @property {number} AGGREGATED_TEST_RESULT_UNSPECIFIED=0 AGGREGATED_TEST_RESULT_UNSPECIFIED value + * @property {number} PASSED=1 PASSED value + * @property {number} FAILED=2 FAILED value + */ + ContinuousTestResult.AggregatedTestResult = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "AGGREGATED_TEST_RESULT_UNSPECIFIED"] = 0; + values[valuesById[1] = "PASSED"] = 1; + values[valuesById[2] = "FAILED"] = 2; + return values; + })(); + + return ContinuousTestResult; })(); - v3.ConversationTurn = (function() { + v3.RunContinuousTestRequest = (function() { /** - * Properties of a ConversationTurn. + * Properties of a RunContinuousTestRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IConversationTurn - * @property {google.cloud.dialogflow.cx.v3.ConversationTurn.IUserInput|null} [userInput] ConversationTurn userInput - * @property {google.cloud.dialogflow.cx.v3.ConversationTurn.IVirtualAgentOutput|null} [virtualAgentOutput] ConversationTurn virtualAgentOutput + * @interface IRunContinuousTestRequest + * @property {string|null} [environment] RunContinuousTestRequest environment */ /** - * Constructs a new ConversationTurn. + * Constructs a new RunContinuousTestRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a ConversationTurn. - * @implements IConversationTurn + * @classdesc Represents a RunContinuousTestRequest. + * @implements IRunContinuousTestRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IConversationTurn=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IRunContinuousTestRequest=} [properties] Properties to set */ - function ConversationTurn(properties) { + function RunContinuousTestRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -44236,91 +44439,77 @@ } /** - * ConversationTurn userInput. - * @member {google.cloud.dialogflow.cx.v3.ConversationTurn.IUserInput|null|undefined} userInput - * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn - * @instance - */ - ConversationTurn.prototype.userInput = null; - - /** - * ConversationTurn virtualAgentOutput. - * @member {google.cloud.dialogflow.cx.v3.ConversationTurn.IVirtualAgentOutput|null|undefined} virtualAgentOutput - * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn + * RunContinuousTestRequest environment. + * @member {string} environment + * @memberof google.cloud.dialogflow.cx.v3.RunContinuousTestRequest * @instance */ - ConversationTurn.prototype.virtualAgentOutput = null; + RunContinuousTestRequest.prototype.environment = ""; /** - * Creates a new ConversationTurn instance using the specified properties. + * Creates a new RunContinuousTestRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn + * @memberof google.cloud.dialogflow.cx.v3.RunContinuousTestRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IConversationTurn=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ConversationTurn} ConversationTurn instance + * @param {google.cloud.dialogflow.cx.v3.IRunContinuousTestRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.RunContinuousTestRequest} RunContinuousTestRequest instance */ - ConversationTurn.create = function create(properties) { - return new ConversationTurn(properties); + RunContinuousTestRequest.create = function create(properties) { + return new RunContinuousTestRequest(properties); }; /** - * Encodes the specified ConversationTurn message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ConversationTurn.verify|verify} messages. + * Encodes the specified RunContinuousTestRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.RunContinuousTestRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn + * @memberof google.cloud.dialogflow.cx.v3.RunContinuousTestRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IConversationTurn} message ConversationTurn message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IRunContinuousTestRequest} message RunContinuousTestRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ConversationTurn.encode = function encode(message, writer) { + RunContinuousTestRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.userInput != null && Object.hasOwnProperty.call(message, "userInput")) - $root.google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput.encode(message.userInput, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.virtualAgentOutput != null && Object.hasOwnProperty.call(message, "virtualAgentOutput")) - $root.google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput.encode(message.virtualAgentOutput, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.environment); return writer; }; /** - * Encodes the specified ConversationTurn message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ConversationTurn.verify|verify} messages. + * Encodes the specified RunContinuousTestRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.RunContinuousTestRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn + * @memberof google.cloud.dialogflow.cx.v3.RunContinuousTestRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IConversationTurn} message ConversationTurn message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IRunContinuousTestRequest} message RunContinuousTestRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ConversationTurn.encodeDelimited = function encodeDelimited(message, writer) { + RunContinuousTestRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ConversationTurn message from the specified reader or buffer. + * Decodes a RunContinuousTestRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn + * @memberof google.cloud.dialogflow.cx.v3.RunContinuousTestRequest * @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.ConversationTurn} ConversationTurn + * @returns {google.cloud.dialogflow.cx.v3.RunContinuousTestRequest} RunContinuousTestRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ConversationTurn.decode = function decode(reader, length, error) { + RunContinuousTestRequest.decode = function decode(reader, length, error) { 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.ConversationTurn(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.RunContinuousTestRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.userInput = $root.google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput.decode(reader, reader.uint32()); - break; - } - case 2: { - message.virtualAgentOutput = $root.google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput.decode(reader, reader.uint32()); + message.environment = reader.string(); break; } default: @@ -44332,840 +44521,560 @@ }; /** - * Decodes a ConversationTurn message from the specified reader or buffer, length delimited. + * Decodes a RunContinuousTestRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn + * @memberof google.cloud.dialogflow.cx.v3.RunContinuousTestRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ConversationTurn} ConversationTurn + * @returns {google.cloud.dialogflow.cx.v3.RunContinuousTestRequest} RunContinuousTestRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ConversationTurn.decodeDelimited = function decodeDelimited(reader) { + RunContinuousTestRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ConversationTurn message. + * Verifies a RunContinuousTestRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn + * @memberof google.cloud.dialogflow.cx.v3.RunContinuousTestRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ConversationTurn.verify = function verify(message) { + RunContinuousTestRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.userInput != null && message.hasOwnProperty("userInput")) { - var error = $root.google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput.verify(message.userInput); - if (error) - return "userInput." + error; - } - if (message.virtualAgentOutput != null && message.hasOwnProperty("virtualAgentOutput")) { - var error = $root.google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput.verify(message.virtualAgentOutput); - if (error) - return "virtualAgentOutput." + error; - } + if (message.environment != null && message.hasOwnProperty("environment")) + if (!$util.isString(message.environment)) + return "environment: string expected"; return null; }; /** - * Creates a ConversationTurn message from a plain object. Also converts values to their respective internal types. + * Creates a RunContinuousTestRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn + * @memberof google.cloud.dialogflow.cx.v3.RunContinuousTestRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ConversationTurn} ConversationTurn + * @returns {google.cloud.dialogflow.cx.v3.RunContinuousTestRequest} RunContinuousTestRequest */ - ConversationTurn.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ConversationTurn) + RunContinuousTestRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.RunContinuousTestRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.ConversationTurn(); - if (object.userInput != null) { - if (typeof object.userInput !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.ConversationTurn.userInput: object expected"); - message.userInput = $root.google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput.fromObject(object.userInput); - } - if (object.virtualAgentOutput != null) { - if (typeof object.virtualAgentOutput !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.ConversationTurn.virtualAgentOutput: object expected"); - message.virtualAgentOutput = $root.google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput.fromObject(object.virtualAgentOutput); - } + var message = new $root.google.cloud.dialogflow.cx.v3.RunContinuousTestRequest(); + if (object.environment != null) + message.environment = String(object.environment); return message; }; /** - * Creates a plain object from a ConversationTurn message. Also converts values to other types if specified. + * Creates a plain object from a RunContinuousTestRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn + * @memberof google.cloud.dialogflow.cx.v3.RunContinuousTestRequest * @static - * @param {google.cloud.dialogflow.cx.v3.ConversationTurn} message ConversationTurn + * @param {google.cloud.dialogflow.cx.v3.RunContinuousTestRequest} message RunContinuousTestRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ConversationTurn.toObject = function toObject(message, options) { + RunContinuousTestRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.userInput = null; - object.virtualAgentOutput = null; - } - if (message.userInput != null && message.hasOwnProperty("userInput")) - object.userInput = $root.google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput.toObject(message.userInput, options); - if (message.virtualAgentOutput != null && message.hasOwnProperty("virtualAgentOutput")) - object.virtualAgentOutput = $root.google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput.toObject(message.virtualAgentOutput, options); + if (options.defaults) + object.environment = ""; + if (message.environment != null && message.hasOwnProperty("environment")) + object.environment = message.environment; return object; }; /** - * Converts this ConversationTurn to JSON. + * Converts this RunContinuousTestRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn + * @memberof google.cloud.dialogflow.cx.v3.RunContinuousTestRequest * @instance * @returns {Object.} JSON object */ - ConversationTurn.prototype.toJSON = function toJSON() { + RunContinuousTestRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ConversationTurn + * Gets the default type url for RunContinuousTestRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn + * @memberof google.cloud.dialogflow.cx.v3.RunContinuousTestRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ConversationTurn.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + RunContinuousTestRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ConversationTurn"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.RunContinuousTestRequest"; }; - ConversationTurn.UserInput = (function() { + return RunContinuousTestRequest; + })(); - /** - * Properties of a UserInput. - * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn - * @interface IUserInput - * @property {google.cloud.dialogflow.cx.v3.IQueryInput|null} [input] UserInput input - * @property {google.protobuf.IStruct|null} [injectedParameters] UserInput injectedParameters - * @property {boolean|null} [isWebhookEnabled] UserInput isWebhookEnabled - * @property {boolean|null} [enableSentimentAnalysis] UserInput enableSentimentAnalysis - */ + v3.RunContinuousTestResponse = (function() { - /** - * Constructs a new UserInput. - * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn - * @classdesc Represents a UserInput. - * @implements IUserInput - * @constructor - * @param {google.cloud.dialogflow.cx.v3.ConversationTurn.IUserInput=} [properties] Properties to set - */ - function UserInput(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]]; - } + /** + * Properties of a RunContinuousTestResponse. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IRunContinuousTestResponse + * @property {google.cloud.dialogflow.cx.v3.IContinuousTestResult|null} [continuousTestResult] RunContinuousTestResponse continuousTestResult + */ - /** - * UserInput input. - * @member {google.cloud.dialogflow.cx.v3.IQueryInput|null|undefined} input - * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput - * @instance - */ - UserInput.prototype.input = null; + /** + * Constructs a new RunContinuousTestResponse. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a RunContinuousTestResponse. + * @implements IRunContinuousTestResponse + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IRunContinuousTestResponse=} [properties] Properties to set + */ + function RunContinuousTestResponse(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]]; + } - /** - * UserInput injectedParameters. - * @member {google.protobuf.IStruct|null|undefined} injectedParameters - * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput - * @instance - */ - UserInput.prototype.injectedParameters = null; + /** + * RunContinuousTestResponse continuousTestResult. + * @member {google.cloud.dialogflow.cx.v3.IContinuousTestResult|null|undefined} continuousTestResult + * @memberof google.cloud.dialogflow.cx.v3.RunContinuousTestResponse + * @instance + */ + RunContinuousTestResponse.prototype.continuousTestResult = null; - /** - * UserInput isWebhookEnabled. - * @member {boolean} isWebhookEnabled - * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput - * @instance - */ - UserInput.prototype.isWebhookEnabled = false; + /** + * Creates a new RunContinuousTestResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.RunContinuousTestResponse + * @static + * @param {google.cloud.dialogflow.cx.v3.IRunContinuousTestResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.RunContinuousTestResponse} RunContinuousTestResponse instance + */ + RunContinuousTestResponse.create = function create(properties) { + return new RunContinuousTestResponse(properties); + }; - /** - * UserInput enableSentimentAnalysis. - * @member {boolean} enableSentimentAnalysis - * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput - * @instance - */ - UserInput.prototype.enableSentimentAnalysis = false; + /** + * Encodes the specified RunContinuousTestResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.RunContinuousTestResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.RunContinuousTestResponse + * @static + * @param {google.cloud.dialogflow.cx.v3.IRunContinuousTestResponse} message RunContinuousTestResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunContinuousTestResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.continuousTestResult != null && Object.hasOwnProperty.call(message, "continuousTestResult")) + $root.google.cloud.dialogflow.cx.v3.ContinuousTestResult.encode(message.continuousTestResult, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; - /** - * Creates a new UserInput instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput - * @static - * @param {google.cloud.dialogflow.cx.v3.ConversationTurn.IUserInput=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput} UserInput instance - */ - UserInput.create = function create(properties) { - return new UserInput(properties); - }; + /** + * Encodes the specified RunContinuousTestResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.RunContinuousTestResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.RunContinuousTestResponse + * @static + * @param {google.cloud.dialogflow.cx.v3.IRunContinuousTestResponse} message RunContinuousTestResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunContinuousTestResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Encodes the specified UserInput message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput - * @static - * @param {google.cloud.dialogflow.cx.v3.ConversationTurn.IUserInput} message UserInput message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UserInput.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.injectedParameters != null && Object.hasOwnProperty.call(message, "injectedParameters")) - $root.google.protobuf.Struct.encode(message.injectedParameters, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.isWebhookEnabled != null && Object.hasOwnProperty.call(message, "isWebhookEnabled")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.isWebhookEnabled); - if (message.input != null && Object.hasOwnProperty.call(message, "input")) - $root.google.cloud.dialogflow.cx.v3.QueryInput.encode(message.input, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.enableSentimentAnalysis != null && Object.hasOwnProperty.call(message, "enableSentimentAnalysis")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.enableSentimentAnalysis); - return writer; - }; - - /** - * Encodes the specified UserInput message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput - * @static - * @param {google.cloud.dialogflow.cx.v3.ConversationTurn.IUserInput} message UserInput message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UserInput.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a UserInput message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput - * @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.ConversationTurn.UserInput} UserInput - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UserInput.decode = function decode(reader, length, error) { - 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.ConversationTurn.UserInput(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 5: { - message.input = $root.google.cloud.dialogflow.cx.v3.QueryInput.decode(reader, reader.uint32()); - break; - } - case 2: { - message.injectedParameters = $root.google.protobuf.Struct.decode(reader, reader.uint32()); - break; - } - case 3: { - message.isWebhookEnabled = reader.bool(); - break; - } - case 7: { - message.enableSentimentAnalysis = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); + /** + * Decodes a RunContinuousTestResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.RunContinuousTestResponse + * @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.RunContinuousTestResponse} RunContinuousTestResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunContinuousTestResponse.decode = function decode(reader, length, error) { + 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.RunContinuousTestResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.continuousTestResult = $root.google.cloud.dialogflow.cx.v3.ContinuousTestResult.decode(reader, reader.uint32()); break; } + default: + reader.skipType(tag & 7); + break; } - return message; - }; - - /** - * Decodes a UserInput message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput} UserInput - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UserInput.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + } + return message; + }; - /** - * Verifies a UserInput message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UserInput.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.input != null && message.hasOwnProperty("input")) { - var error = $root.google.cloud.dialogflow.cx.v3.QueryInput.verify(message.input); - if (error) - return "input." + error; - } - if (message.injectedParameters != null && message.hasOwnProperty("injectedParameters")) { - var error = $root.google.protobuf.Struct.verify(message.injectedParameters); - if (error) - return "injectedParameters." + error; - } - if (message.isWebhookEnabled != null && message.hasOwnProperty("isWebhookEnabled")) - if (typeof message.isWebhookEnabled !== "boolean") - return "isWebhookEnabled: boolean expected"; - if (message.enableSentimentAnalysis != null && message.hasOwnProperty("enableSentimentAnalysis")) - if (typeof message.enableSentimentAnalysis !== "boolean") - return "enableSentimentAnalysis: boolean expected"; - return null; - }; + /** + * Decodes a RunContinuousTestResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.RunContinuousTestResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.RunContinuousTestResponse} RunContinuousTestResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunContinuousTestResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a UserInput message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput} UserInput - */ - UserInput.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput(); - if (object.input != null) { - if (typeof object.input !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput.input: object expected"); - message.input = $root.google.cloud.dialogflow.cx.v3.QueryInput.fromObject(object.input); - } - if (object.injectedParameters != null) { - if (typeof object.injectedParameters !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput.injectedParameters: object expected"); - message.injectedParameters = $root.google.protobuf.Struct.fromObject(object.injectedParameters); - } - if (object.isWebhookEnabled != null) - message.isWebhookEnabled = Boolean(object.isWebhookEnabled); - if (object.enableSentimentAnalysis != null) - message.enableSentimentAnalysis = Boolean(object.enableSentimentAnalysis); - return message; - }; + /** + * Verifies a RunContinuousTestResponse message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.RunContinuousTestResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RunContinuousTestResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.continuousTestResult != null && message.hasOwnProperty("continuousTestResult")) { + var error = $root.google.cloud.dialogflow.cx.v3.ContinuousTestResult.verify(message.continuousTestResult); + if (error) + return "continuousTestResult." + error; + } + return null; + }; - /** - * Creates a plain object from a UserInput message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput - * @static - * @param {google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput} message UserInput - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UserInput.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.injectedParameters = null; - object.isWebhookEnabled = false; - object.input = null; - object.enableSentimentAnalysis = false; - } - if (message.injectedParameters != null && message.hasOwnProperty("injectedParameters")) - object.injectedParameters = $root.google.protobuf.Struct.toObject(message.injectedParameters, options); - if (message.isWebhookEnabled != null && message.hasOwnProperty("isWebhookEnabled")) - object.isWebhookEnabled = message.isWebhookEnabled; - if (message.input != null && message.hasOwnProperty("input")) - object.input = $root.google.cloud.dialogflow.cx.v3.QueryInput.toObject(message.input, options); - if (message.enableSentimentAnalysis != null && message.hasOwnProperty("enableSentimentAnalysis")) - object.enableSentimentAnalysis = message.enableSentimentAnalysis; + /** + * Creates a RunContinuousTestResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.RunContinuousTestResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.RunContinuousTestResponse} RunContinuousTestResponse + */ + RunContinuousTestResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.RunContinuousTestResponse) return object; - }; + var message = new $root.google.cloud.dialogflow.cx.v3.RunContinuousTestResponse(); + if (object.continuousTestResult != null) { + if (typeof object.continuousTestResult !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.RunContinuousTestResponse.continuousTestResult: object expected"); + message.continuousTestResult = $root.google.cloud.dialogflow.cx.v3.ContinuousTestResult.fromObject(object.continuousTestResult); + } + return message; + }; - /** - * Converts this UserInput to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput - * @instance - * @returns {Object.} JSON object - */ - UserInput.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a RunContinuousTestResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.RunContinuousTestResponse + * @static + * @param {google.cloud.dialogflow.cx.v3.RunContinuousTestResponse} message RunContinuousTestResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RunContinuousTestResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.continuousTestResult = null; + if (message.continuousTestResult != null && message.hasOwnProperty("continuousTestResult")) + object.continuousTestResult = $root.google.cloud.dialogflow.cx.v3.ContinuousTestResult.toObject(message.continuousTestResult, options); + return object; + }; - /** - * Gets the default type url for UserInput - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UserInput.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput"; - }; + /** + * Converts this RunContinuousTestResponse to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.RunContinuousTestResponse + * @instance + * @returns {Object.} JSON object + */ + RunContinuousTestResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return UserInput; - })(); + /** + * Gets the default type url for RunContinuousTestResponse + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.RunContinuousTestResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RunContinuousTestResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.RunContinuousTestResponse"; + }; - ConversationTurn.VirtualAgentOutput = (function() { + return RunContinuousTestResponse; + })(); - /** - * Properties of a VirtualAgentOutput. - * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn - * @interface IVirtualAgentOutput - * @property {google.protobuf.IStruct|null} [sessionParameters] VirtualAgentOutput sessionParameters - * @property {Array.|null} [differences] VirtualAgentOutput differences - * @property {google.protobuf.IStruct|null} [diagnosticInfo] VirtualAgentOutput diagnosticInfo - * @property {google.cloud.dialogflow.cx.v3.IIntent|null} [triggeredIntent] VirtualAgentOutput triggeredIntent - * @property {google.cloud.dialogflow.cx.v3.IPage|null} [currentPage] VirtualAgentOutput currentPage - * @property {Array.|null} [textResponses] VirtualAgentOutput textResponses - * @property {google.rpc.IStatus|null} [status] VirtualAgentOutput status - */ + v3.RunContinuousTestMetadata = (function() { - /** - * Constructs a new VirtualAgentOutput. - * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn - * @classdesc Represents a VirtualAgentOutput. - * @implements IVirtualAgentOutput - * @constructor - * @param {google.cloud.dialogflow.cx.v3.ConversationTurn.IVirtualAgentOutput=} [properties] Properties to set - */ - function VirtualAgentOutput(properties) { - this.differences = []; - this.textResponses = []; - 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]]; - } + /** + * Properties of a RunContinuousTestMetadata. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IRunContinuousTestMetadata + * @property {Array.|null} [errors] RunContinuousTestMetadata errors + */ - /** - * VirtualAgentOutput sessionParameters. - * @member {google.protobuf.IStruct|null|undefined} sessionParameters - * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput - * @instance - */ - VirtualAgentOutput.prototype.sessionParameters = null; + /** + * Constructs a new RunContinuousTestMetadata. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a RunContinuousTestMetadata. + * @implements IRunContinuousTestMetadata + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IRunContinuousTestMetadata=} [properties] Properties to set + */ + function RunContinuousTestMetadata(properties) { + this.errors = []; + 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]]; + } - /** - * VirtualAgentOutput differences. - * @member {Array.} differences - * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput - * @instance - */ - VirtualAgentOutput.prototype.differences = $util.emptyArray; + /** + * RunContinuousTestMetadata errors. + * @member {Array.} errors + * @memberof google.cloud.dialogflow.cx.v3.RunContinuousTestMetadata + * @instance + */ + RunContinuousTestMetadata.prototype.errors = $util.emptyArray; - /** - * VirtualAgentOutput diagnosticInfo. - * @member {google.protobuf.IStruct|null|undefined} diagnosticInfo - * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput - * @instance - */ - VirtualAgentOutput.prototype.diagnosticInfo = null; + /** + * Creates a new RunContinuousTestMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.RunContinuousTestMetadata + * @static + * @param {google.cloud.dialogflow.cx.v3.IRunContinuousTestMetadata=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.RunContinuousTestMetadata} RunContinuousTestMetadata instance + */ + RunContinuousTestMetadata.create = function create(properties) { + return new RunContinuousTestMetadata(properties); + }; - /** - * VirtualAgentOutput triggeredIntent. - * @member {google.cloud.dialogflow.cx.v3.IIntent|null|undefined} triggeredIntent - * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput - * @instance - */ - VirtualAgentOutput.prototype.triggeredIntent = null; + /** + * Encodes the specified RunContinuousTestMetadata message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.RunContinuousTestMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.RunContinuousTestMetadata + * @static + * @param {google.cloud.dialogflow.cx.v3.IRunContinuousTestMetadata} message RunContinuousTestMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunContinuousTestMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.errors != null && message.errors.length) + for (var i = 0; i < message.errors.length; ++i) + $root.google.cloud.dialogflow.cx.v3.TestError.encode(message.errors[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; - /** - * VirtualAgentOutput currentPage. - * @member {google.cloud.dialogflow.cx.v3.IPage|null|undefined} currentPage - * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput - * @instance - */ - VirtualAgentOutput.prototype.currentPage = null; + /** + * Encodes the specified RunContinuousTestMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.RunContinuousTestMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.RunContinuousTestMetadata + * @static + * @param {google.cloud.dialogflow.cx.v3.IRunContinuousTestMetadata} message RunContinuousTestMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunContinuousTestMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * VirtualAgentOutput textResponses. - * @member {Array.} textResponses - * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput - * @instance - */ - VirtualAgentOutput.prototype.textResponses = $util.emptyArray; + /** + * Decodes a RunContinuousTestMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.RunContinuousTestMetadata + * @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.RunContinuousTestMetadata} RunContinuousTestMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunContinuousTestMetadata.decode = function decode(reader, length, error) { + 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.RunContinuousTestMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.errors && message.errors.length)) + message.errors = []; + message.errors.push($root.google.cloud.dialogflow.cx.v3.TestError.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * VirtualAgentOutput status. - * @member {google.rpc.IStatus|null|undefined} status - * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput - * @instance - */ - VirtualAgentOutput.prototype.status = null; + /** + * Decodes a RunContinuousTestMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.RunContinuousTestMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.RunContinuousTestMetadata} RunContinuousTestMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunContinuousTestMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a new VirtualAgentOutput instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput - * @static - * @param {google.cloud.dialogflow.cx.v3.ConversationTurn.IVirtualAgentOutput=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput} VirtualAgentOutput instance - */ - VirtualAgentOutput.create = function create(properties) { - return new VirtualAgentOutput(properties); - }; - - /** - * Encodes the specified VirtualAgentOutput message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput - * @static - * @param {google.cloud.dialogflow.cx.v3.ConversationTurn.IVirtualAgentOutput} message VirtualAgentOutput message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VirtualAgentOutput.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.sessionParameters != null && Object.hasOwnProperty.call(message, "sessionParameters")) - $root.google.protobuf.Struct.encode(message.sessionParameters, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.differences != null && message.differences.length) - for (var i = 0; i < message.differences.length; ++i) - $root.google.cloud.dialogflow.cx.v3.TestRunDifference.encode(message.differences[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.diagnosticInfo != null && Object.hasOwnProperty.call(message, "diagnosticInfo")) - $root.google.protobuf.Struct.encode(message.diagnosticInfo, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.triggeredIntent != null && Object.hasOwnProperty.call(message, "triggeredIntent")) - $root.google.cloud.dialogflow.cx.v3.Intent.encode(message.triggeredIntent, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.currentPage != null && Object.hasOwnProperty.call(message, "currentPage")) - $root.google.cloud.dialogflow.cx.v3.Page.encode(message.currentPage, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.textResponses != null && message.textResponses.length) - for (var i = 0; i < message.textResponses.length; ++i) - $root.google.cloud.dialogflow.cx.v3.ResponseMessage.Text.encode(message.textResponses[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.status != null && Object.hasOwnProperty.call(message, "status")) - $root.google.rpc.Status.encode(message.status, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified VirtualAgentOutput message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput - * @static - * @param {google.cloud.dialogflow.cx.v3.ConversationTurn.IVirtualAgentOutput} message VirtualAgentOutput message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VirtualAgentOutput.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a VirtualAgentOutput message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput - * @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.ConversationTurn.VirtualAgentOutput} VirtualAgentOutput - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VirtualAgentOutput.decode = function decode(reader, length, error) { - 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.ConversationTurn.VirtualAgentOutput(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 4: { - message.sessionParameters = $root.google.protobuf.Struct.decode(reader, reader.uint32()); - break; - } - case 5: { - if (!(message.differences && message.differences.length)) - message.differences = []; - message.differences.push($root.google.cloud.dialogflow.cx.v3.TestRunDifference.decode(reader, reader.uint32())); - break; - } - case 6: { - message.diagnosticInfo = $root.google.protobuf.Struct.decode(reader, reader.uint32()); - break; - } - case 7: { - message.triggeredIntent = $root.google.cloud.dialogflow.cx.v3.Intent.decode(reader, reader.uint32()); - break; - } - case 8: { - message.currentPage = $root.google.cloud.dialogflow.cx.v3.Page.decode(reader, reader.uint32()); - break; - } - case 9: { - if (!(message.textResponses && message.textResponses.length)) - message.textResponses = []; - message.textResponses.push($root.google.cloud.dialogflow.cx.v3.ResponseMessage.Text.decode(reader, reader.uint32())); - break; - } - case 10: { - message.status = $root.google.rpc.Status.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a VirtualAgentOutput message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput} VirtualAgentOutput - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VirtualAgentOutput.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a VirtualAgentOutput message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - VirtualAgentOutput.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.sessionParameters != null && message.hasOwnProperty("sessionParameters")) { - var error = $root.google.protobuf.Struct.verify(message.sessionParameters); - if (error) - return "sessionParameters." + error; - } - if (message.differences != null && message.hasOwnProperty("differences")) { - if (!Array.isArray(message.differences)) - return "differences: array expected"; - for (var i = 0; i < message.differences.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.TestRunDifference.verify(message.differences[i]); - if (error) - return "differences." + error; - } - } - if (message.diagnosticInfo != null && message.hasOwnProperty("diagnosticInfo")) { - var error = $root.google.protobuf.Struct.verify(message.diagnosticInfo); - if (error) - return "diagnosticInfo." + error; - } - if (message.triggeredIntent != null && message.hasOwnProperty("triggeredIntent")) { - var error = $root.google.cloud.dialogflow.cx.v3.Intent.verify(message.triggeredIntent); - if (error) - return "triggeredIntent." + error; - } - if (message.currentPage != null && message.hasOwnProperty("currentPage")) { - var error = $root.google.cloud.dialogflow.cx.v3.Page.verify(message.currentPage); - if (error) - return "currentPage." + error; - } - if (message.textResponses != null && message.hasOwnProperty("textResponses")) { - if (!Array.isArray(message.textResponses)) - return "textResponses: array expected"; - for (var i = 0; i < message.textResponses.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.Text.verify(message.textResponses[i]); - if (error) - return "textResponses." + error; - } - } - if (message.status != null && message.hasOwnProperty("status")) { - var error = $root.google.rpc.Status.verify(message.status); + /** + * Verifies a RunContinuousTestMetadata message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.RunContinuousTestMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RunContinuousTestMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.errors != null && message.hasOwnProperty("errors")) { + if (!Array.isArray(message.errors)) + return "errors: array expected"; + for (var i = 0; i < message.errors.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.TestError.verify(message.errors[i]); if (error) - return "status." + error; - } - return null; - }; - - /** - * Creates a VirtualAgentOutput message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput} VirtualAgentOutput - */ - VirtualAgentOutput.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput(); - if (object.sessionParameters != null) { - if (typeof object.sessionParameters !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput.sessionParameters: object expected"); - message.sessionParameters = $root.google.protobuf.Struct.fromObject(object.sessionParameters); - } - if (object.differences) { - if (!Array.isArray(object.differences)) - throw TypeError(".google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput.differences: array expected"); - message.differences = []; - for (var i = 0; i < object.differences.length; ++i) { - if (typeof object.differences[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput.differences: object expected"); - message.differences[i] = $root.google.cloud.dialogflow.cx.v3.TestRunDifference.fromObject(object.differences[i]); - } - } - if (object.diagnosticInfo != null) { - if (typeof object.diagnosticInfo !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput.diagnosticInfo: object expected"); - message.diagnosticInfo = $root.google.protobuf.Struct.fromObject(object.diagnosticInfo); - } - if (object.triggeredIntent != null) { - if (typeof object.triggeredIntent !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput.triggeredIntent: object expected"); - message.triggeredIntent = $root.google.cloud.dialogflow.cx.v3.Intent.fromObject(object.triggeredIntent); - } - if (object.currentPage != null) { - if (typeof object.currentPage !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput.currentPage: object expected"); - message.currentPage = $root.google.cloud.dialogflow.cx.v3.Page.fromObject(object.currentPage); - } - if (object.textResponses) { - if (!Array.isArray(object.textResponses)) - throw TypeError(".google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput.textResponses: array expected"); - message.textResponses = []; - for (var i = 0; i < object.textResponses.length; ++i) { - if (typeof object.textResponses[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput.textResponses: object expected"); - message.textResponses[i] = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.Text.fromObject(object.textResponses[i]); - } - } - if (object.status != null) { - if (typeof object.status !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput.status: object expected"); - message.status = $root.google.rpc.Status.fromObject(object.status); + return "errors." + error; } - return message; - }; + } + return null; + }; - /** - * Creates a plain object from a VirtualAgentOutput message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput - * @static - * @param {google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput} message VirtualAgentOutput - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - VirtualAgentOutput.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.differences = []; - object.textResponses = []; - } - if (options.defaults) { - object.sessionParameters = null; - object.diagnosticInfo = null; - object.triggeredIntent = null; - object.currentPage = null; - object.status = null; - } - if (message.sessionParameters != null && message.hasOwnProperty("sessionParameters")) - object.sessionParameters = $root.google.protobuf.Struct.toObject(message.sessionParameters, options); - if (message.differences && message.differences.length) { - object.differences = []; - for (var j = 0; j < message.differences.length; ++j) - object.differences[j] = $root.google.cloud.dialogflow.cx.v3.TestRunDifference.toObject(message.differences[j], options); - } - if (message.diagnosticInfo != null && message.hasOwnProperty("diagnosticInfo")) - object.diagnosticInfo = $root.google.protobuf.Struct.toObject(message.diagnosticInfo, options); - if (message.triggeredIntent != null && message.hasOwnProperty("triggeredIntent")) - object.triggeredIntent = $root.google.cloud.dialogflow.cx.v3.Intent.toObject(message.triggeredIntent, options); - if (message.currentPage != null && message.hasOwnProperty("currentPage")) - object.currentPage = $root.google.cloud.dialogflow.cx.v3.Page.toObject(message.currentPage, options); - if (message.textResponses && message.textResponses.length) { - object.textResponses = []; - for (var j = 0; j < message.textResponses.length; ++j) - object.textResponses[j] = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.Text.toObject(message.textResponses[j], options); - } - if (message.status != null && message.hasOwnProperty("status")) - object.status = $root.google.rpc.Status.toObject(message.status, options); + /** + * Creates a RunContinuousTestMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.RunContinuousTestMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.RunContinuousTestMetadata} RunContinuousTestMetadata + */ + RunContinuousTestMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.RunContinuousTestMetadata) return object; - }; + var message = new $root.google.cloud.dialogflow.cx.v3.RunContinuousTestMetadata(); + if (object.errors) { + if (!Array.isArray(object.errors)) + throw TypeError(".google.cloud.dialogflow.cx.v3.RunContinuousTestMetadata.errors: array expected"); + message.errors = []; + for (var i = 0; i < object.errors.length; ++i) { + if (typeof object.errors[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.RunContinuousTestMetadata.errors: object expected"); + message.errors[i] = $root.google.cloud.dialogflow.cx.v3.TestError.fromObject(object.errors[i]); + } + } + return message; + }; - /** - * Converts this VirtualAgentOutput to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput - * @instance - * @returns {Object.} JSON object - */ - VirtualAgentOutput.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a RunContinuousTestMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.RunContinuousTestMetadata + * @static + * @param {google.cloud.dialogflow.cx.v3.RunContinuousTestMetadata} message RunContinuousTestMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RunContinuousTestMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.errors = []; + if (message.errors && message.errors.length) { + object.errors = []; + for (var j = 0; j < message.errors.length; ++j) + object.errors[j] = $root.google.cloud.dialogflow.cx.v3.TestError.toObject(message.errors[j], options); + } + return object; + }; - /** - * Gets the default type url for VirtualAgentOutput - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - VirtualAgentOutput.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput"; - }; + /** + * Converts this RunContinuousTestMetadata to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.RunContinuousTestMetadata + * @instance + * @returns {Object.} JSON object + */ + RunContinuousTestMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return VirtualAgentOutput; - })(); + /** + * Gets the default type url for RunContinuousTestMetadata + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.RunContinuousTestMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RunContinuousTestMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.RunContinuousTestMetadata"; + }; - return ConversationTurn; + return RunContinuousTestMetadata; })(); - v3.TestRunDifference = (function() { + v3.ListContinuousTestResultsRequest = (function() { /** - * Properties of a TestRunDifference. + * Properties of a ListContinuousTestResultsRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface ITestRunDifference - * @property {google.cloud.dialogflow.cx.v3.TestRunDifference.DiffType|null} [type] TestRunDifference type - * @property {string|null} [description] TestRunDifference description + * @interface IListContinuousTestResultsRequest + * @property {string|null} [parent] ListContinuousTestResultsRequest parent + * @property {number|null} [pageSize] ListContinuousTestResultsRequest pageSize + * @property {string|null} [pageToken] ListContinuousTestResultsRequest pageToken */ /** - * Constructs a new TestRunDifference. + * Constructs a new ListContinuousTestResultsRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a TestRunDifference. - * @implements ITestRunDifference + * @classdesc Represents a ListContinuousTestResultsRequest. + * @implements IListContinuousTestResultsRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.ITestRunDifference=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IListContinuousTestResultsRequest=} [properties] Properties to set */ - function TestRunDifference(properties) { + function ListContinuousTestResultsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -45173,91 +45082,105 @@ } /** - * TestRunDifference type. - * @member {google.cloud.dialogflow.cx.v3.TestRunDifference.DiffType} type - * @memberof google.cloud.dialogflow.cx.v3.TestRunDifference + * ListContinuousTestResultsRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.cx.v3.ListContinuousTestResultsRequest * @instance */ - TestRunDifference.prototype.type = 0; + ListContinuousTestResultsRequest.prototype.parent = ""; /** - * TestRunDifference description. - * @member {string} description - * @memberof google.cloud.dialogflow.cx.v3.TestRunDifference + * ListContinuousTestResultsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dialogflow.cx.v3.ListContinuousTestResultsRequest * @instance */ - TestRunDifference.prototype.description = ""; + ListContinuousTestResultsRequest.prototype.pageSize = 0; /** - * Creates a new TestRunDifference instance using the specified properties. + * ListContinuousTestResultsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dialogflow.cx.v3.ListContinuousTestResultsRequest + * @instance + */ + ListContinuousTestResultsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListContinuousTestResultsRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.TestRunDifference + * @memberof google.cloud.dialogflow.cx.v3.ListContinuousTestResultsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.ITestRunDifference=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.TestRunDifference} TestRunDifference instance + * @param {google.cloud.dialogflow.cx.v3.IListContinuousTestResultsRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ListContinuousTestResultsRequest} ListContinuousTestResultsRequest instance */ - TestRunDifference.create = function create(properties) { - return new TestRunDifference(properties); + ListContinuousTestResultsRequest.create = function create(properties) { + return new ListContinuousTestResultsRequest(properties); }; /** - * Encodes the specified TestRunDifference message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TestRunDifference.verify|verify} messages. + * Encodes the specified ListContinuousTestResultsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListContinuousTestResultsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.TestRunDifference + * @memberof google.cloud.dialogflow.cx.v3.ListContinuousTestResultsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.ITestRunDifference} message TestRunDifference message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListContinuousTestResultsRequest} message ListContinuousTestResultsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TestRunDifference.encode = function encode(message, writer) { + ListContinuousTestResultsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); return writer; }; /** - * Encodes the specified TestRunDifference message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TestRunDifference.verify|verify} messages. + * Encodes the specified ListContinuousTestResultsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListContinuousTestResultsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.TestRunDifference + * @memberof google.cloud.dialogflow.cx.v3.ListContinuousTestResultsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.ITestRunDifference} message TestRunDifference message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListContinuousTestResultsRequest} message ListContinuousTestResultsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TestRunDifference.encodeDelimited = function encodeDelimited(message, writer) { + ListContinuousTestResultsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TestRunDifference message from the specified reader or buffer. + * Decodes a ListContinuousTestResultsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.TestRunDifference + * @memberof google.cloud.dialogflow.cx.v3.ListContinuousTestResultsRequest * @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.TestRunDifference} TestRunDifference + * @returns {google.cloud.dialogflow.cx.v3.ListContinuousTestResultsRequest} ListContinuousTestResultsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TestRunDifference.decode = function decode(reader, length, error) { + ListContinuousTestResultsRequest.decode = function decode(reader, length, error) { 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.TestRunDifference(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ListContinuousTestResultsRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.type = reader.int32(); + message.parent = reader.string(); break; } case 2: { - message.description = reader.string(); + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); break; } default: @@ -45269,194 +45192,141 @@ }; /** - * Decodes a TestRunDifference message from the specified reader or buffer, length delimited. + * Decodes a ListContinuousTestResultsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.TestRunDifference + * @memberof google.cloud.dialogflow.cx.v3.ListContinuousTestResultsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.TestRunDifference} TestRunDifference + * @returns {google.cloud.dialogflow.cx.v3.ListContinuousTestResultsRequest} ListContinuousTestResultsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TestRunDifference.decodeDelimited = function decodeDelimited(reader) { + ListContinuousTestResultsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TestRunDifference message. + * Verifies a ListContinuousTestResultsRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.TestRunDifference + * @memberof google.cloud.dialogflow.cx.v3.ListContinuousTestResultsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TestRunDifference.verify = function verify(message) { + ListContinuousTestResultsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; return null; }; /** - * Creates a TestRunDifference message from a plain object. Also converts values to their respective internal types. + * Creates a ListContinuousTestResultsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.TestRunDifference + * @memberof google.cloud.dialogflow.cx.v3.ListContinuousTestResultsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.TestRunDifference} TestRunDifference + * @returns {google.cloud.dialogflow.cx.v3.ListContinuousTestResultsRequest} ListContinuousTestResultsRequest */ - TestRunDifference.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.TestRunDifference) + ListContinuousTestResultsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListContinuousTestResultsRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.TestRunDifference(); - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "DIFF_TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "INTENT": - case 1: - message.type = 1; - break; - case "PAGE": - case 2: - message.type = 2; - break; - case "PARAMETERS": - case 3: - message.type = 3; - break; - case "UTTERANCE": - case 4: - message.type = 4; - break; - case "FLOW": - case 5: - message.type = 5; - break; - } - if (object.description != null) - message.description = String(object.description); + var message = new $root.google.cloud.dialogflow.cx.v3.ListContinuousTestResultsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); return message; }; /** - * Creates a plain object from a TestRunDifference message. Also converts values to other types if specified. + * Creates a plain object from a ListContinuousTestResultsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.TestRunDifference + * @memberof google.cloud.dialogflow.cx.v3.ListContinuousTestResultsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.TestRunDifference} message TestRunDifference + * @param {google.cloud.dialogflow.cx.v3.ListContinuousTestResultsRequest} message ListContinuousTestResultsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TestRunDifference.toObject = function toObject(message, options) { + ListContinuousTestResultsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.type = options.enums === String ? "DIFF_TYPE_UNSPECIFIED" : 0; - object.description = ""; + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; } - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.TestRunDifference.DiffType[message.type] === undefined ? message.type : $root.google.cloud.dialogflow.cx.v3.TestRunDifference.DiffType[message.type] : message.type; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; return object; }; /** - * Converts this TestRunDifference to JSON. + * Converts this ListContinuousTestResultsRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.TestRunDifference + * @memberof google.cloud.dialogflow.cx.v3.ListContinuousTestResultsRequest * @instance * @returns {Object.} JSON object */ - TestRunDifference.prototype.toJSON = function toJSON() { + ListContinuousTestResultsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for TestRunDifference + * Gets the default type url for ListContinuousTestResultsRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.TestRunDifference + * @memberof google.cloud.dialogflow.cx.v3.ListContinuousTestResultsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - TestRunDifference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListContinuousTestResultsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.TestRunDifference"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListContinuousTestResultsRequest"; }; - /** - * DiffType enum. - * @name google.cloud.dialogflow.cx.v3.TestRunDifference.DiffType - * @enum {number} - * @property {number} DIFF_TYPE_UNSPECIFIED=0 DIFF_TYPE_UNSPECIFIED value - * @property {number} INTENT=1 INTENT value - * @property {number} PAGE=2 PAGE value - * @property {number} PARAMETERS=3 PARAMETERS value - * @property {number} UTTERANCE=4 UTTERANCE value - * @property {number} FLOW=5 FLOW value - */ - TestRunDifference.DiffType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DIFF_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "INTENT"] = 1; - values[valuesById[2] = "PAGE"] = 2; - values[valuesById[3] = "PARAMETERS"] = 3; - values[valuesById[4] = "UTTERANCE"] = 4; - values[valuesById[5] = "FLOW"] = 5; - return values; - })(); - - return TestRunDifference; + return ListContinuousTestResultsRequest; })(); - v3.TransitionCoverage = (function() { + v3.ListContinuousTestResultsResponse = (function() { /** - * Properties of a TransitionCoverage. + * Properties of a ListContinuousTestResultsResponse. * @memberof google.cloud.dialogflow.cx.v3 - * @interface ITransitionCoverage - * @property {Array.|null} [transitions] TransitionCoverage transitions - * @property {number|null} [coverageScore] TransitionCoverage coverageScore + * @interface IListContinuousTestResultsResponse + * @property {Array.|null} [continuousTestResults] ListContinuousTestResultsResponse continuousTestResults + * @property {string|null} [nextPageToken] ListContinuousTestResultsResponse nextPageToken */ /** - * Constructs a new TransitionCoverage. + * Constructs a new ListContinuousTestResultsResponse. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a TransitionCoverage. - * @implements ITransitionCoverage + * @classdesc Represents a ListContinuousTestResultsResponse. + * @implements IListContinuousTestResultsResponse * @constructor - * @param {google.cloud.dialogflow.cx.v3.ITransitionCoverage=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IListContinuousTestResultsResponse=} [properties] Properties to set */ - function TransitionCoverage(properties) { - this.transitions = []; + function ListContinuousTestResultsResponse(properties) { + this.continuousTestResults = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -45464,94 +45334,94 @@ } /** - * TransitionCoverage transitions. - * @member {Array.} transitions - * @memberof google.cloud.dialogflow.cx.v3.TransitionCoverage + * ListContinuousTestResultsResponse continuousTestResults. + * @member {Array.} continuousTestResults + * @memberof google.cloud.dialogflow.cx.v3.ListContinuousTestResultsResponse * @instance */ - TransitionCoverage.prototype.transitions = $util.emptyArray; + ListContinuousTestResultsResponse.prototype.continuousTestResults = $util.emptyArray; /** - * TransitionCoverage coverageScore. - * @member {number} coverageScore - * @memberof google.cloud.dialogflow.cx.v3.TransitionCoverage + * ListContinuousTestResultsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dialogflow.cx.v3.ListContinuousTestResultsResponse * @instance */ - TransitionCoverage.prototype.coverageScore = 0; + ListContinuousTestResultsResponse.prototype.nextPageToken = ""; /** - * Creates a new TransitionCoverage instance using the specified properties. + * Creates a new ListContinuousTestResultsResponse instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.TransitionCoverage + * @memberof google.cloud.dialogflow.cx.v3.ListContinuousTestResultsResponse * @static - * @param {google.cloud.dialogflow.cx.v3.ITransitionCoverage=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.TransitionCoverage} TransitionCoverage instance + * @param {google.cloud.dialogflow.cx.v3.IListContinuousTestResultsResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ListContinuousTestResultsResponse} ListContinuousTestResultsResponse instance */ - TransitionCoverage.create = function create(properties) { - return new TransitionCoverage(properties); + ListContinuousTestResultsResponse.create = function create(properties) { + return new ListContinuousTestResultsResponse(properties); }; /** - * Encodes the specified TransitionCoverage message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TransitionCoverage.verify|verify} messages. + * Encodes the specified ListContinuousTestResultsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListContinuousTestResultsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.TransitionCoverage + * @memberof google.cloud.dialogflow.cx.v3.ListContinuousTestResultsResponse * @static - * @param {google.cloud.dialogflow.cx.v3.ITransitionCoverage} message TransitionCoverage message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListContinuousTestResultsResponse} message ListContinuousTestResultsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TransitionCoverage.encode = function encode(message, writer) { + ListContinuousTestResultsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.transitions != null && message.transitions.length) - for (var i = 0; i < message.transitions.length; ++i) - $root.google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition.encode(message.transitions[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); + if (message.continuousTestResults != null && message.continuousTestResults.length) + for (var i = 0; i < message.continuousTestResults.length; ++i) + $root.google.cloud.dialogflow.cx.v3.ContinuousTestResult.encode(message.continuousTestResults[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; /** - * Encodes the specified TransitionCoverage message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TransitionCoverage.verify|verify} messages. + * Encodes the specified ListContinuousTestResultsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListContinuousTestResultsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.TransitionCoverage + * @memberof google.cloud.dialogflow.cx.v3.ListContinuousTestResultsResponse * @static - * @param {google.cloud.dialogflow.cx.v3.ITransitionCoverage} message TransitionCoverage message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListContinuousTestResultsResponse} message ListContinuousTestResultsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TransitionCoverage.encodeDelimited = function encodeDelimited(message, writer) { + ListContinuousTestResultsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TransitionCoverage message from the specified reader or buffer. + * Decodes a ListContinuousTestResultsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.TransitionCoverage + * @memberof google.cloud.dialogflow.cx.v3.ListContinuousTestResultsResponse * @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.TransitionCoverage} TransitionCoverage + * @returns {google.cloud.dialogflow.cx.v3.ListContinuousTestResultsResponse} ListContinuousTestResultsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TransitionCoverage.decode = function decode(reader, length, error) { + ListContinuousTestResultsResponse.decode = function decode(reader, length, error) { 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.TransitionCoverage(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ListContinuousTestResultsResponse(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - if (!(message.transitions && message.transitions.length)) - message.transitions = []; - message.transitions.push($root.google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition.decode(reader, reader.uint32())); + if (!(message.continuousTestResults && message.continuousTestResults.length)) + message.continuousTestResults = []; + message.continuousTestResults.push($root.google.cloud.dialogflow.cx.v3.ContinuousTestResult.decode(reader, reader.uint32())); break; } case 2: { - message.coverageScore = reader.float(); + message.nextPageToken = reader.string(); break; } default: @@ -45563,782 +45433,612 @@ }; /** - * Decodes a TransitionCoverage message from the specified reader or buffer, length delimited. + * Decodes a ListContinuousTestResultsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.TransitionCoverage + * @memberof google.cloud.dialogflow.cx.v3.ListContinuousTestResultsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.TransitionCoverage} TransitionCoverage + * @returns {google.cloud.dialogflow.cx.v3.ListContinuousTestResultsResponse} ListContinuousTestResultsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TransitionCoverage.decodeDelimited = function decodeDelimited(reader) { + ListContinuousTestResultsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TransitionCoverage message. + * Verifies a ListContinuousTestResultsResponse message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.TransitionCoverage + * @memberof google.cloud.dialogflow.cx.v3.ListContinuousTestResultsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TransitionCoverage.verify = function verify(message) { + ListContinuousTestResultsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - 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.TransitionCoverage.Transition.verify(message.transitions[i]); + if (message.continuousTestResults != null && message.hasOwnProperty("continuousTestResults")) { + if (!Array.isArray(message.continuousTestResults)) + return "continuousTestResults: array expected"; + for (var i = 0; i < message.continuousTestResults.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.ContinuousTestResult.verify(message.continuousTestResults[i]); if (error) - return "transitions." + error; + return "continuousTestResults." + error; } } - if (message.coverageScore != null && message.hasOwnProperty("coverageScore")) - if (typeof message.coverageScore !== "number") - return "coverageScore: number expected"; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a TransitionCoverage message from a plain object. Also converts values to their respective internal types. + * Creates a ListContinuousTestResultsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.TransitionCoverage + * @memberof google.cloud.dialogflow.cx.v3.ListContinuousTestResultsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.TransitionCoverage} TransitionCoverage + * @returns {google.cloud.dialogflow.cx.v3.ListContinuousTestResultsResponse} ListContinuousTestResultsResponse */ - TransitionCoverage.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.TransitionCoverage) + ListContinuousTestResultsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListContinuousTestResultsResponse) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.TransitionCoverage(); - if (object.transitions) { - if (!Array.isArray(object.transitions)) - throw TypeError(".google.cloud.dialogflow.cx.v3.TransitionCoverage.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.TransitionCoverage.transitions: object expected"); - message.transitions[i] = $root.google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition.fromObject(object.transitions[i]); + var message = new $root.google.cloud.dialogflow.cx.v3.ListContinuousTestResultsResponse(); + if (object.continuousTestResults) { + if (!Array.isArray(object.continuousTestResults)) + throw TypeError(".google.cloud.dialogflow.cx.v3.ListContinuousTestResultsResponse.continuousTestResults: array expected"); + message.continuousTestResults = []; + for (var i = 0; i < object.continuousTestResults.length; ++i) { + if (typeof object.continuousTestResults[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.ListContinuousTestResultsResponse.continuousTestResults: object expected"); + message.continuousTestResults[i] = $root.google.cloud.dialogflow.cx.v3.ContinuousTestResult.fromObject(object.continuousTestResults[i]); } } - if (object.coverageScore != null) - message.coverageScore = Number(object.coverageScore); + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a TransitionCoverage message. Also converts values to other types if specified. + * Creates a plain object from a ListContinuousTestResultsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.TransitionCoverage + * @memberof google.cloud.dialogflow.cx.v3.ListContinuousTestResultsResponse * @static - * @param {google.cloud.dialogflow.cx.v3.TransitionCoverage} message TransitionCoverage + * @param {google.cloud.dialogflow.cx.v3.ListContinuousTestResultsResponse} message ListContinuousTestResultsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TransitionCoverage.toObject = function toObject(message, options) { + ListContinuousTestResultsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.transitions = []; + object.continuousTestResults = []; if (options.defaults) - object.coverageScore = 0; - 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.TransitionCoverage.Transition.toObject(message.transitions[j], options); + object.nextPageToken = ""; + if (message.continuousTestResults && message.continuousTestResults.length) { + object.continuousTestResults = []; + for (var j = 0; j < message.continuousTestResults.length; ++j) + object.continuousTestResults[j] = $root.google.cloud.dialogflow.cx.v3.ContinuousTestResult.toObject(message.continuousTestResults[j], options); } - if (message.coverageScore != null && message.hasOwnProperty("coverageScore")) - object.coverageScore = options.json && !isFinite(message.coverageScore) ? String(message.coverageScore) : message.coverageScore; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this TransitionCoverage to JSON. + * Converts this ListContinuousTestResultsResponse to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.TransitionCoverage + * @memberof google.cloud.dialogflow.cx.v3.ListContinuousTestResultsResponse * @instance * @returns {Object.} JSON object */ - TransitionCoverage.prototype.toJSON = function toJSON() { + ListContinuousTestResultsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for TransitionCoverage + * Gets the default type url for ListContinuousTestResultsResponse * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.TransitionCoverage + * @memberof google.cloud.dialogflow.cx.v3.ListContinuousTestResultsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - TransitionCoverage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListContinuousTestResultsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.TransitionCoverage"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListContinuousTestResultsResponse"; }; - TransitionCoverage.TransitionNode = (function() { + return ListContinuousTestResultsResponse; + })(); - /** - * Properties of a TransitionNode. - * @memberof google.cloud.dialogflow.cx.v3.TransitionCoverage - * @interface ITransitionNode - * @property {google.cloud.dialogflow.cx.v3.IPage|null} [page] TransitionNode page - * @property {google.cloud.dialogflow.cx.v3.IFlow|null} [flow] TransitionNode flow - */ + v3.DeployFlowRequest = (function() { - /** - * Constructs a new TransitionNode. - * @memberof google.cloud.dialogflow.cx.v3.TransitionCoverage - * @classdesc Represents a TransitionNode. - * @implements ITransitionNode - * @constructor - * @param {google.cloud.dialogflow.cx.v3.TransitionCoverage.ITransitionNode=} [properties] Properties to set - */ - function TransitionNode(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]]; - } + /** + * Properties of a DeployFlowRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IDeployFlowRequest + * @property {string|null} [environment] DeployFlowRequest environment + * @property {string|null} [flowVersion] DeployFlowRequest flowVersion + */ - /** - * TransitionNode page. - * @member {google.cloud.dialogflow.cx.v3.IPage|null|undefined} page - * @memberof google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode - * @instance - */ - TransitionNode.prototype.page = null; + /** + * Constructs a new DeployFlowRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a DeployFlowRequest. + * @implements IDeployFlowRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IDeployFlowRequest=} [properties] Properties to set + */ + function DeployFlowRequest(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]]; + } - /** - * TransitionNode flow. - * @member {google.cloud.dialogflow.cx.v3.IFlow|null|undefined} flow - * @memberof google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode - * @instance - */ - TransitionNode.prototype.flow = null; + /** + * DeployFlowRequest environment. + * @member {string} environment + * @memberof google.cloud.dialogflow.cx.v3.DeployFlowRequest + * @instance + */ + DeployFlowRequest.prototype.environment = ""; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * DeployFlowRequest flowVersion. + * @member {string} flowVersion + * @memberof google.cloud.dialogflow.cx.v3.DeployFlowRequest + * @instance + */ + DeployFlowRequest.prototype.flowVersion = ""; - /** - * TransitionNode kind. - * @member {"page"|"flow"|undefined} kind - * @memberof google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode - * @instance - */ - Object.defineProperty(TransitionNode.prototype, "kind", { - get: $util.oneOfGetter($oneOfFields = ["page", "flow"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Creates a new DeployFlowRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.DeployFlowRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IDeployFlowRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.DeployFlowRequest} DeployFlowRequest instance + */ + DeployFlowRequest.create = function create(properties) { + return new DeployFlowRequest(properties); + }; - /** - * Creates a new TransitionNode instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode - * @static - * @param {google.cloud.dialogflow.cx.v3.TransitionCoverage.ITransitionNode=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode} TransitionNode instance - */ - TransitionNode.create = function create(properties) { - return new TransitionNode(properties); - }; + /** + * Encodes the specified DeployFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeployFlowRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.DeployFlowRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IDeployFlowRequest} message DeployFlowRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeployFlowRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.environment); + if (message.flowVersion != null && Object.hasOwnProperty.call(message, "flowVersion")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.flowVersion); + return writer; + }; - /** - * Encodes the specified TransitionNode message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode - * @static - * @param {google.cloud.dialogflow.cx.v3.TransitionCoverage.ITransitionNode} message TransitionNode message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TransitionNode.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.page != null && Object.hasOwnProperty.call(message, "page")) - $root.google.cloud.dialogflow.cx.v3.Page.encode(message.page, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.flow != null && Object.hasOwnProperty.call(message, "flow")) - $root.google.cloud.dialogflow.cx.v3.Flow.encode(message.flow, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; + /** + * Encodes the specified DeployFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeployFlowRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.DeployFlowRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IDeployFlowRequest} message DeployFlowRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeployFlowRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Encodes the specified TransitionNode message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode - * @static - * @param {google.cloud.dialogflow.cx.v3.TransitionCoverage.ITransitionNode} message TransitionNode message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TransitionNode.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TransitionNode message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode - * @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.TransitionCoverage.TransitionNode} TransitionNode - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TransitionNode.decode = function decode(reader, length, error) { - 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.TransitionCoverage.TransitionNode(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) + /** + * Decodes a DeployFlowRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.DeployFlowRequest + * @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.DeployFlowRequest} DeployFlowRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeployFlowRequest.decode = function decode(reader, length, error) { + 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.DeployFlowRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.environment = reader.string(); break; - switch (tag >>> 3) { - case 1: { - message.page = $root.google.cloud.dialogflow.cx.v3.Page.decode(reader, reader.uint32()); - break; - } - case 2: { - message.flow = $root.google.cloud.dialogflow.cx.v3.Flow.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); + } + case 2: { + message.flowVersion = reader.string(); break; } + default: + reader.skipType(tag & 7); + break; } - return message; - }; - - /** - * Decodes a TransitionNode message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode} TransitionNode - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TransitionNode.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + } + return message; + }; - /** - * Verifies a TransitionNode message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TransitionNode.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.page != null && message.hasOwnProperty("page")) { - properties.kind = 1; - { - var error = $root.google.cloud.dialogflow.cx.v3.Page.verify(message.page); - if (error) - return "page." + error; - } - } - if (message.flow != null && message.hasOwnProperty("flow")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - { - var error = $root.google.cloud.dialogflow.cx.v3.Flow.verify(message.flow); - if (error) - return "flow." + error; - } - } - return null; - }; + /** + * Decodes a DeployFlowRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.DeployFlowRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.DeployFlowRequest} DeployFlowRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeployFlowRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a TransitionNode message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode} TransitionNode - */ - TransitionNode.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode(); - if (object.page != null) { - if (typeof object.page !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode.page: object expected"); - message.page = $root.google.cloud.dialogflow.cx.v3.Page.fromObject(object.page); - } - if (object.flow != null) { - if (typeof object.flow !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode.flow: object expected"); - message.flow = $root.google.cloud.dialogflow.cx.v3.Flow.fromObject(object.flow); - } - return message; - }; + /** + * Verifies a DeployFlowRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.DeployFlowRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeployFlowRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.environment != null && message.hasOwnProperty("environment")) + if (!$util.isString(message.environment)) + return "environment: string expected"; + if (message.flowVersion != null && message.hasOwnProperty("flowVersion")) + if (!$util.isString(message.flowVersion)) + return "flowVersion: string expected"; + return null; + }; - /** - * Creates a plain object from a TransitionNode message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode - * @static - * @param {google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode} message TransitionNode - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TransitionNode.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.page != null && message.hasOwnProperty("page")) { - object.page = $root.google.cloud.dialogflow.cx.v3.Page.toObject(message.page, options); - if (options.oneofs) - object.kind = "page"; - } - if (message.flow != null && message.hasOwnProperty("flow")) { - object.flow = $root.google.cloud.dialogflow.cx.v3.Flow.toObject(message.flow, options); - if (options.oneofs) - object.kind = "flow"; - } + /** + * Creates a DeployFlowRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.DeployFlowRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.DeployFlowRequest} DeployFlowRequest + */ + DeployFlowRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.DeployFlowRequest) return object; - }; - - /** - * Converts this TransitionNode to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode - * @instance - * @returns {Object.} JSON object - */ - TransitionNode.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + var message = new $root.google.cloud.dialogflow.cx.v3.DeployFlowRequest(); + if (object.environment != null) + message.environment = String(object.environment); + if (object.flowVersion != null) + message.flowVersion = String(object.flowVersion); + return message; + }; - /** - * Gets the default type url for TransitionNode - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - TransitionNode.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode"; - }; + /** + * Creates a plain object from a DeployFlowRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.DeployFlowRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.DeployFlowRequest} message DeployFlowRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeployFlowRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.environment = ""; + object.flowVersion = ""; + } + if (message.environment != null && message.hasOwnProperty("environment")) + object.environment = message.environment; + if (message.flowVersion != null && message.hasOwnProperty("flowVersion")) + object.flowVersion = message.flowVersion; + return object; + }; - return TransitionNode; - })(); + /** + * Converts this DeployFlowRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.DeployFlowRequest + * @instance + * @returns {Object.} JSON object + */ + DeployFlowRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - TransitionCoverage.Transition = (function() { + /** + * Gets the default type url for DeployFlowRequest + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.DeployFlowRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeployFlowRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.DeployFlowRequest"; + }; - /** - * Properties of a Transition. - * @memberof google.cloud.dialogflow.cx.v3.TransitionCoverage - * @interface ITransition - * @property {google.cloud.dialogflow.cx.v3.TransitionCoverage.ITransitionNode|null} [source] Transition source - * @property {number|null} [index] Transition index - * @property {google.cloud.dialogflow.cx.v3.TransitionCoverage.ITransitionNode|null} [target] Transition target - * @property {boolean|null} [covered] Transition covered - * @property {google.cloud.dialogflow.cx.v3.ITransitionRoute|null} [transitionRoute] Transition transitionRoute - * @property {google.cloud.dialogflow.cx.v3.IEventHandler|null} [eventHandler] Transition eventHandler - */ + return DeployFlowRequest; + })(); - /** - * Constructs a new Transition. - * @memberof google.cloud.dialogflow.cx.v3.TransitionCoverage - * @classdesc Represents a Transition. - * @implements ITransition - * @constructor - * @param {google.cloud.dialogflow.cx.v3.TransitionCoverage.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]]; - } + v3.DeployFlowResponse = (function() { - /** - * Transition source. - * @member {google.cloud.dialogflow.cx.v3.TransitionCoverage.ITransitionNode|null|undefined} source - * @memberof google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition - * @instance - */ - Transition.prototype.source = null; + /** + * Properties of a DeployFlowResponse. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IDeployFlowResponse + * @property {google.cloud.dialogflow.cx.v3.IEnvironment|null} [environment] DeployFlowResponse environment + * @property {string|null} [deployment] DeployFlowResponse deployment + */ - /** - * Transition index. - * @member {number} index - * @memberof google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition - * @instance - */ - Transition.prototype.index = 0; + /** + * Constructs a new DeployFlowResponse. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a DeployFlowResponse. + * @implements IDeployFlowResponse + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IDeployFlowResponse=} [properties] Properties to set + */ + function DeployFlowResponse(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 target. - * @member {google.cloud.dialogflow.cx.v3.TransitionCoverage.ITransitionNode|null|undefined} target - * @memberof google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition - * @instance - */ - Transition.prototype.target = null; + /** + * DeployFlowResponse environment. + * @member {google.cloud.dialogflow.cx.v3.IEnvironment|null|undefined} environment + * @memberof google.cloud.dialogflow.cx.v3.DeployFlowResponse + * @instance + */ + DeployFlowResponse.prototype.environment = null; - /** - * Transition covered. - * @member {boolean} covered - * @memberof google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition - * @instance - */ - Transition.prototype.covered = false; + /** + * DeployFlowResponse deployment. + * @member {string} deployment + * @memberof google.cloud.dialogflow.cx.v3.DeployFlowResponse + * @instance + */ + DeployFlowResponse.prototype.deployment = ""; - /** - * Transition transitionRoute. - * @member {google.cloud.dialogflow.cx.v3.ITransitionRoute|null|undefined} transitionRoute - * @memberof google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition - * @instance - */ - Transition.prototype.transitionRoute = null; + /** + * Creates a new DeployFlowResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.DeployFlowResponse + * @static + * @param {google.cloud.dialogflow.cx.v3.IDeployFlowResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.DeployFlowResponse} DeployFlowResponse instance + */ + DeployFlowResponse.create = function create(properties) { + return new DeployFlowResponse(properties); + }; - /** - * Transition eventHandler. - * @member {google.cloud.dialogflow.cx.v3.IEventHandler|null|undefined} eventHandler - * @memberof google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition - * @instance - */ - Transition.prototype.eventHandler = null; + /** + * Encodes the specified DeployFlowResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeployFlowResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.DeployFlowResponse + * @static + * @param {google.cloud.dialogflow.cx.v3.IDeployFlowResponse} message DeployFlowResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeployFlowResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) + $root.google.cloud.dialogflow.cx.v3.Environment.encode(message.environment, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.deployment != null && Object.hasOwnProperty.call(message, "deployment")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.deployment); + return writer; + }; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Encodes the specified DeployFlowResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeployFlowResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.DeployFlowResponse + * @static + * @param {google.cloud.dialogflow.cx.v3.IDeployFlowResponse} message DeployFlowResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeployFlowResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Transition detail. - * @member {"transitionRoute"|"eventHandler"|undefined} detail - * @memberof google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition - * @instance - */ - Object.defineProperty(Transition.prototype, "detail", { - get: $util.oneOfGetter($oneOfFields = ["transitionRoute", "eventHandler"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Decodes a DeployFlowResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.DeployFlowResponse + * @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.DeployFlowResponse} DeployFlowResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeployFlowResponse.decode = function decode(reader, length, error) { + 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.DeployFlowResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.environment = $root.google.cloud.dialogflow.cx.v3.Environment.decode(reader, reader.uint32()); + break; + } + case 2: { + message.deployment = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Creates a new Transition instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition - * @static - * @param {google.cloud.dialogflow.cx.v3.TransitionCoverage.ITransition=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition} Transition instance - */ - Transition.create = function create(properties) { - return new Transition(properties); - }; + /** + * Decodes a DeployFlowResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.DeployFlowResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.DeployFlowResponse} DeployFlowResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeployFlowResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Encodes the specified Transition message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition - * @static - * @param {google.cloud.dialogflow.cx.v3.TransitionCoverage.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.source != null && Object.hasOwnProperty.call(message, "source")) - $root.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode.encode(message.source, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - $root.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode.encode(message.target, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.covered != null && Object.hasOwnProperty.call(message, "covered")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.covered); - if (message.index != null && Object.hasOwnProperty.call(message, "index")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.index); - if (message.transitionRoute != null && Object.hasOwnProperty.call(message, "transitionRoute")) - $root.google.cloud.dialogflow.cx.v3.TransitionRoute.encode(message.transitionRoute, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.eventHandler != null && Object.hasOwnProperty.call(message, "eventHandler")) - $root.google.cloud.dialogflow.cx.v3.EventHandler.encode(message.eventHandler, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Transition message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition - * @static - * @param {google.cloud.dialogflow.cx.v3.TransitionCoverage.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.TransitionCoverage.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.TransitionCoverage.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, error) { - 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.TransitionCoverage.Transition(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.source = $root.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode.decode(reader, reader.uint32()); - break; - } - case 4: { - message.index = reader.int32(); - break; - } - case 2: { - message.target = $root.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode.decode(reader, reader.uint32()); - break; - } - case 3: { - message.covered = reader.bool(); - break; - } - case 5: { - message.transitionRoute = $root.google.cloud.dialogflow.cx.v3.TransitionRoute.decode(reader, reader.uint32()); - break; - } - case 6: { - message.eventHandler = $root.google.cloud.dialogflow.cx.v3.EventHandler.decode(reader, reader.uint32()); - 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.TransitionCoverage.Transition - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.TransitionCoverage.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.TransitionCoverage.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"; - var properties = {}; - if (message.source != null && message.hasOwnProperty("source")) { - var error = $root.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode.verify(message.source); - if (error) - return "source." + error; - } - if (message.index != null && message.hasOwnProperty("index")) - if (!$util.isInteger(message.index)) - return "index: integer expected"; - if (message.target != null && message.hasOwnProperty("target")) { - var error = $root.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode.verify(message.target); - if (error) - return "target." + error; - } - if (message.covered != null && message.hasOwnProperty("covered")) - if (typeof message.covered !== "boolean") - return "covered: boolean expected"; - if (message.transitionRoute != null && message.hasOwnProperty("transitionRoute")) { - properties.detail = 1; - { - var error = $root.google.cloud.dialogflow.cx.v3.TransitionRoute.verify(message.transitionRoute); - if (error) - return "transitionRoute." + error; - } - } - if (message.eventHandler != null && message.hasOwnProperty("eventHandler")) { - if (properties.detail === 1) - return "detail: multiple values"; - properties.detail = 1; - { - var error = $root.google.cloud.dialogflow.cx.v3.EventHandler.verify(message.eventHandler); - if (error) - return "eventHandler." + error; - } - } - 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.TransitionCoverage.Transition - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition} Transition - */ - Transition.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition(); - if (object.source != null) { - if (typeof object.source !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition.source: object expected"); - message.source = $root.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode.fromObject(object.source); - } - if (object.index != null) - message.index = object.index | 0; - if (object.target != null) { - if (typeof object.target !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition.target: object expected"); - message.target = $root.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode.fromObject(object.target); - } - if (object.covered != null) - message.covered = Boolean(object.covered); - if (object.transitionRoute != null) { - if (typeof object.transitionRoute !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition.transitionRoute: object expected"); - message.transitionRoute = $root.google.cloud.dialogflow.cx.v3.TransitionRoute.fromObject(object.transitionRoute); - } - if (object.eventHandler != null) { - if (typeof object.eventHandler !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition.eventHandler: object expected"); - message.eventHandler = $root.google.cloud.dialogflow.cx.v3.EventHandler.fromObject(object.eventHandler); - } - return message; - }; + /** + * Verifies a DeployFlowResponse message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.DeployFlowResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeployFlowResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.environment != null && message.hasOwnProperty("environment")) { + var error = $root.google.cloud.dialogflow.cx.v3.Environment.verify(message.environment); + if (error) + return "environment." + error; + } + if (message.deployment != null && message.hasOwnProperty("deployment")) + if (!$util.isString(message.deployment)) + return "deployment: string expected"; + return null; + }; - /** - * Creates a plain object from a Transition message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition - * @static - * @param {google.cloud.dialogflow.cx.v3.TransitionCoverage.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.source = null; - object.target = null; - object.covered = false; - object.index = 0; - } - if (message.source != null && message.hasOwnProperty("source")) - object.source = $root.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode.toObject(message.source, options); - if (message.target != null && message.hasOwnProperty("target")) - object.target = $root.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode.toObject(message.target, options); - if (message.covered != null && message.hasOwnProperty("covered")) - object.covered = message.covered; - if (message.index != null && message.hasOwnProperty("index")) - object.index = message.index; - if (message.transitionRoute != null && message.hasOwnProperty("transitionRoute")) { - object.transitionRoute = $root.google.cloud.dialogflow.cx.v3.TransitionRoute.toObject(message.transitionRoute, options); - if (options.oneofs) - object.detail = "transitionRoute"; - } - if (message.eventHandler != null && message.hasOwnProperty("eventHandler")) { - object.eventHandler = $root.google.cloud.dialogflow.cx.v3.EventHandler.toObject(message.eventHandler, options); - if (options.oneofs) - object.detail = "eventHandler"; - } + /** + * Creates a DeployFlowResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.DeployFlowResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.DeployFlowResponse} DeployFlowResponse + */ + DeployFlowResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.DeployFlowResponse) return object; - }; + var message = new $root.google.cloud.dialogflow.cx.v3.DeployFlowResponse(); + if (object.environment != null) { + if (typeof object.environment !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.DeployFlowResponse.environment: object expected"); + message.environment = $root.google.cloud.dialogflow.cx.v3.Environment.fromObject(object.environment); + } + if (object.deployment != null) + message.deployment = String(object.deployment); + return message; + }; - /** - * Converts this Transition to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition - * @instance - * @returns {Object.} JSON object - */ - Transition.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a DeployFlowResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.DeployFlowResponse + * @static + * @param {google.cloud.dialogflow.cx.v3.DeployFlowResponse} message DeployFlowResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeployFlowResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.environment = null; + object.deployment = ""; + } + if (message.environment != null && message.hasOwnProperty("environment")) + object.environment = $root.google.cloud.dialogflow.cx.v3.Environment.toObject(message.environment, options); + if (message.deployment != null && message.hasOwnProperty("deployment")) + object.deployment = message.deployment; + return object; + }; - /** - * Gets the default type url for Transition - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Transition.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition"; - }; + /** + * Converts this DeployFlowResponse to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.DeployFlowResponse + * @instance + * @returns {Object.} JSON object + */ + DeployFlowResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return Transition; - })(); + /** + * Gets the default type url for DeployFlowResponse + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.DeployFlowResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeployFlowResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.DeployFlowResponse"; + }; - return TransitionCoverage; + return DeployFlowResponse; })(); - v3.TransitionRouteGroupCoverage = (function() { + v3.DeployFlowMetadata = (function() { /** - * Properties of a TransitionRouteGroupCoverage. + * Properties of a DeployFlowMetadata. * @memberof google.cloud.dialogflow.cx.v3 - * @interface ITransitionRouteGroupCoverage - * @property {Array.|null} [coverages] TransitionRouteGroupCoverage coverages - * @property {number|null} [coverageScore] TransitionRouteGroupCoverage coverageScore + * @interface IDeployFlowMetadata + * @property {Array.|null} [testErrors] DeployFlowMetadata testErrors */ /** - * Constructs a new TransitionRouteGroupCoverage. + * Constructs a new DeployFlowMetadata. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a TransitionRouteGroupCoverage. - * @implements ITransitionRouteGroupCoverage + * @classdesc Represents a DeployFlowMetadata. + * @implements IDeployFlowMetadata * @constructor - * @param {google.cloud.dialogflow.cx.v3.ITransitionRouteGroupCoverage=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IDeployFlowMetadata=} [properties] Properties to set */ - function TransitionRouteGroupCoverage(properties) { - this.coverages = []; + function DeployFlowMetadata(properties) { + this.testErrors = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -46346,94 +46046,80 @@ } /** - * 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 + * DeployFlowMetadata testErrors. + * @member {Array.} testErrors + * @memberof google.cloud.dialogflow.cx.v3.DeployFlowMetadata * @instance */ - TransitionRouteGroupCoverage.prototype.coverageScore = 0; + DeployFlowMetadata.prototype.testErrors = $util.emptyArray; /** - * Creates a new TransitionRouteGroupCoverage instance using the specified properties. + * Creates a new DeployFlowMetadata instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage + * @memberof google.cloud.dialogflow.cx.v3.DeployFlowMetadata * @static - * @param {google.cloud.dialogflow.cx.v3.ITransitionRouteGroupCoverage=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage} TransitionRouteGroupCoverage instance + * @param {google.cloud.dialogflow.cx.v3.IDeployFlowMetadata=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.DeployFlowMetadata} DeployFlowMetadata instance */ - TransitionRouteGroupCoverage.create = function create(properties) { - return new TransitionRouteGroupCoverage(properties); + DeployFlowMetadata.create = function create(properties) { + return new DeployFlowMetadata(properties); }; /** - * Encodes the specified TransitionRouteGroupCoverage message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.verify|verify} messages. + * Encodes the specified DeployFlowMetadata message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeployFlowMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage + * @memberof google.cloud.dialogflow.cx.v3.DeployFlowMetadata * @static - * @param {google.cloud.dialogflow.cx.v3.ITransitionRouteGroupCoverage} message TransitionRouteGroupCoverage message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IDeployFlowMetadata} message DeployFlowMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TransitionRouteGroupCoverage.encode = function encode(message, writer) { + DeployFlowMetadata.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); + if (message.testErrors != null && message.testErrors.length) + for (var i = 0; i < message.testErrors.length; ++i) + $root.google.cloud.dialogflow.cx.v3.TestError.encode(message.testErrors[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified TransitionRouteGroupCoverage message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.verify|verify} messages. + * Encodes the specified DeployFlowMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeployFlowMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage + * @memberof google.cloud.dialogflow.cx.v3.DeployFlowMetadata * @static - * @param {google.cloud.dialogflow.cx.v3.ITransitionRouteGroupCoverage} message TransitionRouteGroupCoverage message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IDeployFlowMetadata} message DeployFlowMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TransitionRouteGroupCoverage.encodeDelimited = function encodeDelimited(message, writer) { + DeployFlowMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TransitionRouteGroupCoverage message from the specified reader or buffer. + * Decodes a DeployFlowMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage + * @memberof google.cloud.dialogflow.cx.v3.DeployFlowMetadata * @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 + * @returns {google.cloud.dialogflow.cx.v3.DeployFlowMetadata} DeployFlowMetadata * @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, error) { + DeployFlowMetadata.decode = function decode(reader, length, error) { 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(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.DeployFlowMetadata(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; 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(); + if (!(message.testErrors && message.testErrors.length)) + message.testErrors = []; + message.testErrors.push($root.google.cloud.dialogflow.cx.v3.TestError.decode(reader, reader.uint32())); break; } default: @@ -46445,663 +46131,579 @@ }; /** - * Decodes a TransitionRouteGroupCoverage message from the specified reader or buffer, length delimited. + * Decodes a DeployFlowMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage + * @memberof google.cloud.dialogflow.cx.v3.DeployFlowMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage} TransitionRouteGroupCoverage + * @returns {google.cloud.dialogflow.cx.v3.DeployFlowMetadata} DeployFlowMetadata * @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) { + DeployFlowMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TransitionRouteGroupCoverage message. + * Verifies a DeployFlowMetadata message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage + * @memberof google.cloud.dialogflow.cx.v3.DeployFlowMetadata * @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) { + DeployFlowMetadata.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 (message.testErrors != null && message.hasOwnProperty("testErrors")) { + if (!Array.isArray(message.testErrors)) + return "testErrors: array expected"; + for (var i = 0; i < message.testErrors.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.TestError.verify(message.testErrors[i]); if (error) - return "coverages." + error; + return "testErrors." + 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. + * Creates a DeployFlowMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage + * @memberof google.cloud.dialogflow.cx.v3.DeployFlowMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage} TransitionRouteGroupCoverage + * @returns {google.cloud.dialogflow.cx.v3.DeployFlowMetadata} DeployFlowMetadata */ - TransitionRouteGroupCoverage.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage) + DeployFlowMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.DeployFlowMetadata) 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]); + var message = new $root.google.cloud.dialogflow.cx.v3.DeployFlowMetadata(); + if (object.testErrors) { + if (!Array.isArray(object.testErrors)) + throw TypeError(".google.cloud.dialogflow.cx.v3.DeployFlowMetadata.testErrors: array expected"); + message.testErrors = []; + for (var i = 0; i < object.testErrors.length; ++i) { + if (typeof object.testErrors[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.DeployFlowMetadata.testErrors: object expected"); + message.testErrors[i] = $root.google.cloud.dialogflow.cx.v3.TestError.fromObject(object.testErrors[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. + * Creates a plain object from a DeployFlowMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage + * @memberof google.cloud.dialogflow.cx.v3.DeployFlowMetadata * @static - * @param {google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage} message TransitionRouteGroupCoverage + * @param {google.cloud.dialogflow.cx.v3.DeployFlowMetadata} message DeployFlowMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TransitionRouteGroupCoverage.toObject = function toObject(message, options) { + DeployFlowMetadata.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; + object.testErrors = []; + if (message.testErrors && message.testErrors.length) { + object.testErrors = []; + for (var j = 0; j < message.testErrors.length; ++j) + object.testErrors[j] = $root.google.cloud.dialogflow.cx.v3.TestError.toObject(message.testErrors[j], options); + } + return object; }; /** - * Converts this TransitionRouteGroupCoverage to JSON. + * Converts this DeployFlowMetadata to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage + * @memberof google.cloud.dialogflow.cx.v3.DeployFlowMetadata * @instance * @returns {Object.} JSON object */ - TransitionRouteGroupCoverage.prototype.toJSON = function toJSON() { + DeployFlowMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for TransitionRouteGroupCoverage + * Gets the default type url for DeployFlowMetadata * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage + * @memberof google.cloud.dialogflow.cx.v3.DeployFlowMetadata * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - TransitionRouteGroupCoverage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeployFlowMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.DeployFlowMetadata"; }; - TransitionRouteGroupCoverage.Coverage = (function() { + return DeployFlowMetadata; + })(); - /** - * 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 - */ + v3.TestCases = (function() { - /** - * 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]]; - } + /** + * Constructs a new TestCases service. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a TestCases + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function TestCases(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } - /** - * 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; + (TestCases.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = TestCases; - /** - * Coverage transitions. - * @member {Array.} transitions - * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage - * @instance - */ - Coverage.prototype.transitions = $util.emptyArray; + /** + * Creates new TestCases service using the specified rpc implementation. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.TestCases + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {TestCases} RPC service. Useful where requests and/or responses are streamed. + */ + TestCases.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; - /** - * Coverage coverageScore. - * @member {number} coverageScore - * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage - * @instance - */ - Coverage.prototype.coverageScore = 0; + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.TestCases|listTestCases}. + * @memberof google.cloud.dialogflow.cx.v3.TestCases + * @typedef ListTestCasesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.ListTestCasesResponse} [response] ListTestCasesResponse + */ - /** - * 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); - }; + /** + * Calls ListTestCases. + * @function listTestCases + * @memberof google.cloud.dialogflow.cx.v3.TestCases + * @instance + * @param {google.cloud.dialogflow.cx.v3.IListTestCasesRequest} request ListTestCasesRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.TestCases.ListTestCasesCallback} callback Node-style callback called with the error, if any, and ListTestCasesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(TestCases.prototype.listTestCases = function listTestCases(request, callback) { + return this.rpcCall(listTestCases, $root.google.cloud.dialogflow.cx.v3.ListTestCasesRequest, $root.google.cloud.dialogflow.cx.v3.ListTestCasesResponse, request, callback); + }, "name", { value: "ListTestCases" }); - /** - * 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; - }; + /** + * Calls ListTestCases. + * @function listTestCases + * @memberof google.cloud.dialogflow.cx.v3.TestCases + * @instance + * @param {google.cloud.dialogflow.cx.v3.IListTestCasesRequest} request ListTestCasesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * 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(); - }; + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.TestCases|batchDeleteTestCases}. + * @memberof google.cloud.dialogflow.cx.v3.TestCases + * @typedef BatchDeleteTestCasesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ - /** - * 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, error) { - 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(); - if (tag === error) - break; - 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; - }; + /** + * Calls BatchDeleteTestCases. + * @function batchDeleteTestCases + * @memberof google.cloud.dialogflow.cx.v3.TestCases + * @instance + * @param {google.cloud.dialogflow.cx.v3.IBatchDeleteTestCasesRequest} request BatchDeleteTestCasesRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.TestCases.BatchDeleteTestCasesCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(TestCases.prototype.batchDeleteTestCases = function batchDeleteTestCases(request, callback) { + return this.rpcCall(batchDeleteTestCases, $root.google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "BatchDeleteTestCases" }); - /** - * 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()); - }; + /** + * Calls BatchDeleteTestCases. + * @function batchDeleteTestCases + * @memberof google.cloud.dialogflow.cx.v3.TestCases + * @instance + * @param {google.cloud.dialogflow.cx.v3.IBatchDeleteTestCasesRequest} request BatchDeleteTestCasesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * 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; - }; + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.TestCases|getTestCase}. + * @memberof google.cloud.dialogflow.cx.v3.TestCases + * @typedef GetTestCaseCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.TestCase} [response] TestCase + */ - /** - * 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; - }; + /** + * Calls GetTestCase. + * @function getTestCase + * @memberof google.cloud.dialogflow.cx.v3.TestCases + * @instance + * @param {google.cloud.dialogflow.cx.v3.IGetTestCaseRequest} request GetTestCaseRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.TestCases.GetTestCaseCallback} callback Node-style callback called with the error, if any, and TestCase + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(TestCases.prototype.getTestCase = function getTestCase(request, callback) { + return this.rpcCall(getTestCase, $root.google.cloud.dialogflow.cx.v3.GetTestCaseRequest, $root.google.cloud.dialogflow.cx.v3.TestCase, request, callback); + }, "name", { value: "GetTestCase" }); - /** - * 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; - }; + /** + * Calls GetTestCase. + * @function getTestCase + * @memberof google.cloud.dialogflow.cx.v3.TestCases + * @instance + * @param {google.cloud.dialogflow.cx.v3.IGetTestCaseRequest} request GetTestCaseRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * 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); - }; + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.TestCases|createTestCase}. + * @memberof google.cloud.dialogflow.cx.v3.TestCases + * @typedef CreateTestCaseCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.TestCase} [response] TestCase + */ - /** - * Gets the default type url for Coverage - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Coverage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage"; - }; + /** + * Calls CreateTestCase. + * @function createTestCase + * @memberof google.cloud.dialogflow.cx.v3.TestCases + * @instance + * @param {google.cloud.dialogflow.cx.v3.ICreateTestCaseRequest} request CreateTestCaseRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.TestCases.CreateTestCaseCallback} callback Node-style callback called with the error, if any, and TestCase + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(TestCases.prototype.createTestCase = function createTestCase(request, callback) { + return this.rpcCall(createTestCase, $root.google.cloud.dialogflow.cx.v3.CreateTestCaseRequest, $root.google.cloud.dialogflow.cx.v3.TestCase, request, callback); + }, "name", { value: "CreateTestCase" }); - Coverage.Transition = (function() { + /** + * Calls CreateTestCase. + * @function createTestCase + * @memberof google.cloud.dialogflow.cx.v3.TestCases + * @instance + * @param {google.cloud.dialogflow.cx.v3.ICreateTestCaseRequest} request CreateTestCaseRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * 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 - */ + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.TestCases|updateTestCase}. + * @memberof google.cloud.dialogflow.cx.v3.TestCases + * @typedef UpdateTestCaseCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.TestCase} [response] TestCase + */ - /** - * 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]]; - } + /** + * Calls UpdateTestCase. + * @function updateTestCase + * @memberof google.cloud.dialogflow.cx.v3.TestCases + * @instance + * @param {google.cloud.dialogflow.cx.v3.IUpdateTestCaseRequest} request UpdateTestCaseRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.TestCases.UpdateTestCaseCallback} callback Node-style callback called with the error, if any, and TestCase + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(TestCases.prototype.updateTestCase = function updateTestCase(request, callback) { + return this.rpcCall(updateTestCase, $root.google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest, $root.google.cloud.dialogflow.cx.v3.TestCase, request, callback); + }, "name", { value: "UpdateTestCase" }); - /** - * 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; + /** + * Calls UpdateTestCase. + * @function updateTestCase + * @memberof google.cloud.dialogflow.cx.v3.TestCases + * @instance + * @param {google.cloud.dialogflow.cx.v3.IUpdateTestCaseRequest} request UpdateTestCaseRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Transition covered. - * @member {boolean} covered - * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition - * @instance - */ - Transition.prototype.covered = false; + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.TestCases|runTestCase}. + * @memberof google.cloud.dialogflow.cx.v3.TestCases + * @typedef RunTestCaseCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ - /** - * 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); - }; + /** + * Calls RunTestCase. + * @function runTestCase + * @memberof google.cloud.dialogflow.cx.v3.TestCases + * @instance + * @param {google.cloud.dialogflow.cx.v3.IRunTestCaseRequest} request RunTestCaseRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.TestCases.RunTestCaseCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(TestCases.prototype.runTestCase = function runTestCase(request, callback) { + return this.rpcCall(runTestCase, $root.google.cloud.dialogflow.cx.v3.RunTestCaseRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "RunTestCase" }); - /** - * 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; - }; + /** + * Calls RunTestCase. + * @function runTestCase + * @memberof google.cloud.dialogflow.cx.v3.TestCases + * @instance + * @param {google.cloud.dialogflow.cx.v3.IRunTestCaseRequest} request RunTestCaseRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * 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(); - }; + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.TestCases|batchRunTestCases}. + * @memberof google.cloud.dialogflow.cx.v3.TestCases + * @typedef BatchRunTestCasesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ - /** - * 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, error) { - 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(); - if (tag === error) - break; - 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; - }; + /** + * Calls BatchRunTestCases. + * @function batchRunTestCases + * @memberof google.cloud.dialogflow.cx.v3.TestCases + * @instance + * @param {google.cloud.dialogflow.cx.v3.IBatchRunTestCasesRequest} request BatchRunTestCasesRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.TestCases.BatchRunTestCasesCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(TestCases.prototype.batchRunTestCases = function batchRunTestCases(request, callback) { + return this.rpcCall(batchRunTestCases, $root.google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "BatchRunTestCases" }); - /** - * 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()); - }; + /** + * Calls BatchRunTestCases. + * @function batchRunTestCases + * @memberof google.cloud.dialogflow.cx.v3.TestCases + * @instance + * @param {google.cloud.dialogflow.cx.v3.IBatchRunTestCasesRequest} request BatchRunTestCasesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * 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; - }; + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.TestCases|calculateCoverage}. + * @memberof google.cloud.dialogflow.cx.v3.TestCases + * @typedef CalculateCoverageCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.CalculateCoverageResponse} [response] CalculateCoverageResponse + */ - /** - * 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; - }; + /** + * Calls CalculateCoverage. + * @function calculateCoverage + * @memberof google.cloud.dialogflow.cx.v3.TestCases + * @instance + * @param {google.cloud.dialogflow.cx.v3.ICalculateCoverageRequest} request CalculateCoverageRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.TestCases.CalculateCoverageCallback} callback Node-style callback called with the error, if any, and CalculateCoverageResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(TestCases.prototype.calculateCoverage = function calculateCoverage(request, callback) { + return this.rpcCall(calculateCoverage, $root.google.cloud.dialogflow.cx.v3.CalculateCoverageRequest, $root.google.cloud.dialogflow.cx.v3.CalculateCoverageResponse, request, callback); + }, "name", { value: "CalculateCoverage" }); - /** - * 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; - }; + /** + * Calls CalculateCoverage. + * @function calculateCoverage + * @memberof google.cloud.dialogflow.cx.v3.TestCases + * @instance + * @param {google.cloud.dialogflow.cx.v3.ICalculateCoverageRequest} request CalculateCoverageRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * 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); - }; + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.TestCases|importTestCases}. + * @memberof google.cloud.dialogflow.cx.v3.TestCases + * @typedef ImportTestCasesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ - /** - * Gets the default type url for Transition - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Transition.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition"; - }; + /** + * Calls ImportTestCases. + * @function importTestCases + * @memberof google.cloud.dialogflow.cx.v3.TestCases + * @instance + * @param {google.cloud.dialogflow.cx.v3.IImportTestCasesRequest} request ImportTestCasesRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.TestCases.ImportTestCasesCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(TestCases.prototype.importTestCases = function importTestCases(request, callback) { + return this.rpcCall(importTestCases, $root.google.cloud.dialogflow.cx.v3.ImportTestCasesRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "ImportTestCases" }); - return Transition; - })(); + /** + * Calls ImportTestCases. + * @function importTestCases + * @memberof google.cloud.dialogflow.cx.v3.TestCases + * @instance + * @param {google.cloud.dialogflow.cx.v3.IImportTestCasesRequest} request ImportTestCasesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - return Coverage; - })(); + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.TestCases|exportTestCases}. + * @memberof google.cloud.dialogflow.cx.v3.TestCases + * @typedef ExportTestCasesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ - return TransitionRouteGroupCoverage; + /** + * Calls ExportTestCases. + * @function exportTestCases + * @memberof google.cloud.dialogflow.cx.v3.TestCases + * @instance + * @param {google.cloud.dialogflow.cx.v3.IExportTestCasesRequest} request ExportTestCasesRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.TestCases.ExportTestCasesCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(TestCases.prototype.exportTestCases = function exportTestCases(request, callback) { + return this.rpcCall(exportTestCases, $root.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "ExportTestCases" }); + + /** + * Calls ExportTestCases. + * @function exportTestCases + * @memberof google.cloud.dialogflow.cx.v3.TestCases + * @instance + * @param {google.cloud.dialogflow.cx.v3.IExportTestCasesRequest} request ExportTestCasesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.TestCases|listTestCaseResults}. + * @memberof google.cloud.dialogflow.cx.v3.TestCases + * @typedef ListTestCaseResultsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse} [response] ListTestCaseResultsResponse + */ + + /** + * Calls ListTestCaseResults. + * @function listTestCaseResults + * @memberof google.cloud.dialogflow.cx.v3.TestCases + * @instance + * @param {google.cloud.dialogflow.cx.v3.IListTestCaseResultsRequest} request ListTestCaseResultsRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.TestCases.ListTestCaseResultsCallback} callback Node-style callback called with the error, if any, and ListTestCaseResultsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(TestCases.prototype.listTestCaseResults = function listTestCaseResults(request, callback) { + return this.rpcCall(listTestCaseResults, $root.google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest, $root.google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse, request, callback); + }, "name", { value: "ListTestCaseResults" }); + + /** + * Calls ListTestCaseResults. + * @function listTestCaseResults + * @memberof google.cloud.dialogflow.cx.v3.TestCases + * @instance + * @param {google.cloud.dialogflow.cx.v3.IListTestCaseResultsRequest} request ListTestCaseResultsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.TestCases|getTestCaseResult}. + * @memberof google.cloud.dialogflow.cx.v3.TestCases + * @typedef GetTestCaseResultCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.TestCaseResult} [response] TestCaseResult + */ + + /** + * Calls GetTestCaseResult. + * @function getTestCaseResult + * @memberof google.cloud.dialogflow.cx.v3.TestCases + * @instance + * @param {google.cloud.dialogflow.cx.v3.IGetTestCaseResultRequest} request GetTestCaseResultRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.TestCases.GetTestCaseResultCallback} callback Node-style callback called with the error, if any, and TestCaseResult + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(TestCases.prototype.getTestCaseResult = function getTestCaseResult(request, callback) { + return this.rpcCall(getTestCaseResult, $root.google.cloud.dialogflow.cx.v3.GetTestCaseResultRequest, $root.google.cloud.dialogflow.cx.v3.TestCaseResult, request, callback); + }, "name", { value: "GetTestCaseResult" }); + + /** + * Calls GetTestCaseResult. + * @function getTestCaseResult + * @memberof google.cloud.dialogflow.cx.v3.TestCases + * @instance + * @param {google.cloud.dialogflow.cx.v3.IGetTestCaseResultRequest} request GetTestCaseResultRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return TestCases; })(); - v3.IntentCoverage = (function() { + v3.TestCase = (function() { /** - * Properties of an IntentCoverage. + * Properties of a TestCase. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IIntentCoverage - * @property {Array.|null} [intents] IntentCoverage intents - * @property {number|null} [coverageScore] IntentCoverage coverageScore + * @interface ITestCase + * @property {string|null} [name] TestCase name + * @property {Array.|null} [tags] TestCase tags + * @property {string|null} [displayName] TestCase displayName + * @property {string|null} [notes] TestCase notes + * @property {google.cloud.dialogflow.cx.v3.ITestConfig|null} [testConfig] TestCase testConfig + * @property {Array.|null} [testCaseConversationTurns] TestCase testCaseConversationTurns + * @property {google.protobuf.ITimestamp|null} [creationTime] TestCase creationTime + * @property {google.cloud.dialogflow.cx.v3.ITestCaseResult|null} [lastTestResult] TestCase lastTestResult */ /** - * Constructs a new IntentCoverage. + * Constructs a new TestCase. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents an IntentCoverage. - * @implements IIntentCoverage + * @classdesc Represents a TestCase. + * @implements ITestCase * @constructor - * @param {google.cloud.dialogflow.cx.v3.IIntentCoverage=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.ITestCase=} [properties] Properties to set */ - function IntentCoverage(properties) { - this.intents = []; + function TestCase(properties) { + this.tags = []; + this.testCaseConversationTurns = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -47109,94 +46711,181 @@ } /** - * IntentCoverage intents. - * @member {Array.} intents - * @memberof google.cloud.dialogflow.cx.v3.IntentCoverage + * TestCase name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.TestCase * @instance */ - IntentCoverage.prototype.intents = $util.emptyArray; + TestCase.prototype.name = ""; /** - * IntentCoverage coverageScore. - * @member {number} coverageScore - * @memberof google.cloud.dialogflow.cx.v3.IntentCoverage + * TestCase tags. + * @member {Array.} tags + * @memberof google.cloud.dialogflow.cx.v3.TestCase * @instance */ - IntentCoverage.prototype.coverageScore = 0; + TestCase.prototype.tags = $util.emptyArray; /** - * Creates a new IntentCoverage instance using the specified properties. + * TestCase displayName. + * @member {string} displayName + * @memberof google.cloud.dialogflow.cx.v3.TestCase + * @instance + */ + TestCase.prototype.displayName = ""; + + /** + * TestCase notes. + * @member {string} notes + * @memberof google.cloud.dialogflow.cx.v3.TestCase + * @instance + */ + TestCase.prototype.notes = ""; + + /** + * TestCase testConfig. + * @member {google.cloud.dialogflow.cx.v3.ITestConfig|null|undefined} testConfig + * @memberof google.cloud.dialogflow.cx.v3.TestCase + * @instance + */ + TestCase.prototype.testConfig = null; + + /** + * TestCase testCaseConversationTurns. + * @member {Array.} testCaseConversationTurns + * @memberof google.cloud.dialogflow.cx.v3.TestCase + * @instance + */ + TestCase.prototype.testCaseConversationTurns = $util.emptyArray; + + /** + * TestCase creationTime. + * @member {google.protobuf.ITimestamp|null|undefined} creationTime + * @memberof google.cloud.dialogflow.cx.v3.TestCase + * @instance + */ + TestCase.prototype.creationTime = null; + + /** + * TestCase lastTestResult. + * @member {google.cloud.dialogflow.cx.v3.ITestCaseResult|null|undefined} lastTestResult + * @memberof google.cloud.dialogflow.cx.v3.TestCase + * @instance + */ + TestCase.prototype.lastTestResult = null; + + /** + * Creates a new TestCase instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.IntentCoverage + * @memberof google.cloud.dialogflow.cx.v3.TestCase * @static - * @param {google.cloud.dialogflow.cx.v3.IIntentCoverage=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.IntentCoverage} IntentCoverage instance + * @param {google.cloud.dialogflow.cx.v3.ITestCase=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.TestCase} TestCase instance */ - IntentCoverage.create = function create(properties) { - return new IntentCoverage(properties); + TestCase.create = function create(properties) { + return new TestCase(properties); }; /** - * Encodes the specified IntentCoverage message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.IntentCoverage.verify|verify} messages. + * Encodes the specified TestCase message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TestCase.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.IntentCoverage + * @memberof google.cloud.dialogflow.cx.v3.TestCase * @static - * @param {google.cloud.dialogflow.cx.v3.IIntentCoverage} message IntentCoverage message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ITestCase} message TestCase message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - IntentCoverage.encode = function encode(message, writer) { + TestCase.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.intents != null && message.intents.length) - for (var i = 0; i < message.intents.length; ++i) - $root.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent.encode(message.intents[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 IntentCoverage message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.IntentCoverage.verify|verify} messages. + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.tags != null && message.tags.length) + for (var i = 0; i < message.tags.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.tags[i]); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.displayName); + if (message.notes != null && Object.hasOwnProperty.call(message, "notes")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.notes); + if (message.testCaseConversationTurns != null && message.testCaseConversationTurns.length) + for (var i = 0; i < message.testCaseConversationTurns.length; ++i) + $root.google.cloud.dialogflow.cx.v3.ConversationTurn.encode(message.testCaseConversationTurns[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.creationTime != null && Object.hasOwnProperty.call(message, "creationTime")) + $root.google.protobuf.Timestamp.encode(message.creationTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.lastTestResult != null && Object.hasOwnProperty.call(message, "lastTestResult")) + $root.google.cloud.dialogflow.cx.v3.TestCaseResult.encode(message.lastTestResult, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.testConfig != null && Object.hasOwnProperty.call(message, "testConfig")) + $root.google.cloud.dialogflow.cx.v3.TestConfig.encode(message.testConfig, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TestCase message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TestCase.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.IntentCoverage + * @memberof google.cloud.dialogflow.cx.v3.TestCase * @static - * @param {google.cloud.dialogflow.cx.v3.IIntentCoverage} message IntentCoverage message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ITestCase} message TestCase message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - IntentCoverage.encodeDelimited = function encodeDelimited(message, writer) { + TestCase.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an IntentCoverage message from the specified reader or buffer. + * Decodes a TestCase message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.IntentCoverage + * @memberof google.cloud.dialogflow.cx.v3.TestCase * @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.IntentCoverage} IntentCoverage + * @returns {google.cloud.dialogflow.cx.v3.TestCase} TestCase * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - IntentCoverage.decode = function decode(reader, length, error) { + TestCase.decode = function decode(reader, length, error) { 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.IntentCoverage(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.TestCase(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - if (!(message.intents && message.intents.length)) - message.intents = []; - message.intents.push($root.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent.decode(reader, reader.uint32())); + message.name = reader.string(); break; } case 2: { - message.coverageScore = reader.float(); + if (!(message.tags && message.tags.length)) + message.tags = []; + message.tags.push(reader.string()); + break; + } + case 3: { + message.displayName = reader.string(); + break; + } + case 4: { + message.notes = reader.string(); + break; + } + case 13: { + message.testConfig = $root.google.cloud.dialogflow.cx.v3.TestConfig.decode(reader, reader.uint32()); + break; + } + case 5: { + if (!(message.testCaseConversationTurns && message.testCaseConversationTurns.length)) + message.testCaseConversationTurns = []; + message.testCaseConversationTurns.push($root.google.cloud.dialogflow.cx.v3.ConversationTurn.decode(reader, reader.uint32())); + break; + } + case 10: { + message.creationTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 12: { + message.lastTestResult = $root.google.cloud.dialogflow.cx.v3.TestCaseResult.decode(reader, reader.uint32()); break; } default: @@ -47208,378 +46897,230 @@ }; /** - * Decodes an IntentCoverage message from the specified reader or buffer, length delimited. + * Decodes a TestCase message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.IntentCoverage + * @memberof google.cloud.dialogflow.cx.v3.TestCase * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.IntentCoverage} IntentCoverage + * @returns {google.cloud.dialogflow.cx.v3.TestCase} TestCase * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - IntentCoverage.decodeDelimited = function decodeDelimited(reader) { + TestCase.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an IntentCoverage message. + * Verifies a TestCase message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.IntentCoverage + * @memberof google.cloud.dialogflow.cx.v3.TestCase * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - IntentCoverage.verify = function verify(message) { + TestCase.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.intents != null && message.hasOwnProperty("intents")) { - if (!Array.isArray(message.intents)) - return "intents: array expected"; - for (var i = 0; i < message.intents.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent.verify(message.intents[i]); + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.tags != null && message.hasOwnProperty("tags")) { + if (!Array.isArray(message.tags)) + return "tags: array expected"; + for (var i = 0; i < message.tags.length; ++i) + if (!$util.isString(message.tags[i])) + return "tags: string[] expected"; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.notes != null && message.hasOwnProperty("notes")) + if (!$util.isString(message.notes)) + return "notes: string expected"; + if (message.testConfig != null && message.hasOwnProperty("testConfig")) { + var error = $root.google.cloud.dialogflow.cx.v3.TestConfig.verify(message.testConfig); + if (error) + return "testConfig." + error; + } + if (message.testCaseConversationTurns != null && message.hasOwnProperty("testCaseConversationTurns")) { + if (!Array.isArray(message.testCaseConversationTurns)) + return "testCaseConversationTurns: array expected"; + for (var i = 0; i < message.testCaseConversationTurns.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.ConversationTurn.verify(message.testCaseConversationTurns[i]); if (error) - return "intents." + error; + return "testCaseConversationTurns." + error; } } - if (message.coverageScore != null && message.hasOwnProperty("coverageScore")) - if (typeof message.coverageScore !== "number") - return "coverageScore: number expected"; + if (message.creationTime != null && message.hasOwnProperty("creationTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.creationTime); + if (error) + return "creationTime." + error; + } + if (message.lastTestResult != null && message.hasOwnProperty("lastTestResult")) { + var error = $root.google.cloud.dialogflow.cx.v3.TestCaseResult.verify(message.lastTestResult); + if (error) + return "lastTestResult." + error; + } return null; }; /** - * Creates an IntentCoverage message from a plain object. Also converts values to their respective internal types. + * Creates a TestCase message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.IntentCoverage + * @memberof google.cloud.dialogflow.cx.v3.TestCase * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.IntentCoverage} IntentCoverage + * @returns {google.cloud.dialogflow.cx.v3.TestCase} TestCase */ - IntentCoverage.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.IntentCoverage) + TestCase.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.TestCase) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.IntentCoverage(); - if (object.intents) { - if (!Array.isArray(object.intents)) - throw TypeError(".google.cloud.dialogflow.cx.v3.IntentCoverage.intents: array expected"); - message.intents = []; - for (var i = 0; i < object.intents.length; ++i) { - if (typeof object.intents[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.IntentCoverage.intents: object expected"); - message.intents[i] = $root.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent.fromObject(object.intents[i]); + var message = new $root.google.cloud.dialogflow.cx.v3.TestCase(); + if (object.name != null) + message.name = String(object.name); + if (object.tags) { + if (!Array.isArray(object.tags)) + throw TypeError(".google.cloud.dialogflow.cx.v3.TestCase.tags: array expected"); + message.tags = []; + for (var i = 0; i < object.tags.length; ++i) + message.tags[i] = String(object.tags[i]); + } + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.notes != null) + message.notes = String(object.notes); + if (object.testConfig != null) { + if (typeof object.testConfig !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.TestCase.testConfig: object expected"); + message.testConfig = $root.google.cloud.dialogflow.cx.v3.TestConfig.fromObject(object.testConfig); + } + if (object.testCaseConversationTurns) { + if (!Array.isArray(object.testCaseConversationTurns)) + throw TypeError(".google.cloud.dialogflow.cx.v3.TestCase.testCaseConversationTurns: array expected"); + message.testCaseConversationTurns = []; + for (var i = 0; i < object.testCaseConversationTurns.length; ++i) { + if (typeof object.testCaseConversationTurns[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.TestCase.testCaseConversationTurns: object expected"); + message.testCaseConversationTurns[i] = $root.google.cloud.dialogflow.cx.v3.ConversationTurn.fromObject(object.testCaseConversationTurns[i]); } } - if (object.coverageScore != null) - message.coverageScore = Number(object.coverageScore); + if (object.creationTime != null) { + if (typeof object.creationTime !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.TestCase.creationTime: object expected"); + message.creationTime = $root.google.protobuf.Timestamp.fromObject(object.creationTime); + } + if (object.lastTestResult != null) { + if (typeof object.lastTestResult !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.TestCase.lastTestResult: object expected"); + message.lastTestResult = $root.google.cloud.dialogflow.cx.v3.TestCaseResult.fromObject(object.lastTestResult); + } return message; }; /** - * Creates a plain object from an IntentCoverage message. Also converts values to other types if specified. + * Creates a plain object from a TestCase message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.IntentCoverage + * @memberof google.cloud.dialogflow.cx.v3.TestCase * @static - * @param {google.cloud.dialogflow.cx.v3.IntentCoverage} message IntentCoverage + * @param {google.cloud.dialogflow.cx.v3.TestCase} message TestCase * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - IntentCoverage.toObject = function toObject(message, options) { + TestCase.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.intents = []; - if (options.defaults) - object.coverageScore = 0; - if (message.intents && message.intents.length) { - object.intents = []; - for (var j = 0; j < message.intents.length; ++j) - object.intents[j] = $root.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent.toObject(message.intents[j], options); + if (options.arrays || options.defaults) { + object.tags = []; + object.testCaseConversationTurns = []; } - if (message.coverageScore != null && message.hasOwnProperty("coverageScore")) - object.coverageScore = options.json && !isFinite(message.coverageScore) ? String(message.coverageScore) : message.coverageScore; + if (options.defaults) { + object.name = ""; + object.displayName = ""; + object.notes = ""; + object.creationTime = null; + object.lastTestResult = null; + object.testConfig = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.tags && message.tags.length) { + object.tags = []; + for (var j = 0; j < message.tags.length; ++j) + object.tags[j] = message.tags[j]; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.notes != null && message.hasOwnProperty("notes")) + object.notes = message.notes; + if (message.testCaseConversationTurns && message.testCaseConversationTurns.length) { + object.testCaseConversationTurns = []; + for (var j = 0; j < message.testCaseConversationTurns.length; ++j) + object.testCaseConversationTurns[j] = $root.google.cloud.dialogflow.cx.v3.ConversationTurn.toObject(message.testCaseConversationTurns[j], options); + } + if (message.creationTime != null && message.hasOwnProperty("creationTime")) + object.creationTime = $root.google.protobuf.Timestamp.toObject(message.creationTime, options); + if (message.lastTestResult != null && message.hasOwnProperty("lastTestResult")) + object.lastTestResult = $root.google.cloud.dialogflow.cx.v3.TestCaseResult.toObject(message.lastTestResult, options); + if (message.testConfig != null && message.hasOwnProperty("testConfig")) + object.testConfig = $root.google.cloud.dialogflow.cx.v3.TestConfig.toObject(message.testConfig, options); return object; }; /** - * Converts this IntentCoverage to JSON. + * Converts this TestCase to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.IntentCoverage + * @memberof google.cloud.dialogflow.cx.v3.TestCase * @instance * @returns {Object.} JSON object */ - IntentCoverage.prototype.toJSON = function toJSON() { + TestCase.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for IntentCoverage + * Gets the default type url for TestCase * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.IntentCoverage + * @memberof google.cloud.dialogflow.cx.v3.TestCase * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - IntentCoverage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + TestCase.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.IntentCoverage"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.TestCase"; }; - IntentCoverage.Intent = (function() { - - /** - * Properties of an Intent. - * @memberof google.cloud.dialogflow.cx.v3.IntentCoverage - * @interface IIntent - * @property {string|null} [intent] Intent intent - * @property {boolean|null} [covered] Intent covered - */ - - /** - * Constructs a new Intent. - * @memberof google.cloud.dialogflow.cx.v3.IntentCoverage - * @classdesc Represents an Intent. - * @implements IIntent - * @constructor - * @param {google.cloud.dialogflow.cx.v3.IntentCoverage.IIntent=} [properties] Properties to set - */ - function Intent(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]]; - } - - /** - * Intent intent. - * @member {string} intent - * @memberof google.cloud.dialogflow.cx.v3.IntentCoverage.Intent - * @instance - */ - Intent.prototype.intent = ""; - - /** - * Intent covered. - * @member {boolean} covered - * @memberof google.cloud.dialogflow.cx.v3.IntentCoverage.Intent - * @instance - */ - Intent.prototype.covered = false; - - /** - * Creates a new Intent instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.IntentCoverage.Intent - * @static - * @param {google.cloud.dialogflow.cx.v3.IntentCoverage.IIntent=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.IntentCoverage.Intent} Intent instance - */ - Intent.create = function create(properties) { - return new Intent(properties); - }; - - /** - * Encodes the specified Intent message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.IntentCoverage.Intent.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.IntentCoverage.Intent - * @static - * @param {google.cloud.dialogflow.cx.v3.IntentCoverage.IIntent} message Intent message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Intent.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.intent != null && Object.hasOwnProperty.call(message, "intent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.intent); - if (message.covered != null && Object.hasOwnProperty.call(message, "covered")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.covered); - return writer; - }; - - /** - * Encodes the specified Intent message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.IntentCoverage.Intent.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.IntentCoverage.Intent - * @static - * @param {google.cloud.dialogflow.cx.v3.IntentCoverage.IIntent} message Intent message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Intent.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Intent message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.IntentCoverage.Intent - * @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.IntentCoverage.Intent} Intent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Intent.decode = function decode(reader, length, error) { - 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.IntentCoverage.Intent(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.intent = reader.string(); - break; - } - case 2: { - message.covered = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Intent message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.IntentCoverage.Intent - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.IntentCoverage.Intent} Intent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Intent.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Intent message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.IntentCoverage.Intent - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Intent.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.intent != null && message.hasOwnProperty("intent")) - if (!$util.isString(message.intent)) - return "intent: string expected"; - if (message.covered != null && message.hasOwnProperty("covered")) - if (typeof message.covered !== "boolean") - return "covered: boolean expected"; - return null; - }; - - /** - * Creates an Intent message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.IntentCoverage.Intent - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.IntentCoverage.Intent} Intent - */ - Intent.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent(); - if (object.intent != null) - message.intent = String(object.intent); - if (object.covered != null) - message.covered = Boolean(object.covered); - return message; - }; - - /** - * Creates a plain object from an Intent message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.IntentCoverage.Intent - * @static - * @param {google.cloud.dialogflow.cx.v3.IntentCoverage.Intent} message Intent - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Intent.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.intent = ""; - object.covered = false; - } - if (message.intent != null && message.hasOwnProperty("intent")) - object.intent = message.intent; - if (message.covered != null && message.hasOwnProperty("covered")) - object.covered = message.covered; - return object; - }; - - /** - * Converts this Intent to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.IntentCoverage.Intent - * @instance - * @returns {Object.} JSON object - */ - Intent.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Intent - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.IntentCoverage.Intent - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Intent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.IntentCoverage.Intent"; - }; - - return Intent; - })(); - - return IntentCoverage; + return TestCase; })(); - v3.CalculateCoverageRequest = (function() { + v3.TestCaseResult = (function() { /** - * Properties of a CalculateCoverageRequest. + * Properties of a TestCaseResult. * @memberof google.cloud.dialogflow.cx.v3 - * @interface ICalculateCoverageRequest - * @property {string|null} [agent] CalculateCoverageRequest agent - * @property {google.cloud.dialogflow.cx.v3.CalculateCoverageRequest.CoverageType|null} [type] CalculateCoverageRequest type + * @interface ITestCaseResult + * @property {string|null} [name] TestCaseResult name + * @property {string|null} [environment] TestCaseResult environment + * @property {Array.|null} [conversationTurns] TestCaseResult conversationTurns + * @property {google.cloud.dialogflow.cx.v3.TestResult|null} [testResult] TestCaseResult testResult + * @property {google.protobuf.ITimestamp|null} [testTime] TestCaseResult testTime */ /** - * Constructs a new CalculateCoverageRequest. + * Constructs a new TestCaseResult. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a CalculateCoverageRequest. - * @implements ICalculateCoverageRequest + * @classdesc Represents a TestCaseResult. + * @implements ITestCaseResult * @constructor - * @param {google.cloud.dialogflow.cx.v3.ICalculateCoverageRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.ITestCaseResult=} [properties] Properties to set */ - function CalculateCoverageRequest(properties) { + function TestCaseResult(properties) { + this.conversationTurns = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -47587,91 +47128,136 @@ } /** - * CalculateCoverageRequest agent. - * @member {string} agent - * @memberof google.cloud.dialogflow.cx.v3.CalculateCoverageRequest + * TestCaseResult name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.TestCaseResult * @instance */ - CalculateCoverageRequest.prototype.agent = ""; + TestCaseResult.prototype.name = ""; /** - * CalculateCoverageRequest type. - * @member {google.cloud.dialogflow.cx.v3.CalculateCoverageRequest.CoverageType} type - * @memberof google.cloud.dialogflow.cx.v3.CalculateCoverageRequest + * TestCaseResult environment. + * @member {string} environment + * @memberof google.cloud.dialogflow.cx.v3.TestCaseResult * @instance */ - CalculateCoverageRequest.prototype.type = 0; + TestCaseResult.prototype.environment = ""; /** - * Creates a new CalculateCoverageRequest instance using the specified properties. + * TestCaseResult conversationTurns. + * @member {Array.} conversationTurns + * @memberof google.cloud.dialogflow.cx.v3.TestCaseResult + * @instance + */ + TestCaseResult.prototype.conversationTurns = $util.emptyArray; + + /** + * TestCaseResult testResult. + * @member {google.cloud.dialogflow.cx.v3.TestResult} testResult + * @memberof google.cloud.dialogflow.cx.v3.TestCaseResult + * @instance + */ + TestCaseResult.prototype.testResult = 0; + + /** + * TestCaseResult testTime. + * @member {google.protobuf.ITimestamp|null|undefined} testTime + * @memberof google.cloud.dialogflow.cx.v3.TestCaseResult + * @instance + */ + TestCaseResult.prototype.testTime = null; + + /** + * Creates a new TestCaseResult instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.CalculateCoverageRequest + * @memberof google.cloud.dialogflow.cx.v3.TestCaseResult * @static - * @param {google.cloud.dialogflow.cx.v3.ICalculateCoverageRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.CalculateCoverageRequest} CalculateCoverageRequest instance + * @param {google.cloud.dialogflow.cx.v3.ITestCaseResult=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.TestCaseResult} TestCaseResult instance */ - CalculateCoverageRequest.create = function create(properties) { - return new CalculateCoverageRequest(properties); + TestCaseResult.create = function create(properties) { + return new TestCaseResult(properties); }; /** - * Encodes the specified CalculateCoverageRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CalculateCoverageRequest.verify|verify} messages. + * Encodes the specified TestCaseResult message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TestCaseResult.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.CalculateCoverageRequest + * @memberof google.cloud.dialogflow.cx.v3.TestCaseResult * @static - * @param {google.cloud.dialogflow.cx.v3.ICalculateCoverageRequest} message CalculateCoverageRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ITestCaseResult} message TestCaseResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CalculateCoverageRequest.encode = function encode(message, writer) { + TestCaseResult.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); - if (message.agent != null && Object.hasOwnProperty.call(message, "agent")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.agent); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.environment); + if (message.conversationTurns != null && message.conversationTurns.length) + for (var i = 0; i < message.conversationTurns.length; ++i) + $root.google.cloud.dialogflow.cx.v3.ConversationTurn.encode(message.conversationTurns[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.testResult != null && Object.hasOwnProperty.call(message, "testResult")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.testResult); + if (message.testTime != null && Object.hasOwnProperty.call(message, "testTime")) + $root.google.protobuf.Timestamp.encode(message.testTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; /** - * Encodes the specified CalculateCoverageRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CalculateCoverageRequest.verify|verify} messages. + * Encodes the specified TestCaseResult message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TestCaseResult.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.CalculateCoverageRequest + * @memberof google.cloud.dialogflow.cx.v3.TestCaseResult * @static - * @param {google.cloud.dialogflow.cx.v3.ICalculateCoverageRequest} message CalculateCoverageRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ITestCaseResult} message TestCaseResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CalculateCoverageRequest.encodeDelimited = function encodeDelimited(message, writer) { + TestCaseResult.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CalculateCoverageRequest message from the specified reader or buffer. + * Decodes a TestCaseResult message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.CalculateCoverageRequest + * @memberof google.cloud.dialogflow.cx.v3.TestCaseResult * @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.CalculateCoverageRequest} CalculateCoverageRequest + * @returns {google.cloud.dialogflow.cx.v3.TestCaseResult} TestCaseResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CalculateCoverageRequest.decode = function decode(reader, length, error) { + TestCaseResult.decode = function decode(reader, length, error) { 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.CalculateCoverageRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.TestCaseResult(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { - case 3: { - message.agent = reader.string(); + case 1: { + message.name = reader.string(); break; } case 2: { - message.type = reader.int32(); + message.environment = reader.string(); + break; + } + case 3: { + if (!(message.conversationTurns && message.conversationTurns.length)) + message.conversationTurns = []; + message.conversationTurns.push($root.google.cloud.dialogflow.cx.v3.ConversationTurn.decode(reader, reader.uint32())); + break; + } + case 4: { + message.testResult = reader.int32(); + break; + } + case 5: { + message.testTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } default: @@ -47683,181 +47269,205 @@ }; /** - * Decodes a CalculateCoverageRequest message from the specified reader or buffer, length delimited. + * Decodes a TestCaseResult message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.CalculateCoverageRequest + * @memberof google.cloud.dialogflow.cx.v3.TestCaseResult * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.CalculateCoverageRequest} CalculateCoverageRequest + * @returns {google.cloud.dialogflow.cx.v3.TestCaseResult} TestCaseResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CalculateCoverageRequest.decodeDelimited = function decodeDelimited(reader) { + TestCaseResult.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CalculateCoverageRequest message. + * Verifies a TestCaseResult message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.CalculateCoverageRequest + * @memberof google.cloud.dialogflow.cx.v3.TestCaseResult * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CalculateCoverageRequest.verify = function verify(message) { + TestCaseResult.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.agent != null && message.hasOwnProperty("agent")) - if (!$util.isString(message.agent)) - return "agent: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.environment != null && message.hasOwnProperty("environment")) + if (!$util.isString(message.environment)) + return "environment: string expected"; + if (message.conversationTurns != null && message.hasOwnProperty("conversationTurns")) { + if (!Array.isArray(message.conversationTurns)) + return "conversationTurns: array expected"; + for (var i = 0; i < message.conversationTurns.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.ConversationTurn.verify(message.conversationTurns[i]); + if (error) + return "conversationTurns." + error; + } + } + if (message.testResult != null && message.hasOwnProperty("testResult")) + switch (message.testResult) { default: - return "type: enum value expected"; + return "testResult: enum value expected"; case 0: case 1: case 2: - case 3: break; } + if (message.testTime != null && message.hasOwnProperty("testTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.testTime); + if (error) + return "testTime." + error; + } return null; }; /** - * Creates a CalculateCoverageRequest message from a plain object. Also converts values to their respective internal types. + * Creates a TestCaseResult message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.CalculateCoverageRequest + * @memberof google.cloud.dialogflow.cx.v3.TestCaseResult * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.CalculateCoverageRequest} CalculateCoverageRequest + * @returns {google.cloud.dialogflow.cx.v3.TestCaseResult} TestCaseResult */ - CalculateCoverageRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.CalculateCoverageRequest) + TestCaseResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.TestCaseResult) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.CalculateCoverageRequest(); - if (object.agent != null) - message.agent = String(object.agent); - switch (object.type) { + var message = new $root.google.cloud.dialogflow.cx.v3.TestCaseResult(); + if (object.name != null) + message.name = String(object.name); + if (object.environment != null) + message.environment = String(object.environment); + if (object.conversationTurns) { + if (!Array.isArray(object.conversationTurns)) + throw TypeError(".google.cloud.dialogflow.cx.v3.TestCaseResult.conversationTurns: array expected"); + message.conversationTurns = []; + for (var i = 0; i < object.conversationTurns.length; ++i) { + if (typeof object.conversationTurns[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.TestCaseResult.conversationTurns: object expected"); + message.conversationTurns[i] = $root.google.cloud.dialogflow.cx.v3.ConversationTurn.fromObject(object.conversationTurns[i]); + } + } + switch (object.testResult) { default: - if (typeof object.type === "number") { - message.type = object.type; + if (typeof object.testResult === "number") { + message.testResult = object.testResult; break; } break; - case "COVERAGE_TYPE_UNSPECIFIED": + case "TEST_RESULT_UNSPECIFIED": case 0: - message.type = 0; + message.testResult = 0; break; - case "INTENT": + case "PASSED": case 1: - message.type = 1; + message.testResult = 1; break; - case "PAGE_TRANSITION": + case "FAILED": case 2: - message.type = 2; - break; - case "TRANSITION_ROUTE_GROUP": - case 3: - message.type = 3; + message.testResult = 2; break; } + if (object.testTime != null) { + if (typeof object.testTime !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.TestCaseResult.testTime: object expected"); + message.testTime = $root.google.protobuf.Timestamp.fromObject(object.testTime); + } return message; }; /** - * Creates a plain object from a CalculateCoverageRequest message. Also converts values to other types if specified. + * Creates a plain object from a TestCaseResult message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.CalculateCoverageRequest + * @memberof google.cloud.dialogflow.cx.v3.TestCaseResult * @static - * @param {google.cloud.dialogflow.cx.v3.CalculateCoverageRequest} message CalculateCoverageRequest + * @param {google.cloud.dialogflow.cx.v3.TestCaseResult} message TestCaseResult * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CalculateCoverageRequest.toObject = function toObject(message, options) { + TestCaseResult.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.conversationTurns = []; if (options.defaults) { - object.type = options.enums === String ? "COVERAGE_TYPE_UNSPECIFIED" : 0; - object.agent = ""; + object.name = ""; + object.environment = ""; + object.testResult = options.enums === String ? "TEST_RESULT_UNSPECIFIED" : 0; + object.testTime = null; } - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.CalculateCoverageRequest.CoverageType[message.type] === undefined ? message.type : $root.google.cloud.dialogflow.cx.v3.CalculateCoverageRequest.CoverageType[message.type] : message.type; - if (message.agent != null && message.hasOwnProperty("agent")) - object.agent = message.agent; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.environment != null && message.hasOwnProperty("environment")) + object.environment = message.environment; + if (message.conversationTurns && message.conversationTurns.length) { + object.conversationTurns = []; + for (var j = 0; j < message.conversationTurns.length; ++j) + object.conversationTurns[j] = $root.google.cloud.dialogflow.cx.v3.ConversationTurn.toObject(message.conversationTurns[j], options); + } + if (message.testResult != null && message.hasOwnProperty("testResult")) + object.testResult = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.TestResult[message.testResult] === undefined ? message.testResult : $root.google.cloud.dialogflow.cx.v3.TestResult[message.testResult] : message.testResult; + if (message.testTime != null && message.hasOwnProperty("testTime")) + object.testTime = $root.google.protobuf.Timestamp.toObject(message.testTime, options); return object; }; /** - * Converts this CalculateCoverageRequest to JSON. + * Converts this TestCaseResult to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.CalculateCoverageRequest + * @memberof google.cloud.dialogflow.cx.v3.TestCaseResult * @instance * @returns {Object.} JSON object */ - CalculateCoverageRequest.prototype.toJSON = function toJSON() { + TestCaseResult.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CalculateCoverageRequest + * Gets the default type url for TestCaseResult * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.CalculateCoverageRequest + * @memberof google.cloud.dialogflow.cx.v3.TestCaseResult * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CalculateCoverageRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + TestCaseResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.CalculateCoverageRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.TestCaseResult"; }; - /** - * CoverageType enum. - * @name google.cloud.dialogflow.cx.v3.CalculateCoverageRequest.CoverageType - * @enum {number} - * @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; - })(); - - return CalculateCoverageRequest; + return TestCaseResult; })(); - v3.CalculateCoverageResponse = (function() { + v3.TestConfig = (function() { /** - * Properties of a CalculateCoverageResponse. + * Properties of a TestConfig. * @memberof google.cloud.dialogflow.cx.v3 - * @interface ICalculateCoverageResponse - * @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 + * @interface ITestConfig + * @property {Array.|null} [trackingParameters] TestConfig trackingParameters + * @property {string|null} [flow] TestConfig flow + * @property {string|null} [page] TestConfig page */ /** - * Constructs a new CalculateCoverageResponse. + * Constructs a new TestConfig. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a CalculateCoverageResponse. - * @implements ICalculateCoverageResponse + * @classdesc Represents a TestConfig. + * @implements ITestConfig * @constructor - * @param {google.cloud.dialogflow.cx.v3.ICalculateCoverageResponse=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.ITestConfig=} [properties] Properties to set */ - function CalculateCoverageResponse(properties) { + function TestConfig(properties) { + this.trackingParameters = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -47865,133 +47475,108 @@ } /** - * CalculateCoverageResponse agent. - * @member {string} agent - * @memberof google.cloud.dialogflow.cx.v3.CalculateCoverageResponse - * @instance - */ - CalculateCoverageResponse.prototype.agent = ""; - - /** - * CalculateCoverageResponse intentCoverage. - * @member {google.cloud.dialogflow.cx.v3.IIntentCoverage|null|undefined} intentCoverage - * @memberof google.cloud.dialogflow.cx.v3.CalculateCoverageResponse - * @instance - */ - CalculateCoverageResponse.prototype.intentCoverage = null; - - /** - * CalculateCoverageResponse transitionCoverage. - * @member {google.cloud.dialogflow.cx.v3.ITransitionCoverage|null|undefined} transitionCoverage - * @memberof google.cloud.dialogflow.cx.v3.CalculateCoverageResponse + * TestConfig trackingParameters. + * @member {Array.} trackingParameters + * @memberof google.cloud.dialogflow.cx.v3.TestConfig * @instance */ - CalculateCoverageResponse.prototype.transitionCoverage = null; + TestConfig.prototype.trackingParameters = $util.emptyArray; /** - * CalculateCoverageResponse routeGroupCoverage. - * @member {google.cloud.dialogflow.cx.v3.ITransitionRouteGroupCoverage|null|undefined} routeGroupCoverage - * @memberof google.cloud.dialogflow.cx.v3.CalculateCoverageResponse + * TestConfig flow. + * @member {string} flow + * @memberof google.cloud.dialogflow.cx.v3.TestConfig * @instance */ - CalculateCoverageResponse.prototype.routeGroupCoverage = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + TestConfig.prototype.flow = ""; /** - * CalculateCoverageResponse coverageType. - * @member {"intentCoverage"|"transitionCoverage"|"routeGroupCoverage"|undefined} coverageType - * @memberof google.cloud.dialogflow.cx.v3.CalculateCoverageResponse + * TestConfig page. + * @member {string} page + * @memberof google.cloud.dialogflow.cx.v3.TestConfig * @instance */ - Object.defineProperty(CalculateCoverageResponse.prototype, "coverageType", { - get: $util.oneOfGetter($oneOfFields = ["intentCoverage", "transitionCoverage", "routeGroupCoverage"]), - set: $util.oneOfSetter($oneOfFields) - }); + TestConfig.prototype.page = ""; /** - * Creates a new CalculateCoverageResponse instance using the specified properties. + * Creates a new TestConfig instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.CalculateCoverageResponse + * @memberof google.cloud.dialogflow.cx.v3.TestConfig * @static - * @param {google.cloud.dialogflow.cx.v3.ICalculateCoverageResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.CalculateCoverageResponse} CalculateCoverageResponse instance + * @param {google.cloud.dialogflow.cx.v3.ITestConfig=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.TestConfig} TestConfig instance */ - CalculateCoverageResponse.create = function create(properties) { - return new CalculateCoverageResponse(properties); + TestConfig.create = function create(properties) { + return new TestConfig(properties); }; /** - * Encodes the specified CalculateCoverageResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CalculateCoverageResponse.verify|verify} messages. + * Encodes the specified TestConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TestConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.CalculateCoverageResponse + * @memberof google.cloud.dialogflow.cx.v3.TestConfig * @static - * @param {google.cloud.dialogflow.cx.v3.ICalculateCoverageResponse} message CalculateCoverageResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ITestConfig} message TestConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CalculateCoverageResponse.encode = function encode(message, writer) { + TestConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.intentCoverage != null && Object.hasOwnProperty.call(message, "intentCoverage")) - $root.google.cloud.dialogflow.cx.v3.IntentCoverage.encode(message.intentCoverage, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.transitionCoverage != null && Object.hasOwnProperty.call(message, "transitionCoverage")) - $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(); + if (message.trackingParameters != null && message.trackingParameters.length) + for (var i = 0; i < message.trackingParameters.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.trackingParameters[i]); + if (message.flow != null && Object.hasOwnProperty.call(message, "flow")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.flow); + if (message.page != null && Object.hasOwnProperty.call(message, "page")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.page); return writer; }; /** - * Encodes the specified CalculateCoverageResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CalculateCoverageResponse.verify|verify} messages. + * Encodes the specified TestConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TestConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.CalculateCoverageResponse + * @memberof google.cloud.dialogflow.cx.v3.TestConfig * @static - * @param {google.cloud.dialogflow.cx.v3.ICalculateCoverageResponse} message CalculateCoverageResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ITestConfig} message TestConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CalculateCoverageResponse.encodeDelimited = function encodeDelimited(message, writer) { + TestConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CalculateCoverageResponse message from the specified reader or buffer. + * Decodes a TestConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.CalculateCoverageResponse + * @memberof google.cloud.dialogflow.cx.v3.TestConfig * @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.CalculateCoverageResponse} CalculateCoverageResponse + * @returns {google.cloud.dialogflow.cx.v3.TestConfig} TestConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CalculateCoverageResponse.decode = function decode(reader, length, error) { + TestConfig.decode = function decode(reader, length, error) { 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.CalculateCoverageResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.TestConfig(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { - case 5: { - message.agent = reader.string(); + case 1: { + if (!(message.trackingParameters && message.trackingParameters.length)) + message.trackingParameters = []; + message.trackingParameters.push(reader.string()); break; } case 2: { - message.intentCoverage = $root.google.cloud.dialogflow.cx.v3.IntentCoverage.decode(reader, reader.uint32()); - break; - } - case 4: { - message.transitionCoverage = $root.google.cloud.dialogflow.cx.v3.TransitionCoverage.decode(reader, reader.uint32()); + message.flow = reader.string(); break; } - case 6: { - message.routeGroupCoverage = $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.decode(reader, reader.uint32()); + case 3: { + message.page = reader.string(); break; } default: @@ -48003,184 +47588,153 @@ }; /** - * Decodes a CalculateCoverageResponse message from the specified reader or buffer, length delimited. + * Decodes a TestConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.CalculateCoverageResponse + * @memberof google.cloud.dialogflow.cx.v3.TestConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.CalculateCoverageResponse} CalculateCoverageResponse + * @returns {google.cloud.dialogflow.cx.v3.TestConfig} TestConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CalculateCoverageResponse.decodeDelimited = function decodeDelimited(reader) { + TestConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CalculateCoverageResponse message. + * Verifies a TestConfig message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.CalculateCoverageResponse + * @memberof google.cloud.dialogflow.cx.v3.TestConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CalculateCoverageResponse.verify = function verify(message) { + TestConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.agent != null && message.hasOwnProperty("agent")) - if (!$util.isString(message.agent)) - return "agent: string expected"; - if (message.intentCoverage != null && message.hasOwnProperty("intentCoverage")) { - properties.coverageType = 1; - { - var error = $root.google.cloud.dialogflow.cx.v3.IntentCoverage.verify(message.intentCoverage); - if (error) - return "intentCoverage." + error; - } - } - if (message.transitionCoverage != null && message.hasOwnProperty("transitionCoverage")) { - if (properties.coverageType === 1) - return "coverageType: multiple values"; - properties.coverageType = 1; - { - var error = $root.google.cloud.dialogflow.cx.v3.TransitionCoverage.verify(message.transitionCoverage); - if (error) - 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; - } + if (message.trackingParameters != null && message.hasOwnProperty("trackingParameters")) { + if (!Array.isArray(message.trackingParameters)) + return "trackingParameters: array expected"; + for (var i = 0; i < message.trackingParameters.length; ++i) + if (!$util.isString(message.trackingParameters[i])) + return "trackingParameters: string[] expected"; } + if (message.flow != null && message.hasOwnProperty("flow")) + if (!$util.isString(message.flow)) + return "flow: string expected"; + if (message.page != null && message.hasOwnProperty("page")) + if (!$util.isString(message.page)) + return "page: string expected"; return null; }; /** - * Creates a CalculateCoverageResponse message from a plain object. Also converts values to their respective internal types. + * Creates a TestConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.CalculateCoverageResponse + * @memberof google.cloud.dialogflow.cx.v3.TestConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.CalculateCoverageResponse} CalculateCoverageResponse + * @returns {google.cloud.dialogflow.cx.v3.TestConfig} TestConfig */ - CalculateCoverageResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.CalculateCoverageResponse) + TestConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.TestConfig) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.CalculateCoverageResponse(); - if (object.agent != null) - message.agent = String(object.agent); - if (object.intentCoverage != null) { - if (typeof object.intentCoverage !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.CalculateCoverageResponse.intentCoverage: object expected"); - message.intentCoverage = $root.google.cloud.dialogflow.cx.v3.IntentCoverage.fromObject(object.intentCoverage); - } - if (object.transitionCoverage != null) { - if (typeof object.transitionCoverage !== "object") - 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); + var message = new $root.google.cloud.dialogflow.cx.v3.TestConfig(); + if (object.trackingParameters) { + if (!Array.isArray(object.trackingParameters)) + throw TypeError(".google.cloud.dialogflow.cx.v3.TestConfig.trackingParameters: array expected"); + message.trackingParameters = []; + for (var i = 0; i < object.trackingParameters.length; ++i) + message.trackingParameters[i] = String(object.trackingParameters[i]); } + if (object.flow != null) + message.flow = String(object.flow); + if (object.page != null) + message.page = String(object.page); return message; }; /** - * Creates a plain object from a CalculateCoverageResponse message. Also converts values to other types if specified. + * Creates a plain object from a TestConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.CalculateCoverageResponse + * @memberof google.cloud.dialogflow.cx.v3.TestConfig * @static - * @param {google.cloud.dialogflow.cx.v3.CalculateCoverageResponse} message CalculateCoverageResponse + * @param {google.cloud.dialogflow.cx.v3.TestConfig} message TestConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CalculateCoverageResponse.toObject = function toObject(message, options) { + TestConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.agent = ""; - if (message.intentCoverage != null && message.hasOwnProperty("intentCoverage")) { - object.intentCoverage = $root.google.cloud.dialogflow.cx.v3.IntentCoverage.toObject(message.intentCoverage, options); - if (options.oneofs) - object.coverageType = "intentCoverage"; - } - if (message.transitionCoverage != null && message.hasOwnProperty("transitionCoverage")) { - object.transitionCoverage = $root.google.cloud.dialogflow.cx.v3.TransitionCoverage.toObject(message.transitionCoverage, options); - if (options.oneofs) - object.coverageType = "transitionCoverage"; + if (options.arrays || options.defaults) + object.trackingParameters = []; + if (options.defaults) { + object.flow = ""; + object.page = ""; } - 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"; + if (message.trackingParameters && message.trackingParameters.length) { + object.trackingParameters = []; + for (var j = 0; j < message.trackingParameters.length; ++j) + object.trackingParameters[j] = message.trackingParameters[j]; } + if (message.flow != null && message.hasOwnProperty("flow")) + object.flow = message.flow; + if (message.page != null && message.hasOwnProperty("page")) + object.page = message.page; return object; }; /** - * Converts this CalculateCoverageResponse to JSON. + * Converts this TestConfig to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.CalculateCoverageResponse + * @memberof google.cloud.dialogflow.cx.v3.TestConfig * @instance * @returns {Object.} JSON object */ - CalculateCoverageResponse.prototype.toJSON = function toJSON() { + TestConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CalculateCoverageResponse + * Gets the default type url for TestConfig * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.CalculateCoverageResponse + * @memberof google.cloud.dialogflow.cx.v3.TestConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CalculateCoverageResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + TestConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.CalculateCoverageResponse"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.TestConfig"; }; - return CalculateCoverageResponse; + return TestConfig; })(); - v3.ListTestCasesRequest = (function() { + v3.ConversationTurn = (function() { /** - * Properties of a ListTestCasesRequest. + * Properties of a ConversationTurn. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IListTestCasesRequest - * @property {string|null} [parent] ListTestCasesRequest parent - * @property {number|null} [pageSize] ListTestCasesRequest pageSize - * @property {string|null} [pageToken] ListTestCasesRequest pageToken - * @property {google.cloud.dialogflow.cx.v3.ListTestCasesRequest.TestCaseView|null} [view] ListTestCasesRequest view + * @interface IConversationTurn + * @property {google.cloud.dialogflow.cx.v3.ConversationTurn.IUserInput|null} [userInput] ConversationTurn userInput + * @property {google.cloud.dialogflow.cx.v3.ConversationTurn.IVirtualAgentOutput|null} [virtualAgentOutput] ConversationTurn virtualAgentOutput */ /** - * Constructs a new ListTestCasesRequest. + * Constructs a new ConversationTurn. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a ListTestCasesRequest. - * @implements IListTestCasesRequest + * @classdesc Represents a ConversationTurn. + * @implements IConversationTurn * @constructor - * @param {google.cloud.dialogflow.cx.v3.IListTestCasesRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IConversationTurn=} [properties] Properties to set */ - function ListTestCasesRequest(properties) { + function ConversationTurn(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -48188,119 +47742,91 @@ } /** - * ListTestCasesRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3.ListTestCasesRequest - * @instance - */ - ListTestCasesRequest.prototype.parent = ""; - - /** - * ListTestCasesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dialogflow.cx.v3.ListTestCasesRequest - * @instance - */ - ListTestCasesRequest.prototype.pageSize = 0; - - /** - * ListTestCasesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dialogflow.cx.v3.ListTestCasesRequest + * ConversationTurn userInput. + * @member {google.cloud.dialogflow.cx.v3.ConversationTurn.IUserInput|null|undefined} userInput + * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn * @instance */ - ListTestCasesRequest.prototype.pageToken = ""; + ConversationTurn.prototype.userInput = null; /** - * ListTestCasesRequest view. - * @member {google.cloud.dialogflow.cx.v3.ListTestCasesRequest.TestCaseView} view - * @memberof google.cloud.dialogflow.cx.v3.ListTestCasesRequest + * ConversationTurn virtualAgentOutput. + * @member {google.cloud.dialogflow.cx.v3.ConversationTurn.IVirtualAgentOutput|null|undefined} virtualAgentOutput + * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn * @instance */ - ListTestCasesRequest.prototype.view = 0; + ConversationTurn.prototype.virtualAgentOutput = null; /** - * Creates a new ListTestCasesRequest instance using the specified properties. + * Creates a new ConversationTurn instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.ListTestCasesRequest + * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn * @static - * @param {google.cloud.dialogflow.cx.v3.IListTestCasesRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ListTestCasesRequest} ListTestCasesRequest instance + * @param {google.cloud.dialogflow.cx.v3.IConversationTurn=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ConversationTurn} ConversationTurn instance */ - ListTestCasesRequest.create = function create(properties) { - return new ListTestCasesRequest(properties); + ConversationTurn.create = function create(properties) { + return new ConversationTurn(properties); }; /** - * Encodes the specified ListTestCasesRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListTestCasesRequest.verify|verify} messages. + * Encodes the specified ConversationTurn message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ConversationTurn.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ListTestCasesRequest + * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn * @static - * @param {google.cloud.dialogflow.cx.v3.IListTestCasesRequest} message ListTestCasesRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IConversationTurn} message ConversationTurn message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListTestCasesRequest.encode = function encode(message, writer) { + ConversationTurn.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.view != null && Object.hasOwnProperty.call(message, "view")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.view); + if (message.userInput != null && Object.hasOwnProperty.call(message, "userInput")) + $root.google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput.encode(message.userInput, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.virtualAgentOutput != null && Object.hasOwnProperty.call(message, "virtualAgentOutput")) + $root.google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput.encode(message.virtualAgentOutput, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListTestCasesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListTestCasesRequest.verify|verify} messages. + * Encodes the specified ConversationTurn message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ConversationTurn.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListTestCasesRequest + * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn * @static - * @param {google.cloud.dialogflow.cx.v3.IListTestCasesRequest} message ListTestCasesRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IConversationTurn} message ConversationTurn message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListTestCasesRequest.encodeDelimited = function encodeDelimited(message, writer) { + ConversationTurn.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListTestCasesRequest message from the specified reader or buffer. + * Decodes a ConversationTurn message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ListTestCasesRequest + * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn * @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.ListTestCasesRequest} ListTestCasesRequest + * @returns {google.cloud.dialogflow.cx.v3.ConversationTurn} ConversationTurn * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListTestCasesRequest.decode = function decode(reader, length, error) { + ConversationTurn.decode = function decode(reader, length, error) { 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.ListTestCasesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ConversationTurn(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + message.userInput = $root.google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput.decode(reader, reader.uint32()); break; } case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - case 4: { - message.view = reader.int32(); + message.virtualAgentOutput = $root.google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput.decode(reader, reader.uint32()); break; } default: @@ -48312,683 +47838,840 @@ }; /** - * Decodes a ListTestCasesRequest message from the specified reader or buffer, length delimited. + * Decodes a ConversationTurn message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListTestCasesRequest + * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ListTestCasesRequest} ListTestCasesRequest + * @returns {google.cloud.dialogflow.cx.v3.ConversationTurn} ConversationTurn * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListTestCasesRequest.decodeDelimited = function decodeDelimited(reader) { + ConversationTurn.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListTestCasesRequest message. + * Verifies a ConversationTurn message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ListTestCasesRequest + * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListTestCasesRequest.verify = function verify(message) { + ConversationTurn.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.view != null && message.hasOwnProperty("view")) - switch (message.view) { - default: - return "view: enum value expected"; - case 0: - case 1: - case 2: - break; - } + if (message.userInput != null && message.hasOwnProperty("userInput")) { + var error = $root.google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput.verify(message.userInput); + if (error) + return "userInput." + error; + } + if (message.virtualAgentOutput != null && message.hasOwnProperty("virtualAgentOutput")) { + var error = $root.google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput.verify(message.virtualAgentOutput); + if (error) + return "virtualAgentOutput." + error; + } return null; }; /** - * Creates a ListTestCasesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ConversationTurn message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ListTestCasesRequest + * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ListTestCasesRequest} ListTestCasesRequest + * @returns {google.cloud.dialogflow.cx.v3.ConversationTurn} ConversationTurn */ - ListTestCasesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListTestCasesRequest) + ConversationTurn.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ConversationTurn) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.ListTestCasesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - switch (object.view) { - default: - if (typeof object.view === "number") { - message.view = object.view; - break; - } - break; - case "TEST_CASE_VIEW_UNSPECIFIED": - case 0: - message.view = 0; - break; - case "BASIC": - case 1: - message.view = 1; - break; - case "FULL": - case 2: - message.view = 2; - break; + var message = new $root.google.cloud.dialogflow.cx.v3.ConversationTurn(); + if (object.userInput != null) { + if (typeof object.userInput !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.ConversationTurn.userInput: object expected"); + message.userInput = $root.google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput.fromObject(object.userInput); + } + if (object.virtualAgentOutput != null) { + if (typeof object.virtualAgentOutput !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.ConversationTurn.virtualAgentOutput: object expected"); + message.virtualAgentOutput = $root.google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput.fromObject(object.virtualAgentOutput); } return message; }; /** - * Creates a plain object from a ListTestCasesRequest message. Also converts values to other types if specified. + * Creates a plain object from a ConversationTurn message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ListTestCasesRequest + * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn * @static - * @param {google.cloud.dialogflow.cx.v3.ListTestCasesRequest} message ListTestCasesRequest + * @param {google.cloud.dialogflow.cx.v3.ConversationTurn} message ConversationTurn * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListTestCasesRequest.toObject = function toObject(message, options) { + ConversationTurn.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.view = options.enums === String ? "TEST_CASE_VIEW_UNSPECIFIED" : 0; + object.userInput = null; + object.virtualAgentOutput = null; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.view != null && message.hasOwnProperty("view")) - object.view = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.ListTestCasesRequest.TestCaseView[message.view] === undefined ? message.view : $root.google.cloud.dialogflow.cx.v3.ListTestCasesRequest.TestCaseView[message.view] : message.view; + if (message.userInput != null && message.hasOwnProperty("userInput")) + object.userInput = $root.google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput.toObject(message.userInput, options); + if (message.virtualAgentOutput != null && message.hasOwnProperty("virtualAgentOutput")) + object.virtualAgentOutput = $root.google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput.toObject(message.virtualAgentOutput, options); return object; }; /** - * Converts this ListTestCasesRequest to JSON. + * Converts this ConversationTurn to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ListTestCasesRequest + * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn * @instance * @returns {Object.} JSON object */ - ListTestCasesRequest.prototype.toJSON = function toJSON() { + ConversationTurn.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListTestCasesRequest + * Gets the default type url for ConversationTurn * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.ListTestCasesRequest + * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListTestCasesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ConversationTurn.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListTestCasesRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ConversationTurn"; }; - /** - * TestCaseView enum. - * @name google.cloud.dialogflow.cx.v3.ListTestCasesRequest.TestCaseView - * @enum {number} - * @property {number} TEST_CASE_VIEW_UNSPECIFIED=0 TEST_CASE_VIEW_UNSPECIFIED value - * @property {number} BASIC=1 BASIC value - * @property {number} FULL=2 FULL value - */ - ListTestCasesRequest.TestCaseView = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TEST_CASE_VIEW_UNSPECIFIED"] = 0; - values[valuesById[1] = "BASIC"] = 1; - values[valuesById[2] = "FULL"] = 2; - return values; - })(); + ConversationTurn.UserInput = (function() { - return ListTestCasesRequest; - })(); + /** + * Properties of a UserInput. + * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn + * @interface IUserInput + * @property {google.cloud.dialogflow.cx.v3.IQueryInput|null} [input] UserInput input + * @property {google.protobuf.IStruct|null} [injectedParameters] UserInput injectedParameters + * @property {boolean|null} [isWebhookEnabled] UserInput isWebhookEnabled + * @property {boolean|null} [enableSentimentAnalysis] UserInput enableSentimentAnalysis + */ - v3.ListTestCasesResponse = (function() { + /** + * Constructs a new UserInput. + * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn + * @classdesc Represents a UserInput. + * @implements IUserInput + * @constructor + * @param {google.cloud.dialogflow.cx.v3.ConversationTurn.IUserInput=} [properties] Properties to set + */ + function UserInput(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]]; + } - /** - * Properties of a ListTestCasesResponse. - * @memberof google.cloud.dialogflow.cx.v3 - * @interface IListTestCasesResponse - * @property {Array.|null} [testCases] ListTestCasesResponse testCases - * @property {string|null} [nextPageToken] ListTestCasesResponse nextPageToken - */ + /** + * UserInput input. + * @member {google.cloud.dialogflow.cx.v3.IQueryInput|null|undefined} input + * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput + * @instance + */ + UserInput.prototype.input = null; - /** - * Constructs a new ListTestCasesResponse. - * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a ListTestCasesResponse. - * @implements IListTestCasesResponse - * @constructor - * @param {google.cloud.dialogflow.cx.v3.IListTestCasesResponse=} [properties] Properties to set - */ - function ListTestCasesResponse(properties) { - this.testCases = []; - 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]]; - } + /** + * UserInput injectedParameters. + * @member {google.protobuf.IStruct|null|undefined} injectedParameters + * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput + * @instance + */ + UserInput.prototype.injectedParameters = null; - /** - * ListTestCasesResponse testCases. - * @member {Array.} testCases - * @memberof google.cloud.dialogflow.cx.v3.ListTestCasesResponse - * @instance - */ - ListTestCasesResponse.prototype.testCases = $util.emptyArray; + /** + * UserInput isWebhookEnabled. + * @member {boolean} isWebhookEnabled + * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput + * @instance + */ + UserInput.prototype.isWebhookEnabled = false; - /** - * ListTestCasesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dialogflow.cx.v3.ListTestCasesResponse - * @instance - */ - ListTestCasesResponse.prototype.nextPageToken = ""; + /** + * UserInput enableSentimentAnalysis. + * @member {boolean} enableSentimentAnalysis + * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput + * @instance + */ + UserInput.prototype.enableSentimentAnalysis = false; - /** - * Creates a new ListTestCasesResponse instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.ListTestCasesResponse - * @static - * @param {google.cloud.dialogflow.cx.v3.IListTestCasesResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ListTestCasesResponse} ListTestCasesResponse instance - */ - ListTestCasesResponse.create = function create(properties) { - return new ListTestCasesResponse(properties); - }; + /** + * Creates a new UserInput instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput + * @static + * @param {google.cloud.dialogflow.cx.v3.ConversationTurn.IUserInput=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput} UserInput instance + */ + UserInput.create = function create(properties) { + return new UserInput(properties); + }; - /** - * Encodes the specified ListTestCasesResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListTestCasesResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ListTestCasesResponse - * @static - * @param {google.cloud.dialogflow.cx.v3.IListTestCasesResponse} message ListTestCasesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListTestCasesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.testCases != null && message.testCases.length) - for (var i = 0; i < message.testCases.length; ++i) - $root.google.cloud.dialogflow.cx.v3.TestCase.encode(message.testCases[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - return writer; - }; + /** + * Encodes the specified UserInput message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput + * @static + * @param {google.cloud.dialogflow.cx.v3.ConversationTurn.IUserInput} message UserInput message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserInput.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.injectedParameters != null && Object.hasOwnProperty.call(message, "injectedParameters")) + $root.google.protobuf.Struct.encode(message.injectedParameters, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.isWebhookEnabled != null && Object.hasOwnProperty.call(message, "isWebhookEnabled")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.isWebhookEnabled); + if (message.input != null && Object.hasOwnProperty.call(message, "input")) + $root.google.cloud.dialogflow.cx.v3.QueryInput.encode(message.input, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.enableSentimentAnalysis != null && Object.hasOwnProperty.call(message, "enableSentimentAnalysis")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.enableSentimentAnalysis); + return writer; + }; - /** - * Encodes the specified ListTestCasesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListTestCasesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListTestCasesResponse - * @static - * @param {google.cloud.dialogflow.cx.v3.IListTestCasesResponse} message ListTestCasesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListTestCasesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified UserInput message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput + * @static + * @param {google.cloud.dialogflow.cx.v3.ConversationTurn.IUserInput} message UserInput message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserInput.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a ListTestCasesResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ListTestCasesResponse - * @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.ListTestCasesResponse} ListTestCasesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListTestCasesResponse.decode = function decode(reader, length, error) { - 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.ListTestCasesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.testCases && message.testCases.length)) - message.testCases = []; - message.testCases.push($root.google.cloud.dialogflow.cx.v3.TestCase.decode(reader, reader.uint32())); + /** + * Decodes a UserInput message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput + * @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.ConversationTurn.UserInput} UserInput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserInput.decode = function decode(reader, length, error) { + 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.ConversationTurn.UserInput(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - } - case 2: { - message.nextPageToken = reader.string(); + switch (tag >>> 3) { + case 5: { + message.input = $root.google.cloud.dialogflow.cx.v3.QueryInput.decode(reader, reader.uint32()); + break; + } + case 2: { + message.injectedParameters = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + } + case 3: { + message.isWebhookEnabled = reader.bool(); + break; + } + case 7: { + message.enableSentimentAnalysis = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); break; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; + return message; + }; - /** - * Decodes a ListTestCasesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListTestCasesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ListTestCasesResponse} ListTestCasesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListTestCasesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a UserInput message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput} UserInput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserInput.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a ListTestCasesResponse message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ListTestCasesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListTestCasesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.testCases != null && message.hasOwnProperty("testCases")) { - if (!Array.isArray(message.testCases)) - return "testCases: array expected"; - for (var i = 0; i < message.testCases.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.TestCase.verify(message.testCases[i]); + /** + * Verifies a UserInput message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UserInput.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.input != null && message.hasOwnProperty("input")) { + var error = $root.google.cloud.dialogflow.cx.v3.QueryInput.verify(message.input); if (error) - return "testCases." + error; + return "input." + error; } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; + if (message.injectedParameters != null && message.hasOwnProperty("injectedParameters")) { + var error = $root.google.protobuf.Struct.verify(message.injectedParameters); + if (error) + return "injectedParameters." + error; + } + if (message.isWebhookEnabled != null && message.hasOwnProperty("isWebhookEnabled")) + if (typeof message.isWebhookEnabled !== "boolean") + return "isWebhookEnabled: boolean expected"; + if (message.enableSentimentAnalysis != null && message.hasOwnProperty("enableSentimentAnalysis")) + if (typeof message.enableSentimentAnalysis !== "boolean") + return "enableSentimentAnalysis: boolean expected"; + return null; + }; - /** - * Creates a ListTestCasesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ListTestCasesResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ListTestCasesResponse} ListTestCasesResponse - */ - ListTestCasesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListTestCasesResponse) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.ListTestCasesResponse(); - if (object.testCases) { - if (!Array.isArray(object.testCases)) - throw TypeError(".google.cloud.dialogflow.cx.v3.ListTestCasesResponse.testCases: array expected"); - message.testCases = []; - for (var i = 0; i < object.testCases.length; ++i) { - if (typeof object.testCases[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.ListTestCasesResponse.testCases: object expected"); - message.testCases[i] = $root.google.cloud.dialogflow.cx.v3.TestCase.fromObject(object.testCases[i]); + /** + * Creates a UserInput message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput} UserInput + */ + UserInput.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput(); + if (object.input != null) { + if (typeof object.input !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput.input: object expected"); + message.input = $root.google.cloud.dialogflow.cx.v3.QueryInput.fromObject(object.input); } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; + if (object.injectedParameters != null) { + if (typeof object.injectedParameters !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput.injectedParameters: object expected"); + message.injectedParameters = $root.google.protobuf.Struct.fromObject(object.injectedParameters); + } + if (object.isWebhookEnabled != null) + message.isWebhookEnabled = Boolean(object.isWebhookEnabled); + if (object.enableSentimentAnalysis != null) + message.enableSentimentAnalysis = Boolean(object.enableSentimentAnalysis); + return message; + }; - /** - * Creates a plain object from a ListTestCasesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ListTestCasesResponse - * @static - * @param {google.cloud.dialogflow.cx.v3.ListTestCasesResponse} message ListTestCasesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListTestCasesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.testCases = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.testCases && message.testCases.length) { - object.testCases = []; - for (var j = 0; j < message.testCases.length; ++j) - object.testCases[j] = $root.google.cloud.dialogflow.cx.v3.TestCase.toObject(message.testCases[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; + /** + * Creates a plain object from a UserInput message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput + * @static + * @param {google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput} message UserInput + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UserInput.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.injectedParameters = null; + object.isWebhookEnabled = false; + object.input = null; + object.enableSentimentAnalysis = false; + } + if (message.injectedParameters != null && message.hasOwnProperty("injectedParameters")) + object.injectedParameters = $root.google.protobuf.Struct.toObject(message.injectedParameters, options); + if (message.isWebhookEnabled != null && message.hasOwnProperty("isWebhookEnabled")) + object.isWebhookEnabled = message.isWebhookEnabled; + if (message.input != null && message.hasOwnProperty("input")) + object.input = $root.google.cloud.dialogflow.cx.v3.QueryInput.toObject(message.input, options); + if (message.enableSentimentAnalysis != null && message.hasOwnProperty("enableSentimentAnalysis")) + object.enableSentimentAnalysis = message.enableSentimentAnalysis; + return object; + }; - /** - * Converts this ListTestCasesResponse to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ListTestCasesResponse - * @instance - * @returns {Object.} JSON object - */ - ListTestCasesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this UserInput to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput + * @instance + * @returns {Object.} JSON object + */ + UserInput.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Gets the default type url for ListTestCasesResponse - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.ListTestCasesResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListTestCasesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListTestCasesResponse"; - }; + /** + * Gets the default type url for UserInput + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UserInput.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ConversationTurn.UserInput"; + }; - return ListTestCasesResponse; - })(); + return UserInput; + })(); - v3.BatchDeleteTestCasesRequest = (function() { + ConversationTurn.VirtualAgentOutput = (function() { - /** - * Properties of a BatchDeleteTestCasesRequest. - * @memberof google.cloud.dialogflow.cx.v3 - * @interface IBatchDeleteTestCasesRequest - * @property {string|null} [parent] BatchDeleteTestCasesRequest parent - * @property {Array.|null} [names] BatchDeleteTestCasesRequest names - */ + /** + * Properties of a VirtualAgentOutput. + * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn + * @interface IVirtualAgentOutput + * @property {google.protobuf.IStruct|null} [sessionParameters] VirtualAgentOutput sessionParameters + * @property {Array.|null} [differences] VirtualAgentOutput differences + * @property {google.protobuf.IStruct|null} [diagnosticInfo] VirtualAgentOutput diagnosticInfo + * @property {google.cloud.dialogflow.cx.v3.IIntent|null} [triggeredIntent] VirtualAgentOutput triggeredIntent + * @property {google.cloud.dialogflow.cx.v3.IPage|null} [currentPage] VirtualAgentOutput currentPage + * @property {Array.|null} [textResponses] VirtualAgentOutput textResponses + * @property {google.rpc.IStatus|null} [status] VirtualAgentOutput status + */ - /** - * Constructs a new BatchDeleteTestCasesRequest. - * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a BatchDeleteTestCasesRequest. - * @implements IBatchDeleteTestCasesRequest - * @constructor - * @param {google.cloud.dialogflow.cx.v3.IBatchDeleteTestCasesRequest=} [properties] Properties to set - */ - function BatchDeleteTestCasesRequest(properties) { - this.names = []; - 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]]; - } + /** + * Constructs a new VirtualAgentOutput. + * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn + * @classdesc Represents a VirtualAgentOutput. + * @implements IVirtualAgentOutput + * @constructor + * @param {google.cloud.dialogflow.cx.v3.ConversationTurn.IVirtualAgentOutput=} [properties] Properties to set + */ + function VirtualAgentOutput(properties) { + this.differences = []; + this.textResponses = []; + 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]]; + } - /** - * BatchDeleteTestCasesRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest - * @instance - */ - BatchDeleteTestCasesRequest.prototype.parent = ""; + /** + * VirtualAgentOutput sessionParameters. + * @member {google.protobuf.IStruct|null|undefined} sessionParameters + * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput + * @instance + */ + VirtualAgentOutput.prototype.sessionParameters = null; - /** - * BatchDeleteTestCasesRequest names. - * @member {Array.} names - * @memberof google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest - * @instance - */ - BatchDeleteTestCasesRequest.prototype.names = $util.emptyArray; + /** + * VirtualAgentOutput differences. + * @member {Array.} differences + * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput + * @instance + */ + VirtualAgentOutput.prototype.differences = $util.emptyArray; - /** - * Creates a new BatchDeleteTestCasesRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.IBatchDeleteTestCasesRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest} BatchDeleteTestCasesRequest instance - */ - BatchDeleteTestCasesRequest.create = function create(properties) { - return new BatchDeleteTestCasesRequest(properties); - }; + /** + * VirtualAgentOutput diagnosticInfo. + * @member {google.protobuf.IStruct|null|undefined} diagnosticInfo + * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput + * @instance + */ + VirtualAgentOutput.prototype.diagnosticInfo = null; - /** - * Encodes the specified BatchDeleteTestCasesRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.IBatchDeleteTestCasesRequest} message BatchDeleteTestCasesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BatchDeleteTestCasesRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.names != null && message.names.length) - for (var i = 0; i < message.names.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.names[i]); - return writer; - }; + /** + * VirtualAgentOutput triggeredIntent. + * @member {google.cloud.dialogflow.cx.v3.IIntent|null|undefined} triggeredIntent + * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput + * @instance + */ + VirtualAgentOutput.prototype.triggeredIntent = null; - /** - * Encodes the specified BatchDeleteTestCasesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.IBatchDeleteTestCasesRequest} message BatchDeleteTestCasesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BatchDeleteTestCasesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * VirtualAgentOutput currentPage. + * @member {google.cloud.dialogflow.cx.v3.IPage|null|undefined} currentPage + * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput + * @instance + */ + VirtualAgentOutput.prototype.currentPage = null; - /** - * Decodes a BatchDeleteTestCasesRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest - * @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.BatchDeleteTestCasesRequest} BatchDeleteTestCasesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BatchDeleteTestCasesRequest.decode = function decode(reader, length, error) { - 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.BatchDeleteTestCasesRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 3: { - if (!(message.names && message.names.length)) - message.names = []; - message.names.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * VirtualAgentOutput textResponses. + * @member {Array.} textResponses + * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput + * @instance + */ + VirtualAgentOutput.prototype.textResponses = $util.emptyArray; - /** - * Decodes a BatchDeleteTestCasesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest} BatchDeleteTestCasesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BatchDeleteTestCasesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * VirtualAgentOutput status. + * @member {google.rpc.IStatus|null|undefined} status + * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput + * @instance + */ + VirtualAgentOutput.prototype.status = null; - /** - * Verifies a BatchDeleteTestCasesRequest message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BatchDeleteTestCasesRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.names != null && message.hasOwnProperty("names")) { - if (!Array.isArray(message.names)) - return "names: array expected"; - for (var i = 0; i < message.names.length; ++i) - if (!$util.isString(message.names[i])) - return "names: string[] expected"; - } - return null; - }; + /** + * Creates a new VirtualAgentOutput instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput + * @static + * @param {google.cloud.dialogflow.cx.v3.ConversationTurn.IVirtualAgentOutput=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput} VirtualAgentOutput instance + */ + VirtualAgentOutput.create = function create(properties) { + return new VirtualAgentOutput(properties); + }; - /** - * Creates a BatchDeleteTestCasesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest} BatchDeleteTestCasesRequest - */ - BatchDeleteTestCasesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest) + /** + * Encodes the specified VirtualAgentOutput message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput + * @static + * @param {google.cloud.dialogflow.cx.v3.ConversationTurn.IVirtualAgentOutput} message VirtualAgentOutput message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VirtualAgentOutput.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sessionParameters != null && Object.hasOwnProperty.call(message, "sessionParameters")) + $root.google.protobuf.Struct.encode(message.sessionParameters, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.differences != null && message.differences.length) + for (var i = 0; i < message.differences.length; ++i) + $root.google.cloud.dialogflow.cx.v3.TestRunDifference.encode(message.differences[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.diagnosticInfo != null && Object.hasOwnProperty.call(message, "diagnosticInfo")) + $root.google.protobuf.Struct.encode(message.diagnosticInfo, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.triggeredIntent != null && Object.hasOwnProperty.call(message, "triggeredIntent")) + $root.google.cloud.dialogflow.cx.v3.Intent.encode(message.triggeredIntent, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.currentPage != null && Object.hasOwnProperty.call(message, "currentPage")) + $root.google.cloud.dialogflow.cx.v3.Page.encode(message.currentPage, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.textResponses != null && message.textResponses.length) + for (var i = 0; i < message.textResponses.length; ++i) + $root.google.cloud.dialogflow.cx.v3.ResponseMessage.Text.encode(message.textResponses[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + $root.google.rpc.Status.encode(message.status, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified VirtualAgentOutput message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput + * @static + * @param {google.cloud.dialogflow.cx.v3.ConversationTurn.IVirtualAgentOutput} message VirtualAgentOutput message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VirtualAgentOutput.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VirtualAgentOutput message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput + * @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.ConversationTurn.VirtualAgentOutput} VirtualAgentOutput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VirtualAgentOutput.decode = function decode(reader, length, error) { + 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.ConversationTurn.VirtualAgentOutput(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 4: { + message.sessionParameters = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + } + case 5: { + if (!(message.differences && message.differences.length)) + message.differences = []; + message.differences.push($root.google.cloud.dialogflow.cx.v3.TestRunDifference.decode(reader, reader.uint32())); + break; + } + case 6: { + message.diagnosticInfo = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + } + case 7: { + message.triggeredIntent = $root.google.cloud.dialogflow.cx.v3.Intent.decode(reader, reader.uint32()); + break; + } + case 8: { + message.currentPage = $root.google.cloud.dialogflow.cx.v3.Page.decode(reader, reader.uint32()); + break; + } + case 9: { + if (!(message.textResponses && message.textResponses.length)) + message.textResponses = []; + message.textResponses.push($root.google.cloud.dialogflow.cx.v3.ResponseMessage.Text.decode(reader, reader.uint32())); + break; + } + case 10: { + message.status = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VirtualAgentOutput message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput} VirtualAgentOutput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VirtualAgentOutput.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VirtualAgentOutput message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VirtualAgentOutput.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sessionParameters != null && message.hasOwnProperty("sessionParameters")) { + var error = $root.google.protobuf.Struct.verify(message.sessionParameters); + if (error) + return "sessionParameters." + error; + } + if (message.differences != null && message.hasOwnProperty("differences")) { + if (!Array.isArray(message.differences)) + return "differences: array expected"; + for (var i = 0; i < message.differences.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.TestRunDifference.verify(message.differences[i]); + if (error) + return "differences." + error; + } + } + if (message.diagnosticInfo != null && message.hasOwnProperty("diagnosticInfo")) { + var error = $root.google.protobuf.Struct.verify(message.diagnosticInfo); + if (error) + return "diagnosticInfo." + error; + } + if (message.triggeredIntent != null && message.hasOwnProperty("triggeredIntent")) { + var error = $root.google.cloud.dialogflow.cx.v3.Intent.verify(message.triggeredIntent); + if (error) + return "triggeredIntent." + error; + } + if (message.currentPage != null && message.hasOwnProperty("currentPage")) { + var error = $root.google.cloud.dialogflow.cx.v3.Page.verify(message.currentPage); + if (error) + return "currentPage." + error; + } + if (message.textResponses != null && message.hasOwnProperty("textResponses")) { + if (!Array.isArray(message.textResponses)) + return "textResponses: array expected"; + for (var i = 0; i < message.textResponses.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.Text.verify(message.textResponses[i]); + if (error) + return "textResponses." + error; + } + } + if (message.status != null && message.hasOwnProperty("status")) { + var error = $root.google.rpc.Status.verify(message.status); + if (error) + return "status." + error; + } + return null; + }; + + /** + * Creates a VirtualAgentOutput message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput} VirtualAgentOutput + */ + VirtualAgentOutput.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput(); + if (object.sessionParameters != null) { + if (typeof object.sessionParameters !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput.sessionParameters: object expected"); + message.sessionParameters = $root.google.protobuf.Struct.fromObject(object.sessionParameters); + } + if (object.differences) { + if (!Array.isArray(object.differences)) + throw TypeError(".google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput.differences: array expected"); + message.differences = []; + for (var i = 0; i < object.differences.length; ++i) { + if (typeof object.differences[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput.differences: object expected"); + message.differences[i] = $root.google.cloud.dialogflow.cx.v3.TestRunDifference.fromObject(object.differences[i]); + } + } + if (object.diagnosticInfo != null) { + if (typeof object.diagnosticInfo !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput.diagnosticInfo: object expected"); + message.diagnosticInfo = $root.google.protobuf.Struct.fromObject(object.diagnosticInfo); + } + if (object.triggeredIntent != null) { + if (typeof object.triggeredIntent !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput.triggeredIntent: object expected"); + message.triggeredIntent = $root.google.cloud.dialogflow.cx.v3.Intent.fromObject(object.triggeredIntent); + } + if (object.currentPage != null) { + if (typeof object.currentPage !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput.currentPage: object expected"); + message.currentPage = $root.google.cloud.dialogflow.cx.v3.Page.fromObject(object.currentPage); + } + if (object.textResponses) { + if (!Array.isArray(object.textResponses)) + throw TypeError(".google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput.textResponses: array expected"); + message.textResponses = []; + for (var i = 0; i < object.textResponses.length; ++i) { + if (typeof object.textResponses[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput.textResponses: object expected"); + message.textResponses[i] = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.Text.fromObject(object.textResponses[i]); + } + } + if (object.status != null) { + if (typeof object.status !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput.status: object expected"); + message.status = $root.google.rpc.Status.fromObject(object.status); + } + return message; + }; + + /** + * Creates a plain object from a VirtualAgentOutput message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput + * @static + * @param {google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput} message VirtualAgentOutput + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VirtualAgentOutput.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.differences = []; + object.textResponses = []; + } + if (options.defaults) { + object.sessionParameters = null; + object.diagnosticInfo = null; + object.triggeredIntent = null; + object.currentPage = null; + object.status = null; + } + if (message.sessionParameters != null && message.hasOwnProperty("sessionParameters")) + object.sessionParameters = $root.google.protobuf.Struct.toObject(message.sessionParameters, options); + if (message.differences && message.differences.length) { + object.differences = []; + for (var j = 0; j < message.differences.length; ++j) + object.differences[j] = $root.google.cloud.dialogflow.cx.v3.TestRunDifference.toObject(message.differences[j], options); + } + if (message.diagnosticInfo != null && message.hasOwnProperty("diagnosticInfo")) + object.diagnosticInfo = $root.google.protobuf.Struct.toObject(message.diagnosticInfo, options); + if (message.triggeredIntent != null && message.hasOwnProperty("triggeredIntent")) + object.triggeredIntent = $root.google.cloud.dialogflow.cx.v3.Intent.toObject(message.triggeredIntent, options); + if (message.currentPage != null && message.hasOwnProperty("currentPage")) + object.currentPage = $root.google.cloud.dialogflow.cx.v3.Page.toObject(message.currentPage, options); + if (message.textResponses && message.textResponses.length) { + object.textResponses = []; + for (var j = 0; j < message.textResponses.length; ++j) + object.textResponses[j] = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.Text.toObject(message.textResponses[j], options); + } + if (message.status != null && message.hasOwnProperty("status")) + object.status = $root.google.rpc.Status.toObject(message.status, options); return object; - var message = new $root.google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.names) { - if (!Array.isArray(object.names)) - throw TypeError(".google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest.names: array expected"); - message.names = []; - for (var i = 0; i < object.names.length; ++i) - message.names[i] = String(object.names[i]); - } - return message; - }; + }; - /** - * Creates a plain object from a BatchDeleteTestCasesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest} message BatchDeleteTestCasesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BatchDeleteTestCasesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.names = []; - if (options.defaults) - object.parent = ""; - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.names && message.names.length) { - object.names = []; - for (var j = 0; j < message.names.length; ++j) - object.names[j] = message.names[j]; - } - return object; - }; + /** + * Converts this VirtualAgentOutput to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput + * @instance + * @returns {Object.} JSON object + */ + VirtualAgentOutput.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this BatchDeleteTestCasesRequest to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest - * @instance - * @returns {Object.} JSON object - */ - BatchDeleteTestCasesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Gets the default type url for VirtualAgentOutput + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VirtualAgentOutput.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ConversationTurn.VirtualAgentOutput"; + }; - /** - * Gets the default type url for BatchDeleteTestCasesRequest - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BatchDeleteTestCasesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest"; - }; + return VirtualAgentOutput; + })(); - return BatchDeleteTestCasesRequest; + return ConversationTurn; })(); - v3.CreateTestCaseRequest = (function() { + v3.TestRunDifference = (function() { /** - * Properties of a CreateTestCaseRequest. + * Properties of a TestRunDifference. * @memberof google.cloud.dialogflow.cx.v3 - * @interface ICreateTestCaseRequest - * @property {string|null} [parent] CreateTestCaseRequest parent - * @property {google.cloud.dialogflow.cx.v3.ITestCase|null} [testCase] CreateTestCaseRequest testCase + * @interface ITestRunDifference + * @property {google.cloud.dialogflow.cx.v3.TestRunDifference.DiffType|null} [type] TestRunDifference type + * @property {string|null} [description] TestRunDifference description */ /** - * Constructs a new CreateTestCaseRequest. + * Constructs a new TestRunDifference. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a CreateTestCaseRequest. - * @implements ICreateTestCaseRequest + * @classdesc Represents a TestRunDifference. + * @implements ITestRunDifference * @constructor - * @param {google.cloud.dialogflow.cx.v3.ICreateTestCaseRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.ITestRunDifference=} [properties] Properties to set */ - function CreateTestCaseRequest(properties) { + function TestRunDifference(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -48996,91 +48679,91 @@ } /** - * CreateTestCaseRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3.CreateTestCaseRequest + * TestRunDifference type. + * @member {google.cloud.dialogflow.cx.v3.TestRunDifference.DiffType} type + * @memberof google.cloud.dialogflow.cx.v3.TestRunDifference * @instance */ - CreateTestCaseRequest.prototype.parent = ""; + TestRunDifference.prototype.type = 0; /** - * CreateTestCaseRequest testCase. - * @member {google.cloud.dialogflow.cx.v3.ITestCase|null|undefined} testCase - * @memberof google.cloud.dialogflow.cx.v3.CreateTestCaseRequest + * TestRunDifference description. + * @member {string} description + * @memberof google.cloud.dialogflow.cx.v3.TestRunDifference * @instance */ - CreateTestCaseRequest.prototype.testCase = null; + TestRunDifference.prototype.description = ""; /** - * Creates a new CreateTestCaseRequest instance using the specified properties. + * Creates a new TestRunDifference instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.CreateTestCaseRequest + * @memberof google.cloud.dialogflow.cx.v3.TestRunDifference * @static - * @param {google.cloud.dialogflow.cx.v3.ICreateTestCaseRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.CreateTestCaseRequest} CreateTestCaseRequest instance + * @param {google.cloud.dialogflow.cx.v3.ITestRunDifference=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.TestRunDifference} TestRunDifference instance */ - CreateTestCaseRequest.create = function create(properties) { - return new CreateTestCaseRequest(properties); + TestRunDifference.create = function create(properties) { + return new TestRunDifference(properties); }; /** - * Encodes the specified CreateTestCaseRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateTestCaseRequest.verify|verify} messages. + * Encodes the specified TestRunDifference message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TestRunDifference.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.CreateTestCaseRequest + * @memberof google.cloud.dialogflow.cx.v3.TestRunDifference * @static - * @param {google.cloud.dialogflow.cx.v3.ICreateTestCaseRequest} message CreateTestCaseRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ITestRunDifference} message TestRunDifference message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateTestCaseRequest.encode = function encode(message, writer) { + TestRunDifference.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.testCase != null && Object.hasOwnProperty.call(message, "testCase")) - $root.google.cloud.dialogflow.cx.v3.TestCase.encode(message.testCase, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); return writer; }; /** - * Encodes the specified CreateTestCaseRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateTestCaseRequest.verify|verify} messages. + * Encodes the specified TestRunDifference message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TestRunDifference.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.CreateTestCaseRequest + * @memberof google.cloud.dialogflow.cx.v3.TestRunDifference * @static - * @param {google.cloud.dialogflow.cx.v3.ICreateTestCaseRequest} message CreateTestCaseRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ITestRunDifference} message TestRunDifference message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateTestCaseRequest.encodeDelimited = function encodeDelimited(message, writer) { + TestRunDifference.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateTestCaseRequest message from the specified reader or buffer. + * Decodes a TestRunDifference message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.CreateTestCaseRequest + * @memberof google.cloud.dialogflow.cx.v3.TestRunDifference * @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.CreateTestCaseRequest} CreateTestCaseRequest + * @returns {google.cloud.dialogflow.cx.v3.TestRunDifference} TestRunDifference * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateTestCaseRequest.decode = function decode(reader, length, error) { + TestRunDifference.decode = function decode(reader, length, error) { 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.CreateTestCaseRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.TestRunDifference(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + message.type = reader.int32(); break; } case 2: { - message.testCase = $root.google.cloud.dialogflow.cx.v3.TestCase.decode(reader, reader.uint32()); + message.description = reader.string(); break; } default: @@ -49092,137 +48775,194 @@ }; /** - * Decodes a CreateTestCaseRequest message from the specified reader or buffer, length delimited. + * Decodes a TestRunDifference message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.CreateTestCaseRequest + * @memberof google.cloud.dialogflow.cx.v3.TestRunDifference * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.CreateTestCaseRequest} CreateTestCaseRequest + * @returns {google.cloud.dialogflow.cx.v3.TestRunDifference} TestRunDifference * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateTestCaseRequest.decodeDelimited = function decodeDelimited(reader) { + TestRunDifference.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateTestCaseRequest message. + * Verifies a TestRunDifference message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.CreateTestCaseRequest + * @memberof google.cloud.dialogflow.cx.v3.TestRunDifference * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateTestCaseRequest.verify = function verify(message) { + TestRunDifference.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.testCase != null && message.hasOwnProperty("testCase")) { - var error = $root.google.cloud.dialogflow.cx.v3.TestCase.verify(message.testCase); - if (error) - return "testCase." + error; - } - return null; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + return null; }; /** - * Creates a CreateTestCaseRequest message from a plain object. Also converts values to their respective internal types. + * Creates a TestRunDifference message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.CreateTestCaseRequest + * @memberof google.cloud.dialogflow.cx.v3.TestRunDifference * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.CreateTestCaseRequest} CreateTestCaseRequest + * @returns {google.cloud.dialogflow.cx.v3.TestRunDifference} TestRunDifference */ - CreateTestCaseRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.CreateTestCaseRequest) + TestRunDifference.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.TestRunDifference) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.CreateTestCaseRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.testCase != null) { - if (typeof object.testCase !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.CreateTestCaseRequest.testCase: object expected"); - message.testCase = $root.google.cloud.dialogflow.cx.v3.TestCase.fromObject(object.testCase); + var message = new $root.google.cloud.dialogflow.cx.v3.TestRunDifference(); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "DIFF_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "INTENT": + case 1: + message.type = 1; + break; + case "PAGE": + case 2: + message.type = 2; + break; + case "PARAMETERS": + case 3: + message.type = 3; + break; + case "UTTERANCE": + case 4: + message.type = 4; + break; + case "FLOW": + case 5: + message.type = 5; + break; } + if (object.description != null) + message.description = String(object.description); return message; }; /** - * Creates a plain object from a CreateTestCaseRequest message. Also converts values to other types if specified. + * Creates a plain object from a TestRunDifference message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.CreateTestCaseRequest + * @memberof google.cloud.dialogflow.cx.v3.TestRunDifference * @static - * @param {google.cloud.dialogflow.cx.v3.CreateTestCaseRequest} message CreateTestCaseRequest + * @param {google.cloud.dialogflow.cx.v3.TestRunDifference} message TestRunDifference * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateTestCaseRequest.toObject = function toObject(message, options) { + TestRunDifference.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.testCase = null; + object.type = options.enums === String ? "DIFF_TYPE_UNSPECIFIED" : 0; + object.description = ""; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.testCase != null && message.hasOwnProperty("testCase")) - object.testCase = $root.google.cloud.dialogflow.cx.v3.TestCase.toObject(message.testCase, options); + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.TestRunDifference.DiffType[message.type] === undefined ? message.type : $root.google.cloud.dialogflow.cx.v3.TestRunDifference.DiffType[message.type] : message.type; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; return object; }; /** - * Converts this CreateTestCaseRequest to JSON. + * Converts this TestRunDifference to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.CreateTestCaseRequest + * @memberof google.cloud.dialogflow.cx.v3.TestRunDifference * @instance * @returns {Object.} JSON object */ - CreateTestCaseRequest.prototype.toJSON = function toJSON() { + TestRunDifference.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateTestCaseRequest + * Gets the default type url for TestRunDifference * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.CreateTestCaseRequest + * @memberof google.cloud.dialogflow.cx.v3.TestRunDifference * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateTestCaseRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + TestRunDifference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.CreateTestCaseRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.TestRunDifference"; }; - return CreateTestCaseRequest; + /** + * DiffType enum. + * @name google.cloud.dialogflow.cx.v3.TestRunDifference.DiffType + * @enum {number} + * @property {number} DIFF_TYPE_UNSPECIFIED=0 DIFF_TYPE_UNSPECIFIED value + * @property {number} INTENT=1 INTENT value + * @property {number} PAGE=2 PAGE value + * @property {number} PARAMETERS=3 PARAMETERS value + * @property {number} UTTERANCE=4 UTTERANCE value + * @property {number} FLOW=5 FLOW value + */ + TestRunDifference.DiffType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DIFF_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "INTENT"] = 1; + values[valuesById[2] = "PAGE"] = 2; + values[valuesById[3] = "PARAMETERS"] = 3; + values[valuesById[4] = "UTTERANCE"] = 4; + values[valuesById[5] = "FLOW"] = 5; + return values; + })(); + + return TestRunDifference; })(); - v3.UpdateTestCaseRequest = (function() { + v3.TransitionCoverage = (function() { /** - * Properties of an UpdateTestCaseRequest. + * Properties of a TransitionCoverage. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IUpdateTestCaseRequest - * @property {google.cloud.dialogflow.cx.v3.ITestCase|null} [testCase] UpdateTestCaseRequest testCase - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateTestCaseRequest updateMask + * @interface ITransitionCoverage + * @property {Array.|null} [transitions] TransitionCoverage transitions + * @property {number|null} [coverageScore] TransitionCoverage coverageScore */ /** - * Constructs a new UpdateTestCaseRequest. + * Constructs a new TransitionCoverage. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents an UpdateTestCaseRequest. - * @implements IUpdateTestCaseRequest + * @classdesc Represents a TransitionCoverage. + * @implements ITransitionCoverage * @constructor - * @param {google.cloud.dialogflow.cx.v3.IUpdateTestCaseRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.ITransitionCoverage=} [properties] Properties to set */ - function UpdateTestCaseRequest(properties) { + function TransitionCoverage(properties) { + this.transitions = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -49230,91 +48970,94 @@ } /** - * UpdateTestCaseRequest testCase. - * @member {google.cloud.dialogflow.cx.v3.ITestCase|null|undefined} testCase - * @memberof google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest + * TransitionCoverage transitions. + * @member {Array.} transitions + * @memberof google.cloud.dialogflow.cx.v3.TransitionCoverage * @instance */ - UpdateTestCaseRequest.prototype.testCase = null; + TransitionCoverage.prototype.transitions = $util.emptyArray; /** - * UpdateTestCaseRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest + * TransitionCoverage coverageScore. + * @member {number} coverageScore + * @memberof google.cloud.dialogflow.cx.v3.TransitionCoverage * @instance */ - UpdateTestCaseRequest.prototype.updateMask = null; + TransitionCoverage.prototype.coverageScore = 0; /** - * Creates a new UpdateTestCaseRequest instance using the specified properties. + * Creates a new TransitionCoverage instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest + * @memberof google.cloud.dialogflow.cx.v3.TransitionCoverage * @static - * @param {google.cloud.dialogflow.cx.v3.IUpdateTestCaseRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest} UpdateTestCaseRequest instance + * @param {google.cloud.dialogflow.cx.v3.ITransitionCoverage=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.TransitionCoverage} TransitionCoverage instance */ - UpdateTestCaseRequest.create = function create(properties) { - return new UpdateTestCaseRequest(properties); + TransitionCoverage.create = function create(properties) { + return new TransitionCoverage(properties); }; /** - * Encodes the specified UpdateTestCaseRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest.verify|verify} messages. + * Encodes the specified TransitionCoverage message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TransitionCoverage.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest + * @memberof google.cloud.dialogflow.cx.v3.TransitionCoverage * @static - * @param {google.cloud.dialogflow.cx.v3.IUpdateTestCaseRequest} message UpdateTestCaseRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ITransitionCoverage} message TransitionCoverage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateTestCaseRequest.encode = function encode(message, writer) { + TransitionCoverage.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.testCase != null && Object.hasOwnProperty.call(message, "testCase")) - $root.google.cloud.dialogflow.cx.v3.TestCase.encode(message.testCase, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.transitions != null && message.transitions.length) + for (var i = 0; i < message.transitions.length; ++i) + $root.google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition.encode(message.transitions[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 UpdateTestCaseRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest.verify|verify} messages. + * Encodes the specified TransitionCoverage message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TransitionCoverage.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest + * @memberof google.cloud.dialogflow.cx.v3.TransitionCoverage * @static - * @param {google.cloud.dialogflow.cx.v3.IUpdateTestCaseRequest} message UpdateTestCaseRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ITransitionCoverage} message TransitionCoverage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateTestCaseRequest.encodeDelimited = function encodeDelimited(message, writer) { + TransitionCoverage.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateTestCaseRequest message from the specified reader or buffer. + * Decodes a TransitionCoverage message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest + * @memberof google.cloud.dialogflow.cx.v3.TransitionCoverage * @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.UpdateTestCaseRequest} UpdateTestCaseRequest + * @returns {google.cloud.dialogflow.cx.v3.TransitionCoverage} TransitionCoverage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateTestCaseRequest.decode = function decode(reader, length, error) { + TransitionCoverage.decode = function decode(reader, length, error) { 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.UpdateTestCaseRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.TransitionCoverage(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.testCase = $root.google.cloud.dialogflow.cx.v3.TestCase.decode(reader, reader.uint32()); + if (!(message.transitions && message.transitions.length)) + message.transitions = []; + message.transitions.push($root.google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition.decode(reader, reader.uint32())); break; } case 2: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.coverageScore = reader.float(); break; } default: @@ -49326,575 +49069,782 @@ }; /** - * Decodes an UpdateTestCaseRequest message from the specified reader or buffer, length delimited. + * Decodes a TransitionCoverage message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest + * @memberof google.cloud.dialogflow.cx.v3.TransitionCoverage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest} UpdateTestCaseRequest + * @returns {google.cloud.dialogflow.cx.v3.TransitionCoverage} TransitionCoverage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateTestCaseRequest.decodeDelimited = function decodeDelimited(reader) { + TransitionCoverage.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateTestCaseRequest message. + * Verifies a TransitionCoverage message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest + * @memberof google.cloud.dialogflow.cx.v3.TransitionCoverage * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateTestCaseRequest.verify = function verify(message) { + TransitionCoverage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.testCase != null && message.hasOwnProperty("testCase")) { - var error = $root.google.cloud.dialogflow.cx.v3.TestCase.verify(message.testCase); - if (error) - return "testCase." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + 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.TransitionCoverage.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 an UpdateTestCaseRequest message from a plain object. Also converts values to their respective internal types. + * Creates a TransitionCoverage message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest + * @memberof google.cloud.dialogflow.cx.v3.TransitionCoverage * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest} UpdateTestCaseRequest + * @returns {google.cloud.dialogflow.cx.v3.TransitionCoverage} TransitionCoverage */ - UpdateTestCaseRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest) + TransitionCoverage.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.TransitionCoverage) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest(); - if (object.testCase != null) { - if (typeof object.testCase !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest.testCase: object expected"); - message.testCase = $root.google.cloud.dialogflow.cx.v3.TestCase.fromObject(object.testCase); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + var message = new $root.google.cloud.dialogflow.cx.v3.TransitionCoverage(); + if (object.transitions) { + if (!Array.isArray(object.transitions)) + throw TypeError(".google.cloud.dialogflow.cx.v3.TransitionCoverage.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.TransitionCoverage.transitions: object expected"); + message.transitions[i] = $root.google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition.fromObject(object.transitions[i]); + } } + if (object.coverageScore != null) + message.coverageScore = Number(object.coverageScore); return message; }; /** - * Creates a plain object from an UpdateTestCaseRequest message. Also converts values to other types if specified. + * Creates a plain object from a TransitionCoverage message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest + * @memberof google.cloud.dialogflow.cx.v3.TransitionCoverage * @static - * @param {google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest} message UpdateTestCaseRequest + * @param {google.cloud.dialogflow.cx.v3.TransitionCoverage} message TransitionCoverage * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateTestCaseRequest.toObject = function toObject(message, options) { + TransitionCoverage.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.testCase = null; - object.updateMask = null; + if (options.arrays || options.defaults) + object.transitions = []; + if (options.defaults) + object.coverageScore = 0; + 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.TransitionCoverage.Transition.toObject(message.transitions[j], options); } - if (message.testCase != null && message.hasOwnProperty("testCase")) - object.testCase = $root.google.cloud.dialogflow.cx.v3.TestCase.toObject(message.testCase, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.coverageScore != null && message.hasOwnProperty("coverageScore")) + object.coverageScore = options.json && !isFinite(message.coverageScore) ? String(message.coverageScore) : message.coverageScore; return object; }; /** - * Converts this UpdateTestCaseRequest to JSON. + * Converts this TransitionCoverage to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest + * @memberof google.cloud.dialogflow.cx.v3.TransitionCoverage * @instance * @returns {Object.} JSON object */ - UpdateTestCaseRequest.prototype.toJSON = function toJSON() { + TransitionCoverage.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UpdateTestCaseRequest + * Gets the default type url for TransitionCoverage * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest + * @memberof google.cloud.dialogflow.cx.v3.TransitionCoverage * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UpdateTestCaseRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + TransitionCoverage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.TransitionCoverage"; }; - return UpdateTestCaseRequest; - })(); + TransitionCoverage.TransitionNode = (function() { - v3.GetTestCaseRequest = (function() { + /** + * Properties of a TransitionNode. + * @memberof google.cloud.dialogflow.cx.v3.TransitionCoverage + * @interface ITransitionNode + * @property {google.cloud.dialogflow.cx.v3.IPage|null} [page] TransitionNode page + * @property {google.cloud.dialogflow.cx.v3.IFlow|null} [flow] TransitionNode flow + */ - /** - * Properties of a GetTestCaseRequest. - * @memberof google.cloud.dialogflow.cx.v3 - * @interface IGetTestCaseRequest - * @property {string|null} [name] GetTestCaseRequest name - */ + /** + * Constructs a new TransitionNode. + * @memberof google.cloud.dialogflow.cx.v3.TransitionCoverage + * @classdesc Represents a TransitionNode. + * @implements ITransitionNode + * @constructor + * @param {google.cloud.dialogflow.cx.v3.TransitionCoverage.ITransitionNode=} [properties] Properties to set + */ + function TransitionNode(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]]; + } - /** - * Constructs a new GetTestCaseRequest. - * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a GetTestCaseRequest. - * @implements IGetTestCaseRequest - * @constructor - * @param {google.cloud.dialogflow.cx.v3.IGetTestCaseRequest=} [properties] Properties to set - */ - function GetTestCaseRequest(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]]; - } + /** + * TransitionNode page. + * @member {google.cloud.dialogflow.cx.v3.IPage|null|undefined} page + * @memberof google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode + * @instance + */ + TransitionNode.prototype.page = null; - /** - * GetTestCaseRequest name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.GetTestCaseRequest - * @instance - */ - GetTestCaseRequest.prototype.name = ""; + /** + * TransitionNode flow. + * @member {google.cloud.dialogflow.cx.v3.IFlow|null|undefined} flow + * @memberof google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode + * @instance + */ + TransitionNode.prototype.flow = null; - /** - * Creates a new GetTestCaseRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.GetTestCaseRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.IGetTestCaseRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.GetTestCaseRequest} GetTestCaseRequest instance - */ - GetTestCaseRequest.create = function create(properties) { - return new GetTestCaseRequest(properties); - }; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * Encodes the specified GetTestCaseRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetTestCaseRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.GetTestCaseRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.IGetTestCaseRequest} message GetTestCaseRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetTestCaseRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; + /** + * TransitionNode kind. + * @member {"page"|"flow"|undefined} kind + * @memberof google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode + * @instance + */ + Object.defineProperty(TransitionNode.prototype, "kind", { + get: $util.oneOfGetter($oneOfFields = ["page", "flow"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Encodes the specified GetTestCaseRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetTestCaseRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.GetTestCaseRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.IGetTestCaseRequest} message GetTestCaseRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetTestCaseRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a new TransitionNode instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode + * @static + * @param {google.cloud.dialogflow.cx.v3.TransitionCoverage.ITransitionNode=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode} TransitionNode instance + */ + TransitionNode.create = function create(properties) { + return new TransitionNode(properties); + }; - /** - * Decodes a GetTestCaseRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.GetTestCaseRequest - * @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.GetTestCaseRequest} GetTestCaseRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetTestCaseRequest.decode = function decode(reader, length, error) { - 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.GetTestCaseRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Encodes the specified TransitionNode message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode + * @static + * @param {google.cloud.dialogflow.cx.v3.TransitionCoverage.ITransitionNode} message TransitionNode message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TransitionNode.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.page != null && Object.hasOwnProperty.call(message, "page")) + $root.google.cloud.dialogflow.cx.v3.Page.encode(message.page, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.flow != null && Object.hasOwnProperty.call(message, "flow")) + $root.google.cloud.dialogflow.cx.v3.Flow.encode(message.flow, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; - /** - * Decodes a GetTestCaseRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.GetTestCaseRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.GetTestCaseRequest} GetTestCaseRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetTestCaseRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetTestCaseRequest message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.GetTestCaseRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetTestCaseRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; + /** + * Encodes the specified TransitionNode message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode + * @static + * @param {google.cloud.dialogflow.cx.v3.TransitionCoverage.ITransitionNode} message TransitionNode message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TransitionNode.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates a GetTestCaseRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.GetTestCaseRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.GetTestCaseRequest} GetTestCaseRequest - */ - GetTestCaseRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.GetTestCaseRequest) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.GetTestCaseRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; + /** + * Decodes a TransitionNode message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode + * @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.TransitionCoverage.TransitionNode} TransitionNode + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TransitionNode.decode = function decode(reader, length, error) { + 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.TransitionCoverage.TransitionNode(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.page = $root.google.cloud.dialogflow.cx.v3.Page.decode(reader, reader.uint32()); + break; + } + case 2: { + message.flow = $root.google.cloud.dialogflow.cx.v3.Flow.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Creates a plain object from a GetTestCaseRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.GetTestCaseRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.GetTestCaseRequest} message GetTestCaseRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetTestCaseRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; + /** + * Decodes a TransitionNode message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode} TransitionNode + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TransitionNode.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Converts this GetTestCaseRequest to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.GetTestCaseRequest - * @instance - * @returns {Object.} JSON object - */ - GetTestCaseRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Verifies a TransitionNode message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TransitionNode.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.page != null && message.hasOwnProperty("page")) { + properties.kind = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3.Page.verify(message.page); + if (error) + return "page." + error; + } + } + if (message.flow != null && message.hasOwnProperty("flow")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3.Flow.verify(message.flow); + if (error) + return "flow." + error; + } + } + return null; + }; - /** - * Gets the default type url for GetTestCaseRequest - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.GetTestCaseRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetTestCaseRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.GetTestCaseRequest"; - }; + /** + * Creates a TransitionNode message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode} TransitionNode + */ + TransitionNode.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode(); + if (object.page != null) { + if (typeof object.page !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode.page: object expected"); + message.page = $root.google.cloud.dialogflow.cx.v3.Page.fromObject(object.page); + } + if (object.flow != null) { + if (typeof object.flow !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode.flow: object expected"); + message.flow = $root.google.cloud.dialogflow.cx.v3.Flow.fromObject(object.flow); + } + return message; + }; - return GetTestCaseRequest; - })(); + /** + * Creates a plain object from a TransitionNode message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode + * @static + * @param {google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode} message TransitionNode + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TransitionNode.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.page != null && message.hasOwnProperty("page")) { + object.page = $root.google.cloud.dialogflow.cx.v3.Page.toObject(message.page, options); + if (options.oneofs) + object.kind = "page"; + } + if (message.flow != null && message.hasOwnProperty("flow")) { + object.flow = $root.google.cloud.dialogflow.cx.v3.Flow.toObject(message.flow, options); + if (options.oneofs) + object.kind = "flow"; + } + return object; + }; - v3.RunTestCaseRequest = (function() { + /** + * Converts this TransitionNode to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode + * @instance + * @returns {Object.} JSON object + */ + TransitionNode.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Properties of a RunTestCaseRequest. - * @memberof google.cloud.dialogflow.cx.v3 - * @interface IRunTestCaseRequest - * @property {string|null} [name] RunTestCaseRequest name - * @property {string|null} [environment] RunTestCaseRequest environment - */ + /** + * Gets the default type url for TransitionNode + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TransitionNode.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode"; + }; - /** - * Constructs a new RunTestCaseRequest. - * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a RunTestCaseRequest. - * @implements IRunTestCaseRequest - * @constructor - * @param {google.cloud.dialogflow.cx.v3.IRunTestCaseRequest=} [properties] Properties to set - */ - function RunTestCaseRequest(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]]; - } + return TransitionNode; + })(); - /** - * RunTestCaseRequest name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.RunTestCaseRequest - * @instance - */ - RunTestCaseRequest.prototype.name = ""; + TransitionCoverage.Transition = (function() { - /** - * RunTestCaseRequest environment. - * @member {string} environment - * @memberof google.cloud.dialogflow.cx.v3.RunTestCaseRequest - * @instance - */ - RunTestCaseRequest.prototype.environment = ""; + /** + * Properties of a Transition. + * @memberof google.cloud.dialogflow.cx.v3.TransitionCoverage + * @interface ITransition + * @property {google.cloud.dialogflow.cx.v3.TransitionCoverage.ITransitionNode|null} [source] Transition source + * @property {number|null} [index] Transition index + * @property {google.cloud.dialogflow.cx.v3.TransitionCoverage.ITransitionNode|null} [target] Transition target + * @property {boolean|null} [covered] Transition covered + * @property {google.cloud.dialogflow.cx.v3.ITransitionRoute|null} [transitionRoute] Transition transitionRoute + * @property {google.cloud.dialogflow.cx.v3.IEventHandler|null} [eventHandler] Transition eventHandler + */ - /** - * Creates a new RunTestCaseRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.RunTestCaseRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.IRunTestCaseRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.RunTestCaseRequest} RunTestCaseRequest instance - */ - RunTestCaseRequest.create = function create(properties) { - return new RunTestCaseRequest(properties); - }; + /** + * Constructs a new Transition. + * @memberof google.cloud.dialogflow.cx.v3.TransitionCoverage + * @classdesc Represents a Transition. + * @implements ITransition + * @constructor + * @param {google.cloud.dialogflow.cx.v3.TransitionCoverage.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]]; + } - /** - * Encodes the specified RunTestCaseRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.RunTestCaseRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.RunTestCaseRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.IRunTestCaseRequest} message RunTestCaseRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RunTestCaseRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.environment); - return writer; - }; + /** + * Transition source. + * @member {google.cloud.dialogflow.cx.v3.TransitionCoverage.ITransitionNode|null|undefined} source + * @memberof google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition + * @instance + */ + Transition.prototype.source = null; - /** - * Encodes the specified RunTestCaseRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.RunTestCaseRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.RunTestCaseRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.IRunTestCaseRequest} message RunTestCaseRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RunTestCaseRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Transition index. + * @member {number} index + * @memberof google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition + * @instance + */ + Transition.prototype.index = 0; - /** - * Decodes a RunTestCaseRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.RunTestCaseRequest - * @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.RunTestCaseRequest} RunTestCaseRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RunTestCaseRequest.decode = function decode(reader, length, error) { - 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.RunTestCaseRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.environment = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Transition target. + * @member {google.cloud.dialogflow.cx.v3.TransitionCoverage.ITransitionNode|null|undefined} target + * @memberof google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition + * @instance + */ + Transition.prototype.target = null; - /** - * Decodes a RunTestCaseRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.RunTestCaseRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.RunTestCaseRequest} RunTestCaseRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RunTestCaseRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Transition covered. + * @member {boolean} covered + * @memberof google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition + * @instance + */ + Transition.prototype.covered = false; - /** - * Verifies a RunTestCaseRequest message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.RunTestCaseRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RunTestCaseRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.environment != null && message.hasOwnProperty("environment")) - if (!$util.isString(message.environment)) - return "environment: string expected"; - return null; - }; + /** + * Transition transitionRoute. + * @member {google.cloud.dialogflow.cx.v3.ITransitionRoute|null|undefined} transitionRoute + * @memberof google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition + * @instance + */ + Transition.prototype.transitionRoute = null; - /** - * Creates a RunTestCaseRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.RunTestCaseRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.RunTestCaseRequest} RunTestCaseRequest - */ - RunTestCaseRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.RunTestCaseRequest) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.RunTestCaseRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.environment != null) - message.environment = String(object.environment); - return message; - }; + /** + * Transition eventHandler. + * @member {google.cloud.dialogflow.cx.v3.IEventHandler|null|undefined} eventHandler + * @memberof google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition + * @instance + */ + Transition.prototype.eventHandler = null; - /** - * Creates a plain object from a RunTestCaseRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.RunTestCaseRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.RunTestCaseRequest} message RunTestCaseRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RunTestCaseRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.environment = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.environment != null && message.hasOwnProperty("environment")) - object.environment = message.environment; - return object; - }; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * Converts this RunTestCaseRequest to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.RunTestCaseRequest - * @instance - * @returns {Object.} JSON object - */ - RunTestCaseRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Transition detail. + * @member {"transitionRoute"|"eventHandler"|undefined} detail + * @memberof google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition + * @instance + */ + Object.defineProperty(Transition.prototype, "detail", { + get: $util.oneOfGetter($oneOfFields = ["transitionRoute", "eventHandler"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Gets the default type url for RunTestCaseRequest - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.RunTestCaseRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RunTestCaseRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.RunTestCaseRequest"; - }; + /** + * Creates a new Transition instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition + * @static + * @param {google.cloud.dialogflow.cx.v3.TransitionCoverage.ITransition=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition} Transition instance + */ + Transition.create = function create(properties) { + return new Transition(properties); + }; - return RunTestCaseRequest; + /** + * Encodes the specified Transition message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition + * @static + * @param {google.cloud.dialogflow.cx.v3.TransitionCoverage.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.source != null && Object.hasOwnProperty.call(message, "source")) + $root.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode.encode(message.source, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + $root.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode.encode(message.target, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.covered != null && Object.hasOwnProperty.call(message, "covered")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.covered); + if (message.index != null && Object.hasOwnProperty.call(message, "index")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.index); + if (message.transitionRoute != null && Object.hasOwnProperty.call(message, "transitionRoute")) + $root.google.cloud.dialogflow.cx.v3.TransitionRoute.encode(message.transitionRoute, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.eventHandler != null && Object.hasOwnProperty.call(message, "eventHandler")) + $root.google.cloud.dialogflow.cx.v3.EventHandler.encode(message.eventHandler, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Transition message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition + * @static + * @param {google.cloud.dialogflow.cx.v3.TransitionCoverage.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.TransitionCoverage.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.TransitionCoverage.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, error) { + 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.TransitionCoverage.Transition(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.source = $root.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode.decode(reader, reader.uint32()); + break; + } + case 4: { + message.index = reader.int32(); + break; + } + case 2: { + message.target = $root.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode.decode(reader, reader.uint32()); + break; + } + case 3: { + message.covered = reader.bool(); + break; + } + case 5: { + message.transitionRoute = $root.google.cloud.dialogflow.cx.v3.TransitionRoute.decode(reader, reader.uint32()); + break; + } + case 6: { + message.eventHandler = $root.google.cloud.dialogflow.cx.v3.EventHandler.decode(reader, reader.uint32()); + 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.TransitionCoverage.Transition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.TransitionCoverage.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.TransitionCoverage.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"; + var properties = {}; + if (message.source != null && message.hasOwnProperty("source")) { + var error = $root.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode.verify(message.source); + if (error) + return "source." + error; + } + if (message.index != null && message.hasOwnProperty("index")) + if (!$util.isInteger(message.index)) + return "index: integer expected"; + if (message.target != null && message.hasOwnProperty("target")) { + var error = $root.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode.verify(message.target); + if (error) + return "target." + error; + } + if (message.covered != null && message.hasOwnProperty("covered")) + if (typeof message.covered !== "boolean") + return "covered: boolean expected"; + if (message.transitionRoute != null && message.hasOwnProperty("transitionRoute")) { + properties.detail = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3.TransitionRoute.verify(message.transitionRoute); + if (error) + return "transitionRoute." + error; + } + } + if (message.eventHandler != null && message.hasOwnProperty("eventHandler")) { + if (properties.detail === 1) + return "detail: multiple values"; + properties.detail = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3.EventHandler.verify(message.eventHandler); + if (error) + return "eventHandler." + error; + } + } + 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.TransitionCoverage.Transition + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition} Transition + */ + Transition.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition(); + if (object.source != null) { + if (typeof object.source !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition.source: object expected"); + message.source = $root.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode.fromObject(object.source); + } + if (object.index != null) + message.index = object.index | 0; + if (object.target != null) { + if (typeof object.target !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition.target: object expected"); + message.target = $root.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode.fromObject(object.target); + } + if (object.covered != null) + message.covered = Boolean(object.covered); + if (object.transitionRoute != null) { + if (typeof object.transitionRoute !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition.transitionRoute: object expected"); + message.transitionRoute = $root.google.cloud.dialogflow.cx.v3.TransitionRoute.fromObject(object.transitionRoute); + } + if (object.eventHandler != null) { + if (typeof object.eventHandler !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition.eventHandler: object expected"); + message.eventHandler = $root.google.cloud.dialogflow.cx.v3.EventHandler.fromObject(object.eventHandler); + } + 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.TransitionCoverage.Transition + * @static + * @param {google.cloud.dialogflow.cx.v3.TransitionCoverage.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.source = null; + object.target = null; + object.covered = false; + object.index = 0; + } + if (message.source != null && message.hasOwnProperty("source")) + object.source = $root.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode.toObject(message.source, options); + if (message.target != null && message.hasOwnProperty("target")) + object.target = $root.google.cloud.dialogflow.cx.v3.TransitionCoverage.TransitionNode.toObject(message.target, options); + if (message.covered != null && message.hasOwnProperty("covered")) + object.covered = message.covered; + if (message.index != null && message.hasOwnProperty("index")) + object.index = message.index; + if (message.transitionRoute != null && message.hasOwnProperty("transitionRoute")) { + object.transitionRoute = $root.google.cloud.dialogflow.cx.v3.TransitionRoute.toObject(message.transitionRoute, options); + if (options.oneofs) + object.detail = "transitionRoute"; + } + if (message.eventHandler != null && message.hasOwnProperty("eventHandler")) { + object.eventHandler = $root.google.cloud.dialogflow.cx.v3.EventHandler.toObject(message.eventHandler, options); + if (options.oneofs) + object.detail = "eventHandler"; + } + return object; + }; + + /** + * Converts this Transition to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition + * @instance + * @returns {Object.} JSON object + */ + Transition.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Transition + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Transition.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.TransitionCoverage.Transition"; + }; + + return Transition; + })(); + + return TransitionCoverage; })(); - v3.RunTestCaseResponse = (function() { + v3.TransitionRouteGroupCoverage = (function() { /** - * Properties of a RunTestCaseResponse. + * Properties of a TransitionRouteGroupCoverage. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IRunTestCaseResponse - * @property {google.cloud.dialogflow.cx.v3.ITestCaseResult|null} [result] RunTestCaseResponse result + * @interface ITransitionRouteGroupCoverage + * @property {Array.|null} [coverages] TransitionRouteGroupCoverage coverages + * @property {number|null} [coverageScore] TransitionRouteGroupCoverage coverageScore */ /** - * Constructs a new RunTestCaseResponse. + * Constructs a new TransitionRouteGroupCoverage. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a RunTestCaseResponse. - * @implements IRunTestCaseResponse + * @classdesc Represents a TransitionRouteGroupCoverage. + * @implements ITransitionRouteGroupCoverage * @constructor - * @param {google.cloud.dialogflow.cx.v3.IRunTestCaseResponse=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.ITransitionRouteGroupCoverage=} [properties] Properties to set */ - function RunTestCaseResponse(properties) { + function TransitionRouteGroupCoverage(properties) { + this.coverages = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -49902,77 +49852,94 @@ } /** - * RunTestCaseResponse result. - * @member {google.cloud.dialogflow.cx.v3.ITestCaseResult|null|undefined} result - * @memberof google.cloud.dialogflow.cx.v3.RunTestCaseResponse + * TransitionRouteGroupCoverage coverages. + * @member {Array.} coverages + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage * @instance */ - RunTestCaseResponse.prototype.result = null; + TransitionRouteGroupCoverage.prototype.coverages = $util.emptyArray; /** - * Creates a new RunTestCaseResponse instance using the specified properties. + * 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.RunTestCaseResponse + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage * @static - * @param {google.cloud.dialogflow.cx.v3.IRunTestCaseResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.RunTestCaseResponse} RunTestCaseResponse instance + * @param {google.cloud.dialogflow.cx.v3.ITransitionRouteGroupCoverage=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage} TransitionRouteGroupCoverage instance */ - RunTestCaseResponse.create = function create(properties) { - return new RunTestCaseResponse(properties); + TransitionRouteGroupCoverage.create = function create(properties) { + return new TransitionRouteGroupCoverage(properties); }; /** - * Encodes the specified RunTestCaseResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.RunTestCaseResponse.verify|verify} messages. + * 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.RunTestCaseResponse + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage * @static - * @param {google.cloud.dialogflow.cx.v3.IRunTestCaseResponse} message RunTestCaseResponse message or plain object to encode + * @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 */ - RunTestCaseResponse.encode = function encode(message, writer) { + TransitionRouteGroupCoverage.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.result != null && Object.hasOwnProperty.call(message, "result")) - $root.google.cloud.dialogflow.cx.v3.TestCaseResult.encode(message.result, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + 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 RunTestCaseResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.RunTestCaseResponse.verify|verify} messages. + * 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.RunTestCaseResponse + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage * @static - * @param {google.cloud.dialogflow.cx.v3.IRunTestCaseResponse} message RunTestCaseResponse message or plain object to encode + * @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 */ - RunTestCaseResponse.encodeDelimited = function encodeDelimited(message, writer) { + TransitionRouteGroupCoverage.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RunTestCaseResponse message from the specified reader or buffer. + * Decodes a TransitionRouteGroupCoverage message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.RunTestCaseResponse + * @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.RunTestCaseResponse} RunTestCaseResponse + * @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 */ - RunTestCaseResponse.decode = function decode(reader, length, error) { + TransitionRouteGroupCoverage.decode = function decode(reader, length, error) { 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.RunTestCaseResponse(); + 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(); if (tag === error) break; 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.result = $root.google.cloud.dialogflow.cx.v3.TestCaseResult.decode(reader, reader.uint32()); + message.coverageScore = reader.float(); break; } default: @@ -49984,574 +49951,663 @@ }; /** - * Decodes a RunTestCaseResponse message from the specified reader or buffer, length delimited. + * Decodes a TransitionRouteGroupCoverage message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.RunTestCaseResponse + * @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.RunTestCaseResponse} RunTestCaseResponse + * @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 */ - RunTestCaseResponse.decodeDelimited = function decodeDelimited(reader) { + TransitionRouteGroupCoverage.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RunTestCaseResponse message. + * Verifies a TransitionRouteGroupCoverage message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.RunTestCaseResponse + * @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 */ - RunTestCaseResponse.verify = function verify(message) { + TransitionRouteGroupCoverage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.result != null && message.hasOwnProperty("result")) { - var error = $root.google.cloud.dialogflow.cx.v3.TestCaseResult.verify(message.result); - if (error) - return "result." + error; + 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 RunTestCaseResponse message from a plain object. Also converts values to their respective internal types. + * Creates a TransitionRouteGroupCoverage message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.RunTestCaseResponse + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.RunTestCaseResponse} RunTestCaseResponse + * @returns {google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage} TransitionRouteGroupCoverage */ - RunTestCaseResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.RunTestCaseResponse) + 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.RunTestCaseResponse(); - if (object.result != null) { - if (typeof object.result !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.RunTestCaseResponse.result: object expected"); - message.result = $root.google.cloud.dialogflow.cx.v3.TestCaseResult.fromObject(object.result); + 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 RunTestCaseResponse message. Also converts values to other types if specified. + * Creates a plain object from a TransitionRouteGroupCoverage message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.RunTestCaseResponse + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage * @static - * @param {google.cloud.dialogflow.cx.v3.RunTestCaseResponse} message RunTestCaseResponse + * @param {google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage} message TransitionRouteGroupCoverage * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RunTestCaseResponse.toObject = function toObject(message, options) { + TransitionRouteGroupCoverage.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.coverages = []; if (options.defaults) - object.result = null; - if (message.result != null && message.hasOwnProperty("result")) - object.result = $root.google.cloud.dialogflow.cx.v3.TestCaseResult.toObject(message.result, options); + 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 RunTestCaseResponse to JSON. + * Converts this TransitionRouteGroupCoverage to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.RunTestCaseResponse + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage * @instance * @returns {Object.} JSON object */ - RunTestCaseResponse.prototype.toJSON = function toJSON() { + TransitionRouteGroupCoverage.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for RunTestCaseResponse + * Gets the default type url for TransitionRouteGroupCoverage * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.RunTestCaseResponse + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - RunTestCaseResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + TransitionRouteGroupCoverage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.RunTestCaseResponse"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage"; }; - return RunTestCaseResponse; - })(); - - v3.RunTestCaseMetadata = (function() { + TransitionRouteGroupCoverage.Coverage = (function() { - /** - * Properties of a RunTestCaseMetadata. - * @memberof google.cloud.dialogflow.cx.v3 - * @interface IRunTestCaseMetadata - */ + /** + * 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 RunTestCaseMetadata. - * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a RunTestCaseMetadata. - * @implements IRunTestCaseMetadata - * @constructor - * @param {google.cloud.dialogflow.cx.v3.IRunTestCaseMetadata=} [properties] Properties to set - */ - function RunTestCaseMetadata(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]]; - } - - /** - * Creates a new RunTestCaseMetadata instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.RunTestCaseMetadata - * @static - * @param {google.cloud.dialogflow.cx.v3.IRunTestCaseMetadata=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.RunTestCaseMetadata} RunTestCaseMetadata instance - */ - RunTestCaseMetadata.create = function create(properties) { - return new RunTestCaseMetadata(properties); - }; + /** + * 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]]; + } - /** - * Encodes the specified RunTestCaseMetadata message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.RunTestCaseMetadata.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.RunTestCaseMetadata - * @static - * @param {google.cloud.dialogflow.cx.v3.IRunTestCaseMetadata} message RunTestCaseMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RunTestCaseMetadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; + /** + * 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; - /** - * Encodes the specified RunTestCaseMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.RunTestCaseMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.RunTestCaseMetadata - * @static - * @param {google.cloud.dialogflow.cx.v3.IRunTestCaseMetadata} message RunTestCaseMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RunTestCaseMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Coverage transitions. + * @member {Array.} transitions + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage + * @instance + */ + Coverage.prototype.transitions = $util.emptyArray; - /** - * Decodes a RunTestCaseMetadata message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.RunTestCaseMetadata - * @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.RunTestCaseMetadata} RunTestCaseMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RunTestCaseMetadata.decode = function decode(reader, length, error) { - 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.RunTestCaseMetadata(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Coverage coverageScore. + * @member {number} coverageScore + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage + * @instance + */ + Coverage.prototype.coverageScore = 0; - /** - * Decodes a RunTestCaseMetadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.RunTestCaseMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.RunTestCaseMetadata} RunTestCaseMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RunTestCaseMetadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * 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); + }; - /** - * Verifies a RunTestCaseMetadata message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.RunTestCaseMetadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RunTestCaseMetadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; + /** + * 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; + }; - /** - * Creates a RunTestCaseMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.RunTestCaseMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.RunTestCaseMetadata} RunTestCaseMetadata - */ - RunTestCaseMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.RunTestCaseMetadata) - return object; - return new $root.google.cloud.dialogflow.cx.v3.RunTestCaseMetadata(); - }; + /** + * 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(); + }; - /** - * Creates a plain object from a RunTestCaseMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.RunTestCaseMetadata - * @static - * @param {google.cloud.dialogflow.cx.v3.RunTestCaseMetadata} message RunTestCaseMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RunTestCaseMetadata.toObject = function toObject() { - return {}; - }; + /** + * 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, error) { + 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(); + if (tag === error) + break; + 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; + }; - /** - * Converts this RunTestCaseMetadata to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.RunTestCaseMetadata - * @instance - * @returns {Object.} JSON object - */ - RunTestCaseMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * 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()); + }; - /** - * Gets the default type url for RunTestCaseMetadata - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.RunTestCaseMetadata - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RunTestCaseMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.RunTestCaseMetadata"; - }; + /** + * 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; + }; - return RunTestCaseMetadata; - })(); + /** + * 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; + }; - v3.BatchRunTestCasesRequest = (function() { + /** + * 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; + }; - /** - * Properties of a BatchRunTestCasesRequest. - * @memberof google.cloud.dialogflow.cx.v3 - * @interface IBatchRunTestCasesRequest - * @property {string|null} [parent] BatchRunTestCasesRequest parent - * @property {string|null} [environment] BatchRunTestCasesRequest environment - * @property {Array.|null} [testCases] BatchRunTestCasesRequest testCases - */ + /** + * 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); + }; - /** - * Constructs a new BatchRunTestCasesRequest. - * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a BatchRunTestCasesRequest. - * @implements IBatchRunTestCasesRequest - * @constructor - * @param {google.cloud.dialogflow.cx.v3.IBatchRunTestCasesRequest=} [properties] Properties to set - */ - function BatchRunTestCasesRequest(properties) { - this.testCases = []; - 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]]; - } + /** + * Gets the default type url for Coverage + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Coverage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage"; + }; - /** - * BatchRunTestCasesRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest - * @instance - */ - BatchRunTestCasesRequest.prototype.parent = ""; + Coverage.Transition = (function() { - /** - * BatchRunTestCasesRequest environment. - * @member {string} environment - * @memberof google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest - * @instance - */ - BatchRunTestCasesRequest.prototype.environment = ""; + /** + * 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 + */ - /** - * BatchRunTestCasesRequest testCases. - * @member {Array.} testCases - * @memberof google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest - * @instance - */ - BatchRunTestCasesRequest.prototype.testCases = $util.emptyArray; + /** + * 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]]; + } - /** - * Creates a new BatchRunTestCasesRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.IBatchRunTestCasesRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest} BatchRunTestCasesRequest instance - */ - BatchRunTestCasesRequest.create = function create(properties) { - return new BatchRunTestCasesRequest(properties); - }; + /** + * 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; - /** - * Encodes the specified BatchRunTestCasesRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.IBatchRunTestCasesRequest} message BatchRunTestCasesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BatchRunTestCasesRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.environment); - if (message.testCases != null && message.testCases.length) - for (var i = 0; i < message.testCases.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.testCases[i]); - return writer; - }; + /** + * Transition covered. + * @member {boolean} covered + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition + * @instance + */ + Transition.prototype.covered = false; - /** - * Encodes the specified BatchRunTestCasesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.IBatchRunTestCasesRequest} message BatchRunTestCasesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BatchRunTestCasesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * 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); + }; - /** - * Decodes a BatchRunTestCasesRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest - * @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.BatchRunTestCasesRequest} BatchRunTestCasesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BatchRunTestCasesRequest.decode = function decode(reader, length, error) { - 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.BatchRunTestCasesRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.environment = reader.string(); - break; + /** + * 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, error) { + 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(); + if (tag === error) + break; + 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; + } } - case 3: { - if (!(message.testCases && message.testCases.length)) - message.testCases = []; - message.testCases.push(reader.string()); - 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; } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + if (message.covered != null && message.hasOwnProperty("covered")) + if (typeof message.covered !== "boolean") + return "covered: boolean expected"; + return null; + }; - /** - * Decodes a BatchRunTestCasesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest} BatchRunTestCasesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BatchRunTestCasesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * 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; + }; - /** - * Verifies a BatchRunTestCasesRequest message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BatchRunTestCasesRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.environment != null && message.hasOwnProperty("environment")) - if (!$util.isString(message.environment)) - return "environment: string expected"; - if (message.testCases != null && message.hasOwnProperty("testCases")) { - if (!Array.isArray(message.testCases)) - return "testCases: array expected"; - for (var i = 0; i < message.testCases.length; ++i) - if (!$util.isString(message.testCases[i])) - return "testCases: string[] expected"; - } - return null; - }; + /** + * 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; + }; - /** - * Creates a BatchRunTestCasesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest} BatchRunTestCasesRequest - */ - BatchRunTestCasesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.environment != null) - message.environment = String(object.environment); - if (object.testCases) { - if (!Array.isArray(object.testCases)) - throw TypeError(".google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest.testCases: array expected"); - message.testCases = []; - for (var i = 0; i < object.testCases.length; ++i) - message.testCases[i] = String(object.testCases[i]); - } - return message; - }; + /** + * 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); + }; - /** - * Creates a plain object from a BatchRunTestCasesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest} message BatchRunTestCasesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BatchRunTestCasesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.testCases = []; - if (options.defaults) { - object.parent = ""; - object.environment = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.environment != null && message.hasOwnProperty("environment")) - object.environment = message.environment; - if (message.testCases && message.testCases.length) { - object.testCases = []; - for (var j = 0; j < message.testCases.length; ++j) - object.testCases[j] = message.testCases[j]; - } - return object; - }; + /** + * Gets the default type url for Transition + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Transition.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.TransitionRouteGroupCoverage.Coverage.Transition"; + }; - /** - * Converts this BatchRunTestCasesRequest to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest - * @instance - * @returns {Object.} JSON object - */ - BatchRunTestCasesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + return Transition; + })(); - /** - * Gets the default type url for BatchRunTestCasesRequest - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BatchRunTestCasesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest"; - }; + return Coverage; + })(); - return BatchRunTestCasesRequest; + return TransitionRouteGroupCoverage; })(); - v3.BatchRunTestCasesResponse = (function() { + v3.IntentCoverage = (function() { /** - * Properties of a BatchRunTestCasesResponse. + * Properties of an IntentCoverage. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IBatchRunTestCasesResponse - * @property {Array.|null} [results] BatchRunTestCasesResponse results + * @interface IIntentCoverage + * @property {Array.|null} [intents] IntentCoverage intents + * @property {number|null} [coverageScore] IntentCoverage coverageScore */ /** - * Constructs a new BatchRunTestCasesResponse. + * Constructs a new IntentCoverage. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a BatchRunTestCasesResponse. - * @implements IBatchRunTestCasesResponse + * @classdesc Represents an IntentCoverage. + * @implements IIntentCoverage * @constructor - * @param {google.cloud.dialogflow.cx.v3.IBatchRunTestCasesResponse=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IIntentCoverage=} [properties] Properties to set */ - function BatchRunTestCasesResponse(properties) { - this.results = []; + function IntentCoverage(properties) { + this.intents = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -50559,80 +50615,94 @@ } /** - * BatchRunTestCasesResponse results. - * @member {Array.} results - * @memberof google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse + * IntentCoverage intents. + * @member {Array.} intents + * @memberof google.cloud.dialogflow.cx.v3.IntentCoverage * @instance */ - BatchRunTestCasesResponse.prototype.results = $util.emptyArray; + IntentCoverage.prototype.intents = $util.emptyArray; /** - * Creates a new BatchRunTestCasesResponse instance using the specified properties. + * IntentCoverage coverageScore. + * @member {number} coverageScore + * @memberof google.cloud.dialogflow.cx.v3.IntentCoverage + * @instance + */ + IntentCoverage.prototype.coverageScore = 0; + + /** + * Creates a new IntentCoverage instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse + * @memberof google.cloud.dialogflow.cx.v3.IntentCoverage * @static - * @param {google.cloud.dialogflow.cx.v3.IBatchRunTestCasesResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse} BatchRunTestCasesResponse instance + * @param {google.cloud.dialogflow.cx.v3.IIntentCoverage=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.IntentCoverage} IntentCoverage instance */ - BatchRunTestCasesResponse.create = function create(properties) { - return new BatchRunTestCasesResponse(properties); + IntentCoverage.create = function create(properties) { + return new IntentCoverage(properties); }; /** - * Encodes the specified BatchRunTestCasesResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse.verify|verify} messages. + * Encodes the specified IntentCoverage message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.IntentCoverage.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse + * @memberof google.cloud.dialogflow.cx.v3.IntentCoverage * @static - * @param {google.cloud.dialogflow.cx.v3.IBatchRunTestCasesResponse} message BatchRunTestCasesResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IIntentCoverage} message IntentCoverage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BatchRunTestCasesResponse.encode = function encode(message, writer) { + IntentCoverage.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.results != null && message.results.length) - for (var i = 0; i < message.results.length; ++i) - $root.google.cloud.dialogflow.cx.v3.TestCaseResult.encode(message.results[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.intents != null && message.intents.length) + for (var i = 0; i < message.intents.length; ++i) + $root.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent.encode(message.intents[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 BatchRunTestCasesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse.verify|verify} messages. + * Encodes the specified IntentCoverage message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.IntentCoverage.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse + * @memberof google.cloud.dialogflow.cx.v3.IntentCoverage * @static - * @param {google.cloud.dialogflow.cx.v3.IBatchRunTestCasesResponse} message BatchRunTestCasesResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IIntentCoverage} message IntentCoverage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BatchRunTestCasesResponse.encodeDelimited = function encodeDelimited(message, writer) { + IntentCoverage.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BatchRunTestCasesResponse message from the specified reader or buffer. + * Decodes an IntentCoverage message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse + * @memberof google.cloud.dialogflow.cx.v3.IntentCoverage * @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.BatchRunTestCasesResponse} BatchRunTestCasesResponse + * @returns {google.cloud.dialogflow.cx.v3.IntentCoverage} IntentCoverage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BatchRunTestCasesResponse.decode = function decode(reader, length, error) { + IntentCoverage.decode = function decode(reader, length, error) { 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.BatchRunTestCasesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.IntentCoverage(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - if (!(message.results && message.results.length)) - message.results = []; - message.results.push($root.google.cloud.dialogflow.cx.v3.TestCaseResult.decode(reader, reader.uint32())); + if (!(message.intents && message.intents.length)) + message.intents = []; + message.intents.push($root.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent.decode(reader, reader.uint32())); + break; + } + case 2: { + message.coverageScore = reader.float(); break; } default: @@ -50644,140 +50714,378 @@ }; /** - * Decodes a BatchRunTestCasesResponse message from the specified reader or buffer, length delimited. + * Decodes an IntentCoverage message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse + * @memberof google.cloud.dialogflow.cx.v3.IntentCoverage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse} BatchRunTestCasesResponse + * @returns {google.cloud.dialogflow.cx.v3.IntentCoverage} IntentCoverage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BatchRunTestCasesResponse.decodeDelimited = function decodeDelimited(reader) { + IntentCoverage.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BatchRunTestCasesResponse message. + * Verifies an IntentCoverage message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse + * @memberof google.cloud.dialogflow.cx.v3.IntentCoverage * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BatchRunTestCasesResponse.verify = function verify(message) { + IntentCoverage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.results != null && message.hasOwnProperty("results")) { - if (!Array.isArray(message.results)) - return "results: array expected"; - for (var i = 0; i < message.results.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.TestCaseResult.verify(message.results[i]); + if (message.intents != null && message.hasOwnProperty("intents")) { + if (!Array.isArray(message.intents)) + return "intents: array expected"; + for (var i = 0; i < message.intents.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent.verify(message.intents[i]); if (error) - return "results." + error; + return "intents." + error; } } + if (message.coverageScore != null && message.hasOwnProperty("coverageScore")) + if (typeof message.coverageScore !== "number") + return "coverageScore: number expected"; return null; }; /** - * Creates a BatchRunTestCasesResponse message from a plain object. Also converts values to their respective internal types. + * Creates an IntentCoverage message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse + * @memberof google.cloud.dialogflow.cx.v3.IntentCoverage * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse} BatchRunTestCasesResponse + * @returns {google.cloud.dialogflow.cx.v3.IntentCoverage} IntentCoverage */ - BatchRunTestCasesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse) + IntentCoverage.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.IntentCoverage) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse(); - if (object.results) { - if (!Array.isArray(object.results)) - throw TypeError(".google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse.results: array expected"); - message.results = []; - for (var i = 0; i < object.results.length; ++i) { - if (typeof object.results[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse.results: object expected"); - message.results[i] = $root.google.cloud.dialogflow.cx.v3.TestCaseResult.fromObject(object.results[i]); + var message = new $root.google.cloud.dialogflow.cx.v3.IntentCoverage(); + if (object.intents) { + if (!Array.isArray(object.intents)) + throw TypeError(".google.cloud.dialogflow.cx.v3.IntentCoverage.intents: array expected"); + message.intents = []; + for (var i = 0; i < object.intents.length; ++i) { + if (typeof object.intents[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.IntentCoverage.intents: object expected"); + message.intents[i] = $root.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent.fromObject(object.intents[i]); } } + if (object.coverageScore != null) + message.coverageScore = Number(object.coverageScore); return message; }; /** - * Creates a plain object from a BatchRunTestCasesResponse message. Also converts values to other types if specified. + * Creates a plain object from an IntentCoverage message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse + * @memberof google.cloud.dialogflow.cx.v3.IntentCoverage * @static - * @param {google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse} message BatchRunTestCasesResponse + * @param {google.cloud.dialogflow.cx.v3.IntentCoverage} message IntentCoverage * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BatchRunTestCasesResponse.toObject = function toObject(message, options) { + IntentCoverage.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.results = []; - if (message.results && message.results.length) { - object.results = []; - for (var j = 0; j < message.results.length; ++j) - object.results[j] = $root.google.cloud.dialogflow.cx.v3.TestCaseResult.toObject(message.results[j], options); + object.intents = []; + if (options.defaults) + object.coverageScore = 0; + if (message.intents && message.intents.length) { + object.intents = []; + for (var j = 0; j < message.intents.length; ++j) + object.intents[j] = $root.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent.toObject(message.intents[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 BatchRunTestCasesResponse to JSON. + * Converts this IntentCoverage to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse + * @memberof google.cloud.dialogflow.cx.v3.IntentCoverage * @instance * @returns {Object.} JSON object */ - BatchRunTestCasesResponse.prototype.toJSON = function toJSON() { + IntentCoverage.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for BatchRunTestCasesResponse + * Gets the default type url for IntentCoverage * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse + * @memberof google.cloud.dialogflow.cx.v3.IntentCoverage * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - BatchRunTestCasesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + IntentCoverage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.IntentCoverage"; }; - return BatchRunTestCasesResponse; + IntentCoverage.Intent = (function() { + + /** + * Properties of an Intent. + * @memberof google.cloud.dialogflow.cx.v3.IntentCoverage + * @interface IIntent + * @property {string|null} [intent] Intent intent + * @property {boolean|null} [covered] Intent covered + */ + + /** + * Constructs a new Intent. + * @memberof google.cloud.dialogflow.cx.v3.IntentCoverage + * @classdesc Represents an Intent. + * @implements IIntent + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IntentCoverage.IIntent=} [properties] Properties to set + */ + function Intent(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]]; + } + + /** + * Intent intent. + * @member {string} intent + * @memberof google.cloud.dialogflow.cx.v3.IntentCoverage.Intent + * @instance + */ + Intent.prototype.intent = ""; + + /** + * Intent covered. + * @member {boolean} covered + * @memberof google.cloud.dialogflow.cx.v3.IntentCoverage.Intent + * @instance + */ + Intent.prototype.covered = false; + + /** + * Creates a new Intent instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.IntentCoverage.Intent + * @static + * @param {google.cloud.dialogflow.cx.v3.IntentCoverage.IIntent=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.IntentCoverage.Intent} Intent instance + */ + Intent.create = function create(properties) { + return new Intent(properties); + }; + + /** + * Encodes the specified Intent message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.IntentCoverage.Intent.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.IntentCoverage.Intent + * @static + * @param {google.cloud.dialogflow.cx.v3.IntentCoverage.IIntent} message Intent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Intent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.intent != null && Object.hasOwnProperty.call(message, "intent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.intent); + if (message.covered != null && Object.hasOwnProperty.call(message, "covered")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.covered); + return writer; + }; + + /** + * Encodes the specified Intent message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.IntentCoverage.Intent.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.IntentCoverage.Intent + * @static + * @param {google.cloud.dialogflow.cx.v3.IntentCoverage.IIntent} message Intent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Intent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Intent message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.IntentCoverage.Intent + * @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.IntentCoverage.Intent} Intent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Intent.decode = function decode(reader, length, error) { + 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.IntentCoverage.Intent(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.intent = reader.string(); + break; + } + case 2: { + message.covered = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Intent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.IntentCoverage.Intent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.IntentCoverage.Intent} Intent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Intent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Intent message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.IntentCoverage.Intent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Intent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.intent != null && message.hasOwnProperty("intent")) + if (!$util.isString(message.intent)) + return "intent: string expected"; + if (message.covered != null && message.hasOwnProperty("covered")) + if (typeof message.covered !== "boolean") + return "covered: boolean expected"; + return null; + }; + + /** + * Creates an Intent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.IntentCoverage.Intent + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.IntentCoverage.Intent} Intent + */ + Intent.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.IntentCoverage.Intent(); + if (object.intent != null) + message.intent = String(object.intent); + if (object.covered != null) + message.covered = Boolean(object.covered); + return message; + }; + + /** + * Creates a plain object from an Intent message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.IntentCoverage.Intent + * @static + * @param {google.cloud.dialogflow.cx.v3.IntentCoverage.Intent} message Intent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Intent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.intent = ""; + object.covered = false; + } + if (message.intent != null && message.hasOwnProperty("intent")) + object.intent = message.intent; + if (message.covered != null && message.hasOwnProperty("covered")) + object.covered = message.covered; + return object; + }; + + /** + * Converts this Intent to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.IntentCoverage.Intent + * @instance + * @returns {Object.} JSON object + */ + Intent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Intent + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.IntentCoverage.Intent + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Intent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.IntentCoverage.Intent"; + }; + + return Intent; + })(); + + return IntentCoverage; })(); - v3.BatchRunTestCasesMetadata = (function() { + v3.CalculateCoverageRequest = (function() { /** - * Properties of a BatchRunTestCasesMetadata. + * Properties of a CalculateCoverageRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IBatchRunTestCasesMetadata - * @property {Array.|null} [errors] BatchRunTestCasesMetadata errors + * @interface ICalculateCoverageRequest + * @property {string|null} [agent] CalculateCoverageRequest agent + * @property {google.cloud.dialogflow.cx.v3.CalculateCoverageRequest.CoverageType|null} [type] CalculateCoverageRequest type */ /** - * Constructs a new BatchRunTestCasesMetadata. + * Constructs a new CalculateCoverageRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a BatchRunTestCasesMetadata. - * @implements IBatchRunTestCasesMetadata + * @classdesc Represents a CalculateCoverageRequest. + * @implements ICalculateCoverageRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IBatchRunTestCasesMetadata=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.ICalculateCoverageRequest=} [properties] Properties to set */ - function BatchRunTestCasesMetadata(properties) { - this.errors = []; + function CalculateCoverageRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -50785,80 +51093,91 @@ } /** - * BatchRunTestCasesMetadata errors. - * @member {Array.} errors - * @memberof google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata + * CalculateCoverageRequest agent. + * @member {string} agent + * @memberof google.cloud.dialogflow.cx.v3.CalculateCoverageRequest * @instance */ - BatchRunTestCasesMetadata.prototype.errors = $util.emptyArray; + CalculateCoverageRequest.prototype.agent = ""; /** - * Creates a new BatchRunTestCasesMetadata instance using the specified properties. + * CalculateCoverageRequest type. + * @member {google.cloud.dialogflow.cx.v3.CalculateCoverageRequest.CoverageType} type + * @memberof google.cloud.dialogflow.cx.v3.CalculateCoverageRequest + * @instance + */ + CalculateCoverageRequest.prototype.type = 0; + + /** + * Creates a new CalculateCoverageRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata + * @memberof google.cloud.dialogflow.cx.v3.CalculateCoverageRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IBatchRunTestCasesMetadata=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata} BatchRunTestCasesMetadata instance + * @param {google.cloud.dialogflow.cx.v3.ICalculateCoverageRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.CalculateCoverageRequest} CalculateCoverageRequest instance */ - BatchRunTestCasesMetadata.create = function create(properties) { - return new BatchRunTestCasesMetadata(properties); + CalculateCoverageRequest.create = function create(properties) { + return new CalculateCoverageRequest(properties); }; /** - * Encodes the specified BatchRunTestCasesMetadata message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata.verify|verify} messages. + * Encodes the specified CalculateCoverageRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CalculateCoverageRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata + * @memberof google.cloud.dialogflow.cx.v3.CalculateCoverageRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IBatchRunTestCasesMetadata} message BatchRunTestCasesMetadata message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ICalculateCoverageRequest} message CalculateCoverageRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BatchRunTestCasesMetadata.encode = function encode(message, writer) { + CalculateCoverageRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.errors != null && message.errors.length) - for (var i = 0; i < message.errors.length; ++i) - $root.google.cloud.dialogflow.cx.v3.TestError.encode(message.errors[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); + if (message.agent != null && Object.hasOwnProperty.call(message, "agent")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.agent); return writer; }; /** - * Encodes the specified BatchRunTestCasesMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata.verify|verify} messages. + * Encodes the specified CalculateCoverageRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CalculateCoverageRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata + * @memberof google.cloud.dialogflow.cx.v3.CalculateCoverageRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IBatchRunTestCasesMetadata} message BatchRunTestCasesMetadata message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ICalculateCoverageRequest} message CalculateCoverageRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BatchRunTestCasesMetadata.encodeDelimited = function encodeDelimited(message, writer) { + CalculateCoverageRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BatchRunTestCasesMetadata message from the specified reader or buffer. + * Decodes a CalculateCoverageRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata + * @memberof google.cloud.dialogflow.cx.v3.CalculateCoverageRequest * @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.BatchRunTestCasesMetadata} BatchRunTestCasesMetadata + * @returns {google.cloud.dialogflow.cx.v3.CalculateCoverageRequest} CalculateCoverageRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BatchRunTestCasesMetadata.decode = function decode(reader, length, error) { + CalculateCoverageRequest.decode = function decode(reader, length, error) { 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.BatchRunTestCasesMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.CalculateCoverageRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { - case 1: { - if (!(message.errors && message.errors.length)) - message.errors = []; - message.errors.push($root.google.cloud.dialogflow.cx.v3.TestError.decode(reader, reader.uint32())); + case 3: { + message.agent = reader.string(); + break; + } + case 2: { + message.type = reader.int32(); break; } default: @@ -50870,141 +51189,181 @@ }; /** - * Decodes a BatchRunTestCasesMetadata message from the specified reader or buffer, length delimited. + * Decodes a CalculateCoverageRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata + * @memberof google.cloud.dialogflow.cx.v3.CalculateCoverageRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata} BatchRunTestCasesMetadata + * @returns {google.cloud.dialogflow.cx.v3.CalculateCoverageRequest} CalculateCoverageRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BatchRunTestCasesMetadata.decodeDelimited = function decodeDelimited(reader) { + CalculateCoverageRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BatchRunTestCasesMetadata message. + * Verifies a CalculateCoverageRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata + * @memberof google.cloud.dialogflow.cx.v3.CalculateCoverageRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BatchRunTestCasesMetadata.verify = function verify(message) { + CalculateCoverageRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.errors != null && message.hasOwnProperty("errors")) { - if (!Array.isArray(message.errors)) - return "errors: array expected"; - for (var i = 0; i < message.errors.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.TestError.verify(message.errors[i]); - if (error) - return "errors." + error; + if (message.agent != null && message.hasOwnProperty("agent")) + if (!$util.isString(message.agent)) + return "agent: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; } - } return null; }; /** - * Creates a BatchRunTestCasesMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a CalculateCoverageRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata + * @memberof google.cloud.dialogflow.cx.v3.CalculateCoverageRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata} BatchRunTestCasesMetadata + * @returns {google.cloud.dialogflow.cx.v3.CalculateCoverageRequest} CalculateCoverageRequest */ - BatchRunTestCasesMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata) + CalculateCoverageRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.CalculateCoverageRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata(); - if (object.errors) { - if (!Array.isArray(object.errors)) - throw TypeError(".google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata.errors: array expected"); - message.errors = []; - for (var i = 0; i < object.errors.length; ++i) { - if (typeof object.errors[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata.errors: object expected"); - message.errors[i] = $root.google.cloud.dialogflow.cx.v3.TestError.fromObject(object.errors[i]); + var message = new $root.google.cloud.dialogflow.cx.v3.CalculateCoverageRequest(); + if (object.agent != null) + message.agent = String(object.agent); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; } + break; + case "COVERAGE_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "INTENT": + case 1: + message.type = 1; + break; + case "PAGE_TRANSITION": + case 2: + message.type = 2; + break; + case "TRANSITION_ROUTE_GROUP": + case 3: + message.type = 3; + break; } return message; }; /** - * Creates a plain object from a BatchRunTestCasesMetadata message. Also converts values to other types if specified. + * Creates a plain object from a CalculateCoverageRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata + * @memberof google.cloud.dialogflow.cx.v3.CalculateCoverageRequest * @static - * @param {google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata} message BatchRunTestCasesMetadata + * @param {google.cloud.dialogflow.cx.v3.CalculateCoverageRequest} message CalculateCoverageRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BatchRunTestCasesMetadata.toObject = function toObject(message, options) { + CalculateCoverageRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.errors = []; - if (message.errors && message.errors.length) { - object.errors = []; - for (var j = 0; j < message.errors.length; ++j) - object.errors[j] = $root.google.cloud.dialogflow.cx.v3.TestError.toObject(message.errors[j], options); + if (options.defaults) { + object.type = options.enums === String ? "COVERAGE_TYPE_UNSPECIFIED" : 0; + object.agent = ""; } + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.CalculateCoverageRequest.CoverageType[message.type] === undefined ? message.type : $root.google.cloud.dialogflow.cx.v3.CalculateCoverageRequest.CoverageType[message.type] : message.type; + if (message.agent != null && message.hasOwnProperty("agent")) + object.agent = message.agent; return object; }; /** - * Converts this BatchRunTestCasesMetadata to JSON. + * Converts this CalculateCoverageRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata + * @memberof google.cloud.dialogflow.cx.v3.CalculateCoverageRequest * @instance * @returns {Object.} JSON object */ - BatchRunTestCasesMetadata.prototype.toJSON = function toJSON() { + CalculateCoverageRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for BatchRunTestCasesMetadata + * Gets the default type url for CalculateCoverageRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata + * @memberof google.cloud.dialogflow.cx.v3.CalculateCoverageRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - BatchRunTestCasesMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CalculateCoverageRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.CalculateCoverageRequest"; }; - return BatchRunTestCasesMetadata; + /** + * CoverageType enum. + * @name google.cloud.dialogflow.cx.v3.CalculateCoverageRequest.CoverageType + * @enum {number} + * @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; + })(); + + return CalculateCoverageRequest; })(); - v3.TestError = (function() { + v3.CalculateCoverageResponse = (function() { /** - * Properties of a TestError. + * Properties of a CalculateCoverageResponse. * @memberof google.cloud.dialogflow.cx.v3 - * @interface ITestError - * @property {string|null} [testCase] TestError testCase - * @property {google.rpc.IStatus|null} [status] TestError status - * @property {google.protobuf.ITimestamp|null} [testTime] TestError testTime + * @interface ICalculateCoverageResponse + * @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 */ /** - * Constructs a new TestError. + * Constructs a new CalculateCoverageResponse. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a TestError. - * @implements ITestError + * @classdesc Represents a CalculateCoverageResponse. + * @implements ICalculateCoverageResponse * @constructor - * @param {google.cloud.dialogflow.cx.v3.ITestError=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.ICalculateCoverageResponse=} [properties] Properties to set */ - function TestError(properties) { + function CalculateCoverageResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -51012,105 +51371,133 @@ } /** - * TestError testCase. - * @member {string} testCase - * @memberof google.cloud.dialogflow.cx.v3.TestError + * CalculateCoverageResponse agent. + * @member {string} agent + * @memberof google.cloud.dialogflow.cx.v3.CalculateCoverageResponse * @instance */ - TestError.prototype.testCase = ""; + CalculateCoverageResponse.prototype.agent = ""; /** - * TestError status. - * @member {google.rpc.IStatus|null|undefined} status - * @memberof google.cloud.dialogflow.cx.v3.TestError + * CalculateCoverageResponse intentCoverage. + * @member {google.cloud.dialogflow.cx.v3.IIntentCoverage|null|undefined} intentCoverage + * @memberof google.cloud.dialogflow.cx.v3.CalculateCoverageResponse * @instance */ - TestError.prototype.status = null; + CalculateCoverageResponse.prototype.intentCoverage = null; /** - * TestError testTime. - * @member {google.protobuf.ITimestamp|null|undefined} testTime - * @memberof google.cloud.dialogflow.cx.v3.TestError + * CalculateCoverageResponse transitionCoverage. + * @member {google.cloud.dialogflow.cx.v3.ITransitionCoverage|null|undefined} transitionCoverage + * @memberof google.cloud.dialogflow.cx.v3.CalculateCoverageResponse * @instance */ - TestError.prototype.testTime = null; + CalculateCoverageResponse.prototype.transitionCoverage = null; /** - * Creates a new TestError instance using the specified properties. + * 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"|"routeGroupCoverage"|undefined} coverageType + * @memberof google.cloud.dialogflow.cx.v3.CalculateCoverageResponse + * @instance + */ + Object.defineProperty(CalculateCoverageResponse.prototype, "coverageType", { + get: $util.oneOfGetter($oneOfFields = ["intentCoverage", "transitionCoverage", "routeGroupCoverage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new CalculateCoverageResponse instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.TestError + * @memberof google.cloud.dialogflow.cx.v3.CalculateCoverageResponse * @static - * @param {google.cloud.dialogflow.cx.v3.ITestError=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.TestError} TestError instance + * @param {google.cloud.dialogflow.cx.v3.ICalculateCoverageResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.CalculateCoverageResponse} CalculateCoverageResponse instance */ - TestError.create = function create(properties) { - return new TestError(properties); + CalculateCoverageResponse.create = function create(properties) { + return new CalculateCoverageResponse(properties); }; /** - * Encodes the specified TestError message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TestError.verify|verify} messages. + * Encodes the specified CalculateCoverageResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CalculateCoverageResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.TestError + * @memberof google.cloud.dialogflow.cx.v3.CalculateCoverageResponse * @static - * @param {google.cloud.dialogflow.cx.v3.ITestError} message TestError message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ICalculateCoverageResponse} message CalculateCoverageResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TestError.encode = function encode(message, writer) { + CalculateCoverageResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.testCase != null && Object.hasOwnProperty.call(message, "testCase")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.testCase); - if (message.status != null && Object.hasOwnProperty.call(message, "status")) - $root.google.rpc.Status.encode(message.status, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.testTime != null && Object.hasOwnProperty.call(message, "testTime")) - $root.google.protobuf.Timestamp.encode(message.testTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.intentCoverage != null && Object.hasOwnProperty.call(message, "intentCoverage")) + $root.google.cloud.dialogflow.cx.v3.IntentCoverage.encode(message.intentCoverage, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.transitionCoverage != null && Object.hasOwnProperty.call(message, "transitionCoverage")) + $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; }; /** - * Encodes the specified TestError message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TestError.verify|verify} messages. + * Encodes the specified CalculateCoverageResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CalculateCoverageResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.TestError + * @memberof google.cloud.dialogflow.cx.v3.CalculateCoverageResponse * @static - * @param {google.cloud.dialogflow.cx.v3.ITestError} message TestError message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ICalculateCoverageResponse} message CalculateCoverageResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TestError.encodeDelimited = function encodeDelimited(message, writer) { + CalculateCoverageResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TestError message from the specified reader or buffer. + * Decodes a CalculateCoverageResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.TestError + * @memberof google.cloud.dialogflow.cx.v3.CalculateCoverageResponse * @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.TestError} TestError + * @returns {google.cloud.dialogflow.cx.v3.CalculateCoverageResponse} CalculateCoverageResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TestError.decode = function decode(reader, length, error) { + CalculateCoverageResponse.decode = function decode(reader, length, error) { 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.TestError(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.CalculateCoverageResponse(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { - case 1: { - message.testCase = reader.string(); + case 5: { + message.agent = reader.string(); break; } case 2: { - message.status = $root.google.rpc.Status.decode(reader, reader.uint32()); + message.intentCoverage = $root.google.cloud.dialogflow.cx.v3.IntentCoverage.decode(reader, reader.uint32()); break; } - case 3: { - message.testTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + 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: @@ -51122,151 +51509,184 @@ }; /** - * Decodes a TestError message from the specified reader or buffer, length delimited. + * Decodes a CalculateCoverageResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.TestError + * @memberof google.cloud.dialogflow.cx.v3.CalculateCoverageResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.TestError} TestError + * @returns {google.cloud.dialogflow.cx.v3.CalculateCoverageResponse} CalculateCoverageResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TestError.decodeDelimited = function decodeDelimited(reader) { + CalculateCoverageResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TestError message. + * Verifies a CalculateCoverageResponse message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.TestError + * @memberof google.cloud.dialogflow.cx.v3.CalculateCoverageResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TestError.verify = function verify(message) { + CalculateCoverageResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.testCase != null && message.hasOwnProperty("testCase")) - if (!$util.isString(message.testCase)) - return "testCase: string expected"; - if (message.status != null && message.hasOwnProperty("status")) { - var error = $root.google.rpc.Status.verify(message.status); - if (error) - return "status." + error; + var properties = {}; + if (message.agent != null && message.hasOwnProperty("agent")) + if (!$util.isString(message.agent)) + return "agent: string expected"; + if (message.intentCoverage != null && message.hasOwnProperty("intentCoverage")) { + properties.coverageType = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3.IntentCoverage.verify(message.intentCoverage); + if (error) + return "intentCoverage." + error; + } } - if (message.testTime != null && message.hasOwnProperty("testTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.testTime); - if (error) - return "testTime." + error; + if (message.transitionCoverage != null && message.hasOwnProperty("transitionCoverage")) { + if (properties.coverageType === 1) + return "coverageType: multiple values"; + properties.coverageType = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3.TransitionCoverage.verify(message.transitionCoverage); + if (error) + 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; }; /** - * Creates a TestError message from a plain object. Also converts values to their respective internal types. + * Creates a CalculateCoverageResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.TestError + * @memberof google.cloud.dialogflow.cx.v3.CalculateCoverageResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.TestError} TestError + * @returns {google.cloud.dialogflow.cx.v3.CalculateCoverageResponse} CalculateCoverageResponse */ - TestError.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.TestError) + CalculateCoverageResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.CalculateCoverageResponse) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.TestError(); - if (object.testCase != null) - message.testCase = String(object.testCase); - if (object.status != null) { - if (typeof object.status !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.TestError.status: object expected"); - message.status = $root.google.rpc.Status.fromObject(object.status); + var message = new $root.google.cloud.dialogflow.cx.v3.CalculateCoverageResponse(); + if (object.agent != null) + message.agent = String(object.agent); + if (object.intentCoverage != null) { + if (typeof object.intentCoverage !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.CalculateCoverageResponse.intentCoverage: object expected"); + message.intentCoverage = $root.google.cloud.dialogflow.cx.v3.IntentCoverage.fromObject(object.intentCoverage); } - if (object.testTime != null) { - if (typeof object.testTime !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.TestError.testTime: object expected"); - message.testTime = $root.google.protobuf.Timestamp.fromObject(object.testTime); + if (object.transitionCoverage != null) { + if (typeof object.transitionCoverage !== "object") + 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; }; /** - * Creates a plain object from a TestError message. Also converts values to other types if specified. + * Creates a plain object from a CalculateCoverageResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.TestError + * @memberof google.cloud.dialogflow.cx.v3.CalculateCoverageResponse * @static - * @param {google.cloud.dialogflow.cx.v3.TestError} message TestError + * @param {google.cloud.dialogflow.cx.v3.CalculateCoverageResponse} message CalculateCoverageResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TestError.toObject = function toObject(message, options) { + CalculateCoverageResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.testCase = ""; - object.status = null; - object.testTime = null; + if (options.defaults) + object.agent = ""; + if (message.intentCoverage != null && message.hasOwnProperty("intentCoverage")) { + object.intentCoverage = $root.google.cloud.dialogflow.cx.v3.IntentCoverage.toObject(message.intentCoverage, options); + if (options.oneofs) + object.coverageType = "intentCoverage"; + } + if (message.transitionCoverage != null && message.hasOwnProperty("transitionCoverage")) { + object.transitionCoverage = $root.google.cloud.dialogflow.cx.v3.TransitionCoverage.toObject(message.transitionCoverage, options); + if (options.oneofs) + object.coverageType = "transitionCoverage"; + } + 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"; } - if (message.testCase != null && message.hasOwnProperty("testCase")) - object.testCase = message.testCase; - if (message.status != null && message.hasOwnProperty("status")) - object.status = $root.google.rpc.Status.toObject(message.status, options); - if (message.testTime != null && message.hasOwnProperty("testTime")) - object.testTime = $root.google.protobuf.Timestamp.toObject(message.testTime, options); return object; }; /** - * Converts this TestError to JSON. + * Converts this CalculateCoverageResponse to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.TestError + * @memberof google.cloud.dialogflow.cx.v3.CalculateCoverageResponse * @instance * @returns {Object.} JSON object */ - TestError.prototype.toJSON = function toJSON() { + CalculateCoverageResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for TestError + * Gets the default type url for CalculateCoverageResponse * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.TestError + * @memberof google.cloud.dialogflow.cx.v3.CalculateCoverageResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - TestError.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CalculateCoverageResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.TestError"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.CalculateCoverageResponse"; }; - return TestError; + return CalculateCoverageResponse; })(); - v3.ImportTestCasesRequest = (function() { + v3.ListTestCasesRequest = (function() { /** - * Properties of an ImportTestCasesRequest. + * Properties of a ListTestCasesRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IImportTestCasesRequest - * @property {string|null} [parent] ImportTestCasesRequest parent - * @property {string|null} [gcsUri] ImportTestCasesRequest gcsUri - * @property {Uint8Array|null} [content] ImportTestCasesRequest content + * @interface IListTestCasesRequest + * @property {string|null} [parent] ListTestCasesRequest parent + * @property {number|null} [pageSize] ListTestCasesRequest pageSize + * @property {string|null} [pageToken] ListTestCasesRequest pageToken + * @property {google.cloud.dialogflow.cx.v3.ListTestCasesRequest.TestCaseView|null} [view] ListTestCasesRequest view */ /** - * Constructs a new ImportTestCasesRequest. + * Constructs a new ListTestCasesRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents an ImportTestCasesRequest. - * @implements IImportTestCasesRequest + * @classdesc Represents a ListTestCasesRequest. + * @implements IListTestCasesRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IImportTestCasesRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IListTestCasesRequest=} [properties] Properties to set */ - function ImportTestCasesRequest(properties) { + function ListTestCasesRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -51274,104 +51694,100 @@ } /** - * ImportTestCasesRequest parent. + * ListTestCasesRequest parent. * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3.ImportTestCasesRequest + * @memberof google.cloud.dialogflow.cx.v3.ListTestCasesRequest * @instance */ - ImportTestCasesRequest.prototype.parent = ""; + ListTestCasesRequest.prototype.parent = ""; /** - * ImportTestCasesRequest gcsUri. - * @member {string|null|undefined} gcsUri - * @memberof google.cloud.dialogflow.cx.v3.ImportTestCasesRequest + * ListTestCasesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dialogflow.cx.v3.ListTestCasesRequest * @instance */ - ImportTestCasesRequest.prototype.gcsUri = null; + ListTestCasesRequest.prototype.pageSize = 0; /** - * ImportTestCasesRequest content. - * @member {Uint8Array|null|undefined} content - * @memberof google.cloud.dialogflow.cx.v3.ImportTestCasesRequest + * ListTestCasesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dialogflow.cx.v3.ListTestCasesRequest * @instance */ - ImportTestCasesRequest.prototype.content = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + ListTestCasesRequest.prototype.pageToken = ""; /** - * ImportTestCasesRequest source. - * @member {"gcsUri"|"content"|undefined} source - * @memberof google.cloud.dialogflow.cx.v3.ImportTestCasesRequest + * ListTestCasesRequest view. + * @member {google.cloud.dialogflow.cx.v3.ListTestCasesRequest.TestCaseView} view + * @memberof google.cloud.dialogflow.cx.v3.ListTestCasesRequest * @instance */ - Object.defineProperty(ImportTestCasesRequest.prototype, "source", { - get: $util.oneOfGetter($oneOfFields = ["gcsUri", "content"]), - set: $util.oneOfSetter($oneOfFields) - }); + ListTestCasesRequest.prototype.view = 0; /** - * Creates a new ImportTestCasesRequest instance using the specified properties. + * Creates a new ListTestCasesRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.ImportTestCasesRequest + * @memberof google.cloud.dialogflow.cx.v3.ListTestCasesRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IImportTestCasesRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ImportTestCasesRequest} ImportTestCasesRequest instance + * @param {google.cloud.dialogflow.cx.v3.IListTestCasesRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ListTestCasesRequest} ListTestCasesRequest instance */ - ImportTestCasesRequest.create = function create(properties) { - return new ImportTestCasesRequest(properties); + ListTestCasesRequest.create = function create(properties) { + return new ListTestCasesRequest(properties); }; /** - * Encodes the specified ImportTestCasesRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportTestCasesRequest.verify|verify} messages. + * Encodes the specified ListTestCasesRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListTestCasesRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ImportTestCasesRequest + * @memberof google.cloud.dialogflow.cx.v3.ListTestCasesRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IImportTestCasesRequest} message ImportTestCasesRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListTestCasesRequest} message ListTestCasesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportTestCasesRequest.encode = function encode(message, writer) { + ListTestCasesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.gcsUri != null && Object.hasOwnProperty.call(message, "gcsUri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.gcsUri); - if (message.content != null && Object.hasOwnProperty.call(message, "content")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.content); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.view != null && Object.hasOwnProperty.call(message, "view")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.view); return writer; }; /** - * Encodes the specified ImportTestCasesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportTestCasesRequest.verify|verify} messages. + * Encodes the specified ListTestCasesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListTestCasesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ImportTestCasesRequest + * @memberof google.cloud.dialogflow.cx.v3.ListTestCasesRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IImportTestCasesRequest} message ImportTestCasesRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListTestCasesRequest} message ListTestCasesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportTestCasesRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListTestCasesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ImportTestCasesRequest message from the specified reader or buffer. + * Decodes a ListTestCasesRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ImportTestCasesRequest + * @memberof google.cloud.dialogflow.cx.v3.ListTestCasesRequest * @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.ImportTestCasesRequest} ImportTestCasesRequest + * @returns {google.cloud.dialogflow.cx.v3.ListTestCasesRequest} ListTestCasesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportTestCasesRequest.decode = function decode(reader, length, error) { + ListTestCasesRequest.decode = function decode(reader, length, error) { 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.ImportTestCasesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ListTestCasesRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -51382,11 +51798,15 @@ break; } case 2: { - message.gcsUri = reader.string(); + message.pageSize = reader.int32(); break; } case 3: { - message.content = reader.bytes(); + message.pageToken = reader.string(); + break; + } + case 4: { + message.view = reader.int32(); break; } default: @@ -51398,153 +51818,189 @@ }; /** - * Decodes an ImportTestCasesRequest message from the specified reader or buffer, length delimited. + * Decodes a ListTestCasesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ImportTestCasesRequest + * @memberof google.cloud.dialogflow.cx.v3.ListTestCasesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ImportTestCasesRequest} ImportTestCasesRequest + * @returns {google.cloud.dialogflow.cx.v3.ListTestCasesRequest} ListTestCasesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportTestCasesRequest.decodeDelimited = function decodeDelimited(reader) { + ListTestCasesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ImportTestCasesRequest message. + * Verifies a ListTestCasesRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ImportTestCasesRequest + * @memberof google.cloud.dialogflow.cx.v3.ListTestCasesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ImportTestCasesRequest.verify = function verify(message) { + ListTestCasesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; if (message.parent != null && message.hasOwnProperty("parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.gcsUri != null && message.hasOwnProperty("gcsUri")) { - properties.source = 1; - if (!$util.isString(message.gcsUri)) - return "gcsUri: string expected"; - } - if (message.content != null && message.hasOwnProperty("content")) { - if (properties.source === 1) - return "source: multiple values"; - properties.source = 1; - if (!(message.content && typeof message.content.length === "number" || $util.isString(message.content))) - return "content: buffer expected"; - } + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.view != null && message.hasOwnProperty("view")) + switch (message.view) { + default: + return "view: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; /** - * Creates an ImportTestCasesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListTestCasesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ImportTestCasesRequest + * @memberof google.cloud.dialogflow.cx.v3.ListTestCasesRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ImportTestCasesRequest} ImportTestCasesRequest + * @returns {google.cloud.dialogflow.cx.v3.ListTestCasesRequest} ListTestCasesRequest */ - ImportTestCasesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ImportTestCasesRequest) + ListTestCasesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListTestCasesRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.ImportTestCasesRequest(); + var message = new $root.google.cloud.dialogflow.cx.v3.ListTestCasesRequest(); if (object.parent != null) message.parent = String(object.parent); - if (object.gcsUri != null) - message.gcsUri = String(object.gcsUri); - if (object.content != null) - if (typeof object.content === "string") - $util.base64.decode(object.content, message.content = $util.newBuffer($util.base64.length(object.content)), 0); - else if (object.content.length >= 0) - message.content = object.content; + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + switch (object.view) { + default: + if (typeof object.view === "number") { + message.view = object.view; + break; + } + break; + case "TEST_CASE_VIEW_UNSPECIFIED": + case 0: + message.view = 0; + break; + case "BASIC": + case 1: + message.view = 1; + break; + case "FULL": + case 2: + message.view = 2; + break; + } return message; }; /** - * Creates a plain object from an ImportTestCasesRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListTestCasesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ImportTestCasesRequest + * @memberof google.cloud.dialogflow.cx.v3.ListTestCasesRequest * @static - * @param {google.cloud.dialogflow.cx.v3.ImportTestCasesRequest} message ImportTestCasesRequest + * @param {google.cloud.dialogflow.cx.v3.ListTestCasesRequest} message ListTestCasesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ImportTestCasesRequest.toObject = function toObject(message, options) { + ListTestCasesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.view = options.enums === String ? "TEST_CASE_VIEW_UNSPECIFIED" : 0; + } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; - if (message.gcsUri != null && message.hasOwnProperty("gcsUri")) { - object.gcsUri = message.gcsUri; - if (options.oneofs) - object.source = "gcsUri"; - } - if (message.content != null && message.hasOwnProperty("content")) { - object.content = options.bytes === String ? $util.base64.encode(message.content, 0, message.content.length) : options.bytes === Array ? Array.prototype.slice.call(message.content) : message.content; - if (options.oneofs) - object.source = "content"; - } + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.view != null && message.hasOwnProperty("view")) + object.view = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.ListTestCasesRequest.TestCaseView[message.view] === undefined ? message.view : $root.google.cloud.dialogflow.cx.v3.ListTestCasesRequest.TestCaseView[message.view] : message.view; return object; }; /** - * Converts this ImportTestCasesRequest to JSON. + * Converts this ListTestCasesRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ImportTestCasesRequest + * @memberof google.cloud.dialogflow.cx.v3.ListTestCasesRequest * @instance * @returns {Object.} JSON object */ - ImportTestCasesRequest.prototype.toJSON = function toJSON() { + ListTestCasesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ImportTestCasesRequest + * Gets the default type url for ListTestCasesRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.ImportTestCasesRequest + * @memberof google.cloud.dialogflow.cx.v3.ListTestCasesRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ImportTestCasesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListTestCasesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ImportTestCasesRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListTestCasesRequest"; }; - return ImportTestCasesRequest; - })(); - - v3.ImportTestCasesResponse = (function() { - /** - * Properties of an ImportTestCasesResponse. - * @memberof google.cloud.dialogflow.cx.v3 - * @interface IImportTestCasesResponse - * @property {Array.|null} [names] ImportTestCasesResponse names - */ - + * TestCaseView enum. + * @name google.cloud.dialogflow.cx.v3.ListTestCasesRequest.TestCaseView + * @enum {number} + * @property {number} TEST_CASE_VIEW_UNSPECIFIED=0 TEST_CASE_VIEW_UNSPECIFIED value + * @property {number} BASIC=1 BASIC value + * @property {number} FULL=2 FULL value + */ + ListTestCasesRequest.TestCaseView = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TEST_CASE_VIEW_UNSPECIFIED"] = 0; + values[valuesById[1] = "BASIC"] = 1; + values[valuesById[2] = "FULL"] = 2; + return values; + })(); + + return ListTestCasesRequest; + })(); + + v3.ListTestCasesResponse = (function() { + /** - * Constructs a new ImportTestCasesResponse. + * Properties of a ListTestCasesResponse. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents an ImportTestCasesResponse. - * @implements IImportTestCasesResponse + * @interface IListTestCasesResponse + * @property {Array.|null} [testCases] ListTestCasesResponse testCases + * @property {string|null} [nextPageToken] ListTestCasesResponse nextPageToken + */ + + /** + * Constructs a new ListTestCasesResponse. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a ListTestCasesResponse. + * @implements IListTestCasesResponse * @constructor - * @param {google.cloud.dialogflow.cx.v3.IImportTestCasesResponse=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IListTestCasesResponse=} [properties] Properties to set */ - function ImportTestCasesResponse(properties) { - this.names = []; + function ListTestCasesResponse(properties) { + this.testCases = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -51552,80 +52008,94 @@ } /** - * ImportTestCasesResponse names. - * @member {Array.} names - * @memberof google.cloud.dialogflow.cx.v3.ImportTestCasesResponse + * ListTestCasesResponse testCases. + * @member {Array.} testCases + * @memberof google.cloud.dialogflow.cx.v3.ListTestCasesResponse * @instance */ - ImportTestCasesResponse.prototype.names = $util.emptyArray; + ListTestCasesResponse.prototype.testCases = $util.emptyArray; /** - * Creates a new ImportTestCasesResponse instance using the specified properties. + * ListTestCasesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dialogflow.cx.v3.ListTestCasesResponse + * @instance + */ + ListTestCasesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListTestCasesResponse instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.ImportTestCasesResponse + * @memberof google.cloud.dialogflow.cx.v3.ListTestCasesResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IImportTestCasesResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ImportTestCasesResponse} ImportTestCasesResponse instance + * @param {google.cloud.dialogflow.cx.v3.IListTestCasesResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ListTestCasesResponse} ListTestCasesResponse instance */ - ImportTestCasesResponse.create = function create(properties) { - return new ImportTestCasesResponse(properties); + ListTestCasesResponse.create = function create(properties) { + return new ListTestCasesResponse(properties); }; /** - * Encodes the specified ImportTestCasesResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportTestCasesResponse.verify|verify} messages. + * Encodes the specified ListTestCasesResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListTestCasesResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ImportTestCasesResponse + * @memberof google.cloud.dialogflow.cx.v3.ListTestCasesResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IImportTestCasesResponse} message ImportTestCasesResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListTestCasesResponse} message ListTestCasesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportTestCasesResponse.encode = function encode(message, writer) { + ListTestCasesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.names != null && message.names.length) - for (var i = 0; i < message.names.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.names[i]); + if (message.testCases != null && message.testCases.length) + for (var i = 0; i < message.testCases.length; ++i) + $root.google.cloud.dialogflow.cx.v3.TestCase.encode(message.testCases[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; /** - * Encodes the specified ImportTestCasesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportTestCasesResponse.verify|verify} messages. + * Encodes the specified ListTestCasesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListTestCasesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ImportTestCasesResponse + * @memberof google.cloud.dialogflow.cx.v3.ListTestCasesResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IImportTestCasesResponse} message ImportTestCasesResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListTestCasesResponse} message ListTestCasesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportTestCasesResponse.encodeDelimited = function encodeDelimited(message, writer) { + ListTestCasesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ImportTestCasesResponse message from the specified reader or buffer. + * Decodes a ListTestCasesResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ImportTestCasesResponse + * @memberof google.cloud.dialogflow.cx.v3.ListTestCasesResponse * @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.ImportTestCasesResponse} ImportTestCasesResponse + * @returns {google.cloud.dialogflow.cx.v3.ListTestCasesResponse} ListTestCasesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportTestCasesResponse.decode = function decode(reader, length, error) { + ListTestCasesResponse.decode = function decode(reader, length, error) { 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.ImportTestCasesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ListTestCasesResponse(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - if (!(message.names && message.names.length)) - message.names = []; - message.names.push(reader.string()); + if (!(message.testCases && message.testCases.length)) + message.testCases = []; + message.testCases.push($root.google.cloud.dialogflow.cx.v3.TestCase.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); break; } default: @@ -51637,135 +52107,150 @@ }; /** - * Decodes an ImportTestCasesResponse message from the specified reader or buffer, length delimited. + * Decodes a ListTestCasesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ImportTestCasesResponse + * @memberof google.cloud.dialogflow.cx.v3.ListTestCasesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ImportTestCasesResponse} ImportTestCasesResponse + * @returns {google.cloud.dialogflow.cx.v3.ListTestCasesResponse} ListTestCasesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportTestCasesResponse.decodeDelimited = function decodeDelimited(reader) { + ListTestCasesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ImportTestCasesResponse message. + * Verifies a ListTestCasesResponse message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ImportTestCasesResponse + * @memberof google.cloud.dialogflow.cx.v3.ListTestCasesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ImportTestCasesResponse.verify = function verify(message) { + ListTestCasesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.names != null && message.hasOwnProperty("names")) { - if (!Array.isArray(message.names)) - return "names: array expected"; - for (var i = 0; i < message.names.length; ++i) - if (!$util.isString(message.names[i])) - return "names: string[] expected"; + if (message.testCases != null && message.hasOwnProperty("testCases")) { + if (!Array.isArray(message.testCases)) + return "testCases: array expected"; + for (var i = 0; i < message.testCases.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.TestCase.verify(message.testCases[i]); + if (error) + return "testCases." + error; + } } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates an ImportTestCasesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListTestCasesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ImportTestCasesResponse + * @memberof google.cloud.dialogflow.cx.v3.ListTestCasesResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ImportTestCasesResponse} ImportTestCasesResponse + * @returns {google.cloud.dialogflow.cx.v3.ListTestCasesResponse} ListTestCasesResponse */ - ImportTestCasesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ImportTestCasesResponse) + ListTestCasesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListTestCasesResponse) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.ImportTestCasesResponse(); - if (object.names) { - if (!Array.isArray(object.names)) - throw TypeError(".google.cloud.dialogflow.cx.v3.ImportTestCasesResponse.names: array expected"); - message.names = []; - for (var i = 0; i < object.names.length; ++i) - message.names[i] = String(object.names[i]); + var message = new $root.google.cloud.dialogflow.cx.v3.ListTestCasesResponse(); + if (object.testCases) { + if (!Array.isArray(object.testCases)) + throw TypeError(".google.cloud.dialogflow.cx.v3.ListTestCasesResponse.testCases: array expected"); + message.testCases = []; + for (var i = 0; i < object.testCases.length; ++i) { + if (typeof object.testCases[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.ListTestCasesResponse.testCases: object expected"); + message.testCases[i] = $root.google.cloud.dialogflow.cx.v3.TestCase.fromObject(object.testCases[i]); + } } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from an ImportTestCasesResponse message. Also converts values to other types if specified. + * Creates a plain object from a ListTestCasesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ImportTestCasesResponse + * @memberof google.cloud.dialogflow.cx.v3.ListTestCasesResponse * @static - * @param {google.cloud.dialogflow.cx.v3.ImportTestCasesResponse} message ImportTestCasesResponse + * @param {google.cloud.dialogflow.cx.v3.ListTestCasesResponse} message ListTestCasesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ImportTestCasesResponse.toObject = function toObject(message, options) { + ListTestCasesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.names = []; - if (message.names && message.names.length) { - object.names = []; - for (var j = 0; j < message.names.length; ++j) - object.names[j] = message.names[j]; + object.testCases = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.testCases && message.testCases.length) { + object.testCases = []; + for (var j = 0; j < message.testCases.length; ++j) + object.testCases[j] = $root.google.cloud.dialogflow.cx.v3.TestCase.toObject(message.testCases[j], options); } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this ImportTestCasesResponse to JSON. + * Converts this ListTestCasesResponse to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ImportTestCasesResponse + * @memberof google.cloud.dialogflow.cx.v3.ListTestCasesResponse * @instance * @returns {Object.} JSON object */ - ImportTestCasesResponse.prototype.toJSON = function toJSON() { + ListTestCasesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ImportTestCasesResponse + * Gets the default type url for ListTestCasesResponse * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.ImportTestCasesResponse + * @memberof google.cloud.dialogflow.cx.v3.ListTestCasesResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ImportTestCasesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListTestCasesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ImportTestCasesResponse"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListTestCasesResponse"; }; - return ImportTestCasesResponse; + return ListTestCasesResponse; })(); - v3.ImportTestCasesMetadata = (function() { + v3.BatchDeleteTestCasesRequest = (function() { /** - * Properties of an ImportTestCasesMetadata. + * Properties of a BatchDeleteTestCasesRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IImportTestCasesMetadata - * @property {Array.|null} [errors] ImportTestCasesMetadata errors + * @interface IBatchDeleteTestCasesRequest + * @property {string|null} [parent] BatchDeleteTestCasesRequest parent + * @property {Array.|null} [names] BatchDeleteTestCasesRequest names */ /** - * Constructs a new ImportTestCasesMetadata. + * Constructs a new BatchDeleteTestCasesRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents an ImportTestCasesMetadata. - * @implements IImportTestCasesMetadata + * @classdesc Represents a BatchDeleteTestCasesRequest. + * @implements IBatchDeleteTestCasesRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IImportTestCasesMetadata=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IBatchDeleteTestCasesRequest=} [properties] Properties to set */ - function ImportTestCasesMetadata(properties) { - this.errors = []; + function BatchDeleteTestCasesRequest(properties) { + this.names = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -51773,80 +52258,94 @@ } /** - * ImportTestCasesMetadata errors. - * @member {Array.} errors - * @memberof google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata + * BatchDeleteTestCasesRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest * @instance */ - ImportTestCasesMetadata.prototype.errors = $util.emptyArray; + BatchDeleteTestCasesRequest.prototype.parent = ""; /** - * Creates a new ImportTestCasesMetadata instance using the specified properties. + * BatchDeleteTestCasesRequest names. + * @member {Array.} names + * @memberof google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest + * @instance + */ + BatchDeleteTestCasesRequest.prototype.names = $util.emptyArray; + + /** + * Creates a new BatchDeleteTestCasesRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata + * @memberof google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IImportTestCasesMetadata=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata} ImportTestCasesMetadata instance + * @param {google.cloud.dialogflow.cx.v3.IBatchDeleteTestCasesRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest} BatchDeleteTestCasesRequest instance */ - ImportTestCasesMetadata.create = function create(properties) { - return new ImportTestCasesMetadata(properties); + BatchDeleteTestCasesRequest.create = function create(properties) { + return new BatchDeleteTestCasesRequest(properties); }; /** - * Encodes the specified ImportTestCasesMetadata message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata.verify|verify} messages. + * Encodes the specified BatchDeleteTestCasesRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata + * @memberof google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IImportTestCasesMetadata} message ImportTestCasesMetadata message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IBatchDeleteTestCasesRequest} message BatchDeleteTestCasesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportTestCasesMetadata.encode = function encode(message, writer) { + BatchDeleteTestCasesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.errors != null && message.errors.length) - for (var i = 0; i < message.errors.length; ++i) - $root.google.cloud.dialogflow.cx.v3.TestCaseError.encode(message.errors[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.names != null && message.names.length) + for (var i = 0; i < message.names.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.names[i]); return writer; }; /** - * Encodes the specified ImportTestCasesMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata.verify|verify} messages. + * Encodes the specified BatchDeleteTestCasesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata + * @memberof google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IImportTestCasesMetadata} message ImportTestCasesMetadata message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IBatchDeleteTestCasesRequest} message BatchDeleteTestCasesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportTestCasesMetadata.encodeDelimited = function encodeDelimited(message, writer) { + BatchDeleteTestCasesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ImportTestCasesMetadata message from the specified reader or buffer. + * Decodes a BatchDeleteTestCasesRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata + * @memberof google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest * @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.ImportTestCasesMetadata} ImportTestCasesMetadata + * @returns {google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest} BatchDeleteTestCasesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportTestCasesMetadata.decode = function decode(reader, length, error) { + BatchDeleteTestCasesRequest.decode = function decode(reader, length, error) { 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.ImportTestCasesMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - if (!(message.errors && message.errors.length)) - message.errors = []; - message.errors.push($root.google.cloud.dialogflow.cx.v3.TestCaseError.decode(reader, reader.uint32())); + message.parent = reader.string(); + break; + } + case 3: { + if (!(message.names && message.names.length)) + message.names = []; + message.names.push(reader.string()); break; } default: @@ -51858,140 +52357,144 @@ }; /** - * Decodes an ImportTestCasesMetadata message from the specified reader or buffer, length delimited. + * Decodes a BatchDeleteTestCasesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata + * @memberof google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata} ImportTestCasesMetadata + * @returns {google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest} BatchDeleteTestCasesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportTestCasesMetadata.decodeDelimited = function decodeDelimited(reader) { + BatchDeleteTestCasesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ImportTestCasesMetadata message. + * Verifies a BatchDeleteTestCasesRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata + * @memberof google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ImportTestCasesMetadata.verify = function verify(message) { + BatchDeleteTestCasesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.errors != null && message.hasOwnProperty("errors")) { - if (!Array.isArray(message.errors)) - return "errors: array expected"; - for (var i = 0; i < message.errors.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.TestCaseError.verify(message.errors[i]); - if (error) - return "errors." + error; - } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.names != null && message.hasOwnProperty("names")) { + if (!Array.isArray(message.names)) + return "names: array expected"; + for (var i = 0; i < message.names.length; ++i) + if (!$util.isString(message.names[i])) + return "names: string[] expected"; } return null; }; /** - * Creates an ImportTestCasesMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a BatchDeleteTestCasesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata + * @memberof google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata} ImportTestCasesMetadata + * @returns {google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest} BatchDeleteTestCasesRequest */ - ImportTestCasesMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata) + BatchDeleteTestCasesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata(); - if (object.errors) { - if (!Array.isArray(object.errors)) - throw TypeError(".google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata.errors: array expected"); - message.errors = []; - for (var i = 0; i < object.errors.length; ++i) { - if (typeof object.errors[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata.errors: object expected"); - message.errors[i] = $root.google.cloud.dialogflow.cx.v3.TestCaseError.fromObject(object.errors[i]); - } + var message = new $root.google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.names) { + if (!Array.isArray(object.names)) + throw TypeError(".google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest.names: array expected"); + message.names = []; + for (var i = 0; i < object.names.length; ++i) + message.names[i] = String(object.names[i]); } return message; }; /** - * Creates a plain object from an ImportTestCasesMetadata message. Also converts values to other types if specified. + * Creates a plain object from a BatchDeleteTestCasesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata + * @memberof google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest * @static - * @param {google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata} message ImportTestCasesMetadata + * @param {google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest} message BatchDeleteTestCasesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ImportTestCasesMetadata.toObject = function toObject(message, options) { + BatchDeleteTestCasesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.errors = []; - if (message.errors && message.errors.length) { - object.errors = []; - for (var j = 0; j < message.errors.length; ++j) - object.errors[j] = $root.google.cloud.dialogflow.cx.v3.TestCaseError.toObject(message.errors[j], options); + object.names = []; + if (options.defaults) + object.parent = ""; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.names && message.names.length) { + object.names = []; + for (var j = 0; j < message.names.length; ++j) + object.names[j] = message.names[j]; } return object; }; /** - * Converts this ImportTestCasesMetadata to JSON. + * Converts this BatchDeleteTestCasesRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata + * @memberof google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest * @instance * @returns {Object.} JSON object */ - ImportTestCasesMetadata.prototype.toJSON = function toJSON() { + BatchDeleteTestCasesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ImportTestCasesMetadata + * Gets the default type url for BatchDeleteTestCasesRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata + * @memberof google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ImportTestCasesMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + BatchDeleteTestCasesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest"; }; - return ImportTestCasesMetadata; + return BatchDeleteTestCasesRequest; })(); - v3.TestCaseError = (function() { + v3.CreateTestCaseRequest = (function() { /** - * Properties of a TestCaseError. + * Properties of a CreateTestCaseRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface ITestCaseError - * @property {google.cloud.dialogflow.cx.v3.ITestCase|null} [testCase] TestCaseError testCase - * @property {google.rpc.IStatus|null} [status] TestCaseError status + * @interface ICreateTestCaseRequest + * @property {string|null} [parent] CreateTestCaseRequest parent + * @property {google.cloud.dialogflow.cx.v3.ITestCase|null} [testCase] CreateTestCaseRequest testCase */ /** - * Constructs a new TestCaseError. + * Constructs a new CreateTestCaseRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a TestCaseError. - * @implements ITestCaseError + * @classdesc Represents a CreateTestCaseRequest. + * @implements ICreateTestCaseRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.ITestCaseError=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.ICreateTestCaseRequest=} [properties] Properties to set */ - function TestCaseError(properties) { + function CreateTestCaseRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -51999,91 +52502,91 @@ } /** - * TestCaseError testCase. - * @member {google.cloud.dialogflow.cx.v3.ITestCase|null|undefined} testCase - * @memberof google.cloud.dialogflow.cx.v3.TestCaseError + * CreateTestCaseRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.cx.v3.CreateTestCaseRequest * @instance */ - TestCaseError.prototype.testCase = null; + CreateTestCaseRequest.prototype.parent = ""; /** - * TestCaseError status. - * @member {google.rpc.IStatus|null|undefined} status - * @memberof google.cloud.dialogflow.cx.v3.TestCaseError + * CreateTestCaseRequest testCase. + * @member {google.cloud.dialogflow.cx.v3.ITestCase|null|undefined} testCase + * @memberof google.cloud.dialogflow.cx.v3.CreateTestCaseRequest * @instance */ - TestCaseError.prototype.status = null; + CreateTestCaseRequest.prototype.testCase = null; /** - * Creates a new TestCaseError instance using the specified properties. + * Creates a new CreateTestCaseRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.TestCaseError + * @memberof google.cloud.dialogflow.cx.v3.CreateTestCaseRequest * @static - * @param {google.cloud.dialogflow.cx.v3.ITestCaseError=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.TestCaseError} TestCaseError instance + * @param {google.cloud.dialogflow.cx.v3.ICreateTestCaseRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.CreateTestCaseRequest} CreateTestCaseRequest instance */ - TestCaseError.create = function create(properties) { - return new TestCaseError(properties); + CreateTestCaseRequest.create = function create(properties) { + return new CreateTestCaseRequest(properties); }; /** - * Encodes the specified TestCaseError message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TestCaseError.verify|verify} messages. + * Encodes the specified CreateTestCaseRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateTestCaseRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.TestCaseError + * @memberof google.cloud.dialogflow.cx.v3.CreateTestCaseRequest * @static - * @param {google.cloud.dialogflow.cx.v3.ITestCaseError} message TestCaseError message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ICreateTestCaseRequest} message CreateTestCaseRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TestCaseError.encode = function encode(message, writer) { + CreateTestCaseRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); if (message.testCase != null && Object.hasOwnProperty.call(message, "testCase")) - $root.google.cloud.dialogflow.cx.v3.TestCase.encode(message.testCase, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.status != null && Object.hasOwnProperty.call(message, "status")) - $root.google.rpc.Status.encode(message.status, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.cloud.dialogflow.cx.v3.TestCase.encode(message.testCase, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified TestCaseError message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TestCaseError.verify|verify} messages. + * Encodes the specified CreateTestCaseRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateTestCaseRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.TestCaseError + * @memberof google.cloud.dialogflow.cx.v3.CreateTestCaseRequest * @static - * @param {google.cloud.dialogflow.cx.v3.ITestCaseError} message TestCaseError message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ICreateTestCaseRequest} message CreateTestCaseRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TestCaseError.encodeDelimited = function encodeDelimited(message, writer) { + CreateTestCaseRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TestCaseError message from the specified reader or buffer. + * Decodes a CreateTestCaseRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.TestCaseError + * @memberof google.cloud.dialogflow.cx.v3.CreateTestCaseRequest * @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.TestCaseError} TestCaseError + * @returns {google.cloud.dialogflow.cx.v3.CreateTestCaseRequest} CreateTestCaseRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TestCaseError.decode = function decode(reader, length, error) { + CreateTestCaseRequest.decode = function decode(reader, length, error) { 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.TestCaseError(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.CreateTestCaseRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.testCase = $root.google.cloud.dialogflow.cx.v3.TestCase.decode(reader, reader.uint32()); + message.parent = reader.string(); break; } case 2: { - message.status = $root.google.rpc.Status.decode(reader, reader.uint32()); + message.testCase = $root.google.cloud.dialogflow.cx.v3.TestCase.decode(reader, reader.uint32()); break; } default: @@ -52095,144 +52598,137 @@ }; /** - * Decodes a TestCaseError message from the specified reader or buffer, length delimited. + * Decodes a CreateTestCaseRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.TestCaseError + * @memberof google.cloud.dialogflow.cx.v3.CreateTestCaseRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.TestCaseError} TestCaseError + * @returns {google.cloud.dialogflow.cx.v3.CreateTestCaseRequest} CreateTestCaseRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TestCaseError.decodeDelimited = function decodeDelimited(reader) { + CreateTestCaseRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TestCaseError message. + * Verifies a CreateTestCaseRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.TestCaseError + * @memberof google.cloud.dialogflow.cx.v3.CreateTestCaseRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TestCaseError.verify = function verify(message) { + CreateTestCaseRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; if (message.testCase != null && message.hasOwnProperty("testCase")) { var error = $root.google.cloud.dialogflow.cx.v3.TestCase.verify(message.testCase); if (error) return "testCase." + error; } - if (message.status != null && message.hasOwnProperty("status")) { - var error = $root.google.rpc.Status.verify(message.status); - if (error) - return "status." + error; - } return null; }; /** - * Creates a TestCaseError message from a plain object. Also converts values to their respective internal types. + * Creates a CreateTestCaseRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.TestCaseError + * @memberof google.cloud.dialogflow.cx.v3.CreateTestCaseRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.TestCaseError} TestCaseError + * @returns {google.cloud.dialogflow.cx.v3.CreateTestCaseRequest} CreateTestCaseRequest */ - TestCaseError.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.TestCaseError) + CreateTestCaseRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.CreateTestCaseRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.TestCaseError(); + var message = new $root.google.cloud.dialogflow.cx.v3.CreateTestCaseRequest(); + if (object.parent != null) + message.parent = String(object.parent); if (object.testCase != null) { if (typeof object.testCase !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.TestCaseError.testCase: object expected"); + throw TypeError(".google.cloud.dialogflow.cx.v3.CreateTestCaseRequest.testCase: object expected"); message.testCase = $root.google.cloud.dialogflow.cx.v3.TestCase.fromObject(object.testCase); } - if (object.status != null) { - if (typeof object.status !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.TestCaseError.status: object expected"); - message.status = $root.google.rpc.Status.fromObject(object.status); - } return message; }; /** - * Creates a plain object from a TestCaseError message. Also converts values to other types if specified. + * Creates a plain object from a CreateTestCaseRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.TestCaseError + * @memberof google.cloud.dialogflow.cx.v3.CreateTestCaseRequest * @static - * @param {google.cloud.dialogflow.cx.v3.TestCaseError} message TestCaseError + * @param {google.cloud.dialogflow.cx.v3.CreateTestCaseRequest} message CreateTestCaseRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TestCaseError.toObject = function toObject(message, options) { + CreateTestCaseRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { + object.parent = ""; object.testCase = null; - object.status = null; } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; if (message.testCase != null && message.hasOwnProperty("testCase")) object.testCase = $root.google.cloud.dialogflow.cx.v3.TestCase.toObject(message.testCase, options); - if (message.status != null && message.hasOwnProperty("status")) - object.status = $root.google.rpc.Status.toObject(message.status, options); return object; }; /** - * Converts this TestCaseError to JSON. + * Converts this CreateTestCaseRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.TestCaseError + * @memberof google.cloud.dialogflow.cx.v3.CreateTestCaseRequest * @instance * @returns {Object.} JSON object */ - TestCaseError.prototype.toJSON = function toJSON() { + CreateTestCaseRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for TestCaseError + * Gets the default type url for CreateTestCaseRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.TestCaseError + * @memberof google.cloud.dialogflow.cx.v3.CreateTestCaseRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - TestCaseError.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateTestCaseRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.TestCaseError"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.CreateTestCaseRequest"; }; - return TestCaseError; + return CreateTestCaseRequest; })(); - v3.ExportTestCasesRequest = (function() { + v3.UpdateTestCaseRequest = (function() { /** - * Properties of an ExportTestCasesRequest. + * Properties of an UpdateTestCaseRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IExportTestCasesRequest - * @property {string|null} [parent] ExportTestCasesRequest parent - * @property {string|null} [gcsUri] ExportTestCasesRequest gcsUri - * @property {google.cloud.dialogflow.cx.v3.ExportTestCasesRequest.DataFormat|null} [dataFormat] ExportTestCasesRequest dataFormat - * @property {string|null} [filter] ExportTestCasesRequest filter + * @interface IUpdateTestCaseRequest + * @property {google.cloud.dialogflow.cx.v3.ITestCase|null} [testCase] UpdateTestCaseRequest testCase + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateTestCaseRequest updateMask */ /** - * Constructs a new ExportTestCasesRequest. + * Constructs a new UpdateTestCaseRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents an ExportTestCasesRequest. - * @implements IExportTestCasesRequest + * @classdesc Represents an UpdateTestCaseRequest. + * @implements IUpdateTestCaseRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IExportTestCasesRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IUpdateTestCaseRequest=} [properties] Properties to set */ - function ExportTestCasesRequest(properties) { + function UpdateTestCaseRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -52240,133 +52736,91 @@ } /** - * ExportTestCasesRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3.ExportTestCasesRequest - * @instance - */ - ExportTestCasesRequest.prototype.parent = ""; - - /** - * ExportTestCasesRequest gcsUri. - * @member {string|null|undefined} gcsUri - * @memberof google.cloud.dialogflow.cx.v3.ExportTestCasesRequest - * @instance - */ - ExportTestCasesRequest.prototype.gcsUri = null; - - /** - * ExportTestCasesRequest dataFormat. - * @member {google.cloud.dialogflow.cx.v3.ExportTestCasesRequest.DataFormat} dataFormat - * @memberof google.cloud.dialogflow.cx.v3.ExportTestCasesRequest - * @instance - */ - ExportTestCasesRequest.prototype.dataFormat = 0; - - /** - * ExportTestCasesRequest filter. - * @member {string} filter - * @memberof google.cloud.dialogflow.cx.v3.ExportTestCasesRequest + * UpdateTestCaseRequest testCase. + * @member {google.cloud.dialogflow.cx.v3.ITestCase|null|undefined} testCase + * @memberof google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest * @instance */ - ExportTestCasesRequest.prototype.filter = ""; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + UpdateTestCaseRequest.prototype.testCase = null; /** - * ExportTestCasesRequest destination. - * @member {"gcsUri"|undefined} destination - * @memberof google.cloud.dialogflow.cx.v3.ExportTestCasesRequest + * UpdateTestCaseRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest * @instance */ - Object.defineProperty(ExportTestCasesRequest.prototype, "destination", { - get: $util.oneOfGetter($oneOfFields = ["gcsUri"]), - set: $util.oneOfSetter($oneOfFields) - }); + UpdateTestCaseRequest.prototype.updateMask = null; /** - * Creates a new ExportTestCasesRequest instance using the specified properties. + * Creates a new UpdateTestCaseRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.ExportTestCasesRequest + * @memberof google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IExportTestCasesRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ExportTestCasesRequest} ExportTestCasesRequest instance + * @param {google.cloud.dialogflow.cx.v3.IUpdateTestCaseRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest} UpdateTestCaseRequest instance */ - ExportTestCasesRequest.create = function create(properties) { - return new ExportTestCasesRequest(properties); + UpdateTestCaseRequest.create = function create(properties) { + return new UpdateTestCaseRequest(properties); }; /** - * Encodes the specified ExportTestCasesRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ExportTestCasesRequest.verify|verify} messages. + * Encodes the specified UpdateTestCaseRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ExportTestCasesRequest + * @memberof google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IExportTestCasesRequest} message ExportTestCasesRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IUpdateTestCaseRequest} message UpdateTestCaseRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExportTestCasesRequest.encode = function encode(message, writer) { + UpdateTestCaseRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.gcsUri != null && Object.hasOwnProperty.call(message, "gcsUri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.gcsUri); - if (message.dataFormat != null && Object.hasOwnProperty.call(message, "dataFormat")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.dataFormat); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.testCase != null && Object.hasOwnProperty.call(message, "testCase")) + $root.google.cloud.dialogflow.cx.v3.TestCase.encode(message.testCase, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified ExportTestCasesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ExportTestCasesRequest.verify|verify} messages. + * Encodes the specified UpdateTestCaseRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ExportTestCasesRequest + * @memberof google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IExportTestCasesRequest} message ExportTestCasesRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IUpdateTestCaseRequest} message UpdateTestCaseRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExportTestCasesRequest.encodeDelimited = function encodeDelimited(message, writer) { + UpdateTestCaseRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ExportTestCasesRequest message from the specified reader or buffer. + * Decodes an UpdateTestCaseRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ExportTestCasesRequest + * @memberof google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest * @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.ExportTestCasesRequest} ExportTestCasesRequest + * @returns {google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest} UpdateTestCaseRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExportTestCasesRequest.decode = function decode(reader, length, error) { + UpdateTestCaseRequest.decode = function decode(reader, length, error) { 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.ExportTestCasesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + message.testCase = $root.google.cloud.dialogflow.cx.v3.TestCase.decode(reader, reader.uint32()); break; } case 2: { - message.gcsUri = reader.string(); - break; - } - case 3: { - message.dataFormat = reader.int32(); - break; - } - case 4: { - message.filter = reader.string(); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; } default: @@ -52378,193 +52832,141 @@ }; /** - * Decodes an ExportTestCasesRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateTestCaseRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ExportTestCasesRequest + * @memberof google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ExportTestCasesRequest} ExportTestCasesRequest + * @returns {google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest} UpdateTestCaseRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExportTestCasesRequest.decodeDelimited = function decodeDelimited(reader) { + UpdateTestCaseRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ExportTestCasesRequest message. + * Verifies an UpdateTestCaseRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ExportTestCasesRequest + * @memberof google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExportTestCasesRequest.verify = function verify(message) { + UpdateTestCaseRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.gcsUri != null && message.hasOwnProperty("gcsUri")) { - properties.destination = 1; - if (!$util.isString(message.gcsUri)) - return "gcsUri: string expected"; + if (message.testCase != null && message.hasOwnProperty("testCase")) { + var error = $root.google.cloud.dialogflow.cx.v3.TestCase.verify(message.testCase); + if (error) + return "testCase." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; } - if (message.dataFormat != null && message.hasOwnProperty("dataFormat")) - switch (message.dataFormat) { - default: - return "dataFormat: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; return null; }; /** - * Creates an ExportTestCasesRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateTestCaseRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ExportTestCasesRequest + * @memberof google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ExportTestCasesRequest} ExportTestCasesRequest + * @returns {google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest} UpdateTestCaseRequest */ - ExportTestCasesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest) + UpdateTestCaseRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.gcsUri != null) - message.gcsUri = String(object.gcsUri); - switch (object.dataFormat) { - default: - if (typeof object.dataFormat === "number") { - message.dataFormat = object.dataFormat; - break; - } - break; - case "DATA_FORMAT_UNSPECIFIED": - case 0: - message.dataFormat = 0; - break; - case "BLOB": - case 1: - message.dataFormat = 1; - break; - case "JSON": - case 2: - message.dataFormat = 2; - break; + var message = new $root.google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest(); + if (object.testCase != null) { + if (typeof object.testCase !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest.testCase: object expected"); + message.testCase = $root.google.cloud.dialogflow.cx.v3.TestCase.fromObject(object.testCase); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } - if (object.filter != null) - message.filter = String(object.filter); return message; }; /** - * Creates a plain object from an ExportTestCasesRequest message. Also converts values to other types if specified. + * Creates a plain object from an UpdateTestCaseRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ExportTestCasesRequest + * @memberof google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest * @static - * @param {google.cloud.dialogflow.cx.v3.ExportTestCasesRequest} message ExportTestCasesRequest + * @param {google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest} message UpdateTestCaseRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExportTestCasesRequest.toObject = function toObject(message, options) { + UpdateTestCaseRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.dataFormat = options.enums === String ? "DATA_FORMAT_UNSPECIFIED" : 0; - object.filter = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.gcsUri != null && message.hasOwnProperty("gcsUri")) { - object.gcsUri = message.gcsUri; - if (options.oneofs) - object.destination = "gcsUri"; + object.testCase = null; + object.updateMask = null; } - if (message.dataFormat != null && message.hasOwnProperty("dataFormat")) - object.dataFormat = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest.DataFormat[message.dataFormat] === undefined ? message.dataFormat : $root.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest.DataFormat[message.dataFormat] : message.dataFormat; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; + if (message.testCase != null && message.hasOwnProperty("testCase")) + object.testCase = $root.google.cloud.dialogflow.cx.v3.TestCase.toObject(message.testCase, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; /** - * Converts this ExportTestCasesRequest to JSON. + * Converts this UpdateTestCaseRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ExportTestCasesRequest + * @memberof google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest * @instance * @returns {Object.} JSON object */ - ExportTestCasesRequest.prototype.toJSON = function toJSON() { + UpdateTestCaseRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ExportTestCasesRequest + * Gets the default type url for UpdateTestCaseRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.ExportTestCasesRequest + * @memberof google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ExportTestCasesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UpdateTestCaseRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ExportTestCasesRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest"; }; - /** - * DataFormat enum. - * @name google.cloud.dialogflow.cx.v3.ExportTestCasesRequest.DataFormat - * @enum {number} - * @property {number} DATA_FORMAT_UNSPECIFIED=0 DATA_FORMAT_UNSPECIFIED value - * @property {number} BLOB=1 BLOB value - * @property {number} JSON=2 JSON value - */ - ExportTestCasesRequest.DataFormat = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DATA_FORMAT_UNSPECIFIED"] = 0; - values[valuesById[1] = "BLOB"] = 1; - values[valuesById[2] = "JSON"] = 2; - return values; - })(); - - return ExportTestCasesRequest; + return UpdateTestCaseRequest; })(); - v3.ExportTestCasesResponse = (function() { + v3.GetTestCaseRequest = (function() { /** - * Properties of an ExportTestCasesResponse. + * Properties of a GetTestCaseRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IExportTestCasesResponse - * @property {string|null} [gcsUri] ExportTestCasesResponse gcsUri - * @property {Uint8Array|null} [content] ExportTestCasesResponse content + * @interface IGetTestCaseRequest + * @property {string|null} [name] GetTestCaseRequest name */ /** - * Constructs a new ExportTestCasesResponse. + * Constructs a new GetTestCaseRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents an ExportTestCasesResponse. - * @implements IExportTestCasesResponse + * @classdesc Represents a GetTestCaseRequest. + * @implements IGetTestCaseRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IExportTestCasesResponse=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IGetTestCaseRequest=} [properties] Properties to set */ - function ExportTestCasesResponse(properties) { + function GetTestCaseRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -52572,105 +52974,77 @@ } /** - * ExportTestCasesResponse gcsUri. - * @member {string|null|undefined} gcsUri - * @memberof google.cloud.dialogflow.cx.v3.ExportTestCasesResponse - * @instance - */ - ExportTestCasesResponse.prototype.gcsUri = null; - - /** - * ExportTestCasesResponse content. - * @member {Uint8Array|null|undefined} content - * @memberof google.cloud.dialogflow.cx.v3.ExportTestCasesResponse - * @instance - */ - ExportTestCasesResponse.prototype.content = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * ExportTestCasesResponse destination. - * @member {"gcsUri"|"content"|undefined} destination - * @memberof google.cloud.dialogflow.cx.v3.ExportTestCasesResponse + * GetTestCaseRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.GetTestCaseRequest * @instance */ - Object.defineProperty(ExportTestCasesResponse.prototype, "destination", { - get: $util.oneOfGetter($oneOfFields = ["gcsUri", "content"]), - set: $util.oneOfSetter($oneOfFields) - }); + GetTestCaseRequest.prototype.name = ""; /** - * Creates a new ExportTestCasesResponse instance using the specified properties. + * Creates a new GetTestCaseRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.ExportTestCasesResponse + * @memberof google.cloud.dialogflow.cx.v3.GetTestCaseRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IExportTestCasesResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ExportTestCasesResponse} ExportTestCasesResponse instance + * @param {google.cloud.dialogflow.cx.v3.IGetTestCaseRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.GetTestCaseRequest} GetTestCaseRequest instance */ - ExportTestCasesResponse.create = function create(properties) { - return new ExportTestCasesResponse(properties); + GetTestCaseRequest.create = function create(properties) { + return new GetTestCaseRequest(properties); }; /** - * Encodes the specified ExportTestCasesResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ExportTestCasesResponse.verify|verify} messages. + * Encodes the specified GetTestCaseRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetTestCaseRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ExportTestCasesResponse + * @memberof google.cloud.dialogflow.cx.v3.GetTestCaseRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IExportTestCasesResponse} message ExportTestCasesResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IGetTestCaseRequest} message GetTestCaseRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExportTestCasesResponse.encode = function encode(message, writer) { + GetTestCaseRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.gcsUri != null && Object.hasOwnProperty.call(message, "gcsUri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.gcsUri); - if (message.content != null && Object.hasOwnProperty.call(message, "content")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.content); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified ExportTestCasesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ExportTestCasesResponse.verify|verify} messages. + * Encodes the specified GetTestCaseRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetTestCaseRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ExportTestCasesResponse + * @memberof google.cloud.dialogflow.cx.v3.GetTestCaseRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IExportTestCasesResponse} message ExportTestCasesResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IGetTestCaseRequest} message GetTestCaseRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExportTestCasesResponse.encodeDelimited = function encodeDelimited(message, writer) { + GetTestCaseRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ExportTestCasesResponse message from the specified reader or buffer. + * Decodes a GetTestCaseRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ExportTestCasesResponse + * @memberof google.cloud.dialogflow.cx.v3.GetTestCaseRequest * @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.ExportTestCasesResponse} ExportTestCasesResponse + * @returns {google.cloud.dialogflow.cx.v3.GetTestCaseRequest} GetTestCaseRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExportTestCasesResponse.decode = function decode(reader, length, error) { + GetTestCaseRequest.decode = function decode(reader, length, error) { 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.ExportTestCasesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.GetTestCaseRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.gcsUri = reader.string(); - break; - } - case 2: { - message.content = reader.bytes(); + message.name = reader.string(); break; } default: @@ -52682,142 +53056,123 @@ }; /** - * Decodes an ExportTestCasesResponse message from the specified reader or buffer, length delimited. + * Decodes a GetTestCaseRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ExportTestCasesResponse + * @memberof google.cloud.dialogflow.cx.v3.GetTestCaseRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ExportTestCasesResponse} ExportTestCasesResponse + * @returns {google.cloud.dialogflow.cx.v3.GetTestCaseRequest} GetTestCaseRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExportTestCasesResponse.decodeDelimited = function decodeDelimited(reader) { + GetTestCaseRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ExportTestCasesResponse message. + * Verifies a GetTestCaseRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ExportTestCasesResponse + * @memberof google.cloud.dialogflow.cx.v3.GetTestCaseRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExportTestCasesResponse.verify = function verify(message) { + GetTestCaseRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.gcsUri != null && message.hasOwnProperty("gcsUri")) { - properties.destination = 1; - if (!$util.isString(message.gcsUri)) - return "gcsUri: string expected"; - } - if (message.content != null && message.hasOwnProperty("content")) { - if (properties.destination === 1) - return "destination: multiple values"; - properties.destination = 1; - if (!(message.content && typeof message.content.length === "number" || $util.isString(message.content))) - return "content: buffer expected"; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates an ExportTestCasesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetTestCaseRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ExportTestCasesResponse + * @memberof google.cloud.dialogflow.cx.v3.GetTestCaseRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ExportTestCasesResponse} ExportTestCasesResponse + * @returns {google.cloud.dialogflow.cx.v3.GetTestCaseRequest} GetTestCaseRequest */ - ExportTestCasesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse) + GetTestCaseRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.GetTestCaseRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse(); - if (object.gcsUri != null) - message.gcsUri = String(object.gcsUri); - if (object.content != null) - if (typeof object.content === "string") - $util.base64.decode(object.content, message.content = $util.newBuffer($util.base64.length(object.content)), 0); - else if (object.content.length >= 0) - message.content = object.content; + var message = new $root.google.cloud.dialogflow.cx.v3.GetTestCaseRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from an ExportTestCasesResponse message. Also converts values to other types if specified. + * Creates a plain object from a GetTestCaseRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ExportTestCasesResponse + * @memberof google.cloud.dialogflow.cx.v3.GetTestCaseRequest * @static - * @param {google.cloud.dialogflow.cx.v3.ExportTestCasesResponse} message ExportTestCasesResponse + * @param {google.cloud.dialogflow.cx.v3.GetTestCaseRequest} message GetTestCaseRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExportTestCasesResponse.toObject = function toObject(message, options) { + GetTestCaseRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.gcsUri != null && message.hasOwnProperty("gcsUri")) { - object.gcsUri = message.gcsUri; - if (options.oneofs) - object.destination = "gcsUri"; - } - if (message.content != null && message.hasOwnProperty("content")) { - object.content = options.bytes === String ? $util.base64.encode(message.content, 0, message.content.length) : options.bytes === Array ? Array.prototype.slice.call(message.content) : message.content; - if (options.oneofs) - object.destination = "content"; - } + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this ExportTestCasesResponse to JSON. + * Converts this GetTestCaseRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ExportTestCasesResponse + * @memberof google.cloud.dialogflow.cx.v3.GetTestCaseRequest * @instance * @returns {Object.} JSON object */ - ExportTestCasesResponse.prototype.toJSON = function toJSON() { + GetTestCaseRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ExportTestCasesResponse + * Gets the default type url for GetTestCaseRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.ExportTestCasesResponse + * @memberof google.cloud.dialogflow.cx.v3.GetTestCaseRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ExportTestCasesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetTestCaseRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ExportTestCasesResponse"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.GetTestCaseRequest"; }; - return ExportTestCasesResponse; + return GetTestCaseRequest; })(); - v3.ExportTestCasesMetadata = (function() { + v3.RunTestCaseRequest = (function() { /** - * Properties of an ExportTestCasesMetadata. + * Properties of a RunTestCaseRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IExportTestCasesMetadata + * @interface IRunTestCaseRequest + * @property {string|null} [name] RunTestCaseRequest name + * @property {string|null} [environment] RunTestCaseRequest environment */ /** - * Constructs a new ExportTestCasesMetadata. + * Constructs a new RunTestCaseRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents an ExportTestCasesMetadata. - * @implements IExportTestCasesMetadata + * @classdesc Represents a RunTestCaseRequest. + * @implements IRunTestCaseRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IExportTestCasesMetadata=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IRunTestCaseRequest=} [properties] Properties to set */ - function ExportTestCasesMetadata(properties) { + function RunTestCaseRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -52825,65 +53180,93 @@ } /** - * Creates a new ExportTestCasesMetadata instance using the specified properties. + * RunTestCaseRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.RunTestCaseRequest + * @instance + */ + RunTestCaseRequest.prototype.name = ""; + + /** + * RunTestCaseRequest environment. + * @member {string} environment + * @memberof google.cloud.dialogflow.cx.v3.RunTestCaseRequest + * @instance + */ + RunTestCaseRequest.prototype.environment = ""; + + /** + * Creates a new RunTestCaseRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata + * @memberof google.cloud.dialogflow.cx.v3.RunTestCaseRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IExportTestCasesMetadata=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata} ExportTestCasesMetadata instance + * @param {google.cloud.dialogflow.cx.v3.IRunTestCaseRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.RunTestCaseRequest} RunTestCaseRequest instance */ - ExportTestCasesMetadata.create = function create(properties) { - return new ExportTestCasesMetadata(properties); + RunTestCaseRequest.create = function create(properties) { + return new RunTestCaseRequest(properties); }; /** - * Encodes the specified ExportTestCasesMetadata message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata.verify|verify} messages. + * Encodes the specified RunTestCaseRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.RunTestCaseRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata + * @memberof google.cloud.dialogflow.cx.v3.RunTestCaseRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IExportTestCasesMetadata} message ExportTestCasesMetadata message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IRunTestCaseRequest} message RunTestCaseRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExportTestCasesMetadata.encode = function encode(message, writer) { + RunTestCaseRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.environment); return writer; }; /** - * Encodes the specified ExportTestCasesMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata.verify|verify} messages. + * Encodes the specified RunTestCaseRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.RunTestCaseRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata + * @memberof google.cloud.dialogflow.cx.v3.RunTestCaseRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IExportTestCasesMetadata} message ExportTestCasesMetadata message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IRunTestCaseRequest} message RunTestCaseRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExportTestCasesMetadata.encodeDelimited = function encodeDelimited(message, writer) { + RunTestCaseRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ExportTestCasesMetadata message from the specified reader or buffer. + * Decodes a RunTestCaseRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata + * @memberof google.cloud.dialogflow.cx.v3.RunTestCaseRequest * @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.ExportTestCasesMetadata} ExportTestCasesMetadata + * @returns {google.cloud.dialogflow.cx.v3.RunTestCaseRequest} RunTestCaseRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExportTestCasesMetadata.decode = function decode(reader, length, error) { + RunTestCaseRequest.decode = function decode(reader, length, error) { 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.ExportTestCasesMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.RunTestCaseRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.environment = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -52893,112 +53276,131 @@ }; /** - * Decodes an ExportTestCasesMetadata message from the specified reader or buffer, length delimited. + * Decodes a RunTestCaseRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata + * @memberof google.cloud.dialogflow.cx.v3.RunTestCaseRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata} ExportTestCasesMetadata + * @returns {google.cloud.dialogflow.cx.v3.RunTestCaseRequest} RunTestCaseRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExportTestCasesMetadata.decodeDelimited = function decodeDelimited(reader) { + RunTestCaseRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ExportTestCasesMetadata message. + * Verifies a RunTestCaseRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata + * @memberof google.cloud.dialogflow.cx.v3.RunTestCaseRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExportTestCasesMetadata.verify = function verify(message) { + RunTestCaseRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.environment != null && message.hasOwnProperty("environment")) + if (!$util.isString(message.environment)) + return "environment: string expected"; return null; }; /** - * Creates an ExportTestCasesMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a RunTestCaseRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata + * @memberof google.cloud.dialogflow.cx.v3.RunTestCaseRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata} ExportTestCasesMetadata + * @returns {google.cloud.dialogflow.cx.v3.RunTestCaseRequest} RunTestCaseRequest */ - ExportTestCasesMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata) + RunTestCaseRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.RunTestCaseRequest) return object; - return new $root.google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata(); + var message = new $root.google.cloud.dialogflow.cx.v3.RunTestCaseRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.environment != null) + message.environment = String(object.environment); + return message; }; /** - * Creates a plain object from an ExportTestCasesMetadata message. Also converts values to other types if specified. + * Creates a plain object from a RunTestCaseRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata + * @memberof google.cloud.dialogflow.cx.v3.RunTestCaseRequest * @static - * @param {google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata} message ExportTestCasesMetadata + * @param {google.cloud.dialogflow.cx.v3.RunTestCaseRequest} message RunTestCaseRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExportTestCasesMetadata.toObject = function toObject() { - return {}; + RunTestCaseRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.environment = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.environment != null && message.hasOwnProperty("environment")) + object.environment = message.environment; + return object; }; /** - * Converts this ExportTestCasesMetadata to JSON. + * Converts this RunTestCaseRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata + * @memberof google.cloud.dialogflow.cx.v3.RunTestCaseRequest * @instance * @returns {Object.} JSON object */ - ExportTestCasesMetadata.prototype.toJSON = function toJSON() { + RunTestCaseRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ExportTestCasesMetadata + * Gets the default type url for RunTestCaseRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata + * @memberof google.cloud.dialogflow.cx.v3.RunTestCaseRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ExportTestCasesMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + RunTestCaseRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.RunTestCaseRequest"; }; - return ExportTestCasesMetadata; + return RunTestCaseRequest; })(); - v3.ListTestCaseResultsRequest = (function() { + v3.RunTestCaseResponse = (function() { /** - * Properties of a ListTestCaseResultsRequest. + * Properties of a RunTestCaseResponse. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IListTestCaseResultsRequest - * @property {string|null} [parent] ListTestCaseResultsRequest parent - * @property {number|null} [pageSize] ListTestCaseResultsRequest pageSize - * @property {string|null} [pageToken] ListTestCaseResultsRequest pageToken - * @property {string|null} [filter] ListTestCaseResultsRequest filter + * @interface IRunTestCaseResponse + * @property {google.cloud.dialogflow.cx.v3.ITestCaseResult|null} [result] RunTestCaseResponse result */ /** - * Constructs a new ListTestCaseResultsRequest. + * Constructs a new RunTestCaseResponse. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a ListTestCaseResultsRequest. - * @implements IListTestCaseResultsRequest + * @classdesc Represents a RunTestCaseResponse. + * @implements IRunTestCaseResponse * @constructor - * @param {google.cloud.dialogflow.cx.v3.IListTestCaseResultsRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IRunTestCaseResponse=} [properties] Properties to set */ - function ListTestCaseResultsRequest(properties) { + function RunTestCaseResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -53006,119 +53408,77 @@ } /** - * ListTestCaseResultsRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest - * @instance - */ - ListTestCaseResultsRequest.prototype.parent = ""; - - /** - * ListTestCaseResultsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest - * @instance - */ - ListTestCaseResultsRequest.prototype.pageSize = 0; - - /** - * ListTestCaseResultsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest - * @instance - */ - ListTestCaseResultsRequest.prototype.pageToken = ""; - - /** - * ListTestCaseResultsRequest filter. - * @member {string} filter - * @memberof google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest + * RunTestCaseResponse result. + * @member {google.cloud.dialogflow.cx.v3.ITestCaseResult|null|undefined} result + * @memberof google.cloud.dialogflow.cx.v3.RunTestCaseResponse * @instance */ - ListTestCaseResultsRequest.prototype.filter = ""; + RunTestCaseResponse.prototype.result = null; /** - * Creates a new ListTestCaseResultsRequest instance using the specified properties. + * Creates a new RunTestCaseResponse instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest + * @memberof google.cloud.dialogflow.cx.v3.RunTestCaseResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IListTestCaseResultsRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest} ListTestCaseResultsRequest instance + * @param {google.cloud.dialogflow.cx.v3.IRunTestCaseResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.RunTestCaseResponse} RunTestCaseResponse instance */ - ListTestCaseResultsRequest.create = function create(properties) { - return new ListTestCaseResultsRequest(properties); + RunTestCaseResponse.create = function create(properties) { + return new RunTestCaseResponse(properties); }; /** - * Encodes the specified ListTestCaseResultsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest.verify|verify} messages. + * Encodes the specified RunTestCaseResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.RunTestCaseResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest + * @memberof google.cloud.dialogflow.cx.v3.RunTestCaseResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IListTestCaseResultsRequest} message ListTestCaseResultsRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IRunTestCaseResponse} message RunTestCaseResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListTestCaseResultsRequest.encode = function encode(message, writer) { + RunTestCaseResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.result != null && Object.hasOwnProperty.call(message, "result")) + $root.google.cloud.dialogflow.cx.v3.TestCaseResult.encode(message.result, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListTestCaseResultsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest.verify|verify} messages. + * Encodes the specified RunTestCaseResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.RunTestCaseResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest + * @memberof google.cloud.dialogflow.cx.v3.RunTestCaseResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IListTestCaseResultsRequest} message ListTestCaseResultsRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IRunTestCaseResponse} message RunTestCaseResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListTestCaseResultsRequest.encodeDelimited = function encodeDelimited(message, writer) { + RunTestCaseResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListTestCaseResultsRequest message from the specified reader or buffer. + * Decodes a RunTestCaseResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest + * @memberof google.cloud.dialogflow.cx.v3.RunTestCaseResponse * @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.ListTestCaseResultsRequest} ListTestCaseResultsRequest + * @returns {google.cloud.dialogflow.cx.v3.RunTestCaseResponse} RunTestCaseResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListTestCaseResultsRequest.decode = function decode(reader, length, error) { + RunTestCaseResponse.decode = function decode(reader, length, error) { 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.ListTestCaseResultsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.RunTestCaseResponse(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - case 4: { - message.filter = reader.string(); + message.result = $root.google.cloud.dialogflow.cx.v3.TestCaseResult.decode(reader, reader.uint32()); break; } default: @@ -53130,149 +53490,126 @@ }; /** - * Decodes a ListTestCaseResultsRequest message from the specified reader or buffer, length delimited. + * Decodes a RunTestCaseResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest + * @memberof google.cloud.dialogflow.cx.v3.RunTestCaseResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest} ListTestCaseResultsRequest + * @returns {google.cloud.dialogflow.cx.v3.RunTestCaseResponse} RunTestCaseResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListTestCaseResultsRequest.decodeDelimited = function decodeDelimited(reader) { + RunTestCaseResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListTestCaseResultsRequest message. + * Verifies a RunTestCaseResponse message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest + * @memberof google.cloud.dialogflow.cx.v3.RunTestCaseResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListTestCaseResultsRequest.verify = function verify(message) { + RunTestCaseResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; + if (message.result != null && message.hasOwnProperty("result")) { + var error = $root.google.cloud.dialogflow.cx.v3.TestCaseResult.verify(message.result); + if (error) + return "result." + error; + } return null; }; /** - * Creates a ListTestCaseResultsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a RunTestCaseResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest + * @memberof google.cloud.dialogflow.cx.v3.RunTestCaseResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest} ListTestCaseResultsRequest + * @returns {google.cloud.dialogflow.cx.v3.RunTestCaseResponse} RunTestCaseResponse */ - ListTestCaseResultsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest) + RunTestCaseResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.RunTestCaseResponse) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.filter != null) - message.filter = String(object.filter); + var message = new $root.google.cloud.dialogflow.cx.v3.RunTestCaseResponse(); + if (object.result != null) { + if (typeof object.result !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.RunTestCaseResponse.result: object expected"); + message.result = $root.google.cloud.dialogflow.cx.v3.TestCaseResult.fromObject(object.result); + } return message; }; /** - * Creates a plain object from a ListTestCaseResultsRequest message. Also converts values to other types if specified. + * Creates a plain object from a RunTestCaseResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest + * @memberof google.cloud.dialogflow.cx.v3.RunTestCaseResponse * @static - * @param {google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest} message ListTestCaseResultsRequest + * @param {google.cloud.dialogflow.cx.v3.RunTestCaseResponse} message RunTestCaseResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListTestCaseResultsRequest.toObject = function toObject(message, options) { + RunTestCaseResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; + if (options.defaults) + object.result = null; + if (message.result != null && message.hasOwnProperty("result")) + object.result = $root.google.cloud.dialogflow.cx.v3.TestCaseResult.toObject(message.result, options); return object; }; /** - * Converts this ListTestCaseResultsRequest to JSON. + * Converts this RunTestCaseResponse to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest + * @memberof google.cloud.dialogflow.cx.v3.RunTestCaseResponse * @instance * @returns {Object.} JSON object */ - ListTestCaseResultsRequest.prototype.toJSON = function toJSON() { + RunTestCaseResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListTestCaseResultsRequest + * Gets the default type url for RunTestCaseResponse * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest + * @memberof google.cloud.dialogflow.cx.v3.RunTestCaseResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListTestCaseResultsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + RunTestCaseResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.RunTestCaseResponse"; }; - return ListTestCaseResultsRequest; + return RunTestCaseResponse; })(); - v3.ListTestCaseResultsResponse = (function() { + v3.RunTestCaseMetadata = (function() { /** - * Properties of a ListTestCaseResultsResponse. + * Properties of a RunTestCaseMetadata. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IListTestCaseResultsResponse - * @property {Array.|null} [testCaseResults] ListTestCaseResultsResponse testCaseResults - * @property {string|null} [nextPageToken] ListTestCaseResultsResponse nextPageToken + * @interface IRunTestCaseMetadata */ /** - * Constructs a new ListTestCaseResultsResponse. + * Constructs a new RunTestCaseMetadata. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a ListTestCaseResultsResponse. - * @implements IListTestCaseResultsResponse + * @classdesc Represents a RunTestCaseMetadata. + * @implements IRunTestCaseMetadata * @constructor - * @param {google.cloud.dialogflow.cx.v3.IListTestCaseResultsResponse=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IRunTestCaseMetadata=} [properties] Properties to set */ - function ListTestCaseResultsResponse(properties) { - this.testCaseResults = []; + function RunTestCaseMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -53280,96 +53617,65 @@ } /** - * ListTestCaseResultsResponse testCaseResults. - * @member {Array.} testCaseResults - * @memberof google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse - * @instance - */ - ListTestCaseResultsResponse.prototype.testCaseResults = $util.emptyArray; - - /** - * ListTestCaseResultsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse - * @instance - */ - ListTestCaseResultsResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListTestCaseResultsResponse instance using the specified properties. + * Creates a new RunTestCaseMetadata instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse + * @memberof google.cloud.dialogflow.cx.v3.RunTestCaseMetadata * @static - * @param {google.cloud.dialogflow.cx.v3.IListTestCaseResultsResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse} ListTestCaseResultsResponse instance + * @param {google.cloud.dialogflow.cx.v3.IRunTestCaseMetadata=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.RunTestCaseMetadata} RunTestCaseMetadata instance */ - ListTestCaseResultsResponse.create = function create(properties) { - return new ListTestCaseResultsResponse(properties); + RunTestCaseMetadata.create = function create(properties) { + return new RunTestCaseMetadata(properties); }; /** - * Encodes the specified ListTestCaseResultsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse.verify|verify} messages. + * Encodes the specified RunTestCaseMetadata message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.RunTestCaseMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse + * @memberof google.cloud.dialogflow.cx.v3.RunTestCaseMetadata * @static - * @param {google.cloud.dialogflow.cx.v3.IListTestCaseResultsResponse} message ListTestCaseResultsResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IRunTestCaseMetadata} message RunTestCaseMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListTestCaseResultsResponse.encode = function encode(message, writer) { + RunTestCaseMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.testCaseResults != null && message.testCaseResults.length) - for (var i = 0; i < message.testCaseResults.length; ++i) - $root.google.cloud.dialogflow.cx.v3.TestCaseResult.encode(message.testCaseResults[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; /** - * Encodes the specified ListTestCaseResultsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse.verify|verify} messages. + * Encodes the specified RunTestCaseMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.RunTestCaseMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse + * @memberof google.cloud.dialogflow.cx.v3.RunTestCaseMetadata * @static - * @param {google.cloud.dialogflow.cx.v3.IListTestCaseResultsResponse} message ListTestCaseResultsResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IRunTestCaseMetadata} message RunTestCaseMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListTestCaseResultsResponse.encodeDelimited = function encodeDelimited(message, writer) { + RunTestCaseMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListTestCaseResultsResponse message from the specified reader or buffer. + * Decodes a RunTestCaseMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse + * @memberof google.cloud.dialogflow.cx.v3.RunTestCaseMetadata * @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.ListTestCaseResultsResponse} ListTestCaseResultsResponse + * @returns {google.cloud.dialogflow.cx.v3.RunTestCaseMetadata} RunTestCaseMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListTestCaseResultsResponse.decode = function decode(reader, length, error) { + RunTestCaseMetadata.decode = function decode(reader, length, error) { 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.ListTestCaseResultsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.RunTestCaseMetadata(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { - case 1: { - if (!(message.testCaseResults && message.testCaseResults.length)) - message.testCaseResults = []; - message.testCaseResults.push($root.google.cloud.dialogflow.cx.v3.TestCaseResult.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } default: reader.skipType(tag & 7); break; @@ -53379,148 +53685,112 @@ }; /** - * Decodes a ListTestCaseResultsResponse message from the specified reader or buffer, length delimited. + * Decodes a RunTestCaseMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse + * @memberof google.cloud.dialogflow.cx.v3.RunTestCaseMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse} ListTestCaseResultsResponse + * @returns {google.cloud.dialogflow.cx.v3.RunTestCaseMetadata} RunTestCaseMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListTestCaseResultsResponse.decodeDelimited = function decodeDelimited(reader) { + RunTestCaseMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListTestCaseResultsResponse message. + * Verifies a RunTestCaseMetadata message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse + * @memberof google.cloud.dialogflow.cx.v3.RunTestCaseMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListTestCaseResultsResponse.verify = function verify(message) { + RunTestCaseMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.testCaseResults != null && message.hasOwnProperty("testCaseResults")) { - if (!Array.isArray(message.testCaseResults)) - return "testCaseResults: array expected"; - for (var i = 0; i < message.testCaseResults.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.TestCaseResult.verify(message.testCaseResults[i]); - if (error) - return "testCaseResults." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; return null; }; /** - * Creates a ListTestCaseResultsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a RunTestCaseMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse + * @memberof google.cloud.dialogflow.cx.v3.RunTestCaseMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse} ListTestCaseResultsResponse + * @returns {google.cloud.dialogflow.cx.v3.RunTestCaseMetadata} RunTestCaseMetadata */ - ListTestCaseResultsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse) + RunTestCaseMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.RunTestCaseMetadata) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse(); - if (object.testCaseResults) { - if (!Array.isArray(object.testCaseResults)) - throw TypeError(".google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse.testCaseResults: array expected"); - message.testCaseResults = []; - for (var i = 0; i < object.testCaseResults.length; ++i) { - if (typeof object.testCaseResults[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse.testCaseResults: object expected"); - message.testCaseResults[i] = $root.google.cloud.dialogflow.cx.v3.TestCaseResult.fromObject(object.testCaseResults[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; + return new $root.google.cloud.dialogflow.cx.v3.RunTestCaseMetadata(); }; /** - * Creates a plain object from a ListTestCaseResultsResponse message. Also converts values to other types if specified. + * Creates a plain object from a RunTestCaseMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse + * @memberof google.cloud.dialogflow.cx.v3.RunTestCaseMetadata * @static - * @param {google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse} message ListTestCaseResultsResponse + * @param {google.cloud.dialogflow.cx.v3.RunTestCaseMetadata} message RunTestCaseMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListTestCaseResultsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.testCaseResults = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.testCaseResults && message.testCaseResults.length) { - object.testCaseResults = []; - for (var j = 0; j < message.testCaseResults.length; ++j) - object.testCaseResults[j] = $root.google.cloud.dialogflow.cx.v3.TestCaseResult.toObject(message.testCaseResults[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; + RunTestCaseMetadata.toObject = function toObject() { + return {}; }; /** - * Converts this ListTestCaseResultsResponse to JSON. + * Converts this RunTestCaseMetadata to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse + * @memberof google.cloud.dialogflow.cx.v3.RunTestCaseMetadata * @instance * @returns {Object.} JSON object */ - ListTestCaseResultsResponse.prototype.toJSON = function toJSON() { + RunTestCaseMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListTestCaseResultsResponse + * Gets the default type url for RunTestCaseMetadata * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse + * @memberof google.cloud.dialogflow.cx.v3.RunTestCaseMetadata * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListTestCaseResultsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + RunTestCaseMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.RunTestCaseMetadata"; }; - return ListTestCaseResultsResponse; + return RunTestCaseMetadata; })(); - v3.GetTestCaseResultRequest = (function() { + v3.BatchRunTestCasesRequest = (function() { /** - * Properties of a GetTestCaseResultRequest. + * Properties of a BatchRunTestCasesRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IGetTestCaseResultRequest - * @property {string|null} [name] GetTestCaseResultRequest name + * @interface IBatchRunTestCasesRequest + * @property {string|null} [parent] BatchRunTestCasesRequest parent + * @property {string|null} [environment] BatchRunTestCasesRequest environment + * @property {Array.|null} [testCases] BatchRunTestCasesRequest testCases */ /** - * Constructs a new GetTestCaseResultRequest. + * Constructs a new BatchRunTestCasesRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a GetTestCaseResultRequest. - * @implements IGetTestCaseResultRequest + * @classdesc Represents a BatchRunTestCasesRequest. + * @implements IBatchRunTestCasesRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IGetTestCaseResultRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IBatchRunTestCasesRequest=} [properties] Properties to set */ - function GetTestCaseResultRequest(properties) { + function BatchRunTestCasesRequest(properties) { + this.testCases = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -53528,77 +53798,108 @@ } /** - * GetTestCaseResultRequest name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.GetTestCaseResultRequest + * BatchRunTestCasesRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest * @instance */ - GetTestCaseResultRequest.prototype.name = ""; + BatchRunTestCasesRequest.prototype.parent = ""; /** - * Creates a new GetTestCaseResultRequest instance using the specified properties. + * BatchRunTestCasesRequest environment. + * @member {string} environment + * @memberof google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest + * @instance + */ + BatchRunTestCasesRequest.prototype.environment = ""; + + /** + * BatchRunTestCasesRequest testCases. + * @member {Array.} testCases + * @memberof google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest + * @instance + */ + BatchRunTestCasesRequest.prototype.testCases = $util.emptyArray; + + /** + * Creates a new BatchRunTestCasesRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.GetTestCaseResultRequest + * @memberof google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IGetTestCaseResultRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.GetTestCaseResultRequest} GetTestCaseResultRequest instance + * @param {google.cloud.dialogflow.cx.v3.IBatchRunTestCasesRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest} BatchRunTestCasesRequest instance */ - GetTestCaseResultRequest.create = function create(properties) { - return new GetTestCaseResultRequest(properties); + BatchRunTestCasesRequest.create = function create(properties) { + return new BatchRunTestCasesRequest(properties); }; /** - * Encodes the specified GetTestCaseResultRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetTestCaseResultRequest.verify|verify} messages. + * Encodes the specified BatchRunTestCasesRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.GetTestCaseResultRequest + * @memberof google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IGetTestCaseResultRequest} message GetTestCaseResultRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IBatchRunTestCasesRequest} message BatchRunTestCasesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetTestCaseResultRequest.encode = function encode(message, writer) { + BatchRunTestCasesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.environment); + if (message.testCases != null && message.testCases.length) + for (var i = 0; i < message.testCases.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.testCases[i]); return writer; }; /** - * Encodes the specified GetTestCaseResultRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetTestCaseResultRequest.verify|verify} messages. + * Encodes the specified BatchRunTestCasesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.GetTestCaseResultRequest + * @memberof google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IGetTestCaseResultRequest} message GetTestCaseResultRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IBatchRunTestCasesRequest} message BatchRunTestCasesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetTestCaseResultRequest.encodeDelimited = function encodeDelimited(message, writer) { + BatchRunTestCasesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetTestCaseResultRequest message from the specified reader or buffer. + * Decodes a BatchRunTestCasesRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.GetTestCaseResultRequest + * @memberof google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest * @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.GetTestCaseResultRequest} GetTestCaseResultRequest + * @returns {google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest} BatchRunTestCasesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetTestCaseResultRequest.decode = function decode(reader, length, error) { + BatchRunTestCasesRequest.decode = function decode(reader, length, error) { 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.GetTestCaseResultRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.parent = reader.string(); + break; + } + case 2: { + message.environment = reader.string(); + break; + } + case 3: { + if (!(message.testCases && message.testCases.length)) + message.testCases = []; + message.testCases.push(reader.string()); break; } default: @@ -53610,414 +53911,606 @@ }; /** - * Decodes a GetTestCaseResultRequest message from the specified reader or buffer, length delimited. + * Decodes a BatchRunTestCasesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.GetTestCaseResultRequest + * @memberof google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.GetTestCaseResultRequest} GetTestCaseResultRequest + * @returns {google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest} BatchRunTestCasesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetTestCaseResultRequest.decodeDelimited = function decodeDelimited(reader) { + BatchRunTestCasesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetTestCaseResultRequest message. + * Verifies a BatchRunTestCasesRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.GetTestCaseResultRequest + * @memberof google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetTestCaseResultRequest.verify = function verify(message) { + BatchRunTestCasesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.environment != null && message.hasOwnProperty("environment")) + if (!$util.isString(message.environment)) + return "environment: string expected"; + if (message.testCases != null && message.hasOwnProperty("testCases")) { + if (!Array.isArray(message.testCases)) + return "testCases: array expected"; + for (var i = 0; i < message.testCases.length; ++i) + if (!$util.isString(message.testCases[i])) + return "testCases: string[] expected"; + } return null; }; /** - * Creates a GetTestCaseResultRequest message from a plain object. Also converts values to their respective internal types. + * Creates a BatchRunTestCasesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.GetTestCaseResultRequest + * @memberof google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.GetTestCaseResultRequest} GetTestCaseResultRequest + * @returns {google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest} BatchRunTestCasesRequest */ - GetTestCaseResultRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.GetTestCaseResultRequest) + BatchRunTestCasesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.GetTestCaseResultRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.environment != null) + message.environment = String(object.environment); + if (object.testCases) { + if (!Array.isArray(object.testCases)) + throw TypeError(".google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest.testCases: array expected"); + message.testCases = []; + for (var i = 0; i < object.testCases.length; ++i) + message.testCases[i] = String(object.testCases[i]); + } return message; }; /** - * Creates a plain object from a GetTestCaseResultRequest message. Also converts values to other types if specified. + * Creates a plain object from a BatchRunTestCasesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.GetTestCaseResultRequest + * @memberof google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest * @static - * @param {google.cloud.dialogflow.cx.v3.GetTestCaseResultRequest} message GetTestCaseResultRequest + * @param {google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest} message BatchRunTestCasesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetTestCaseResultRequest.toObject = function toObject(message, options) { + BatchRunTestCasesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (options.arrays || options.defaults) + object.testCases = []; + if (options.defaults) { + object.parent = ""; + object.environment = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.environment != null && message.hasOwnProperty("environment")) + object.environment = message.environment; + if (message.testCases && message.testCases.length) { + object.testCases = []; + for (var j = 0; j < message.testCases.length; ++j) + object.testCases[j] = message.testCases[j]; + } return object; }; /** - * Converts this GetTestCaseResultRequest to JSON. + * Converts this BatchRunTestCasesRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.GetTestCaseResultRequest + * @memberof google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest * @instance * @returns {Object.} JSON object */ - GetTestCaseResultRequest.prototype.toJSON = function toJSON() { + BatchRunTestCasesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetTestCaseResultRequest + * Gets the default type url for BatchRunTestCasesRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.GetTestCaseResultRequest + * @memberof google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetTestCaseResultRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + BatchRunTestCasesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.GetTestCaseResultRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest"; }; - return GetTestCaseResultRequest; + return BatchRunTestCasesRequest; })(); - /** - * TestResult enum. - * @name google.cloud.dialogflow.cx.v3.TestResult - * @enum {number} - * @property {number} TEST_RESULT_UNSPECIFIED=0 TEST_RESULT_UNSPECIFIED value - * @property {number} PASSED=1 PASSED value - * @property {number} FAILED=2 FAILED value - */ - v3.TestResult = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TEST_RESULT_UNSPECIFIED"] = 0; - values[valuesById[1] = "PASSED"] = 1; - values[valuesById[2] = "FAILED"] = 2; - return values; - })(); + v3.BatchRunTestCasesResponse = (function() { - v3.Intents = (function() { + /** + * Properties of a BatchRunTestCasesResponse. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IBatchRunTestCasesResponse + * @property {Array.|null} [results] BatchRunTestCasesResponse results + */ /** - * Constructs a new Intents service. + * Constructs a new BatchRunTestCasesResponse. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents an Intents - * @extends $protobuf.rpc.Service + * @classdesc Represents a BatchRunTestCasesResponse. + * @implements IBatchRunTestCasesResponse * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @param {google.cloud.dialogflow.cx.v3.IBatchRunTestCasesResponse=} [properties] Properties to set */ - function Intents(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + function BatchRunTestCasesResponse(properties) { + this.results = []; + 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]]; } - (Intents.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Intents; + /** + * BatchRunTestCasesResponse results. + * @member {Array.} results + * @memberof google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse + * @instance + */ + BatchRunTestCasesResponse.prototype.results = $util.emptyArray; /** - * Creates new Intents service using the specified rpc implementation. + * Creates a new BatchRunTestCasesResponse instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.Intents + * @memberof google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {Intents} RPC service. Useful where requests and/or responses are streamed. + * @param {google.cloud.dialogflow.cx.v3.IBatchRunTestCasesResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse} BatchRunTestCasesResponse instance */ - Intents.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); + BatchRunTestCasesResponse.create = function create(properties) { + return new BatchRunTestCasesResponse(properties); }; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Intents|listIntents}. - * @memberof google.cloud.dialogflow.cx.v3.Intents - * @typedef ListIntentsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.ListIntentsResponse} [response] ListIntentsResponse + * Encodes the specified BatchRunTestCasesResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse + * @static + * @param {google.cloud.dialogflow.cx.v3.IBatchRunTestCasesResponse} message BatchRunTestCasesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + BatchRunTestCasesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.results != null && message.results.length) + for (var i = 0; i < message.results.length; ++i) + $root.google.cloud.dialogflow.cx.v3.TestCaseResult.encode(message.results[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; /** - * Calls ListIntents. - * @function listIntents - * @memberof google.cloud.dialogflow.cx.v3.Intents - * @instance - * @param {google.cloud.dialogflow.cx.v3.IListIntentsRequest} request ListIntentsRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Intents.ListIntentsCallback} callback Node-style callback called with the error, if any, and ListIntentsResponse - * @returns {undefined} - * @variation 1 + * Encodes the specified BatchRunTestCasesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse + * @static + * @param {google.cloud.dialogflow.cx.v3.IBatchRunTestCasesResponse} message BatchRunTestCasesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(Intents.prototype.listIntents = function listIntents(request, callback) { - return this.rpcCall(listIntents, $root.google.cloud.dialogflow.cx.v3.ListIntentsRequest, $root.google.cloud.dialogflow.cx.v3.ListIntentsResponse, request, callback); - }, "name", { value: "ListIntents" }); + BatchRunTestCasesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Calls ListIntents. - * @function listIntents - * @memberof google.cloud.dialogflow.cx.v3.Intents - * @instance - * @param {google.cloud.dialogflow.cx.v3.IListIntentsRequest} request ListIntentsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Decodes a BatchRunTestCasesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse + * @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.BatchRunTestCasesResponse} BatchRunTestCasesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + BatchRunTestCasesResponse.decode = function decode(reader, length, error) { + 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.BatchRunTestCasesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.results && message.results.length)) + message.results = []; + message.results.push($root.google.cloud.dialogflow.cx.v3.TestCaseResult.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Intents|getIntent}. - * @memberof google.cloud.dialogflow.cx.v3.Intents - * @typedef GetIntentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.Intent} [response] Intent + * Decodes a BatchRunTestCasesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse} BatchRunTestCasesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + BatchRunTestCasesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls GetIntent. - * @function getIntent - * @memberof google.cloud.dialogflow.cx.v3.Intents - * @instance - * @param {google.cloud.dialogflow.cx.v3.IGetIntentRequest} request GetIntentRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Intents.GetIntentCallback} callback Node-style callback called with the error, if any, and Intent - * @returns {undefined} - * @variation 1 + * Verifies a BatchRunTestCasesResponse message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Object.defineProperty(Intents.prototype.getIntent = function getIntent(request, callback) { - return this.rpcCall(getIntent, $root.google.cloud.dialogflow.cx.v3.GetIntentRequest, $root.google.cloud.dialogflow.cx.v3.Intent, request, callback); - }, "name", { value: "GetIntent" }); + BatchRunTestCasesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.results != null && message.hasOwnProperty("results")) { + if (!Array.isArray(message.results)) + return "results: array expected"; + for (var i = 0; i < message.results.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.TestCaseResult.verify(message.results[i]); + if (error) + return "results." + error; + } + } + return null; + }; /** - * Calls GetIntent. - * @function getIntent - * @memberof google.cloud.dialogflow.cx.v3.Intents - * @instance - * @param {google.cloud.dialogflow.cx.v3.IGetIntentRequest} request GetIntentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a BatchRunTestCasesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse} BatchRunTestCasesResponse */ + BatchRunTestCasesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse(); + if (object.results) { + if (!Array.isArray(object.results)) + throw TypeError(".google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse.results: array expected"); + message.results = []; + for (var i = 0; i < object.results.length; ++i) { + if (typeof object.results[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse.results: object expected"); + message.results[i] = $root.google.cloud.dialogflow.cx.v3.TestCaseResult.fromObject(object.results[i]); + } + } + return message; + }; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Intents|createIntent}. - * @memberof google.cloud.dialogflow.cx.v3.Intents - * @typedef CreateIntentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.Intent} [response] Intent + * Creates a plain object from a BatchRunTestCasesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse + * @static + * @param {google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse} message BatchRunTestCasesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ + BatchRunTestCasesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.results = []; + if (message.results && message.results.length) { + object.results = []; + for (var j = 0; j < message.results.length; ++j) + object.results[j] = $root.google.cloud.dialogflow.cx.v3.TestCaseResult.toObject(message.results[j], options); + } + return object; + }; /** - * Calls CreateIntent. - * @function createIntent - * @memberof google.cloud.dialogflow.cx.v3.Intents + * Converts this BatchRunTestCasesResponse to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse * @instance - * @param {google.cloud.dialogflow.cx.v3.ICreateIntentRequest} request CreateIntentRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Intents.CreateIntentCallback} callback Node-style callback called with the error, if any, and Intent - * @returns {undefined} - * @variation 1 + * @returns {Object.} JSON object */ - Object.defineProperty(Intents.prototype.createIntent = function createIntent(request, callback) { - return this.rpcCall(createIntent, $root.google.cloud.dialogflow.cx.v3.CreateIntentRequest, $root.google.cloud.dialogflow.cx.v3.Intent, request, callback); - }, "name", { value: "CreateIntent" }); + BatchRunTestCasesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Calls CreateIntent. - * @function createIntent - * @memberof google.cloud.dialogflow.cx.v3.Intents - * @instance - * @param {google.cloud.dialogflow.cx.v3.ICreateIntentRequest} request CreateIntentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Gets the default type url for BatchRunTestCasesResponse + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ + BatchRunTestCasesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse"; + }; + + return BatchRunTestCasesResponse; + })(); + + v3.BatchRunTestCasesMetadata = (function() { /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Intents|updateIntent}. - * @memberof google.cloud.dialogflow.cx.v3.Intents - * @typedef UpdateIntentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.Intent} [response] Intent + * Properties of a BatchRunTestCasesMetadata. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IBatchRunTestCasesMetadata + * @property {Array.|null} [errors] BatchRunTestCasesMetadata errors */ /** - * Calls UpdateIntent. - * @function updateIntent - * @memberof google.cloud.dialogflow.cx.v3.Intents - * @instance - * @param {google.cloud.dialogflow.cx.v3.IUpdateIntentRequest} request UpdateIntentRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Intents.UpdateIntentCallback} callback Node-style callback called with the error, if any, and Intent - * @returns {undefined} - * @variation 1 + * Constructs a new BatchRunTestCasesMetadata. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a BatchRunTestCasesMetadata. + * @implements IBatchRunTestCasesMetadata + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IBatchRunTestCasesMetadata=} [properties] Properties to set */ - Object.defineProperty(Intents.prototype.updateIntent = function updateIntent(request, callback) { - return this.rpcCall(updateIntent, $root.google.cloud.dialogflow.cx.v3.UpdateIntentRequest, $root.google.cloud.dialogflow.cx.v3.Intent, request, callback); - }, "name", { value: "UpdateIntent" }); + function BatchRunTestCasesMetadata(properties) { + this.errors = []; + 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]]; + } /** - * Calls UpdateIntent. - * @function updateIntent - * @memberof google.cloud.dialogflow.cx.v3.Intents + * BatchRunTestCasesMetadata errors. + * @member {Array.} errors + * @memberof google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata * @instance - * @param {google.cloud.dialogflow.cx.v3.IUpdateIntentRequest} request UpdateIntentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + BatchRunTestCasesMetadata.prototype.errors = $util.emptyArray; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Intents|deleteIntent}. - * @memberof google.cloud.dialogflow.cx.v3.Intents - * @typedef DeleteIntentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty + * Creates a new BatchRunTestCasesMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata + * @static + * @param {google.cloud.dialogflow.cx.v3.IBatchRunTestCasesMetadata=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata} BatchRunTestCasesMetadata instance */ + BatchRunTestCasesMetadata.create = function create(properties) { + return new BatchRunTestCasesMetadata(properties); + }; /** - * Calls DeleteIntent. - * @function deleteIntent - * @memberof google.cloud.dialogflow.cx.v3.Intents - * @instance - * @param {google.cloud.dialogflow.cx.v3.IDeleteIntentRequest} request DeleteIntentRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Intents.DeleteIntentCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 + * Encodes the specified BatchRunTestCasesMetadata message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata + * @static + * @param {google.cloud.dialogflow.cx.v3.IBatchRunTestCasesMetadata} message BatchRunTestCasesMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(Intents.prototype.deleteIntent = function deleteIntent(request, callback) { - return this.rpcCall(deleteIntent, $root.google.cloud.dialogflow.cx.v3.DeleteIntentRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteIntent" }); + BatchRunTestCasesMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.errors != null && message.errors.length) + for (var i = 0; i < message.errors.length; ++i) + $root.google.cloud.dialogflow.cx.v3.TestError.encode(message.errors[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; /** - * Calls DeleteIntent. - * @function deleteIntent - * @memberof google.cloud.dialogflow.cx.v3.Intents - * @instance - * @param {google.cloud.dialogflow.cx.v3.IDeleteIntentRequest} request DeleteIntentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Encodes the specified BatchRunTestCasesMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata + * @static + * @param {google.cloud.dialogflow.cx.v3.IBatchRunTestCasesMetadata} message BatchRunTestCasesMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + BatchRunTestCasesMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Intents|importIntents}. - * @memberof google.cloud.dialogflow.cx.v3.Intents - * @typedef ImportIntentsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Decodes a BatchRunTestCasesMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata + * @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.BatchRunTestCasesMetadata} BatchRunTestCasesMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + BatchRunTestCasesMetadata.decode = function decode(reader, length, error) { + 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.BatchRunTestCasesMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.errors && message.errors.length)) + message.errors = []; + message.errors.push($root.google.cloud.dialogflow.cx.v3.TestError.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Calls ImportIntents. - * @function importIntents - * @memberof google.cloud.dialogflow.cx.v3.Intents - * @instance - * @param {google.cloud.dialogflow.cx.v3.IImportIntentsRequest} request ImportIntentsRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Intents.ImportIntentsCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 + * Decodes a BatchRunTestCasesMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata} BatchRunTestCasesMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Object.defineProperty(Intents.prototype.importIntents = function importIntents(request, callback) { - return this.rpcCall(importIntents, $root.google.cloud.dialogflow.cx.v3.ImportIntentsRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "ImportIntents" }); + BatchRunTestCasesMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls ImportIntents. - * @function importIntents - * @memberof google.cloud.dialogflow.cx.v3.Intents - * @instance - * @param {google.cloud.dialogflow.cx.v3.IImportIntentsRequest} request ImportIntentsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Verifies a BatchRunTestCasesMetadata message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ + BatchRunTestCasesMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.errors != null && message.hasOwnProperty("errors")) { + if (!Array.isArray(message.errors)) + return "errors: array expected"; + for (var i = 0; i < message.errors.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.TestError.verify(message.errors[i]); + if (error) + return "errors." + error; + } + } + return null; + }; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Intents|exportIntents}. - * @memberof google.cloud.dialogflow.cx.v3.Intents - * @typedef ExportIntentsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Creates a BatchRunTestCasesMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata} BatchRunTestCasesMetadata */ + BatchRunTestCasesMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata(); + if (object.errors) { + if (!Array.isArray(object.errors)) + throw TypeError(".google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata.errors: array expected"); + message.errors = []; + for (var i = 0; i < object.errors.length; ++i) { + if (typeof object.errors[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata.errors: object expected"); + message.errors[i] = $root.google.cloud.dialogflow.cx.v3.TestError.fromObject(object.errors[i]); + } + } + return message; + }; /** - * Calls ExportIntents. - * @function exportIntents - * @memberof google.cloud.dialogflow.cx.v3.Intents - * @instance - * @param {google.cloud.dialogflow.cx.v3.IExportIntentsRequest} request ExportIntentsRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Intents.ExportIntentsCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 + * Creates a plain object from a BatchRunTestCasesMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata + * @static + * @param {google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata} message BatchRunTestCasesMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Object.defineProperty(Intents.prototype.exportIntents = function exportIntents(request, callback) { - return this.rpcCall(exportIntents, $root.google.cloud.dialogflow.cx.v3.ExportIntentsRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "ExportIntents" }); + BatchRunTestCasesMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.errors = []; + if (message.errors && message.errors.length) { + object.errors = []; + for (var j = 0; j < message.errors.length; ++j) + object.errors[j] = $root.google.cloud.dialogflow.cx.v3.TestError.toObject(message.errors[j], options); + } + return object; + }; /** - * Calls ExportIntents. - * @function exportIntents - * @memberof google.cloud.dialogflow.cx.v3.Intents + * Converts this BatchRunTestCasesMetadata to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata * @instance - * @param {google.cloud.dialogflow.cx.v3.IExportIntentsRequest} request ExportIntentsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * @returns {Object.} JSON object */ + BatchRunTestCasesMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return Intents; + /** + * Gets the default type url for BatchRunTestCasesMetadata + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BatchRunTestCasesMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata"; + }; + + return BatchRunTestCasesMetadata; })(); - v3.Intent = (function() { + v3.TestError = (function() { /** - * Properties of an Intent. + * Properties of a TestError. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IIntent - * @property {string|null} [name] Intent name - * @property {string|null} [displayName] Intent displayName - * @property {Array.|null} [trainingPhrases] Intent trainingPhrases - * @property {Array.|null} [parameters] Intent parameters - * @property {number|null} [priority] Intent priority - * @property {boolean|null} [isFallback] Intent isFallback - * @property {Object.|null} [labels] Intent labels - * @property {string|null} [description] Intent description + * @interface ITestError + * @property {string|null} [testCase] TestError testCase + * @property {google.rpc.IStatus|null} [status] TestError status + * @property {google.protobuf.ITimestamp|null} [testTime] TestError testTime */ /** - * Constructs a new Intent. + * Constructs a new TestError. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents an Intent. - * @implements IIntent + * @classdesc Represents a TestError. + * @implements ITestError * @constructor - * @param {google.cloud.dialogflow.cx.v3.IIntent=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.ITestError=} [properties] Properties to set */ - function Intent(properties) { - this.trainingPhrases = []; - this.parameters = []; - this.labels = {}; + function TestError(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -54025,201 +54518,105 @@ } /** - * Intent name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.Intent - * @instance - */ - Intent.prototype.name = ""; - - /** - * Intent displayName. - * @member {string} displayName - * @memberof google.cloud.dialogflow.cx.v3.Intent - * @instance - */ - Intent.prototype.displayName = ""; - - /** - * Intent trainingPhrases. - * @member {Array.} trainingPhrases - * @memberof google.cloud.dialogflow.cx.v3.Intent - * @instance - */ - Intent.prototype.trainingPhrases = $util.emptyArray; - - /** - * Intent parameters. - * @member {Array.} parameters - * @memberof google.cloud.dialogflow.cx.v3.Intent - * @instance - */ - Intent.prototype.parameters = $util.emptyArray; - - /** - * Intent priority. - * @member {number} priority - * @memberof google.cloud.dialogflow.cx.v3.Intent - * @instance - */ - Intent.prototype.priority = 0; - - /** - * Intent isFallback. - * @member {boolean} isFallback - * @memberof google.cloud.dialogflow.cx.v3.Intent + * TestError testCase. + * @member {string} testCase + * @memberof google.cloud.dialogflow.cx.v3.TestError * @instance */ - Intent.prototype.isFallback = false; + TestError.prototype.testCase = ""; /** - * Intent labels. - * @member {Object.} labels - * @memberof google.cloud.dialogflow.cx.v3.Intent + * TestError status. + * @member {google.rpc.IStatus|null|undefined} status + * @memberof google.cloud.dialogflow.cx.v3.TestError * @instance */ - Intent.prototype.labels = $util.emptyObject; + TestError.prototype.status = null; /** - * Intent description. - * @member {string} description - * @memberof google.cloud.dialogflow.cx.v3.Intent + * TestError testTime. + * @member {google.protobuf.ITimestamp|null|undefined} testTime + * @memberof google.cloud.dialogflow.cx.v3.TestError * @instance */ - Intent.prototype.description = ""; + TestError.prototype.testTime = null; /** - * Creates a new Intent instance using the specified properties. + * Creates a new TestError instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.Intent + * @memberof google.cloud.dialogflow.cx.v3.TestError * @static - * @param {google.cloud.dialogflow.cx.v3.IIntent=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.Intent} Intent instance + * @param {google.cloud.dialogflow.cx.v3.ITestError=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.TestError} TestError instance */ - Intent.create = function create(properties) { - return new Intent(properties); + TestError.create = function create(properties) { + return new TestError(properties); }; /** - * Encodes the specified Intent message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Intent.verify|verify} messages. + * Encodes the specified TestError message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TestError.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.Intent + * @memberof google.cloud.dialogflow.cx.v3.TestError * @static - * @param {google.cloud.dialogflow.cx.v3.IIntent} message Intent message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ITestError} message TestError message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Intent.encode = function encode(message, writer) { + TestError.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.trainingPhrases != null && message.trainingPhrases.length) - for (var i = 0; i < message.trainingPhrases.length; ++i) - $root.google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.encode(message.trainingPhrases[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.parameters != null && message.parameters.length) - for (var i = 0; i < message.parameters.length; ++i) - $root.google.cloud.dialogflow.cx.v3.Intent.Parameter.encode(message.parameters[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.priority != null && Object.hasOwnProperty.call(message, "priority")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.priority); - if (message.isFallback != null && Object.hasOwnProperty.call(message, "isFallback")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.isFallback); - if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 7, wireType 2 =*/58).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.description); + if (message.testCase != null && Object.hasOwnProperty.call(message, "testCase")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.testCase); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + $root.google.rpc.Status.encode(message.status, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.testTime != null && Object.hasOwnProperty.call(message, "testTime")) + $root.google.protobuf.Timestamp.encode(message.testTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified Intent message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Intent.verify|verify} messages. + * Encodes the specified TestError message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TestError.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Intent + * @memberof google.cloud.dialogflow.cx.v3.TestError * @static - * @param {google.cloud.dialogflow.cx.v3.IIntent} message Intent message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ITestError} message TestError message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Intent.encodeDelimited = function encodeDelimited(message, writer) { + TestError.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Intent message from the specified reader or buffer. + * Decodes a TestError message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.Intent + * @memberof google.cloud.dialogflow.cx.v3.TestError * @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.Intent} Intent + * @returns {google.cloud.dialogflow.cx.v3.TestError} TestError * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Intent.decode = function decode(reader, length, error) { + TestError.decode = function decode(reader, length, error) { 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.Intent(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.TestError(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.testCase = reader.string(); break; } case 2: { - message.displayName = reader.string(); + message.status = $root.google.rpc.Status.decode(reader, reader.uint32()); break; } case 3: { - if (!(message.trainingPhrases && message.trainingPhrases.length)) - message.trainingPhrases = []; - message.trainingPhrases.push($root.google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.decode(reader, reader.uint32())); - break; - } - case 4: { - if (!(message.parameters && message.parameters.length)) - message.parameters = []; - message.parameters.push($root.google.cloud.dialogflow.cx.v3.Intent.Parameter.decode(reader, reader.uint32())); - break; - } - case 5: { - message.priority = reader.int32(); - break; - } - case 6: { - message.isFallback = reader.bool(); - break; - } - case 7: { - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.labels[key] = value; - break; - } - case 8: { - message.description = reader.string(); + message.testTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } default: @@ -54231,1012 +54628,650 @@ }; /** - * Decodes an Intent message from the specified reader or buffer, length delimited. + * Decodes a TestError message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Intent + * @memberof google.cloud.dialogflow.cx.v3.TestError * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.Intent} Intent + * @returns {google.cloud.dialogflow.cx.v3.TestError} TestError * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Intent.decodeDelimited = function decodeDelimited(reader) { + TestError.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Intent message. + * Verifies a TestError message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.Intent + * @memberof google.cloud.dialogflow.cx.v3.TestError * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Intent.verify = function verify(message) { + TestError.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.trainingPhrases != null && message.hasOwnProperty("trainingPhrases")) { - if (!Array.isArray(message.trainingPhrases)) - return "trainingPhrases: array expected"; - for (var i = 0; i < message.trainingPhrases.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.verify(message.trainingPhrases[i]); - if (error) - return "trainingPhrases." + error; - } - } - if (message.parameters != null && message.hasOwnProperty("parameters")) { - if (!Array.isArray(message.parameters)) - return "parameters: array expected"; - for (var i = 0; i < message.parameters.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.Intent.Parameter.verify(message.parameters[i]); - if (error) - return "parameters." + error; - } + if (message.testCase != null && message.hasOwnProperty("testCase")) + if (!$util.isString(message.testCase)) + return "testCase: string expected"; + if (message.status != null && message.hasOwnProperty("status")) { + var error = $root.google.rpc.Status.verify(message.status); + if (error) + return "status." + error; } - if (message.priority != null && message.hasOwnProperty("priority")) - if (!$util.isInteger(message.priority)) - return "priority: integer expected"; - if (message.isFallback != null && message.hasOwnProperty("isFallback")) - if (typeof message.isFallback !== "boolean") - return "isFallback: boolean expected"; - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; + if (message.testTime != null && message.hasOwnProperty("testTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.testTime); + if (error) + return "testTime." + error; } - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; return null; }; /** - * Creates an Intent message from a plain object. Also converts values to their respective internal types. + * Creates a TestError message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.Intent + * @memberof google.cloud.dialogflow.cx.v3.TestError * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.Intent} Intent + * @returns {google.cloud.dialogflow.cx.v3.TestError} TestError */ - Intent.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.Intent) + TestError.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.TestError) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.Intent(); - if (object.name != null) - message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.trainingPhrases) { - if (!Array.isArray(object.trainingPhrases)) - throw TypeError(".google.cloud.dialogflow.cx.v3.Intent.trainingPhrases: array expected"); - message.trainingPhrases = []; - for (var i = 0; i < object.trainingPhrases.length; ++i) { - if (typeof object.trainingPhrases[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.Intent.trainingPhrases: object expected"); - message.trainingPhrases[i] = $root.google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.fromObject(object.trainingPhrases[i]); - } - } - if (object.parameters) { - if (!Array.isArray(object.parameters)) - throw TypeError(".google.cloud.dialogflow.cx.v3.Intent.parameters: array expected"); - message.parameters = []; - for (var i = 0; i < object.parameters.length; ++i) { - if (typeof object.parameters[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.Intent.parameters: object expected"); - message.parameters[i] = $root.google.cloud.dialogflow.cx.v3.Intent.Parameter.fromObject(object.parameters[i]); - } + var message = new $root.google.cloud.dialogflow.cx.v3.TestError(); + if (object.testCase != null) + message.testCase = String(object.testCase); + if (object.status != null) { + if (typeof object.status !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.TestError.status: object expected"); + message.status = $root.google.rpc.Status.fromObject(object.status); } - if (object.priority != null) - message.priority = object.priority | 0; - if (object.isFallback != null) - message.isFallback = Boolean(object.isFallback); - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.Intent.labels: object expected"); - message.labels = {}; - for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) - message.labels[keys[i]] = String(object.labels[keys[i]]); + if (object.testTime != null) { + if (typeof object.testTime !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.TestError.testTime: object expected"); + message.testTime = $root.google.protobuf.Timestamp.fromObject(object.testTime); } - if (object.description != null) - message.description = String(object.description); return message; }; /** - * Creates a plain object from an Intent message. Also converts values to other types if specified. + * Creates a plain object from a TestError message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.Intent + * @memberof google.cloud.dialogflow.cx.v3.TestError * @static - * @param {google.cloud.dialogflow.cx.v3.Intent} message Intent + * @param {google.cloud.dialogflow.cx.v3.TestError} message TestError * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Intent.toObject = function toObject(message, options) { + TestError.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.trainingPhrases = []; - object.parameters = []; - } - if (options.objects || options.defaults) - object.labels = {}; if (options.defaults) { - object.name = ""; - object.displayName = ""; - object.priority = 0; - object.isFallback = false; - object.description = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.trainingPhrases && message.trainingPhrases.length) { - object.trainingPhrases = []; - for (var j = 0; j < message.trainingPhrases.length; ++j) - object.trainingPhrases[j] = $root.google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.toObject(message.trainingPhrases[j], options); - } - if (message.parameters && message.parameters.length) { - object.parameters = []; - for (var j = 0; j < message.parameters.length; ++j) - object.parameters[j] = $root.google.cloud.dialogflow.cx.v3.Intent.Parameter.toObject(message.parameters[j], options); - } - if (message.priority != null && message.hasOwnProperty("priority")) - object.priority = message.priority; - if (message.isFallback != null && message.hasOwnProperty("isFallback")) - object.isFallback = message.isFallback; - var keys2; - if (message.labels && (keys2 = Object.keys(message.labels)).length) { - object.labels = {}; - for (var j = 0; j < keys2.length; ++j) - object.labels[keys2[j]] = message.labels[keys2[j]]; + object.testCase = ""; + object.status = null; + object.testTime = null; } - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; + if (message.testCase != null && message.hasOwnProperty("testCase")) + object.testCase = message.testCase; + if (message.status != null && message.hasOwnProperty("status")) + object.status = $root.google.rpc.Status.toObject(message.status, options); + if (message.testTime != null && message.hasOwnProperty("testTime")) + object.testTime = $root.google.protobuf.Timestamp.toObject(message.testTime, options); return object; }; /** - * Converts this Intent to JSON. + * Converts this TestError to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.Intent + * @memberof google.cloud.dialogflow.cx.v3.TestError * @instance * @returns {Object.} JSON object */ - Intent.prototype.toJSON = function toJSON() { + TestError.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Intent + * Gets the default type url for TestError * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.Intent + * @memberof google.cloud.dialogflow.cx.v3.TestError * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Intent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + TestError.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Intent"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.TestError"; }; - Intent.TrainingPhrase = (function() { + return TestError; + })(); - /** - * Properties of a TrainingPhrase. - * @memberof google.cloud.dialogflow.cx.v3.Intent - * @interface ITrainingPhrase - * @property {string|null} [id] TrainingPhrase id - * @property {Array.|null} [parts] TrainingPhrase parts - * @property {number|null} [repeatCount] TrainingPhrase repeatCount - */ + v3.ImportTestCasesRequest = (function() { - /** - * Constructs a new TrainingPhrase. - * @memberof google.cloud.dialogflow.cx.v3.Intent - * @classdesc Represents a TrainingPhrase. - * @implements ITrainingPhrase - * @constructor - * @param {google.cloud.dialogflow.cx.v3.Intent.ITrainingPhrase=} [properties] Properties to set - */ - function TrainingPhrase(properties) { - this.parts = []; - 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]]; - } + /** + * Properties of an ImportTestCasesRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IImportTestCasesRequest + * @property {string|null} [parent] ImportTestCasesRequest parent + * @property {string|null} [gcsUri] ImportTestCasesRequest gcsUri + * @property {Uint8Array|null} [content] ImportTestCasesRequest content + */ - /** - * TrainingPhrase id. - * @member {string} id - * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase - * @instance - */ - TrainingPhrase.prototype.id = ""; + /** + * Constructs a new ImportTestCasesRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents an ImportTestCasesRequest. + * @implements IImportTestCasesRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IImportTestCasesRequest=} [properties] Properties to set + */ + function ImportTestCasesRequest(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]]; + } - /** - * TrainingPhrase parts. - * @member {Array.} parts - * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase - * @instance - */ - TrainingPhrase.prototype.parts = $util.emptyArray; + /** + * ImportTestCasesRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.cx.v3.ImportTestCasesRequest + * @instance + */ + ImportTestCasesRequest.prototype.parent = ""; - /** - * TrainingPhrase repeatCount. - * @member {number} repeatCount - * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase - * @instance - */ - TrainingPhrase.prototype.repeatCount = 0; + /** + * ImportTestCasesRequest gcsUri. + * @member {string|null|undefined} gcsUri + * @memberof google.cloud.dialogflow.cx.v3.ImportTestCasesRequest + * @instance + */ + ImportTestCasesRequest.prototype.gcsUri = null; - /** - * Creates a new TrainingPhrase instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase - * @static - * @param {google.cloud.dialogflow.cx.v3.Intent.ITrainingPhrase=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase} TrainingPhrase instance - */ - TrainingPhrase.create = function create(properties) { - return new TrainingPhrase(properties); - }; + /** + * ImportTestCasesRequest content. + * @member {Uint8Array|null|undefined} content + * @memberof google.cloud.dialogflow.cx.v3.ImportTestCasesRequest + * @instance + */ + ImportTestCasesRequest.prototype.content = null; - /** - * Encodes the specified TrainingPhrase message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase - * @static - * @param {google.cloud.dialogflow.cx.v3.Intent.ITrainingPhrase} message TrainingPhrase message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TrainingPhrase.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); - if (message.parts != null && message.parts.length) - for (var i = 0; i < message.parts.length; ++i) - $root.google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part.encode(message.parts[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.repeatCount != null && Object.hasOwnProperty.call(message, "repeatCount")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.repeatCount); - return writer; - }; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * Encodes the specified TrainingPhrase message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase - * @static - * @param {google.cloud.dialogflow.cx.v3.Intent.ITrainingPhrase} message TrainingPhrase message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TrainingPhrase.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * ImportTestCasesRequest source. + * @member {"gcsUri"|"content"|undefined} source + * @memberof google.cloud.dialogflow.cx.v3.ImportTestCasesRequest + * @instance + */ + Object.defineProperty(ImportTestCasesRequest.prototype, "source", { + get: $util.oneOfGetter($oneOfFields = ["gcsUri", "content"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Decodes a TrainingPhrase message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase - * @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.Intent.TrainingPhrase} TrainingPhrase - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TrainingPhrase.decode = function decode(reader, length, error) { - 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.Intent.TrainingPhrase(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) + /** + * Creates a new ImportTestCasesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.ImportTestCasesRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IImportTestCasesRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ImportTestCasesRequest} ImportTestCasesRequest instance + */ + ImportTestCasesRequest.create = function create(properties) { + return new ImportTestCasesRequest(properties); + }; + + /** + * Encodes the specified ImportTestCasesRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportTestCasesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.ImportTestCasesRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IImportTestCasesRequest} message ImportTestCasesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImportTestCasesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.gcsUri != null && Object.hasOwnProperty.call(message, "gcsUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.gcsUri); + if (message.content != null && Object.hasOwnProperty.call(message, "content")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.content); + return writer; + }; + + /** + * Encodes the specified ImportTestCasesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportTestCasesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.ImportTestCasesRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IImportTestCasesRequest} message ImportTestCasesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImportTestCasesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ImportTestCasesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.ImportTestCasesRequest + * @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.ImportTestCasesRequest} ImportTestCasesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImportTestCasesRequest.decode = function decode(reader, length, error) { + 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.ImportTestCasesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); break; - switch (tag >>> 3) { - case 1: { - message.id = reader.string(); - break; - } - case 2: { - if (!(message.parts && message.parts.length)) - message.parts = []; - message.parts.push($root.google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part.decode(reader, reader.uint32())); - break; - } - case 3: { - message.repeatCount = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); + } + case 2: { + message.gcsUri = reader.string(); break; } - } - return message; - }; - - /** - * Decodes a TrainingPhrase message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase} TrainingPhrase - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TrainingPhrase.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TrainingPhrase message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TrainingPhrase.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isString(message.id)) - return "id: string expected"; - if (message.parts != null && message.hasOwnProperty("parts")) { - if (!Array.isArray(message.parts)) - return "parts: array expected"; - for (var i = 0; i < message.parts.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part.verify(message.parts[i]); - if (error) - return "parts." + error; + case 3: { + message.content = reader.bytes(); + break; } + default: + reader.skipType(tag & 7); + break; } - if (message.repeatCount != null && message.hasOwnProperty("repeatCount")) - if (!$util.isInteger(message.repeatCount)) - return "repeatCount: integer expected"; - return null; - }; + } + return message; + }; - /** - * Creates a TrainingPhrase message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase} TrainingPhrase - */ - TrainingPhrase.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase(); - if (object.id != null) - message.id = String(object.id); - if (object.parts) { - if (!Array.isArray(object.parts)) - throw TypeError(".google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.parts: array expected"); - message.parts = []; - for (var i = 0; i < object.parts.length; ++i) { - if (typeof object.parts[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.parts: object expected"); - message.parts[i] = $root.google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part.fromObject(object.parts[i]); - } - } - if (object.repeatCount != null) - message.repeatCount = object.repeatCount | 0; - return message; - }; + /** + * Decodes an ImportTestCasesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.ImportTestCasesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.ImportTestCasesRequest} ImportTestCasesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImportTestCasesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a plain object from a TrainingPhrase message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase - * @static - * @param {google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase} message TrainingPhrase - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TrainingPhrase.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.parts = []; - if (options.defaults) { - object.id = ""; - object.repeatCount = 0; - } - if (message.id != null && message.hasOwnProperty("id")) - object.id = message.id; - if (message.parts && message.parts.length) { - object.parts = []; - for (var j = 0; j < message.parts.length; ++j) - object.parts[j] = $root.google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part.toObject(message.parts[j], options); - } - if (message.repeatCount != null && message.hasOwnProperty("repeatCount")) - object.repeatCount = message.repeatCount; + /** + * Verifies an ImportTestCasesRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.ImportTestCasesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ImportTestCasesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.gcsUri != null && message.hasOwnProperty("gcsUri")) { + properties.source = 1; + if (!$util.isString(message.gcsUri)) + return "gcsUri: string expected"; + } + if (message.content != null && message.hasOwnProperty("content")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; + if (!(message.content && typeof message.content.length === "number" || $util.isString(message.content))) + return "content: buffer expected"; + } + return null; + }; + + /** + * Creates an ImportTestCasesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.ImportTestCasesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.ImportTestCasesRequest} ImportTestCasesRequest + */ + ImportTestCasesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ImportTestCasesRequest) return object; - }; + var message = new $root.google.cloud.dialogflow.cx.v3.ImportTestCasesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.gcsUri != null) + message.gcsUri = String(object.gcsUri); + if (object.content != null) + if (typeof object.content === "string") + $util.base64.decode(object.content, message.content = $util.newBuffer($util.base64.length(object.content)), 0); + else if (object.content.length >= 0) + message.content = object.content; + return message; + }; - /** - * Converts this TrainingPhrase to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase - * @instance - * @returns {Object.} JSON object - */ - TrainingPhrase.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from an ImportTestCasesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.ImportTestCasesRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.ImportTestCasesRequest} message ImportTestCasesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ImportTestCasesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.parent = ""; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.gcsUri != null && message.hasOwnProperty("gcsUri")) { + object.gcsUri = message.gcsUri; + if (options.oneofs) + object.source = "gcsUri"; + } + if (message.content != null && message.hasOwnProperty("content")) { + object.content = options.bytes === String ? $util.base64.encode(message.content, 0, message.content.length) : options.bytes === Array ? Array.prototype.slice.call(message.content) : message.content; + if (options.oneofs) + object.source = "content"; + } + return object; + }; - /** - * Gets the default type url for TrainingPhrase - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - TrainingPhrase.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase"; - }; + /** + * Converts this ImportTestCasesRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.ImportTestCasesRequest + * @instance + * @returns {Object.} JSON object + */ + ImportTestCasesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - TrainingPhrase.Part = (function() { + /** + * Gets the default type url for ImportTestCasesRequest + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.ImportTestCasesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ImportTestCasesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ImportTestCasesRequest"; + }; - /** - * Properties of a Part. - * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase - * @interface IPart - * @property {string|null} [text] Part text - * @property {string|null} [parameterId] Part parameterId - */ + return ImportTestCasesRequest; + })(); - /** - * Constructs a new Part. - * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase - * @classdesc Represents a Part. - * @implements IPart - * @constructor - * @param {google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.IPart=} [properties] Properties to set - */ - function Part(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]]; - } + v3.ImportTestCasesResponse = (function() { - /** - * Part text. - * @member {string} text - * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part - * @instance - */ - Part.prototype.text = ""; + /** + * Properties of an ImportTestCasesResponse. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IImportTestCasesResponse + * @property {Array.|null} [names] ImportTestCasesResponse names + */ - /** - * Part parameterId. - * @member {string} parameterId - * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part - * @instance - */ - Part.prototype.parameterId = ""; + /** + * Constructs a new ImportTestCasesResponse. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents an ImportTestCasesResponse. + * @implements IImportTestCasesResponse + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IImportTestCasesResponse=} [properties] Properties to set + */ + function ImportTestCasesResponse(properties) { + this.names = []; + 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]]; + } - /** - * Creates a new Part instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part - * @static - * @param {google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.IPart=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part} Part instance - */ - Part.create = function create(properties) { - return new Part(properties); - }; + /** + * ImportTestCasesResponse names. + * @member {Array.} names + * @memberof google.cloud.dialogflow.cx.v3.ImportTestCasesResponse + * @instance + */ + ImportTestCasesResponse.prototype.names = $util.emptyArray; - /** - * Encodes the specified Part message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part - * @static - * @param {google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.IPart} message Part message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Part.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.text != null && Object.hasOwnProperty.call(message, "text")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.text); - if (message.parameterId != null && Object.hasOwnProperty.call(message, "parameterId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.parameterId); - return writer; - }; + /** + * Creates a new ImportTestCasesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.ImportTestCasesResponse + * @static + * @param {google.cloud.dialogflow.cx.v3.IImportTestCasesResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ImportTestCasesResponse} ImportTestCasesResponse instance + */ + ImportTestCasesResponse.create = function create(properties) { + return new ImportTestCasesResponse(properties); + }; - /** - * Encodes the specified Part message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part - * @static - * @param {google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.IPart} message Part message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Part.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified ImportTestCasesResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportTestCasesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.ImportTestCasesResponse + * @static + * @param {google.cloud.dialogflow.cx.v3.IImportTestCasesResponse} message ImportTestCasesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImportTestCasesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.names != null && message.names.length) + for (var i = 0; i < message.names.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.names[i]); + return writer; + }; - /** - * Decodes a Part message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part - * @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.Intent.TrainingPhrase.Part} Part - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Part.decode = function decode(reader, length, error) { - 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.Intent.TrainingPhrase.Part(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.text = reader.string(); - break; - } - case 2: { - message.parameterId = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } + /** + * Encodes the specified ImportTestCasesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportTestCasesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.ImportTestCasesResponse + * @static + * @param {google.cloud.dialogflow.cx.v3.IImportTestCasesResponse} message ImportTestCasesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImportTestCasesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ImportTestCasesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.ImportTestCasesResponse + * @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.ImportTestCasesResponse} ImportTestCasesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImportTestCasesResponse.decode = function decode(reader, length, error) { + 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.ImportTestCasesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.names && message.names.length)) + message.names = []; + message.names.push(reader.string()); + break; } - return message; - }; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Decodes a Part message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part} Part - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Part.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes an ImportTestCasesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.ImportTestCasesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.ImportTestCasesResponse} ImportTestCasesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImportTestCasesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a Part message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Part.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.text != null && message.hasOwnProperty("text")) - if (!$util.isString(message.text)) - return "text: string expected"; - if (message.parameterId != null && message.hasOwnProperty("parameterId")) - if (!$util.isString(message.parameterId)) - return "parameterId: string expected"; - return null; - }; + /** + * Verifies an ImportTestCasesResponse message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.ImportTestCasesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ImportTestCasesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.names != null && message.hasOwnProperty("names")) { + if (!Array.isArray(message.names)) + return "names: array expected"; + for (var i = 0; i < message.names.length; ++i) + if (!$util.isString(message.names[i])) + return "names: string[] expected"; + } + return null; + }; - /** - * Creates a Part message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part} Part - */ - Part.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part(); - if (object.text != null) - message.text = String(object.text); - if (object.parameterId != null) - message.parameterId = String(object.parameterId); - return message; - }; + /** + * Creates an ImportTestCasesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.ImportTestCasesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.ImportTestCasesResponse} ImportTestCasesResponse + */ + ImportTestCasesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ImportTestCasesResponse) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.ImportTestCasesResponse(); + if (object.names) { + if (!Array.isArray(object.names)) + throw TypeError(".google.cloud.dialogflow.cx.v3.ImportTestCasesResponse.names: array expected"); + message.names = []; + for (var i = 0; i < object.names.length; ++i) + message.names[i] = String(object.names[i]); + } + return message; + }; - /** - * Creates a plain object from a Part message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part - * @static - * @param {google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part} message Part - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Part.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.text = ""; - object.parameterId = ""; - } - if (message.text != null && message.hasOwnProperty("text")) - object.text = message.text; - if (message.parameterId != null && message.hasOwnProperty("parameterId")) - object.parameterId = message.parameterId; - return object; - }; - - /** - * Converts this Part to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part - * @instance - * @returns {Object.} JSON object - */ - Part.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Part - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Part.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part"; - }; - - return Part; - })(); - - return TrainingPhrase; - })(); - - Intent.Parameter = (function() { - - /** - * Properties of a Parameter. - * @memberof google.cloud.dialogflow.cx.v3.Intent - * @interface IParameter - * @property {string|null} [id] Parameter id - * @property {string|null} [entityType] Parameter entityType - * @property {boolean|null} [isList] Parameter isList - * @property {boolean|null} [redact] Parameter redact - */ - - /** - * Constructs a new Parameter. - * @memberof google.cloud.dialogflow.cx.v3.Intent - * @classdesc Represents a Parameter. - * @implements IParameter - * @constructor - * @param {google.cloud.dialogflow.cx.v3.Intent.IParameter=} [properties] Properties to set - */ - function Parameter(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]]; + /** + * Creates a plain object from an ImportTestCasesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.ImportTestCasesResponse + * @static + * @param {google.cloud.dialogflow.cx.v3.ImportTestCasesResponse} message ImportTestCasesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ImportTestCasesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.names = []; + if (message.names && message.names.length) { + object.names = []; + for (var j = 0; j < message.names.length; ++j) + object.names[j] = message.names[j]; } + return object; + }; - /** - * Parameter id. - * @member {string} id - * @memberof google.cloud.dialogflow.cx.v3.Intent.Parameter - * @instance - */ - Parameter.prototype.id = ""; - - /** - * Parameter entityType. - * @member {string} entityType - * @memberof google.cloud.dialogflow.cx.v3.Intent.Parameter - * @instance - */ - Parameter.prototype.entityType = ""; - - /** - * Parameter isList. - * @member {boolean} isList - * @memberof google.cloud.dialogflow.cx.v3.Intent.Parameter - * @instance - */ - Parameter.prototype.isList = false; - - /** - * Parameter redact. - * @member {boolean} redact - * @memberof google.cloud.dialogflow.cx.v3.Intent.Parameter - * @instance - */ - Parameter.prototype.redact = false; - - /** - * Creates a new Parameter instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.Intent.Parameter - * @static - * @param {google.cloud.dialogflow.cx.v3.Intent.IParameter=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.Intent.Parameter} Parameter instance - */ - Parameter.create = function create(properties) { - return new Parameter(properties); - }; - - /** - * Encodes the specified Parameter message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Intent.Parameter.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.Intent.Parameter - * @static - * @param {google.cloud.dialogflow.cx.v3.Intent.IParameter} message Parameter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Parameter.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); - if (message.entityType != null && Object.hasOwnProperty.call(message, "entityType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.entityType); - if (message.isList != null && Object.hasOwnProperty.call(message, "isList")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.isList); - if (message.redact != null && Object.hasOwnProperty.call(message, "redact")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.redact); - return writer; - }; - - /** - * Encodes the specified Parameter message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Intent.Parameter.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Intent.Parameter - * @static - * @param {google.cloud.dialogflow.cx.v3.Intent.IParameter} message Parameter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Parameter.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Parameter message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.Intent.Parameter - * @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.Intent.Parameter} Parameter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Parameter.decode = function decode(reader, length, error) { - 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.Intent.Parameter(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.id = reader.string(); - break; - } - case 2: { - message.entityType = reader.string(); - break; - } - case 3: { - message.isList = reader.bool(); - break; - } - case 4: { - message.redact = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Parameter message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Intent.Parameter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.Intent.Parameter} Parameter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Parameter.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Parameter message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.Intent.Parameter - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Parameter.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isString(message.id)) - return "id: string expected"; - if (message.entityType != null && message.hasOwnProperty("entityType")) - if (!$util.isString(message.entityType)) - return "entityType: string expected"; - if (message.isList != null && message.hasOwnProperty("isList")) - if (typeof message.isList !== "boolean") - return "isList: boolean expected"; - if (message.redact != null && message.hasOwnProperty("redact")) - if (typeof message.redact !== "boolean") - return "redact: boolean expected"; - return null; - }; - - /** - * Creates a Parameter message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.Intent.Parameter - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.Intent.Parameter} Parameter - */ - Parameter.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.Intent.Parameter) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.Intent.Parameter(); - if (object.id != null) - message.id = String(object.id); - if (object.entityType != null) - message.entityType = String(object.entityType); - if (object.isList != null) - message.isList = Boolean(object.isList); - if (object.redact != null) - message.redact = Boolean(object.redact); - return message; - }; - - /** - * Creates a plain object from a Parameter message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.Intent.Parameter - * @static - * @param {google.cloud.dialogflow.cx.v3.Intent.Parameter} message Parameter - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Parameter.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.id = ""; - object.entityType = ""; - object.isList = false; - object.redact = false; - } - if (message.id != null && message.hasOwnProperty("id")) - object.id = message.id; - if (message.entityType != null && message.hasOwnProperty("entityType")) - object.entityType = message.entityType; - if (message.isList != null && message.hasOwnProperty("isList")) - object.isList = message.isList; - if (message.redact != null && message.hasOwnProperty("redact")) - object.redact = message.redact; - return object; - }; - - /** - * Converts this Parameter to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.Intent.Parameter - * @instance - * @returns {Object.} JSON object - */ - Parameter.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Parameter - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.Intent.Parameter - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Parameter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Intent.Parameter"; - }; + /** + * Converts this ImportTestCasesResponse to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.ImportTestCasesResponse + * @instance + * @returns {Object.} JSON object + */ + ImportTestCasesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return Parameter; - })(); + /** + * Gets the default type url for ImportTestCasesResponse + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.ImportTestCasesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ImportTestCasesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ImportTestCasesResponse"; + }; - return Intent; + return ImportTestCasesResponse; })(); - v3.ListIntentsRequest = (function() { + v3.ImportTestCasesMetadata = (function() { /** - * Properties of a ListIntentsRequest. + * Properties of an ImportTestCasesMetadata. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IListIntentsRequest - * @property {string|null} [parent] ListIntentsRequest parent - * @property {string|null} [languageCode] ListIntentsRequest languageCode - * @property {google.cloud.dialogflow.cx.v3.IntentView|null} [intentView] ListIntentsRequest intentView - * @property {number|null} [pageSize] ListIntentsRequest pageSize - * @property {string|null} [pageToken] ListIntentsRequest pageToken + * @interface IImportTestCasesMetadata + * @property {Array.|null} [errors] ImportTestCasesMetadata errors */ /** - * Constructs a new ListIntentsRequest. + * Constructs a new ImportTestCasesMetadata. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a ListIntentsRequest. - * @implements IListIntentsRequest + * @classdesc Represents an ImportTestCasesMetadata. + * @implements IImportTestCasesMetadata * @constructor - * @param {google.cloud.dialogflow.cx.v3.IListIntentsRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IImportTestCasesMetadata=} [properties] Properties to set */ - function ListIntentsRequest(properties) { + function ImportTestCasesMetadata(properties) { + this.errors = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -55244,133 +55279,80 @@ } /** - * ListIntentsRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3.ListIntentsRequest - * @instance - */ - ListIntentsRequest.prototype.parent = ""; - - /** - * ListIntentsRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3.ListIntentsRequest - * @instance - */ - ListIntentsRequest.prototype.languageCode = ""; - - /** - * ListIntentsRequest intentView. - * @member {google.cloud.dialogflow.cx.v3.IntentView} intentView - * @memberof google.cloud.dialogflow.cx.v3.ListIntentsRequest - * @instance - */ - ListIntentsRequest.prototype.intentView = 0; - - /** - * ListIntentsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dialogflow.cx.v3.ListIntentsRequest - * @instance - */ - ListIntentsRequest.prototype.pageSize = 0; - - /** - * ListIntentsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dialogflow.cx.v3.ListIntentsRequest + * ImportTestCasesMetadata errors. + * @member {Array.} errors + * @memberof google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata * @instance */ - ListIntentsRequest.prototype.pageToken = ""; + ImportTestCasesMetadata.prototype.errors = $util.emptyArray; /** - * Creates a new ListIntentsRequest instance using the specified properties. + * Creates a new ImportTestCasesMetadata instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.ListIntentsRequest + * @memberof google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata * @static - * @param {google.cloud.dialogflow.cx.v3.IListIntentsRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ListIntentsRequest} ListIntentsRequest instance + * @param {google.cloud.dialogflow.cx.v3.IImportTestCasesMetadata=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata} ImportTestCasesMetadata instance */ - ListIntentsRequest.create = function create(properties) { - return new ListIntentsRequest(properties); + ImportTestCasesMetadata.create = function create(properties) { + return new ImportTestCasesMetadata(properties); }; /** - * Encodes the specified ListIntentsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListIntentsRequest.verify|verify} messages. + * Encodes the specified ImportTestCasesMetadata message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ListIntentsRequest + * @memberof google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata * @static - * @param {google.cloud.dialogflow.cx.v3.IListIntentsRequest} message ListIntentsRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IImportTestCasesMetadata} message ImportTestCasesMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListIntentsRequest.encode = function encode(message, writer) { + ImportTestCasesMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); - if (message.intentView != null && Object.hasOwnProperty.call(message, "intentView")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.intentView); + if (message.errors != null && message.errors.length) + for (var i = 0; i < message.errors.length; ++i) + $root.google.cloud.dialogflow.cx.v3.TestCaseError.encode(message.errors[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListIntentsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListIntentsRequest.verify|verify} messages. + * Encodes the specified ImportTestCasesMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListIntentsRequest + * @memberof google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata * @static - * @param {google.cloud.dialogflow.cx.v3.IListIntentsRequest} message ListIntentsRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IImportTestCasesMetadata} message ImportTestCasesMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListIntentsRequest.encodeDelimited = function encodeDelimited(message, writer) { + ImportTestCasesMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListIntentsRequest message from the specified reader or buffer. + * Decodes an ImportTestCasesMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ListIntentsRequest + * @memberof google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata * @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.ListIntentsRequest} ListIntentsRequest + * @returns {google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata} ImportTestCasesMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListIntentsRequest.decode = function decode(reader, length, error) { + ImportTestCasesMetadata.decode = function decode(reader, length, error) { 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.ListIntentsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.languageCode = reader.string(); - break; - } - case 5: { - message.intentView = reader.int32(); - break; - } - case 3: { - message.pageSize = reader.int32(); - break; - } - case 4: { - message.pageToken = reader.string(); + if (!(message.errors && message.errors.length)) + message.errors = []; + message.errors.push($root.google.cloud.dialogflow.cx.v3.TestCaseError.decode(reader, reader.uint32())); break; } default: @@ -55382,181 +55364,140 @@ }; /** - * Decodes a ListIntentsRequest message from the specified reader or buffer, length delimited. + * Decodes an ImportTestCasesMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListIntentsRequest + * @memberof google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ListIntentsRequest} ListIntentsRequest + * @returns {google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata} ImportTestCasesMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListIntentsRequest.decodeDelimited = function decodeDelimited(reader) { + ImportTestCasesMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListIntentsRequest message. + * Verifies an ImportTestCasesMetadata message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ListIntentsRequest + * @memberof google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListIntentsRequest.verify = function verify(message) { + ImportTestCasesMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; - if (message.intentView != null && message.hasOwnProperty("intentView")) - switch (message.intentView) { - default: - return "intentView: enum value expected"; - case 0: - case 1: - case 2: - break; + if (message.errors != null && message.hasOwnProperty("errors")) { + if (!Array.isArray(message.errors)) + return "errors: array expected"; + for (var i = 0; i < message.errors.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.TestCaseError.verify(message.errors[i]); + if (error) + return "errors." + error; } - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; + } return null; }; /** - * Creates a ListIntentsRequest message from a plain object. Also converts values to their respective internal types. + * Creates an ImportTestCasesMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ListIntentsRequest + * @memberof google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ListIntentsRequest} ListIntentsRequest + * @returns {google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata} ImportTestCasesMetadata */ - ListIntentsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListIntentsRequest) + ImportTestCasesMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.ListIntentsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.languageCode != null) - message.languageCode = String(object.languageCode); - switch (object.intentView) { - default: - if (typeof object.intentView === "number") { - message.intentView = object.intentView; - break; + var message = new $root.google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata(); + if (object.errors) { + if (!Array.isArray(object.errors)) + throw TypeError(".google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata.errors: array expected"); + message.errors = []; + for (var i = 0; i < object.errors.length; ++i) { + if (typeof object.errors[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata.errors: object expected"); + message.errors[i] = $root.google.cloud.dialogflow.cx.v3.TestCaseError.fromObject(object.errors[i]); } - break; - case "INTENT_VIEW_UNSPECIFIED": - case 0: - message.intentView = 0; - break; - case "INTENT_VIEW_PARTIAL": - case 1: - message.intentView = 1; - break; - case "INTENT_VIEW_FULL": - case 2: - message.intentView = 2; - break; } - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); return message; }; /** - * Creates a plain object from a ListIntentsRequest message. Also converts values to other types if specified. + * Creates a plain object from an ImportTestCasesMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ListIntentsRequest + * @memberof google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata * @static - * @param {google.cloud.dialogflow.cx.v3.ListIntentsRequest} message ListIntentsRequest + * @param {google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata} message ImportTestCasesMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListIntentsRequest.toObject = function toObject(message, options) { + ImportTestCasesMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.languageCode = ""; - object.pageSize = 0; - object.pageToken = ""; - object.intentView = options.enums === String ? "INTENT_VIEW_UNSPECIFIED" : 0; + if (options.arrays || options.defaults) + object.errors = []; + if (message.errors && message.errors.length) { + object.errors = []; + for (var j = 0; j < message.errors.length; ++j) + object.errors[j] = $root.google.cloud.dialogflow.cx.v3.TestCaseError.toObject(message.errors[j], options); } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.intentView != null && message.hasOwnProperty("intentView")) - object.intentView = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.IntentView[message.intentView] === undefined ? message.intentView : $root.google.cloud.dialogflow.cx.v3.IntentView[message.intentView] : message.intentView; return object; }; /** - * Converts this ListIntentsRequest to JSON. + * Converts this ImportTestCasesMetadata to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ListIntentsRequest + * @memberof google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata * @instance * @returns {Object.} JSON object */ - ListIntentsRequest.prototype.toJSON = function toJSON() { + ImportTestCasesMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListIntentsRequest + * Gets the default type url for ImportTestCasesMetadata * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.ListIntentsRequest + * @memberof google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListIntentsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ImportTestCasesMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListIntentsRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata"; }; - return ListIntentsRequest; + return ImportTestCasesMetadata; })(); - v3.ListIntentsResponse = (function() { + v3.TestCaseError = (function() { /** - * Properties of a ListIntentsResponse. + * Properties of a TestCaseError. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IListIntentsResponse - * @property {Array.|null} [intents] ListIntentsResponse intents - * @property {string|null} [nextPageToken] ListIntentsResponse nextPageToken + * @interface ITestCaseError + * @property {google.cloud.dialogflow.cx.v3.ITestCase|null} [testCase] TestCaseError testCase + * @property {google.rpc.IStatus|null} [status] TestCaseError status */ /** - * Constructs a new ListIntentsResponse. + * Constructs a new TestCaseError. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a ListIntentsResponse. - * @implements IListIntentsResponse + * @classdesc Represents a TestCaseError. + * @implements ITestCaseError * @constructor - * @param {google.cloud.dialogflow.cx.v3.IListIntentsResponse=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.ITestCaseError=} [properties] Properties to set */ - function ListIntentsResponse(properties) { - this.intents = []; + function TestCaseError(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -55564,94 +55505,91 @@ } /** - * ListIntentsResponse intents. - * @member {Array.} intents - * @memberof google.cloud.dialogflow.cx.v3.ListIntentsResponse + * TestCaseError testCase. + * @member {google.cloud.dialogflow.cx.v3.ITestCase|null|undefined} testCase + * @memberof google.cloud.dialogflow.cx.v3.TestCaseError * @instance */ - ListIntentsResponse.prototype.intents = $util.emptyArray; + TestCaseError.prototype.testCase = null; /** - * ListIntentsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dialogflow.cx.v3.ListIntentsResponse + * TestCaseError status. + * @member {google.rpc.IStatus|null|undefined} status + * @memberof google.cloud.dialogflow.cx.v3.TestCaseError * @instance */ - ListIntentsResponse.prototype.nextPageToken = ""; + TestCaseError.prototype.status = null; /** - * Creates a new ListIntentsResponse instance using the specified properties. + * Creates a new TestCaseError instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.ListIntentsResponse + * @memberof google.cloud.dialogflow.cx.v3.TestCaseError * @static - * @param {google.cloud.dialogflow.cx.v3.IListIntentsResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ListIntentsResponse} ListIntentsResponse instance + * @param {google.cloud.dialogflow.cx.v3.ITestCaseError=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.TestCaseError} TestCaseError instance */ - ListIntentsResponse.create = function create(properties) { - return new ListIntentsResponse(properties); + TestCaseError.create = function create(properties) { + return new TestCaseError(properties); }; /** - * Encodes the specified ListIntentsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListIntentsResponse.verify|verify} messages. + * Encodes the specified TestCaseError message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TestCaseError.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ListIntentsResponse + * @memberof google.cloud.dialogflow.cx.v3.TestCaseError * @static - * @param {google.cloud.dialogflow.cx.v3.IListIntentsResponse} message ListIntentsResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ITestCaseError} message TestCaseError message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListIntentsResponse.encode = function encode(message, writer) { + TestCaseError.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.intents != null && message.intents.length) - for (var i = 0; i < message.intents.length; ++i) - $root.google.cloud.dialogflow.cx.v3.Intent.encode(message.intents[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.testCase != null && Object.hasOwnProperty.call(message, "testCase")) + $root.google.cloud.dialogflow.cx.v3.TestCase.encode(message.testCase, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + $root.google.rpc.Status.encode(message.status, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListIntentsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListIntentsResponse.verify|verify} messages. + * Encodes the specified TestCaseError message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TestCaseError.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListIntentsResponse + * @memberof google.cloud.dialogflow.cx.v3.TestCaseError * @static - * @param {google.cloud.dialogflow.cx.v3.IListIntentsResponse} message ListIntentsResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ITestCaseError} message TestCaseError message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListIntentsResponse.encodeDelimited = function encodeDelimited(message, writer) { + TestCaseError.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListIntentsResponse message from the specified reader or buffer. + * Decodes a TestCaseError message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ListIntentsResponse + * @memberof google.cloud.dialogflow.cx.v3.TestCaseError * @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.ListIntentsResponse} ListIntentsResponse + * @returns {google.cloud.dialogflow.cx.v3.TestCaseError} TestCaseError * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListIntentsResponse.decode = function decode(reader, length, error) { + TestCaseError.decode = function decode(reader, length, error) { 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.ListIntentsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.TestCaseError(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - if (!(message.intents && message.intents.length)) - message.intents = []; - message.intents.push($root.google.cloud.dialogflow.cx.v3.Intent.decode(reader, reader.uint32())); + message.testCase = $root.google.cloud.dialogflow.cx.v3.TestCase.decode(reader, reader.uint32()); break; } case 2: { - message.nextPageToken = reader.string(); + message.status = $root.google.rpc.Status.decode(reader, reader.uint32()); break; } default: @@ -55663,149 +55601,144 @@ }; /** - * Decodes a ListIntentsResponse message from the specified reader or buffer, length delimited. + * Decodes a TestCaseError message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListIntentsResponse + * @memberof google.cloud.dialogflow.cx.v3.TestCaseError * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ListIntentsResponse} ListIntentsResponse + * @returns {google.cloud.dialogflow.cx.v3.TestCaseError} TestCaseError * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListIntentsResponse.decodeDelimited = function decodeDelimited(reader) { + TestCaseError.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListIntentsResponse message. + * Verifies a TestCaseError message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ListIntentsResponse + * @memberof google.cloud.dialogflow.cx.v3.TestCaseError * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListIntentsResponse.verify = function verify(message) { + TestCaseError.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.intents != null && message.hasOwnProperty("intents")) { - if (!Array.isArray(message.intents)) - return "intents: array expected"; - for (var i = 0; i < message.intents.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.Intent.verify(message.intents[i]); - if (error) - return "intents." + error; - } + if (message.testCase != null && message.hasOwnProperty("testCase")) { + var error = $root.google.cloud.dialogflow.cx.v3.TestCase.verify(message.testCase); + if (error) + return "testCase." + error; + } + if (message.status != null && message.hasOwnProperty("status")) { + var error = $root.google.rpc.Status.verify(message.status); + if (error) + return "status." + error; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; return null; }; /** - * Creates a ListIntentsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a TestCaseError message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ListIntentsResponse + * @memberof google.cloud.dialogflow.cx.v3.TestCaseError * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ListIntentsResponse} ListIntentsResponse + * @returns {google.cloud.dialogflow.cx.v3.TestCaseError} TestCaseError */ - ListIntentsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListIntentsResponse) + TestCaseError.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.TestCaseError) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.ListIntentsResponse(); - if (object.intents) { - if (!Array.isArray(object.intents)) - throw TypeError(".google.cloud.dialogflow.cx.v3.ListIntentsResponse.intents: array expected"); - message.intents = []; - for (var i = 0; i < object.intents.length; ++i) { - if (typeof object.intents[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.ListIntentsResponse.intents: object expected"); - message.intents[i] = $root.google.cloud.dialogflow.cx.v3.Intent.fromObject(object.intents[i]); - } + var message = new $root.google.cloud.dialogflow.cx.v3.TestCaseError(); + if (object.testCase != null) { + if (typeof object.testCase !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.TestCaseError.testCase: object expected"); + message.testCase = $root.google.cloud.dialogflow.cx.v3.TestCase.fromObject(object.testCase); + } + if (object.status != null) { + if (typeof object.status !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.TestCaseError.status: object expected"); + message.status = $root.google.rpc.Status.fromObject(object.status); } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a ListIntentsResponse message. Also converts values to other types if specified. + * Creates a plain object from a TestCaseError message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ListIntentsResponse + * @memberof google.cloud.dialogflow.cx.v3.TestCaseError * @static - * @param {google.cloud.dialogflow.cx.v3.ListIntentsResponse} message ListIntentsResponse + * @param {google.cloud.dialogflow.cx.v3.TestCaseError} message TestCaseError * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListIntentsResponse.toObject = function toObject(message, options) { + TestCaseError.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.intents = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.intents && message.intents.length) { - object.intents = []; - for (var j = 0; j < message.intents.length; ++j) - object.intents[j] = $root.google.cloud.dialogflow.cx.v3.Intent.toObject(message.intents[j], options); + if (options.defaults) { + object.testCase = null; + object.status = null; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + if (message.testCase != null && message.hasOwnProperty("testCase")) + object.testCase = $root.google.cloud.dialogflow.cx.v3.TestCase.toObject(message.testCase, options); + if (message.status != null && message.hasOwnProperty("status")) + object.status = $root.google.rpc.Status.toObject(message.status, options); return object; }; /** - * Converts this ListIntentsResponse to JSON. + * Converts this TestCaseError to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ListIntentsResponse + * @memberof google.cloud.dialogflow.cx.v3.TestCaseError * @instance * @returns {Object.} JSON object */ - ListIntentsResponse.prototype.toJSON = function toJSON() { + TestCaseError.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListIntentsResponse + * Gets the default type url for TestCaseError * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.ListIntentsResponse + * @memberof google.cloud.dialogflow.cx.v3.TestCaseError * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListIntentsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + TestCaseError.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListIntentsResponse"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.TestCaseError"; }; - return ListIntentsResponse; + return TestCaseError; })(); - v3.GetIntentRequest = (function() { + v3.ExportTestCasesRequest = (function() { /** - * Properties of a GetIntentRequest. + * Properties of an ExportTestCasesRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IGetIntentRequest - * @property {string|null} [name] GetIntentRequest name - * @property {string|null} [languageCode] GetIntentRequest languageCode + * @interface IExportTestCasesRequest + * @property {string|null} [parent] ExportTestCasesRequest parent + * @property {string|null} [gcsUri] ExportTestCasesRequest gcsUri + * @property {google.cloud.dialogflow.cx.v3.ExportTestCasesRequest.DataFormat|null} [dataFormat] ExportTestCasesRequest dataFormat + * @property {string|null} [filter] ExportTestCasesRequest filter */ /** - * Constructs a new GetIntentRequest. + * Constructs a new ExportTestCasesRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a GetIntentRequest. - * @implements IGetIntentRequest + * @classdesc Represents an ExportTestCasesRequest. + * @implements IExportTestCasesRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IGetIntentRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IExportTestCasesRequest=} [properties] Properties to set */ - function GetIntentRequest(properties) { + function ExportTestCasesRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -55813,91 +55746,133 @@ } /** - * GetIntentRequest name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.GetIntentRequest + * ExportTestCasesRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.cx.v3.ExportTestCasesRequest * @instance */ - GetIntentRequest.prototype.name = ""; + ExportTestCasesRequest.prototype.parent = ""; /** - * GetIntentRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3.GetIntentRequest + * ExportTestCasesRequest gcsUri. + * @member {string|null|undefined} gcsUri + * @memberof google.cloud.dialogflow.cx.v3.ExportTestCasesRequest * @instance */ - GetIntentRequest.prototype.languageCode = ""; + ExportTestCasesRequest.prototype.gcsUri = null; /** - * Creates a new GetIntentRequest instance using the specified properties. + * ExportTestCasesRequest dataFormat. + * @member {google.cloud.dialogflow.cx.v3.ExportTestCasesRequest.DataFormat} dataFormat + * @memberof google.cloud.dialogflow.cx.v3.ExportTestCasesRequest + * @instance + */ + ExportTestCasesRequest.prototype.dataFormat = 0; + + /** + * ExportTestCasesRequest filter. + * @member {string} filter + * @memberof google.cloud.dialogflow.cx.v3.ExportTestCasesRequest + * @instance + */ + ExportTestCasesRequest.prototype.filter = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ExportTestCasesRequest destination. + * @member {"gcsUri"|undefined} destination + * @memberof google.cloud.dialogflow.cx.v3.ExportTestCasesRequest + * @instance + */ + Object.defineProperty(ExportTestCasesRequest.prototype, "destination", { + get: $util.oneOfGetter($oneOfFields = ["gcsUri"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ExportTestCasesRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.GetIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.ExportTestCasesRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IGetIntentRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.GetIntentRequest} GetIntentRequest instance + * @param {google.cloud.dialogflow.cx.v3.IExportTestCasesRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ExportTestCasesRequest} ExportTestCasesRequest instance */ - GetIntentRequest.create = function create(properties) { - return new GetIntentRequest(properties); + ExportTestCasesRequest.create = function create(properties) { + return new ExportTestCasesRequest(properties); }; /** - * Encodes the specified GetIntentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetIntentRequest.verify|verify} messages. + * Encodes the specified ExportTestCasesRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ExportTestCasesRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.GetIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.ExportTestCasesRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IGetIntentRequest} message GetIntentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IExportTestCasesRequest} message ExportTestCasesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetIntentRequest.encode = function encode(message, writer) { + ExportTestCasesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.gcsUri != null && Object.hasOwnProperty.call(message, "gcsUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.gcsUri); + if (message.dataFormat != null && Object.hasOwnProperty.call(message, "dataFormat")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.dataFormat); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); return writer; }; /** - * Encodes the specified GetIntentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetIntentRequest.verify|verify} messages. + * Encodes the specified ExportTestCasesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ExportTestCasesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.GetIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.ExportTestCasesRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IGetIntentRequest} message GetIntentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IExportTestCasesRequest} message ExportTestCasesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetIntentRequest.encodeDelimited = function encodeDelimited(message, writer) { + ExportTestCasesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetIntentRequest message from the specified reader or buffer. + * Decodes an ExportTestCasesRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.GetIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.ExportTestCasesRequest * @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.GetIntentRequest} GetIntentRequest + * @returns {google.cloud.dialogflow.cx.v3.ExportTestCasesRequest} ExportTestCasesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetIntentRequest.decode = function decode(reader, length, error) { + ExportTestCasesRequest.decode = function decode(reader, length, error) { 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.GetIntentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.parent = reader.string(); break; } case 2: { - message.languageCode = reader.string(); + message.gcsUri = reader.string(); + break; + } + case 3: { + message.dataFormat = reader.int32(); + break; + } + case 4: { + message.filter = reader.string(); break; } default: @@ -55909,133 +55884,193 @@ }; /** - * Decodes a GetIntentRequest message from the specified reader or buffer, length delimited. + * Decodes an ExportTestCasesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.GetIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.ExportTestCasesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.GetIntentRequest} GetIntentRequest + * @returns {google.cloud.dialogflow.cx.v3.ExportTestCasesRequest} ExportTestCasesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetIntentRequest.decodeDelimited = function decodeDelimited(reader) { + ExportTestCasesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetIntentRequest message. + * Verifies an ExportTestCasesRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.GetIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.ExportTestCasesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetIntentRequest.verify = function verify(message) { + ExportTestCasesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; + var properties = {}; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.gcsUri != null && message.hasOwnProperty("gcsUri")) { + properties.destination = 1; + if (!$util.isString(message.gcsUri)) + return "gcsUri: string expected"; + } + if (message.dataFormat != null && message.hasOwnProperty("dataFormat")) + switch (message.dataFormat) { + default: + return "dataFormat: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; return null; }; /** - * Creates a GetIntentRequest message from a plain object. Also converts values to their respective internal types. + * Creates an ExportTestCasesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.GetIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.ExportTestCasesRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.GetIntentRequest} GetIntentRequest + * @returns {google.cloud.dialogflow.cx.v3.ExportTestCasesRequest} ExportTestCasesRequest */ - GetIntentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.GetIntentRequest) + ExportTestCasesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.GetIntentRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.languageCode != null) - message.languageCode = String(object.languageCode); - return message; - }; - - /** - * Creates a plain object from a GetIntentRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.GetIntentRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.GetIntentRequest} message GetIntentRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + var message = new $root.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.gcsUri != null) + message.gcsUri = String(object.gcsUri); + switch (object.dataFormat) { + default: + if (typeof object.dataFormat === "number") { + message.dataFormat = object.dataFormat; + break; + } + break; + case "DATA_FORMAT_UNSPECIFIED": + case 0: + message.dataFormat = 0; + break; + case "BLOB": + case 1: + message.dataFormat = 1; + break; + case "JSON": + case 2: + message.dataFormat = 2; + break; + } + if (object.filter != null) + message.filter = String(object.filter); + return message; + }; + + /** + * Creates a plain object from an ExportTestCasesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.ExportTestCasesRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.ExportTestCasesRequest} message ExportTestCasesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - GetIntentRequest.toObject = function toObject(message, options) { + ExportTestCasesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; - object.languageCode = ""; + object.parent = ""; + object.dataFormat = options.enums === String ? "DATA_FORMAT_UNSPECIFIED" : 0; + object.filter = ""; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.gcsUri != null && message.hasOwnProperty("gcsUri")) { + object.gcsUri = message.gcsUri; + if (options.oneofs) + object.destination = "gcsUri"; + } + if (message.dataFormat != null && message.hasOwnProperty("dataFormat")) + object.dataFormat = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest.DataFormat[message.dataFormat] === undefined ? message.dataFormat : $root.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest.DataFormat[message.dataFormat] : message.dataFormat; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; return object; }; /** - * Converts this GetIntentRequest to JSON. + * Converts this ExportTestCasesRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.GetIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.ExportTestCasesRequest * @instance * @returns {Object.} JSON object */ - GetIntentRequest.prototype.toJSON = function toJSON() { + ExportTestCasesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetIntentRequest + * Gets the default type url for ExportTestCasesRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.GetIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.ExportTestCasesRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetIntentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ExportTestCasesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.GetIntentRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ExportTestCasesRequest"; }; - return GetIntentRequest; + /** + * DataFormat enum. + * @name google.cloud.dialogflow.cx.v3.ExportTestCasesRequest.DataFormat + * @enum {number} + * @property {number} DATA_FORMAT_UNSPECIFIED=0 DATA_FORMAT_UNSPECIFIED value + * @property {number} BLOB=1 BLOB value + * @property {number} JSON=2 JSON value + */ + ExportTestCasesRequest.DataFormat = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DATA_FORMAT_UNSPECIFIED"] = 0; + values[valuesById[1] = "BLOB"] = 1; + values[valuesById[2] = "JSON"] = 2; + return values; + })(); + + return ExportTestCasesRequest; })(); - v3.CreateIntentRequest = (function() { + v3.ExportTestCasesResponse = (function() { /** - * Properties of a CreateIntentRequest. + * Properties of an ExportTestCasesResponse. * @memberof google.cloud.dialogflow.cx.v3 - * @interface ICreateIntentRequest - * @property {string|null} [parent] CreateIntentRequest parent - * @property {google.cloud.dialogflow.cx.v3.IIntent|null} [intent] CreateIntentRequest intent - * @property {string|null} [languageCode] CreateIntentRequest languageCode + * @interface IExportTestCasesResponse + * @property {string|null} [gcsUri] ExportTestCasesResponse gcsUri + * @property {Uint8Array|null} [content] ExportTestCasesResponse content */ /** - * Constructs a new CreateIntentRequest. + * Constructs a new ExportTestCasesResponse. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a CreateIntentRequest. - * @implements ICreateIntentRequest + * @classdesc Represents an ExportTestCasesResponse. + * @implements IExportTestCasesResponse * @constructor - * @param {google.cloud.dialogflow.cx.v3.ICreateIntentRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IExportTestCasesResponse=} [properties] Properties to set */ - function CreateIntentRequest(properties) { + function ExportTestCasesResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -56043,105 +56078,105 @@ } /** - * CreateIntentRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3.CreateIntentRequest + * ExportTestCasesResponse gcsUri. + * @member {string|null|undefined} gcsUri + * @memberof google.cloud.dialogflow.cx.v3.ExportTestCasesResponse * @instance */ - CreateIntentRequest.prototype.parent = ""; + ExportTestCasesResponse.prototype.gcsUri = null; /** - * CreateIntentRequest intent. - * @member {google.cloud.dialogflow.cx.v3.IIntent|null|undefined} intent - * @memberof google.cloud.dialogflow.cx.v3.CreateIntentRequest + * ExportTestCasesResponse content. + * @member {Uint8Array|null|undefined} content + * @memberof google.cloud.dialogflow.cx.v3.ExportTestCasesResponse * @instance */ - CreateIntentRequest.prototype.intent = null; + ExportTestCasesResponse.prototype.content = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * CreateIntentRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3.CreateIntentRequest + * ExportTestCasesResponse destination. + * @member {"gcsUri"|"content"|undefined} destination + * @memberof google.cloud.dialogflow.cx.v3.ExportTestCasesResponse * @instance */ - CreateIntentRequest.prototype.languageCode = ""; + Object.defineProperty(ExportTestCasesResponse.prototype, "destination", { + get: $util.oneOfGetter($oneOfFields = ["gcsUri", "content"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new CreateIntentRequest instance using the specified properties. + * Creates a new ExportTestCasesResponse instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.CreateIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.ExportTestCasesResponse * @static - * @param {google.cloud.dialogflow.cx.v3.ICreateIntentRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.CreateIntentRequest} CreateIntentRequest instance + * @param {google.cloud.dialogflow.cx.v3.IExportTestCasesResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ExportTestCasesResponse} ExportTestCasesResponse instance */ - CreateIntentRequest.create = function create(properties) { - return new CreateIntentRequest(properties); + ExportTestCasesResponse.create = function create(properties) { + return new ExportTestCasesResponse(properties); }; /** - * Encodes the specified CreateIntentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateIntentRequest.verify|verify} messages. + * Encodes the specified ExportTestCasesResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ExportTestCasesResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.CreateIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.ExportTestCasesResponse * @static - * @param {google.cloud.dialogflow.cx.v3.ICreateIntentRequest} message CreateIntentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IExportTestCasesResponse} message ExportTestCasesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateIntentRequest.encode = function encode(message, writer) { + ExportTestCasesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.intent != null && Object.hasOwnProperty.call(message, "intent")) - $root.google.cloud.dialogflow.cx.v3.Intent.encode(message.intent, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.languageCode); + if (message.gcsUri != null && Object.hasOwnProperty.call(message, "gcsUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.gcsUri); + if (message.content != null && Object.hasOwnProperty.call(message, "content")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.content); return writer; }; /** - * Encodes the specified CreateIntentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateIntentRequest.verify|verify} messages. + * Encodes the specified ExportTestCasesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ExportTestCasesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.CreateIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.ExportTestCasesResponse * @static - * @param {google.cloud.dialogflow.cx.v3.ICreateIntentRequest} message CreateIntentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IExportTestCasesResponse} message ExportTestCasesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateIntentRequest.encodeDelimited = function encodeDelimited(message, writer) { + ExportTestCasesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateIntentRequest message from the specified reader or buffer. + * Decodes an ExportTestCasesResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.CreateIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.ExportTestCasesResponse * @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.CreateIntentRequest} CreateIntentRequest + * @returns {google.cloud.dialogflow.cx.v3.ExportTestCasesResponse} ExportTestCasesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateIntentRequest.decode = function decode(reader, length, error) { + ExportTestCasesResponse.decode = function decode(reader, length, error) { 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.CreateIntentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + message.gcsUri = reader.string(); break; } case 2: { - message.intent = $root.google.cloud.dialogflow.cx.v3.Intent.decode(reader, reader.uint32()); - break; - } - case 3: { - message.languageCode = reader.string(); + message.content = reader.bytes(); break; } default: @@ -56153,146 +56188,142 @@ }; /** - * Decodes a CreateIntentRequest message from the specified reader or buffer, length delimited. + * Decodes an ExportTestCasesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.CreateIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.ExportTestCasesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.CreateIntentRequest} CreateIntentRequest + * @returns {google.cloud.dialogflow.cx.v3.ExportTestCasesResponse} ExportTestCasesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateIntentRequest.decodeDelimited = function decodeDelimited(reader) { + ExportTestCasesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateIntentRequest message. + * Verifies an ExportTestCasesResponse message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.CreateIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.ExportTestCasesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateIntentRequest.verify = function verify(message) { + ExportTestCasesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.intent != null && message.hasOwnProperty("intent")) { - var error = $root.google.cloud.dialogflow.cx.v3.Intent.verify(message.intent); - if (error) - return "intent." + error; + var properties = {}; + if (message.gcsUri != null && message.hasOwnProperty("gcsUri")) { + properties.destination = 1; + if (!$util.isString(message.gcsUri)) + return "gcsUri: string expected"; + } + if (message.content != null && message.hasOwnProperty("content")) { + if (properties.destination === 1) + return "destination: multiple values"; + properties.destination = 1; + if (!(message.content && typeof message.content.length === "number" || $util.isString(message.content))) + return "content: buffer expected"; } - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; return null; }; /** - * Creates a CreateIntentRequest message from a plain object. Also converts values to their respective internal types. + * Creates an ExportTestCasesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.CreateIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.ExportTestCasesResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.CreateIntentRequest} CreateIntentRequest + * @returns {google.cloud.dialogflow.cx.v3.ExportTestCasesResponse} ExportTestCasesResponse */ - CreateIntentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.CreateIntentRequest) + ExportTestCasesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.CreateIntentRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.intent != null) { - if (typeof object.intent !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.CreateIntentRequest.intent: object expected"); - message.intent = $root.google.cloud.dialogflow.cx.v3.Intent.fromObject(object.intent); - } - if (object.languageCode != null) - message.languageCode = String(object.languageCode); + var message = new $root.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse(); + if (object.gcsUri != null) + message.gcsUri = String(object.gcsUri); + if (object.content != null) + if (typeof object.content === "string") + $util.base64.decode(object.content, message.content = $util.newBuffer($util.base64.length(object.content)), 0); + else if (object.content.length >= 0) + message.content = object.content; return message; }; /** - * Creates a plain object from a CreateIntentRequest message. Also converts values to other types if specified. + * Creates a plain object from an ExportTestCasesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.CreateIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.ExportTestCasesResponse * @static - * @param {google.cloud.dialogflow.cx.v3.CreateIntentRequest} message CreateIntentRequest + * @param {google.cloud.dialogflow.cx.v3.ExportTestCasesResponse} message ExportTestCasesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateIntentRequest.toObject = function toObject(message, options) { + ExportTestCasesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.intent = null; - object.languageCode = ""; + if (message.gcsUri != null && message.hasOwnProperty("gcsUri")) { + object.gcsUri = message.gcsUri; + if (options.oneofs) + object.destination = "gcsUri"; + } + if (message.content != null && message.hasOwnProperty("content")) { + object.content = options.bytes === String ? $util.base64.encode(message.content, 0, message.content.length) : options.bytes === Array ? Array.prototype.slice.call(message.content) : message.content; + if (options.oneofs) + object.destination = "content"; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.intent != null && message.hasOwnProperty("intent")) - object.intent = $root.google.cloud.dialogflow.cx.v3.Intent.toObject(message.intent, options); - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; return object; }; /** - * Converts this CreateIntentRequest to JSON. + * Converts this ExportTestCasesResponse to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.CreateIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.ExportTestCasesResponse * @instance * @returns {Object.} JSON object */ - CreateIntentRequest.prototype.toJSON = function toJSON() { + ExportTestCasesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateIntentRequest + * Gets the default type url for ExportTestCasesResponse * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.CreateIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.ExportTestCasesResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateIntentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ExportTestCasesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.CreateIntentRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ExportTestCasesResponse"; }; - return CreateIntentRequest; + return ExportTestCasesResponse; })(); - v3.UpdateIntentRequest = (function() { + v3.ExportTestCasesMetadata = (function() { /** - * Properties of an UpdateIntentRequest. + * Properties of an ExportTestCasesMetadata. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IUpdateIntentRequest - * @property {google.cloud.dialogflow.cx.v3.IIntent|null} [intent] UpdateIntentRequest intent - * @property {string|null} [languageCode] UpdateIntentRequest languageCode - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateIntentRequest updateMask + * @interface IExportTestCasesMetadata */ /** - * Constructs a new UpdateIntentRequest. + * Constructs a new ExportTestCasesMetadata. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents an UpdateIntentRequest. - * @implements IUpdateIntentRequest + * @classdesc Represents an ExportTestCasesMetadata. + * @implements IExportTestCasesMetadata * @constructor - * @param {google.cloud.dialogflow.cx.v3.IUpdateIntentRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IExportTestCasesMetadata=} [properties] Properties to set */ - function UpdateIntentRequest(properties) { + function ExportTestCasesMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -56300,107 +56331,65 @@ } /** - * UpdateIntentRequest intent. - * @member {google.cloud.dialogflow.cx.v3.IIntent|null|undefined} intent - * @memberof google.cloud.dialogflow.cx.v3.UpdateIntentRequest - * @instance - */ - UpdateIntentRequest.prototype.intent = null; - - /** - * UpdateIntentRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3.UpdateIntentRequest - * @instance - */ - UpdateIntentRequest.prototype.languageCode = ""; - - /** - * UpdateIntentRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.dialogflow.cx.v3.UpdateIntentRequest - * @instance - */ - UpdateIntentRequest.prototype.updateMask = null; - - /** - * Creates a new UpdateIntentRequest instance using the specified properties. + * Creates a new ExportTestCasesMetadata instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.UpdateIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata * @static - * @param {google.cloud.dialogflow.cx.v3.IUpdateIntentRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.UpdateIntentRequest} UpdateIntentRequest instance + * @param {google.cloud.dialogflow.cx.v3.IExportTestCasesMetadata=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata} ExportTestCasesMetadata instance */ - UpdateIntentRequest.create = function create(properties) { - return new UpdateIntentRequest(properties); + ExportTestCasesMetadata.create = function create(properties) { + return new ExportTestCasesMetadata(properties); }; /** - * Encodes the specified UpdateIntentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateIntentRequest.verify|verify} messages. + * Encodes the specified ExportTestCasesMetadata message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.UpdateIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata * @static - * @param {google.cloud.dialogflow.cx.v3.IUpdateIntentRequest} message UpdateIntentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IExportTestCasesMetadata} message ExportTestCasesMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateIntentRequest.encode = function encode(message, writer) { + ExportTestCasesMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.intent != null && Object.hasOwnProperty.call(message, "intent")) - $root.google.cloud.dialogflow.cx.v3.Intent.encode(message.intent, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified UpdateIntentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateIntentRequest.verify|verify} messages. + * Encodes the specified ExportTestCasesMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.UpdateIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata * @static - * @param {google.cloud.dialogflow.cx.v3.IUpdateIntentRequest} message UpdateIntentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IExportTestCasesMetadata} message ExportTestCasesMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateIntentRequest.encodeDelimited = function encodeDelimited(message, writer) { + ExportTestCasesMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateIntentRequest message from the specified reader or buffer. + * Decodes an ExportTestCasesMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.UpdateIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata * @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.UpdateIntentRequest} UpdateIntentRequest + * @returns {google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata} ExportTestCasesMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateIntentRequest.decode = function decode(reader, length, error) { + ExportTestCasesMetadata.decode = function decode(reader, length, error) { 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.UpdateIntentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { - case 1: { - message.intent = $root.google.cloud.dialogflow.cx.v3.Intent.decode(reader, reader.uint32()); - break; - } - case 2: { - message.languageCode = reader.string(); - break; - } - case 3: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } default: reader.skipType(tag & 7); break; @@ -56410,149 +56399,112 @@ }; /** - * Decodes an UpdateIntentRequest message from the specified reader or buffer, length delimited. + * Decodes an ExportTestCasesMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.UpdateIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.UpdateIntentRequest} UpdateIntentRequest + * @returns {google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata} ExportTestCasesMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateIntentRequest.decodeDelimited = function decodeDelimited(reader) { + ExportTestCasesMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateIntentRequest message. + * Verifies an ExportTestCasesMetadata message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.UpdateIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateIntentRequest.verify = function verify(message) { + ExportTestCasesMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.intent != null && message.hasOwnProperty("intent")) { - var error = $root.google.cloud.dialogflow.cx.v3.Intent.verify(message.intent); - if (error) - return "intent." + error; - } - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } return null; }; /** - * Creates an UpdateIntentRequest message from a plain object. Also converts values to their respective internal types. + * Creates an ExportTestCasesMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.UpdateIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.UpdateIntentRequest} UpdateIntentRequest + * @returns {google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata} ExportTestCasesMetadata */ - UpdateIntentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.UpdateIntentRequest) + ExportTestCasesMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.UpdateIntentRequest(); - if (object.intent != null) { - if (typeof object.intent !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.UpdateIntentRequest.intent: object expected"); - message.intent = $root.google.cloud.dialogflow.cx.v3.Intent.fromObject(object.intent); - } - if (object.languageCode != null) - message.languageCode = String(object.languageCode); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.UpdateIntentRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - return message; + return new $root.google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata(); }; /** - * Creates a plain object from an UpdateIntentRequest message. Also converts values to other types if specified. + * Creates a plain object from an ExportTestCasesMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.UpdateIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata * @static - * @param {google.cloud.dialogflow.cx.v3.UpdateIntentRequest} message UpdateIntentRequest + * @param {google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata} message ExportTestCasesMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateIntentRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.intent = null; - object.languageCode = ""; - object.updateMask = null; - } - if (message.intent != null && message.hasOwnProperty("intent")) - object.intent = $root.google.cloud.dialogflow.cx.v3.Intent.toObject(message.intent, options); - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - return object; + ExportTestCasesMetadata.toObject = function toObject() { + return {}; }; /** - * Converts this UpdateIntentRequest to JSON. + * Converts this ExportTestCasesMetadata to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.UpdateIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata * @instance * @returns {Object.} JSON object */ - UpdateIntentRequest.prototype.toJSON = function toJSON() { + ExportTestCasesMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UpdateIntentRequest + * Gets the default type url for ExportTestCasesMetadata * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.UpdateIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UpdateIntentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ExportTestCasesMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.UpdateIntentRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata"; }; - return UpdateIntentRequest; + return ExportTestCasesMetadata; })(); - v3.DeleteIntentRequest = (function() { + v3.ListTestCaseResultsRequest = (function() { /** - * Properties of a DeleteIntentRequest. + * Properties of a ListTestCaseResultsRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IDeleteIntentRequest - * @property {string|null} [name] DeleteIntentRequest name + * @interface IListTestCaseResultsRequest + * @property {string|null} [parent] ListTestCaseResultsRequest parent + * @property {number|null} [pageSize] ListTestCaseResultsRequest pageSize + * @property {string|null} [pageToken] ListTestCaseResultsRequest pageToken + * @property {string|null} [filter] ListTestCaseResultsRequest filter */ /** - * Constructs a new DeleteIntentRequest. + * Constructs a new ListTestCaseResultsRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a DeleteIntentRequest. - * @implements IDeleteIntentRequest + * @classdesc Represents a ListTestCaseResultsRequest. + * @implements IListTestCaseResultsRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IDeleteIntentRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IListTestCaseResultsRequest=} [properties] Properties to set */ - function DeleteIntentRequest(properties) { + function ListTestCaseResultsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -56560,77 +56512,119 @@ } /** - * DeleteIntentRequest name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.DeleteIntentRequest + * ListTestCaseResultsRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest * @instance */ - DeleteIntentRequest.prototype.name = ""; + ListTestCaseResultsRequest.prototype.parent = ""; /** - * Creates a new DeleteIntentRequest instance using the specified properties. + * ListTestCaseResultsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest + * @instance + */ + ListTestCaseResultsRequest.prototype.pageSize = 0; + + /** + * ListTestCaseResultsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest + * @instance + */ + ListTestCaseResultsRequest.prototype.pageToken = ""; + + /** + * ListTestCaseResultsRequest filter. + * @member {string} filter + * @memberof google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest + * @instance + */ + ListTestCaseResultsRequest.prototype.filter = ""; + + /** + * Creates a new ListTestCaseResultsRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.DeleteIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IDeleteIntentRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.DeleteIntentRequest} DeleteIntentRequest instance + * @param {google.cloud.dialogflow.cx.v3.IListTestCaseResultsRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest} ListTestCaseResultsRequest instance */ - DeleteIntentRequest.create = function create(properties) { - return new DeleteIntentRequest(properties); + ListTestCaseResultsRequest.create = function create(properties) { + return new ListTestCaseResultsRequest(properties); }; /** - * Encodes the specified DeleteIntentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteIntentRequest.verify|verify} messages. + * Encodes the specified ListTestCaseResultsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.DeleteIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IDeleteIntentRequest} message DeleteIntentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListTestCaseResultsRequest} message ListTestCaseResultsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteIntentRequest.encode = function encode(message, writer) { + ListTestCaseResultsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); return writer; }; /** - * Encodes the specified DeleteIntentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteIntentRequest.verify|verify} messages. + * Encodes the specified ListTestCaseResultsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.DeleteIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IDeleteIntentRequest} message DeleteIntentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListTestCaseResultsRequest} message ListTestCaseResultsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteIntentRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListTestCaseResultsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteIntentRequest message from the specified reader or buffer. + * Decodes a ListTestCaseResultsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.DeleteIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest * @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.DeleteIntentRequest} DeleteIntentRequest + * @returns {google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest} ListTestCaseResultsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteIntentRequest.decode = function decode(reader, length, error) { + ListTestCaseResultsRequest.decode = function decode(reader, length, error) { 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.DeleteIntentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); break; } default: @@ -56642,141 +56636,149 @@ }; /** - * Decodes a DeleteIntentRequest message from the specified reader or buffer, length delimited. + * Decodes a ListTestCaseResultsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.DeleteIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.DeleteIntentRequest} DeleteIntentRequest + * @returns {google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest} ListTestCaseResultsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteIntentRequest.decodeDelimited = function decodeDelimited(reader) { + ListTestCaseResultsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteIntentRequest message. + * Verifies a ListTestCaseResultsRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.DeleteIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteIntentRequest.verify = function verify(message) { + ListTestCaseResultsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; return null; }; /** - * Creates a DeleteIntentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListTestCaseResultsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.DeleteIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.DeleteIntentRequest} DeleteIntentRequest + * @returns {google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest} ListTestCaseResultsRequest */ - DeleteIntentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.DeleteIntentRequest) + ListTestCaseResultsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.DeleteIntentRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); return message; }; /** - * Creates a plain object from a DeleteIntentRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListTestCaseResultsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.DeleteIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.DeleteIntentRequest} message DeleteIntentRequest + * @param {google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest} message ListTestCaseResultsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteIntentRequest.toObject = function toObject(message, options) { + ListTestCaseResultsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; return object; }; /** - * Converts this DeleteIntentRequest to JSON. + * Converts this ListTestCaseResultsRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.DeleteIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest * @instance * @returns {Object.} JSON object */ - DeleteIntentRequest.prototype.toJSON = function toJSON() { + ListTestCaseResultsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeleteIntentRequest + * Gets the default type url for ListTestCaseResultsRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.DeleteIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeleteIntentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListTestCaseResultsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.DeleteIntentRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest"; }; - return DeleteIntentRequest; - })(); - - /** - * IntentView enum. - * @name google.cloud.dialogflow.cx.v3.IntentView - * @enum {number} - * @property {number} INTENT_VIEW_UNSPECIFIED=0 INTENT_VIEW_UNSPECIFIED value - * @property {number} INTENT_VIEW_PARTIAL=1 INTENT_VIEW_PARTIAL value - * @property {number} INTENT_VIEW_FULL=2 INTENT_VIEW_FULL value - */ - v3.IntentView = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "INTENT_VIEW_UNSPECIFIED"] = 0; - values[valuesById[1] = "INTENT_VIEW_PARTIAL"] = 1; - values[valuesById[2] = "INTENT_VIEW_FULL"] = 2; - return values; + return ListTestCaseResultsRequest; })(); - v3.ImportIntentsRequest = (function() { + v3.ListTestCaseResultsResponse = (function() { /** - * Properties of an ImportIntentsRequest. + * Properties of a ListTestCaseResultsResponse. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IImportIntentsRequest - * @property {string|null} [parent] ImportIntentsRequest parent - * @property {string|null} [intentsUri] ImportIntentsRequest intentsUri - * @property {google.cloud.dialogflow.cx.v3.IInlineSource|null} [intentsContent] ImportIntentsRequest intentsContent - * @property {google.cloud.dialogflow.cx.v3.ImportIntentsRequest.MergeOption|null} [mergeOption] ImportIntentsRequest mergeOption + * @interface IListTestCaseResultsResponse + * @property {Array.|null} [testCaseResults] ListTestCaseResultsResponse testCaseResults + * @property {string|null} [nextPageToken] ListTestCaseResultsResponse nextPageToken */ /** - * Constructs a new ImportIntentsRequest. + * Constructs a new ListTestCaseResultsResponse. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents an ImportIntentsRequest. - * @implements IImportIntentsRequest + * @classdesc Represents a ListTestCaseResultsResponse. + * @implements IListTestCaseResultsResponse * @constructor - * @param {google.cloud.dialogflow.cx.v3.IImportIntentsRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IListTestCaseResultsResponse=} [properties] Properties to set */ - function ImportIntentsRequest(properties) { + function ListTestCaseResultsResponse(properties) { + this.testCaseResults = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -56784,133 +56786,94 @@ } /** - * ImportIntentsRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsRequest - * @instance - */ - ImportIntentsRequest.prototype.parent = ""; - - /** - * ImportIntentsRequest intentsUri. - * @member {string|null|undefined} intentsUri - * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsRequest - * @instance - */ - ImportIntentsRequest.prototype.intentsUri = null; - - /** - * ImportIntentsRequest intentsContent. - * @member {google.cloud.dialogflow.cx.v3.IInlineSource|null|undefined} intentsContent - * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsRequest - * @instance - */ - ImportIntentsRequest.prototype.intentsContent = null; - - /** - * ImportIntentsRequest mergeOption. - * @member {google.cloud.dialogflow.cx.v3.ImportIntentsRequest.MergeOption} mergeOption - * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsRequest + * ListTestCaseResultsResponse testCaseResults. + * @member {Array.} testCaseResults + * @memberof google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse * @instance */ - ImportIntentsRequest.prototype.mergeOption = 0; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + ListTestCaseResultsResponse.prototype.testCaseResults = $util.emptyArray; /** - * ImportIntentsRequest intents. - * @member {"intentsUri"|"intentsContent"|undefined} intents - * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsRequest + * ListTestCaseResultsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse * @instance */ - Object.defineProperty(ImportIntentsRequest.prototype, "intents", { - get: $util.oneOfGetter($oneOfFields = ["intentsUri", "intentsContent"]), - set: $util.oneOfSetter($oneOfFields) - }); + ListTestCaseResultsResponse.prototype.nextPageToken = ""; /** - * Creates a new ImportIntentsRequest instance using the specified properties. + * Creates a new ListTestCaseResultsResponse instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IImportIntentsRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ImportIntentsRequest} ImportIntentsRequest instance + * @param {google.cloud.dialogflow.cx.v3.IListTestCaseResultsResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse} ListTestCaseResultsResponse instance */ - ImportIntentsRequest.create = function create(properties) { - return new ImportIntentsRequest(properties); + ListTestCaseResultsResponse.create = function create(properties) { + return new ListTestCaseResultsResponse(properties); }; /** - * Encodes the specified ImportIntentsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportIntentsRequest.verify|verify} messages. + * Encodes the specified ListTestCaseResultsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IImportIntentsRequest} message ImportIntentsRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListTestCaseResultsResponse} message ListTestCaseResultsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportIntentsRequest.encode = function encode(message, writer) { + ListTestCaseResultsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.intentsUri != null && Object.hasOwnProperty.call(message, "intentsUri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.intentsUri); - if (message.intentsContent != null && Object.hasOwnProperty.call(message, "intentsContent")) - $root.google.cloud.dialogflow.cx.v3.InlineSource.encode(message.intentsContent, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.mergeOption != null && Object.hasOwnProperty.call(message, "mergeOption")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.mergeOption); + if (message.testCaseResults != null && message.testCaseResults.length) + for (var i = 0; i < message.testCaseResults.length; ++i) + $root.google.cloud.dialogflow.cx.v3.TestCaseResult.encode(message.testCaseResults[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; /** - * Encodes the specified ImportIntentsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportIntentsRequest.verify|verify} messages. + * Encodes the specified ListTestCaseResultsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IImportIntentsRequest} message ImportIntentsRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListTestCaseResultsResponse} message ListTestCaseResultsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportIntentsRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListTestCaseResultsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ImportIntentsRequest message from the specified reader or buffer. + * Decodes a ListTestCaseResultsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse * @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.ImportIntentsRequest} ImportIntentsRequest + * @returns {google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse} ListTestCaseResultsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportIntentsRequest.decode = function decode(reader, length, error) { + ListTestCaseResultsResponse.decode = function decode(reader, length, error) { 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.ImportIntentsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + if (!(message.testCaseResults && message.testCaseResults.length)) + message.testCaseResults = []; + message.testCaseResults.push($root.google.cloud.dialogflow.cx.v3.TestCaseResult.decode(reader, reader.uint32())); break; } case 2: { - message.intentsUri = reader.string(); - break; - } - case 3: { - message.intentsContent = $root.google.cloud.dialogflow.cx.v3.InlineSource.decode(reader, reader.uint32()); - break; - } - case 4: { - message.mergeOption = reader.int32(); + message.nextPageToken = reader.string(); break; } default: @@ -56922,234 +56885,148 @@ }; /** - * Decodes an ImportIntentsRequest message from the specified reader or buffer, length delimited. + * Decodes a ListTestCaseResultsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ImportIntentsRequest} ImportIntentsRequest + * @returns {google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse} ListTestCaseResultsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportIntentsRequest.decodeDelimited = function decodeDelimited(reader) { + ListTestCaseResultsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ImportIntentsRequest message. + * Verifies a ListTestCaseResultsResponse message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ImportIntentsRequest.verify = function verify(message) { + ListTestCaseResultsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.intentsUri != null && message.hasOwnProperty("intentsUri")) { - properties.intents = 1; - if (!$util.isString(message.intentsUri)) - return "intentsUri: string expected"; - } - if (message.intentsContent != null && message.hasOwnProperty("intentsContent")) { - if (properties.intents === 1) - return "intents: multiple values"; - properties.intents = 1; - { - var error = $root.google.cloud.dialogflow.cx.v3.InlineSource.verify(message.intentsContent); + if (message.testCaseResults != null && message.hasOwnProperty("testCaseResults")) { + if (!Array.isArray(message.testCaseResults)) + return "testCaseResults: array expected"; + for (var i = 0; i < message.testCaseResults.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.TestCaseResult.verify(message.testCaseResults[i]); if (error) - return "intentsContent." + error; + return "testCaseResults." + error; } } - if (message.mergeOption != null && message.hasOwnProperty("mergeOption")) - switch (message.mergeOption) { - default: - return "mergeOption: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - break; - } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates an ImportIntentsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListTestCaseResultsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ImportIntentsRequest} ImportIntentsRequest + * @returns {google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse} ListTestCaseResultsResponse */ - ImportIntentsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ImportIntentsRequest) + ListTestCaseResultsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.ImportIntentsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.intentsUri != null) - message.intentsUri = String(object.intentsUri); - if (object.intentsContent != null) { - if (typeof object.intentsContent !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.ImportIntentsRequest.intentsContent: object expected"); - message.intentsContent = $root.google.cloud.dialogflow.cx.v3.InlineSource.fromObject(object.intentsContent); - } - switch (object.mergeOption) { - default: - if (typeof object.mergeOption === "number") { - message.mergeOption = object.mergeOption; - break; + var message = new $root.google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse(); + if (object.testCaseResults) { + if (!Array.isArray(object.testCaseResults)) + throw TypeError(".google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse.testCaseResults: array expected"); + message.testCaseResults = []; + for (var i = 0; i < object.testCaseResults.length; ++i) { + if (typeof object.testCaseResults[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse.testCaseResults: object expected"); + message.testCaseResults[i] = $root.google.cloud.dialogflow.cx.v3.TestCaseResult.fromObject(object.testCaseResults[i]); } - break; - case "MERGE_OPTION_UNSPECIFIED": - case 0: - message.mergeOption = 0; - break; - case "REJECT": - case 1: - message.mergeOption = 1; - break; - case "REPLACE": - case 2: - message.mergeOption = 2; - break; - case "MERGE": - case 3: - message.mergeOption = 3; - break; - case "RENAME": - case 4: - message.mergeOption = 4; - break; - case "REPORT_CONFLICT": - case 5: - message.mergeOption = 5; - break; - case "KEEP": - case 6: - message.mergeOption = 6; - break; } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from an ImportIntentsRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListTestCaseResultsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse * @static - * @param {google.cloud.dialogflow.cx.v3.ImportIntentsRequest} message ImportIntentsRequest + * @param {google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse} message ListTestCaseResultsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ImportIntentsRequest.toObject = function toObject(message, options) { + ListTestCaseResultsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.mergeOption = options.enums === String ? "MERGE_OPTION_UNSPECIFIED" : 0; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.intentsUri != null && message.hasOwnProperty("intentsUri")) { - object.intentsUri = message.intentsUri; - if (options.oneofs) - object.intents = "intentsUri"; - } - if (message.intentsContent != null && message.hasOwnProperty("intentsContent")) { - object.intentsContent = $root.google.cloud.dialogflow.cx.v3.InlineSource.toObject(message.intentsContent, options); - if (options.oneofs) - object.intents = "intentsContent"; + if (options.arrays || options.defaults) + object.testCaseResults = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.testCaseResults && message.testCaseResults.length) { + object.testCaseResults = []; + for (var j = 0; j < message.testCaseResults.length; ++j) + object.testCaseResults[j] = $root.google.cloud.dialogflow.cx.v3.TestCaseResult.toObject(message.testCaseResults[j], options); } - if (message.mergeOption != null && message.hasOwnProperty("mergeOption")) - object.mergeOption = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.ImportIntentsRequest.MergeOption[message.mergeOption] === undefined ? message.mergeOption : $root.google.cloud.dialogflow.cx.v3.ImportIntentsRequest.MergeOption[message.mergeOption] : message.mergeOption; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this ImportIntentsRequest to JSON. + * Converts this ListTestCaseResultsResponse to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse * @instance * @returns {Object.} JSON object */ - ImportIntentsRequest.prototype.toJSON = function toJSON() { + ListTestCaseResultsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ImportIntentsRequest + * Gets the default type url for ListTestCaseResultsResponse * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ImportIntentsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListTestCaseResultsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ImportIntentsRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse"; }; - /** - * MergeOption enum. - * @name google.cloud.dialogflow.cx.v3.ImportIntentsRequest.MergeOption - * @enum {number} - * @property {number} MERGE_OPTION_UNSPECIFIED=0 MERGE_OPTION_UNSPECIFIED value - * @property {number} REJECT=1 REJECT value - * @property {number} REPLACE=2 REPLACE value - * @property {number} MERGE=3 MERGE value - * @property {number} RENAME=4 RENAME value - * @property {number} REPORT_CONFLICT=5 REPORT_CONFLICT value - * @property {number} KEEP=6 KEEP value - */ - ImportIntentsRequest.MergeOption = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MERGE_OPTION_UNSPECIFIED"] = 0; - values[valuesById[1] = "REJECT"] = 1; - values[valuesById[2] = "REPLACE"] = 2; - values[valuesById[3] = "MERGE"] = 3; - values[valuesById[4] = "RENAME"] = 4; - values[valuesById[5] = "REPORT_CONFLICT"] = 5; - values[valuesById[6] = "KEEP"] = 6; - return values; - })(); - - return ImportIntentsRequest; + return ListTestCaseResultsResponse; })(); - v3.ImportIntentsResponse = (function() { + v3.GetTestCaseResultRequest = (function() { /** - * Properties of an ImportIntentsResponse. + * Properties of a GetTestCaseResultRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IImportIntentsResponse - * @property {Array.|null} [intents] ImportIntentsResponse intents - * @property {google.cloud.dialogflow.cx.v3.ImportIntentsResponse.IConflictingResources|null} [conflictingResources] ImportIntentsResponse conflictingResources + * @interface IGetTestCaseResultRequest + * @property {string|null} [name] GetTestCaseResultRequest name */ /** - * Constructs a new ImportIntentsResponse. + * Constructs a new GetTestCaseResultRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents an ImportIntentsResponse. - * @implements IImportIntentsResponse + * @classdesc Represents a GetTestCaseResultRequest. + * @implements IGetTestCaseResultRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IImportIntentsResponse=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IGetTestCaseResultRequest=} [properties] Properties to set */ - function ImportIntentsResponse(properties) { - this.intents = []; + function GetTestCaseResultRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -57157,94 +57034,77 @@ } /** - * ImportIntentsResponse intents. - * @member {Array.} intents - * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsResponse - * @instance - */ - ImportIntentsResponse.prototype.intents = $util.emptyArray; - - /** - * ImportIntentsResponse conflictingResources. - * @member {google.cloud.dialogflow.cx.v3.ImportIntentsResponse.IConflictingResources|null|undefined} conflictingResources - * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsResponse + * GetTestCaseResultRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.GetTestCaseResultRequest * @instance */ - ImportIntentsResponse.prototype.conflictingResources = null; + GetTestCaseResultRequest.prototype.name = ""; /** - * Creates a new ImportIntentsResponse instance using the specified properties. + * Creates a new GetTestCaseResultRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsResponse + * @memberof google.cloud.dialogflow.cx.v3.GetTestCaseResultRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IImportIntentsResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ImportIntentsResponse} ImportIntentsResponse instance + * @param {google.cloud.dialogflow.cx.v3.IGetTestCaseResultRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.GetTestCaseResultRequest} GetTestCaseResultRequest instance */ - ImportIntentsResponse.create = function create(properties) { - return new ImportIntentsResponse(properties); + GetTestCaseResultRequest.create = function create(properties) { + return new GetTestCaseResultRequest(properties); }; /** - * Encodes the specified ImportIntentsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportIntentsResponse.verify|verify} messages. + * Encodes the specified GetTestCaseResultRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetTestCaseResultRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsResponse + * @memberof google.cloud.dialogflow.cx.v3.GetTestCaseResultRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IImportIntentsResponse} message ImportIntentsResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IGetTestCaseResultRequest} message GetTestCaseResultRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportIntentsResponse.encode = function encode(message, writer) { + GetTestCaseResultRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.intents != null && message.intents.length) - for (var i = 0; i < message.intents.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.intents[i]); - if (message.conflictingResources != null && Object.hasOwnProperty.call(message, "conflictingResources")) - $root.google.cloud.dialogflow.cx.v3.ImportIntentsResponse.ConflictingResources.encode(message.conflictingResources, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified ImportIntentsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportIntentsResponse.verify|verify} messages. + * Encodes the specified GetTestCaseResultRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetTestCaseResultRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsResponse + * @memberof google.cloud.dialogflow.cx.v3.GetTestCaseResultRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IImportIntentsResponse} message ImportIntentsResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IGetTestCaseResultRequest} message GetTestCaseResultRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportIntentsResponse.encodeDelimited = function encodeDelimited(message, writer) { + GetTestCaseResultRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ImportIntentsResponse message from the specified reader or buffer. + * Decodes a GetTestCaseResultRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsResponse + * @memberof google.cloud.dialogflow.cx.v3.GetTestCaseResultRequest * @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.ImportIntentsResponse} ImportIntentsResponse + * @returns {google.cloud.dialogflow.cx.v3.GetTestCaseResultRequest} GetTestCaseResultRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportIntentsResponse.decode = function decode(reader, length, error) { + GetTestCaseResultRequest.decode = function decode(reader, length, error) { 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.ImportIntentsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.GetTestCaseResultRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - if (!(message.intents && message.intents.length)) - message.intents = []; - message.intents.push(reader.string()); - break; - } - case 2: { - message.conflictingResources = $root.google.cloud.dialogflow.cx.v3.ImportIntentsResponse.ConflictingResources.decode(reader, reader.uint32()); + message.name = reader.string(); break; } default: @@ -57256,591 +57116,414 @@ }; /** - * Decodes an ImportIntentsResponse message from the specified reader or buffer, length delimited. + * Decodes a GetTestCaseResultRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsResponse + * @memberof google.cloud.dialogflow.cx.v3.GetTestCaseResultRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ImportIntentsResponse} ImportIntentsResponse + * @returns {google.cloud.dialogflow.cx.v3.GetTestCaseResultRequest} GetTestCaseResultRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportIntentsResponse.decodeDelimited = function decodeDelimited(reader) { + GetTestCaseResultRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ImportIntentsResponse message. + * Verifies a GetTestCaseResultRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsResponse + * @memberof google.cloud.dialogflow.cx.v3.GetTestCaseResultRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ImportIntentsResponse.verify = function verify(message) { + GetTestCaseResultRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.intents != null && message.hasOwnProperty("intents")) { - if (!Array.isArray(message.intents)) - return "intents: array expected"; - for (var i = 0; i < message.intents.length; ++i) - if (!$util.isString(message.intents[i])) - return "intents: string[] expected"; - } - if (message.conflictingResources != null && message.hasOwnProperty("conflictingResources")) { - var error = $root.google.cloud.dialogflow.cx.v3.ImportIntentsResponse.ConflictingResources.verify(message.conflictingResources); - if (error) - return "conflictingResources." + error; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates an ImportIntentsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetTestCaseResultRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsResponse + * @memberof google.cloud.dialogflow.cx.v3.GetTestCaseResultRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ImportIntentsResponse} ImportIntentsResponse + * @returns {google.cloud.dialogflow.cx.v3.GetTestCaseResultRequest} GetTestCaseResultRequest */ - ImportIntentsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ImportIntentsResponse) + GetTestCaseResultRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.GetTestCaseResultRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.ImportIntentsResponse(); - if (object.intents) { - if (!Array.isArray(object.intents)) - throw TypeError(".google.cloud.dialogflow.cx.v3.ImportIntentsResponse.intents: array expected"); - message.intents = []; - for (var i = 0; i < object.intents.length; ++i) - message.intents[i] = String(object.intents[i]); - } - if (object.conflictingResources != null) { - if (typeof object.conflictingResources !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.ImportIntentsResponse.conflictingResources: object expected"); - message.conflictingResources = $root.google.cloud.dialogflow.cx.v3.ImportIntentsResponse.ConflictingResources.fromObject(object.conflictingResources); - } + var message = new $root.google.cloud.dialogflow.cx.v3.GetTestCaseResultRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from an ImportIntentsResponse message. Also converts values to other types if specified. + * Creates a plain object from a GetTestCaseResultRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsResponse + * @memberof google.cloud.dialogflow.cx.v3.GetTestCaseResultRequest * @static - * @param {google.cloud.dialogflow.cx.v3.ImportIntentsResponse} message ImportIntentsResponse + * @param {google.cloud.dialogflow.cx.v3.GetTestCaseResultRequest} message GetTestCaseResultRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ImportIntentsResponse.toObject = function toObject(message, options) { + GetTestCaseResultRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.intents = []; if (options.defaults) - object.conflictingResources = null; - if (message.intents && message.intents.length) { - object.intents = []; - for (var j = 0; j < message.intents.length; ++j) - object.intents[j] = message.intents[j]; - } - if (message.conflictingResources != null && message.hasOwnProperty("conflictingResources")) - object.conflictingResources = $root.google.cloud.dialogflow.cx.v3.ImportIntentsResponse.ConflictingResources.toObject(message.conflictingResources, options); + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this ImportIntentsResponse to JSON. + * Converts this GetTestCaseResultRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsResponse + * @memberof google.cloud.dialogflow.cx.v3.GetTestCaseResultRequest * @instance * @returns {Object.} JSON object */ - ImportIntentsResponse.prototype.toJSON = function toJSON() { + GetTestCaseResultRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ImportIntentsResponse + * Gets the default type url for GetTestCaseResultRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsResponse + * @memberof google.cloud.dialogflow.cx.v3.GetTestCaseResultRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ImportIntentsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetTestCaseResultRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ImportIntentsResponse"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.GetTestCaseResultRequest"; }; - ImportIntentsResponse.ConflictingResources = (function() { - - /** - * Properties of a ConflictingResources. - * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsResponse - * @interface IConflictingResources - * @property {Array.|null} [intentDisplayNames] ConflictingResources intentDisplayNames - * @property {Array.|null} [entityDisplayNames] ConflictingResources entityDisplayNames - */ - - /** - * Constructs a new ConflictingResources. - * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsResponse - * @classdesc Represents a ConflictingResources. - * @implements IConflictingResources - * @constructor - * @param {google.cloud.dialogflow.cx.v3.ImportIntentsResponse.IConflictingResources=} [properties] Properties to set - */ - function ConflictingResources(properties) { - this.intentDisplayNames = []; - this.entityDisplayNames = []; - 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]]; - } - - /** - * ConflictingResources intentDisplayNames. - * @member {Array.} intentDisplayNames - * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsResponse.ConflictingResources - * @instance - */ - ConflictingResources.prototype.intentDisplayNames = $util.emptyArray; - - /** - * ConflictingResources entityDisplayNames. - * @member {Array.} entityDisplayNames - * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsResponse.ConflictingResources - * @instance - */ - ConflictingResources.prototype.entityDisplayNames = $util.emptyArray; - - /** - * Creates a new ConflictingResources instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsResponse.ConflictingResources - * @static - * @param {google.cloud.dialogflow.cx.v3.ImportIntentsResponse.IConflictingResources=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ImportIntentsResponse.ConflictingResources} ConflictingResources instance - */ - ConflictingResources.create = function create(properties) { - return new ConflictingResources(properties); - }; - - /** - * Encodes the specified ConflictingResources message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportIntentsResponse.ConflictingResources.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsResponse.ConflictingResources - * @static - * @param {google.cloud.dialogflow.cx.v3.ImportIntentsResponse.IConflictingResources} message ConflictingResources message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConflictingResources.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.intentDisplayNames != null && message.intentDisplayNames.length) - for (var i = 0; i < message.intentDisplayNames.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.intentDisplayNames[i]); - if (message.entityDisplayNames != null && message.entityDisplayNames.length) - for (var i = 0; i < message.entityDisplayNames.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.entityDisplayNames[i]); - return writer; - }; - - /** - * Encodes the specified ConflictingResources message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportIntentsResponse.ConflictingResources.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsResponse.ConflictingResources - * @static - * @param {google.cloud.dialogflow.cx.v3.ImportIntentsResponse.IConflictingResources} message ConflictingResources message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConflictingResources.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ConflictingResources message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsResponse.ConflictingResources - * @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.ImportIntentsResponse.ConflictingResources} ConflictingResources - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConflictingResources.decode = function decode(reader, length, error) { - 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.ImportIntentsResponse.ConflictingResources(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.intentDisplayNames && message.intentDisplayNames.length)) - message.intentDisplayNames = []; - message.intentDisplayNames.push(reader.string()); - break; - } - case 2: { - if (!(message.entityDisplayNames && message.entityDisplayNames.length)) - message.entityDisplayNames = []; - message.entityDisplayNames.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ConflictingResources message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsResponse.ConflictingResources - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ImportIntentsResponse.ConflictingResources} ConflictingResources - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConflictingResources.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ConflictingResources message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsResponse.ConflictingResources - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ConflictingResources.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.intentDisplayNames != null && message.hasOwnProperty("intentDisplayNames")) { - if (!Array.isArray(message.intentDisplayNames)) - return "intentDisplayNames: array expected"; - for (var i = 0; i < message.intentDisplayNames.length; ++i) - if (!$util.isString(message.intentDisplayNames[i])) - return "intentDisplayNames: string[] expected"; - } - if (message.entityDisplayNames != null && message.hasOwnProperty("entityDisplayNames")) { - if (!Array.isArray(message.entityDisplayNames)) - return "entityDisplayNames: array expected"; - for (var i = 0; i < message.entityDisplayNames.length; ++i) - if (!$util.isString(message.entityDisplayNames[i])) - return "entityDisplayNames: string[] expected"; - } - return null; - }; - - /** - * Creates a ConflictingResources message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsResponse.ConflictingResources - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ImportIntentsResponse.ConflictingResources} ConflictingResources - */ - ConflictingResources.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ImportIntentsResponse.ConflictingResources) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.ImportIntentsResponse.ConflictingResources(); - if (object.intentDisplayNames) { - if (!Array.isArray(object.intentDisplayNames)) - throw TypeError(".google.cloud.dialogflow.cx.v3.ImportIntentsResponse.ConflictingResources.intentDisplayNames: array expected"); - message.intentDisplayNames = []; - for (var i = 0; i < object.intentDisplayNames.length; ++i) - message.intentDisplayNames[i] = String(object.intentDisplayNames[i]); - } - if (object.entityDisplayNames) { - if (!Array.isArray(object.entityDisplayNames)) - throw TypeError(".google.cloud.dialogflow.cx.v3.ImportIntentsResponse.ConflictingResources.entityDisplayNames: array expected"); - message.entityDisplayNames = []; - for (var i = 0; i < object.entityDisplayNames.length; ++i) - message.entityDisplayNames[i] = String(object.entityDisplayNames[i]); - } - return message; - }; - - /** - * Creates a plain object from a ConflictingResources message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsResponse.ConflictingResources - * @static - * @param {google.cloud.dialogflow.cx.v3.ImportIntentsResponse.ConflictingResources} message ConflictingResources - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ConflictingResources.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.intentDisplayNames = []; - object.entityDisplayNames = []; - } - if (message.intentDisplayNames && message.intentDisplayNames.length) { - object.intentDisplayNames = []; - for (var j = 0; j < message.intentDisplayNames.length; ++j) - object.intentDisplayNames[j] = message.intentDisplayNames[j]; - } - if (message.entityDisplayNames && message.entityDisplayNames.length) { - object.entityDisplayNames = []; - for (var j = 0; j < message.entityDisplayNames.length; ++j) - object.entityDisplayNames[j] = message.entityDisplayNames[j]; - } - return object; - }; - - /** - * Converts this ConflictingResources to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsResponse.ConflictingResources - * @instance - * @returns {Object.} JSON object - */ - ConflictingResources.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ConflictingResources - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsResponse.ConflictingResources - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ConflictingResources.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ImportIntentsResponse.ConflictingResources"; - }; - - return ConflictingResources; - })(); - - return ImportIntentsResponse; + return GetTestCaseResultRequest; })(); - v3.ImportIntentsMetadata = (function() { + /** + * TestResult enum. + * @name google.cloud.dialogflow.cx.v3.TestResult + * @enum {number} + * @property {number} TEST_RESULT_UNSPECIFIED=0 TEST_RESULT_UNSPECIFIED value + * @property {number} PASSED=1 PASSED value + * @property {number} FAILED=2 FAILED value + */ + v3.TestResult = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TEST_RESULT_UNSPECIFIED"] = 0; + values[valuesById[1] = "PASSED"] = 1; + values[valuesById[2] = "FAILED"] = 2; + return values; + })(); - /** - * Properties of an ImportIntentsMetadata. - * @memberof google.cloud.dialogflow.cx.v3 - * @interface IImportIntentsMetadata - */ + v3.Intents = (function() { /** - * Constructs a new ImportIntentsMetadata. + * Constructs a new Intents service. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents an ImportIntentsMetadata. - * @implements IImportIntentsMetadata + * @classdesc Represents an Intents + * @extends $protobuf.rpc.Service * @constructor - * @param {google.cloud.dialogflow.cx.v3.IImportIntentsMetadata=} [properties] Properties to set + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited */ - function ImportIntentsMetadata(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]]; + function Intents(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); } + (Intents.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Intents; + /** - * Creates a new ImportIntentsMetadata instance using the specified properties. + * Creates new Intents service using the specified rpc implementation. * @function create - * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsMetadata + * @memberof google.cloud.dialogflow.cx.v3.Intents * @static - * @param {google.cloud.dialogflow.cx.v3.IImportIntentsMetadata=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ImportIntentsMetadata} ImportIntentsMetadata instance + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Intents} RPC service. Useful where requests and/or responses are streamed. */ - ImportIntentsMetadata.create = function create(properties) { - return new ImportIntentsMetadata(properties); + Intents.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); }; /** - * Encodes the specified ImportIntentsMetadata message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportIntentsMetadata.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsMetadata - * @static - * @param {google.cloud.dialogflow.cx.v3.IImportIntentsMetadata} message ImportIntentsMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Intents|listIntents}. + * @memberof google.cloud.dialogflow.cx.v3.Intents + * @typedef ListIntentsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.ListIntentsResponse} [response] ListIntentsResponse */ - ImportIntentsMetadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; /** - * Encodes the specified ImportIntentsMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportIntentsMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsMetadata - * @static - * @param {google.cloud.dialogflow.cx.v3.IImportIntentsMetadata} message ImportIntentsMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls ListIntents. + * @function listIntents + * @memberof google.cloud.dialogflow.cx.v3.Intents + * @instance + * @param {google.cloud.dialogflow.cx.v3.IListIntentsRequest} request ListIntentsRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Intents.ListIntentsCallback} callback Node-style callback called with the error, if any, and ListIntentsResponse + * @returns {undefined} + * @variation 1 */ - ImportIntentsMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + Object.defineProperty(Intents.prototype.listIntents = function listIntents(request, callback) { + return this.rpcCall(listIntents, $root.google.cloud.dialogflow.cx.v3.ListIntentsRequest, $root.google.cloud.dialogflow.cx.v3.ListIntentsResponse, request, callback); + }, "name", { value: "ListIntents" }); /** - * Decodes an ImportIntentsMetadata message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsMetadata - * @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.ImportIntentsMetadata} ImportIntentsMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls ListIntents. + * @function listIntents + * @memberof google.cloud.dialogflow.cx.v3.Intents + * @instance + * @param {google.cloud.dialogflow.cx.v3.IListIntentsRequest} request ListIntentsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ImportIntentsMetadata.decode = function decode(reader, length, error) { - 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.ImportIntentsMetadata(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes an ImportIntentsMetadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ImportIntentsMetadata} ImportIntentsMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Intents|getIntent}. + * @memberof google.cloud.dialogflow.cx.v3.Intents + * @typedef GetIntentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.Intent} [response] Intent */ - ImportIntentsMetadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; /** - * Verifies an ImportIntentsMetadata message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsMetadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls GetIntent. + * @function getIntent + * @memberof google.cloud.dialogflow.cx.v3.Intents + * @instance + * @param {google.cloud.dialogflow.cx.v3.IGetIntentRequest} request GetIntentRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Intents.GetIntentCallback} callback Node-style callback called with the error, if any, and Intent + * @returns {undefined} + * @variation 1 */ - ImportIntentsMetadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; + Object.defineProperty(Intents.prototype.getIntent = function getIntent(request, callback) { + return this.rpcCall(getIntent, $root.google.cloud.dialogflow.cx.v3.GetIntentRequest, $root.google.cloud.dialogflow.cx.v3.Intent, request, callback); + }, "name", { value: "GetIntent" }); /** - * Creates an ImportIntentsMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ImportIntentsMetadata} ImportIntentsMetadata + * Calls GetIntent. + * @function getIntent + * @memberof google.cloud.dialogflow.cx.v3.Intents + * @instance + * @param {google.cloud.dialogflow.cx.v3.IGetIntentRequest} request GetIntentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ImportIntentsMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ImportIntentsMetadata) - return object; - return new $root.google.cloud.dialogflow.cx.v3.ImportIntentsMetadata(); - }; /** - * Creates a plain object from an ImportIntentsMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsMetadata - * @static - * @param {google.cloud.dialogflow.cx.v3.ImportIntentsMetadata} message ImportIntentsMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Intents|createIntent}. + * @memberof google.cloud.dialogflow.cx.v3.Intents + * @typedef CreateIntentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.Intent} [response] Intent */ - ImportIntentsMetadata.toObject = function toObject() { - return {}; - }; /** - * Converts this ImportIntentsMetadata to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsMetadata + * Calls CreateIntent. + * @function createIntent + * @memberof google.cloud.dialogflow.cx.v3.Intents * @instance - * @returns {Object.} JSON object + * @param {google.cloud.dialogflow.cx.v3.ICreateIntentRequest} request CreateIntentRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Intents.CreateIntentCallback} callback Node-style callback called with the error, if any, and Intent + * @returns {undefined} + * @variation 1 */ - ImportIntentsMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + Object.defineProperty(Intents.prototype.createIntent = function createIntent(request, callback) { + return this.rpcCall(createIntent, $root.google.cloud.dialogflow.cx.v3.CreateIntentRequest, $root.google.cloud.dialogflow.cx.v3.Intent, request, callback); + }, "name", { value: "CreateIntent" }); /** - * Gets the default type url for ImportIntentsMetadata - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsMetadata - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * Calls CreateIntent. + * @function createIntent + * @memberof google.cloud.dialogflow.cx.v3.Intents + * @instance + * @param {google.cloud.dialogflow.cx.v3.ICreateIntentRequest} request CreateIntentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ImportIntentsMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ImportIntentsMetadata"; - }; - return ImportIntentsMetadata; + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Intents|updateIntent}. + * @memberof google.cloud.dialogflow.cx.v3.Intents + * @typedef UpdateIntentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.Intent} [response] Intent + */ + + /** + * Calls UpdateIntent. + * @function updateIntent + * @memberof google.cloud.dialogflow.cx.v3.Intents + * @instance + * @param {google.cloud.dialogflow.cx.v3.IUpdateIntentRequest} request UpdateIntentRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Intents.UpdateIntentCallback} callback Node-style callback called with the error, if any, and Intent + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Intents.prototype.updateIntent = function updateIntent(request, callback) { + return this.rpcCall(updateIntent, $root.google.cloud.dialogflow.cx.v3.UpdateIntentRequest, $root.google.cloud.dialogflow.cx.v3.Intent, request, callback); + }, "name", { value: "UpdateIntent" }); + + /** + * Calls UpdateIntent. + * @function updateIntent + * @memberof google.cloud.dialogflow.cx.v3.Intents + * @instance + * @param {google.cloud.dialogflow.cx.v3.IUpdateIntentRequest} request UpdateIntentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Intents|deleteIntent}. + * @memberof google.cloud.dialogflow.cx.v3.Intents + * @typedef DeleteIntentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteIntent. + * @function deleteIntent + * @memberof google.cloud.dialogflow.cx.v3.Intents + * @instance + * @param {google.cloud.dialogflow.cx.v3.IDeleteIntentRequest} request DeleteIntentRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Intents.DeleteIntentCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Intents.prototype.deleteIntent = function deleteIntent(request, callback) { + return this.rpcCall(deleteIntent, $root.google.cloud.dialogflow.cx.v3.DeleteIntentRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteIntent" }); + + /** + * Calls DeleteIntent. + * @function deleteIntent + * @memberof google.cloud.dialogflow.cx.v3.Intents + * @instance + * @param {google.cloud.dialogflow.cx.v3.IDeleteIntentRequest} request DeleteIntentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Intents|importIntents}. + * @memberof google.cloud.dialogflow.cx.v3.Intents + * @typedef ImportIntentsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls ImportIntents. + * @function importIntents + * @memberof google.cloud.dialogflow.cx.v3.Intents + * @instance + * @param {google.cloud.dialogflow.cx.v3.IImportIntentsRequest} request ImportIntentsRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Intents.ImportIntentsCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Intents.prototype.importIntents = function importIntents(request, callback) { + return this.rpcCall(importIntents, $root.google.cloud.dialogflow.cx.v3.ImportIntentsRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "ImportIntents" }); + + /** + * Calls ImportIntents. + * @function importIntents + * @memberof google.cloud.dialogflow.cx.v3.Intents + * @instance + * @param {google.cloud.dialogflow.cx.v3.IImportIntentsRequest} request ImportIntentsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Intents|exportIntents}. + * @memberof google.cloud.dialogflow.cx.v3.Intents + * @typedef ExportIntentsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls ExportIntents. + * @function exportIntents + * @memberof google.cloud.dialogflow.cx.v3.Intents + * @instance + * @param {google.cloud.dialogflow.cx.v3.IExportIntentsRequest} request ExportIntentsRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Intents.ExportIntentsCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Intents.prototype.exportIntents = function exportIntents(request, callback) { + return this.rpcCall(exportIntents, $root.google.cloud.dialogflow.cx.v3.ExportIntentsRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "ExportIntents" }); + + /** + * Calls ExportIntents. + * @function exportIntents + * @memberof google.cloud.dialogflow.cx.v3.Intents + * @instance + * @param {google.cloud.dialogflow.cx.v3.IExportIntentsRequest} request ExportIntentsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Intents; })(); - v3.ExportIntentsRequest = (function() { + v3.Intent = (function() { /** - * Properties of an ExportIntentsRequest. + * Properties of an Intent. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IExportIntentsRequest - * @property {string|null} [parent] ExportIntentsRequest parent - * @property {Array.|null} [intents] ExportIntentsRequest intents - * @property {string|null} [intentsUri] ExportIntentsRequest intentsUri - * @property {boolean|null} [intentsContentInline] ExportIntentsRequest intentsContentInline - * @property {google.cloud.dialogflow.cx.v3.ExportIntentsRequest.DataFormat|null} [dataFormat] ExportIntentsRequest dataFormat + * @interface IIntent + * @property {string|null} [name] Intent name + * @property {string|null} [displayName] Intent displayName + * @property {Array.|null} [trainingPhrases] Intent trainingPhrases + * @property {Array.|null} [parameters] Intent parameters + * @property {number|null} [priority] Intent priority + * @property {boolean|null} [isFallback] Intent isFallback + * @property {Object.|null} [labels] Intent labels + * @property {string|null} [description] Intent description */ /** - * Constructs a new ExportIntentsRequest. + * Constructs a new Intent. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents an ExportIntentsRequest. - * @implements IExportIntentsRequest + * @classdesc Represents an Intent. + * @implements IIntent * @constructor - * @param {google.cloud.dialogflow.cx.v3.IExportIntentsRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IIntent=} [properties] Properties to set */ - function ExportIntentsRequest(properties) { - this.intents = []; + function Intent(properties) { + this.trainingPhrases = []; + this.parameters = []; + this.labels = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -57848,1157 +57531,1352 @@ } /** - * ExportIntentsRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3.ExportIntentsRequest + * Intent name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.Intent * @instance */ - ExportIntentsRequest.prototype.parent = ""; + Intent.prototype.name = ""; /** - * ExportIntentsRequest intents. - * @member {Array.} intents - * @memberof google.cloud.dialogflow.cx.v3.ExportIntentsRequest + * Intent displayName. + * @member {string} displayName + * @memberof google.cloud.dialogflow.cx.v3.Intent * @instance */ - ExportIntentsRequest.prototype.intents = $util.emptyArray; + Intent.prototype.displayName = ""; /** - * ExportIntentsRequest intentsUri. - * @member {string|null|undefined} intentsUri - * @memberof google.cloud.dialogflow.cx.v3.ExportIntentsRequest + * Intent trainingPhrases. + * @member {Array.} trainingPhrases + * @memberof google.cloud.dialogflow.cx.v3.Intent * @instance */ - ExportIntentsRequest.prototype.intentsUri = null; + Intent.prototype.trainingPhrases = $util.emptyArray; /** - * ExportIntentsRequest intentsContentInline. - * @member {boolean|null|undefined} intentsContentInline - * @memberof google.cloud.dialogflow.cx.v3.ExportIntentsRequest + * Intent parameters. + * @member {Array.} parameters + * @memberof google.cloud.dialogflow.cx.v3.Intent * @instance */ - ExportIntentsRequest.prototype.intentsContentInline = null; + Intent.prototype.parameters = $util.emptyArray; /** - * ExportIntentsRequest dataFormat. - * @member {google.cloud.dialogflow.cx.v3.ExportIntentsRequest.DataFormat} dataFormat - * @memberof google.cloud.dialogflow.cx.v3.ExportIntentsRequest + * Intent priority. + * @member {number} priority + * @memberof google.cloud.dialogflow.cx.v3.Intent * @instance */ - ExportIntentsRequest.prototype.dataFormat = 0; + Intent.prototype.priority = 0; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Intent isFallback. + * @member {boolean} isFallback + * @memberof google.cloud.dialogflow.cx.v3.Intent + * @instance + */ + Intent.prototype.isFallback = false; /** - * ExportIntentsRequest destination. - * @member {"intentsUri"|"intentsContentInline"|undefined} destination - * @memberof google.cloud.dialogflow.cx.v3.ExportIntentsRequest + * Intent labels. + * @member {Object.} labels + * @memberof google.cloud.dialogflow.cx.v3.Intent * @instance */ - Object.defineProperty(ExportIntentsRequest.prototype, "destination", { - get: $util.oneOfGetter($oneOfFields = ["intentsUri", "intentsContentInline"]), - set: $util.oneOfSetter($oneOfFields) - }); + Intent.prototype.labels = $util.emptyObject; /** - * Creates a new ExportIntentsRequest instance using the specified properties. + * Intent description. + * @member {string} description + * @memberof google.cloud.dialogflow.cx.v3.Intent + * @instance + */ + Intent.prototype.description = ""; + + /** + * Creates a new Intent instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.ExportIntentsRequest + * @memberof google.cloud.dialogflow.cx.v3.Intent * @static - * @param {google.cloud.dialogflow.cx.v3.IExportIntentsRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ExportIntentsRequest} ExportIntentsRequest instance + * @param {google.cloud.dialogflow.cx.v3.IIntent=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.Intent} Intent instance */ - ExportIntentsRequest.create = function create(properties) { - return new ExportIntentsRequest(properties); + Intent.create = function create(properties) { + return new Intent(properties); }; /** - * Encodes the specified ExportIntentsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ExportIntentsRequest.verify|verify} messages. + * Encodes the specified Intent message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Intent.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ExportIntentsRequest + * @memberof google.cloud.dialogflow.cx.v3.Intent * @static - * @param {google.cloud.dialogflow.cx.v3.IExportIntentsRequest} message ExportIntentsRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IIntent} message Intent message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExportIntentsRequest.encode = function encode(message, writer) { + Intent.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.intents != null && message.intents.length) - for (var i = 0; i < message.intents.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.intents[i]); - if (message.intentsUri != null && Object.hasOwnProperty.call(message, "intentsUri")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.intentsUri); - if (message.intentsContentInline != null && Object.hasOwnProperty.call(message, "intentsContentInline")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.intentsContentInline); - if (message.dataFormat != null && Object.hasOwnProperty.call(message, "dataFormat")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.dataFormat); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.trainingPhrases != null && message.trainingPhrases.length) + for (var i = 0; i < message.trainingPhrases.length; ++i) + $root.google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.encode(message.trainingPhrases[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.parameters != null && message.parameters.length) + for (var i = 0; i < message.parameters.length; ++i) + $root.google.cloud.dialogflow.cx.v3.Intent.Parameter.encode(message.parameters[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.priority != null && Object.hasOwnProperty.call(message, "priority")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.priority); + if (message.isFallback != null && Object.hasOwnProperty.call(message, "isFallback")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.isFallback); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.description); return writer; }; /** - * Encodes the specified ExportIntentsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ExportIntentsRequest.verify|verify} messages. + * Encodes the specified Intent message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Intent.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ExportIntentsRequest + * @memberof google.cloud.dialogflow.cx.v3.Intent * @static - * @param {google.cloud.dialogflow.cx.v3.IExportIntentsRequest} message ExportIntentsRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IIntent} message Intent message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExportIntentsRequest.encodeDelimited = function encodeDelimited(message, writer) { + Intent.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ExportIntentsRequest message from the specified reader or buffer. + * Decodes an Intent message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ExportIntentsRequest + * @memberof google.cloud.dialogflow.cx.v3.Intent * @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.ExportIntentsRequest} ExportIntentsRequest + * @returns {google.cloud.dialogflow.cx.v3.Intent} Intent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExportIntentsRequest.decode = function decode(reader, length, error) { + Intent.decode = function decode(reader, length, error) { 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.ExportIntentsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.Intent(), key, value; while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + message.name = reader.string(); break; } case 2: { - if (!(message.intents && message.intents.length)) - message.intents = []; - message.intents.push(reader.string()); + message.displayName = reader.string(); break; } case 3: { - message.intentsUri = reader.string(); + if (!(message.trainingPhrases && message.trainingPhrases.length)) + message.trainingPhrases = []; + message.trainingPhrases.push($root.google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.decode(reader, reader.uint32())); break; } case 4: { - message.intentsContentInline = reader.bool(); + if (!(message.parameters && message.parameters.length)) + message.parameters = []; + message.parameters.push($root.google.cloud.dialogflow.cx.v3.Intent.Parameter.decode(reader, reader.uint32())); break; } case 5: { - message.dataFormat = reader.int32(); + message.priority = reader.int32(); break; } - default: - reader.skipType(tag & 7); - break; + case 6: { + message.isFallback = reader.bool(); + break; + } + case 7: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + } + case 8: { + message.description = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; } } return message; }; /** - * Decodes an ExportIntentsRequest message from the specified reader or buffer, length delimited. + * Decodes an Intent message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ExportIntentsRequest + * @memberof google.cloud.dialogflow.cx.v3.Intent * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ExportIntentsRequest} ExportIntentsRequest + * @returns {google.cloud.dialogflow.cx.v3.Intent} Intent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExportIntentsRequest.decodeDelimited = function decodeDelimited(reader) { + Intent.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ExportIntentsRequest message. + * Verifies an Intent message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ExportIntentsRequest + * @memberof google.cloud.dialogflow.cx.v3.Intent * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExportIntentsRequest.verify = function verify(message) { + Intent.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.intents != null && message.hasOwnProperty("intents")) { - if (!Array.isArray(message.intents)) - return "intents: array expected"; - for (var i = 0; i < message.intents.length; ++i) - if (!$util.isString(message.intents[i])) - return "intents: string[] expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.trainingPhrases != null && message.hasOwnProperty("trainingPhrases")) { + if (!Array.isArray(message.trainingPhrases)) + return "trainingPhrases: array expected"; + for (var i = 0; i < message.trainingPhrases.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.verify(message.trainingPhrases[i]); + if (error) + return "trainingPhrases." + error; + } } - if (message.intentsUri != null && message.hasOwnProperty("intentsUri")) { - properties.destination = 1; - if (!$util.isString(message.intentsUri)) - return "intentsUri: string expected"; + if (message.parameters != null && message.hasOwnProperty("parameters")) { + if (!Array.isArray(message.parameters)) + return "parameters: array expected"; + for (var i = 0; i < message.parameters.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.Intent.Parameter.verify(message.parameters[i]); + if (error) + return "parameters." + error; + } } - if (message.intentsContentInline != null && message.hasOwnProperty("intentsContentInline")) { - if (properties.destination === 1) - return "destination: multiple values"; - properties.destination = 1; - if (typeof message.intentsContentInline !== "boolean") - return "intentsContentInline: boolean expected"; + if (message.priority != null && message.hasOwnProperty("priority")) + if (!$util.isInteger(message.priority)) + return "priority: integer expected"; + if (message.isFallback != null && message.hasOwnProperty("isFallback")) + if (typeof message.isFallback !== "boolean") + return "isFallback: boolean expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; } - if (message.dataFormat != null && message.hasOwnProperty("dataFormat")) - switch (message.dataFormat) { - default: - return "dataFormat: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; return null; }; /** - * Creates an ExportIntentsRequest message from a plain object. Also converts values to their respective internal types. + * Creates an Intent message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ExportIntentsRequest + * @memberof google.cloud.dialogflow.cx.v3.Intent * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ExportIntentsRequest} ExportIntentsRequest + * @returns {google.cloud.dialogflow.cx.v3.Intent} Intent */ - ExportIntentsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ExportIntentsRequest) + Intent.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.Intent) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.ExportIntentsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.intents) { - if (!Array.isArray(object.intents)) - throw TypeError(".google.cloud.dialogflow.cx.v3.ExportIntentsRequest.intents: array expected"); - message.intents = []; - for (var i = 0; i < object.intents.length; ++i) - message.intents[i] = String(object.intents[i]); + var message = new $root.google.cloud.dialogflow.cx.v3.Intent(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.trainingPhrases) { + if (!Array.isArray(object.trainingPhrases)) + throw TypeError(".google.cloud.dialogflow.cx.v3.Intent.trainingPhrases: array expected"); + message.trainingPhrases = []; + for (var i = 0; i < object.trainingPhrases.length; ++i) { + if (typeof object.trainingPhrases[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Intent.trainingPhrases: object expected"); + message.trainingPhrases[i] = $root.google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.fromObject(object.trainingPhrases[i]); + } } - if (object.intentsUri != null) - message.intentsUri = String(object.intentsUri); - if (object.intentsContentInline != null) - message.intentsContentInline = Boolean(object.intentsContentInline); - switch (object.dataFormat) { - default: - if (typeof object.dataFormat === "number") { - message.dataFormat = object.dataFormat; - break; + if (object.parameters) { + if (!Array.isArray(object.parameters)) + throw TypeError(".google.cloud.dialogflow.cx.v3.Intent.parameters: array expected"); + message.parameters = []; + for (var i = 0; i < object.parameters.length; ++i) { + if (typeof object.parameters[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Intent.parameters: object expected"); + message.parameters[i] = $root.google.cloud.dialogflow.cx.v3.Intent.Parameter.fromObject(object.parameters[i]); } - break; - case "DATA_FORMAT_UNSPECIFIED": - case 0: - message.dataFormat = 0; - break; - case "BLOB": - case 1: - message.dataFormat = 1; - break; - case "JSON": - case 2: - message.dataFormat = 2; - break; - case "CSV": - case 3: - message.dataFormat = 3; - break; } + if (object.priority != null) + message.priority = object.priority | 0; + if (object.isFallback != null) + message.isFallback = Boolean(object.isFallback); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Intent.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + if (object.description != null) + message.description = String(object.description); return message; }; /** - * Creates a plain object from an ExportIntentsRequest message. Also converts values to other types if specified. + * Creates a plain object from an Intent message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ExportIntentsRequest + * @memberof google.cloud.dialogflow.cx.v3.Intent * @static - * @param {google.cloud.dialogflow.cx.v3.ExportIntentsRequest} message ExportIntentsRequest + * @param {google.cloud.dialogflow.cx.v3.Intent} message Intent * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExportIntentsRequest.toObject = function toObject(message, options) { + Intent.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.intents = []; + if (options.arrays || options.defaults) { + object.trainingPhrases = []; + object.parameters = []; + } + if (options.objects || options.defaults) + object.labels = {}; if (options.defaults) { - object.parent = ""; - object.dataFormat = options.enums === String ? "DATA_FORMAT_UNSPECIFIED" : 0; + object.name = ""; + object.displayName = ""; + object.priority = 0; + object.isFallback = false; + object.description = ""; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.intents && message.intents.length) { - object.intents = []; - for (var j = 0; j < message.intents.length; ++j) - object.intents[j] = message.intents[j]; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.trainingPhrases && message.trainingPhrases.length) { + object.trainingPhrases = []; + for (var j = 0; j < message.trainingPhrases.length; ++j) + object.trainingPhrases[j] = $root.google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.toObject(message.trainingPhrases[j], options); } - if (message.intentsUri != null && message.hasOwnProperty("intentsUri")) { - object.intentsUri = message.intentsUri; - if (options.oneofs) - object.destination = "intentsUri"; + if (message.parameters && message.parameters.length) { + object.parameters = []; + for (var j = 0; j < message.parameters.length; ++j) + object.parameters[j] = $root.google.cloud.dialogflow.cx.v3.Intent.Parameter.toObject(message.parameters[j], options); } - if (message.intentsContentInline != null && message.hasOwnProperty("intentsContentInline")) { - object.intentsContentInline = message.intentsContentInline; - if (options.oneofs) - object.destination = "intentsContentInline"; + if (message.priority != null && message.hasOwnProperty("priority")) + object.priority = message.priority; + if (message.isFallback != null && message.hasOwnProperty("isFallback")) + object.isFallback = message.isFallback; + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; } - if (message.dataFormat != null && message.hasOwnProperty("dataFormat")) - object.dataFormat = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.ExportIntentsRequest.DataFormat[message.dataFormat] === undefined ? message.dataFormat : $root.google.cloud.dialogflow.cx.v3.ExportIntentsRequest.DataFormat[message.dataFormat] : message.dataFormat; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; return object; }; /** - * Converts this ExportIntentsRequest to JSON. + * Converts this Intent to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ExportIntentsRequest + * @memberof google.cloud.dialogflow.cx.v3.Intent * @instance * @returns {Object.} JSON object */ - ExportIntentsRequest.prototype.toJSON = function toJSON() { + Intent.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ExportIntentsRequest + * Gets the default type url for Intent * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.ExportIntentsRequest + * @memberof google.cloud.dialogflow.cx.v3.Intent * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ExportIntentsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Intent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ExportIntentsRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Intent"; }; - /** - * DataFormat enum. - * @name google.cloud.dialogflow.cx.v3.ExportIntentsRequest.DataFormat - * @enum {number} - * @property {number} DATA_FORMAT_UNSPECIFIED=0 DATA_FORMAT_UNSPECIFIED value - * @property {number} BLOB=1 BLOB value - * @property {number} JSON=2 JSON value - * @property {number} CSV=3 CSV value - */ - ExportIntentsRequest.DataFormat = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DATA_FORMAT_UNSPECIFIED"] = 0; - values[valuesById[1] = "BLOB"] = 1; - values[valuesById[2] = "JSON"] = 2; - values[valuesById[3] = "CSV"] = 3; - return values; - })(); - - return ExportIntentsRequest; - })(); - - v3.ExportIntentsResponse = (function() { - - /** - * Properties of an ExportIntentsResponse. - * @memberof google.cloud.dialogflow.cx.v3 - * @interface IExportIntentsResponse - * @property {string|null} [intentsUri] ExportIntentsResponse intentsUri - * @property {google.cloud.dialogflow.cx.v3.IInlineDestination|null} [intentsContent] ExportIntentsResponse intentsContent - */ + Intent.TrainingPhrase = (function() { - /** - * Constructs a new ExportIntentsResponse. - * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents an ExportIntentsResponse. - * @implements IExportIntentsResponse - * @constructor - * @param {google.cloud.dialogflow.cx.v3.IExportIntentsResponse=} [properties] Properties to set - */ - function ExportIntentsResponse(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]]; - } + /** + * Properties of a TrainingPhrase. + * @memberof google.cloud.dialogflow.cx.v3.Intent + * @interface ITrainingPhrase + * @property {string|null} [id] TrainingPhrase id + * @property {Array.|null} [parts] TrainingPhrase parts + * @property {number|null} [repeatCount] TrainingPhrase repeatCount + */ - /** - * ExportIntentsResponse intentsUri. - * @member {string|null|undefined} intentsUri - * @memberof google.cloud.dialogflow.cx.v3.ExportIntentsResponse - * @instance - */ - ExportIntentsResponse.prototype.intentsUri = null; + /** + * Constructs a new TrainingPhrase. + * @memberof google.cloud.dialogflow.cx.v3.Intent + * @classdesc Represents a TrainingPhrase. + * @implements ITrainingPhrase + * @constructor + * @param {google.cloud.dialogflow.cx.v3.Intent.ITrainingPhrase=} [properties] Properties to set + */ + function TrainingPhrase(properties) { + this.parts = []; + 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]]; + } - /** - * ExportIntentsResponse intentsContent. - * @member {google.cloud.dialogflow.cx.v3.IInlineDestination|null|undefined} intentsContent - * @memberof google.cloud.dialogflow.cx.v3.ExportIntentsResponse - * @instance - */ - ExportIntentsResponse.prototype.intentsContent = null; + /** + * TrainingPhrase id. + * @member {string} id + * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase + * @instance + */ + TrainingPhrase.prototype.id = ""; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * TrainingPhrase parts. + * @member {Array.} parts + * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase + * @instance + */ + TrainingPhrase.prototype.parts = $util.emptyArray; - /** - * ExportIntentsResponse intents. - * @member {"intentsUri"|"intentsContent"|undefined} intents - * @memberof google.cloud.dialogflow.cx.v3.ExportIntentsResponse - * @instance - */ - Object.defineProperty(ExportIntentsResponse.prototype, "intents", { - get: $util.oneOfGetter($oneOfFields = ["intentsUri", "intentsContent"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * TrainingPhrase repeatCount. + * @member {number} repeatCount + * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase + * @instance + */ + TrainingPhrase.prototype.repeatCount = 0; - /** - * Creates a new ExportIntentsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.ExportIntentsResponse - * @static - * @param {google.cloud.dialogflow.cx.v3.IExportIntentsResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ExportIntentsResponse} ExportIntentsResponse instance - */ - ExportIntentsResponse.create = function create(properties) { - return new ExportIntentsResponse(properties); - }; + /** + * Creates a new TrainingPhrase instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase + * @static + * @param {google.cloud.dialogflow.cx.v3.Intent.ITrainingPhrase=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase} TrainingPhrase instance + */ + TrainingPhrase.create = function create(properties) { + return new TrainingPhrase(properties); + }; - /** - * Encodes the specified ExportIntentsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ExportIntentsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ExportIntentsResponse - * @static - * @param {google.cloud.dialogflow.cx.v3.IExportIntentsResponse} message ExportIntentsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExportIntentsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.intentsUri != null && Object.hasOwnProperty.call(message, "intentsUri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.intentsUri); - if (message.intentsContent != null && Object.hasOwnProperty.call(message, "intentsContent")) - $root.google.cloud.dialogflow.cx.v3.InlineDestination.encode(message.intentsContent, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; + /** + * Encodes the specified TrainingPhrase message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase + * @static + * @param {google.cloud.dialogflow.cx.v3.Intent.ITrainingPhrase} message TrainingPhrase message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TrainingPhrase.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.parts != null && message.parts.length) + for (var i = 0; i < message.parts.length; ++i) + $root.google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part.encode(message.parts[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.repeatCount != null && Object.hasOwnProperty.call(message, "repeatCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.repeatCount); + return writer; + }; - /** - * Encodes the specified ExportIntentsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ExportIntentsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ExportIntentsResponse - * @static - * @param {google.cloud.dialogflow.cx.v3.IExportIntentsResponse} message ExportIntentsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExportIntentsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified TrainingPhrase message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase + * @static + * @param {google.cloud.dialogflow.cx.v3.Intent.ITrainingPhrase} message TrainingPhrase message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TrainingPhrase.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes an ExportIntentsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ExportIntentsResponse - * @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.ExportIntentsResponse} ExportIntentsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExportIntentsResponse.decode = function decode(reader, length, error) { - 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.ExportIntentsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.intentsUri = reader.string(); + /** + * Decodes a TrainingPhrase message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase + * @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.Intent.TrainingPhrase} TrainingPhrase + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TrainingPhrase.decode = function decode(reader, length, error) { + 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.Intent.TrainingPhrase(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - } - case 2: { - message.intentsContent = $root.google.cloud.dialogflow.cx.v3.InlineDestination.decode(reader, reader.uint32()); + switch (tag >>> 3) { + case 1: { + message.id = reader.string(); + break; + } + case 2: { + if (!(message.parts && message.parts.length)) + message.parts = []; + message.parts.push($root.google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part.decode(reader, reader.uint32())); + break; + } + case 3: { + message.repeatCount = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); break; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; + return message; + }; - /** - * Decodes an ExportIntentsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ExportIntentsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ExportIntentsResponse} ExportIntentsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExportIntentsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a TrainingPhrase message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase} TrainingPhrase + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TrainingPhrase.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies an ExportIntentsResponse message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ExportIntentsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExportIntentsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.intentsUri != null && message.hasOwnProperty("intentsUri")) { - properties.intents = 1; - if (!$util.isString(message.intentsUri)) - return "intentsUri: string expected"; - } - if (message.intentsContent != null && message.hasOwnProperty("intentsContent")) { - if (properties.intents === 1) - return "intents: multiple values"; - properties.intents = 1; - { - var error = $root.google.cloud.dialogflow.cx.v3.InlineDestination.verify(message.intentsContent); - if (error) - return "intentsContent." + error; + /** + * Verifies a TrainingPhrase message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TrainingPhrase.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.parts != null && message.hasOwnProperty("parts")) { + if (!Array.isArray(message.parts)) + return "parts: array expected"; + for (var i = 0; i < message.parts.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part.verify(message.parts[i]); + if (error) + return "parts." + error; + } } - } - return null; - }; + if (message.repeatCount != null && message.hasOwnProperty("repeatCount")) + if (!$util.isInteger(message.repeatCount)) + return "repeatCount: integer expected"; + return null; + }; - /** - * Creates an ExportIntentsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ExportIntentsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ExportIntentsResponse} ExportIntentsResponse - */ - ExportIntentsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ExportIntentsResponse) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.ExportIntentsResponse(); - if (object.intentsUri != null) - message.intentsUri = String(object.intentsUri); - if (object.intentsContent != null) { - if (typeof object.intentsContent !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.ExportIntentsResponse.intentsContent: object expected"); - message.intentsContent = $root.google.cloud.dialogflow.cx.v3.InlineDestination.fromObject(object.intentsContent); - } - return message; - }; + /** + * Creates a TrainingPhrase message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase} TrainingPhrase + */ + TrainingPhrase.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase(); + if (object.id != null) + message.id = String(object.id); + if (object.parts) { + if (!Array.isArray(object.parts)) + throw TypeError(".google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.parts: array expected"); + message.parts = []; + for (var i = 0; i < object.parts.length; ++i) { + if (typeof object.parts[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.parts: object expected"); + message.parts[i] = $root.google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part.fromObject(object.parts[i]); + } + } + if (object.repeatCount != null) + message.repeatCount = object.repeatCount | 0; + return message; + }; - /** - * Creates a plain object from an ExportIntentsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ExportIntentsResponse - * @static - * @param {google.cloud.dialogflow.cx.v3.ExportIntentsResponse} message ExportIntentsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExportIntentsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.intentsUri != null && message.hasOwnProperty("intentsUri")) { - object.intentsUri = message.intentsUri; - if (options.oneofs) - object.intents = "intentsUri"; - } - if (message.intentsContent != null && message.hasOwnProperty("intentsContent")) { - object.intentsContent = $root.google.cloud.dialogflow.cx.v3.InlineDestination.toObject(message.intentsContent, options); - if (options.oneofs) - object.intents = "intentsContent"; - } - return object; - }; + /** + * Creates a plain object from a TrainingPhrase message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase + * @static + * @param {google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase} message TrainingPhrase + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TrainingPhrase.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.parts = []; + if (options.defaults) { + object.id = ""; + object.repeatCount = 0; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.parts && message.parts.length) { + object.parts = []; + for (var j = 0; j < message.parts.length; ++j) + object.parts[j] = $root.google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part.toObject(message.parts[j], options); + } + if (message.repeatCount != null && message.hasOwnProperty("repeatCount")) + object.repeatCount = message.repeatCount; + return object; + }; - /** - * Converts this ExportIntentsResponse to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ExportIntentsResponse - * @instance - * @returns {Object.} JSON object - */ - ExportIntentsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this TrainingPhrase to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase + * @instance + * @returns {Object.} JSON object + */ + TrainingPhrase.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Gets the default type url for ExportIntentsResponse - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.ExportIntentsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExportIntentsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ExportIntentsResponse"; - }; + /** + * Gets the default type url for TrainingPhrase + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TrainingPhrase.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase"; + }; - return ExportIntentsResponse; - })(); + TrainingPhrase.Part = (function() { - v3.ExportIntentsMetadata = (function() { + /** + * Properties of a Part. + * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase + * @interface IPart + * @property {string|null} [text] Part text + * @property {string|null} [parameterId] Part parameterId + */ - /** - * Properties of an ExportIntentsMetadata. - * @memberof google.cloud.dialogflow.cx.v3 - * @interface IExportIntentsMetadata - */ + /** + * Constructs a new Part. + * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase + * @classdesc Represents a Part. + * @implements IPart + * @constructor + * @param {google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.IPart=} [properties] Properties to set + */ + function Part(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]]; + } - /** - * Constructs a new ExportIntentsMetadata. - * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents an ExportIntentsMetadata. - * @implements IExportIntentsMetadata - * @constructor - * @param {google.cloud.dialogflow.cx.v3.IExportIntentsMetadata=} [properties] Properties to set - */ - function ExportIntentsMetadata(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]]; - } + /** + * Part text. + * @member {string} text + * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part + * @instance + */ + Part.prototype.text = ""; - /** - * Creates a new ExportIntentsMetadata instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.ExportIntentsMetadata - * @static - * @param {google.cloud.dialogflow.cx.v3.IExportIntentsMetadata=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ExportIntentsMetadata} ExportIntentsMetadata instance - */ - ExportIntentsMetadata.create = function create(properties) { - return new ExportIntentsMetadata(properties); - }; + /** + * Part parameterId. + * @member {string} parameterId + * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part + * @instance + */ + Part.prototype.parameterId = ""; - /** - * Encodes the specified ExportIntentsMetadata message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ExportIntentsMetadata.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ExportIntentsMetadata - * @static - * @param {google.cloud.dialogflow.cx.v3.IExportIntentsMetadata} message ExportIntentsMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExportIntentsMetadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; + /** + * Creates a new Part instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part + * @static + * @param {google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.IPart=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part} Part instance + */ + Part.create = function create(properties) { + return new Part(properties); + }; - /** - * Encodes the specified ExportIntentsMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ExportIntentsMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ExportIntentsMetadata - * @static - * @param {google.cloud.dialogflow.cx.v3.IExportIntentsMetadata} message ExportIntentsMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExportIntentsMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified Part message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part + * @static + * @param {google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.IPart} message Part message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Part.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.text != null && Object.hasOwnProperty.call(message, "text")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.text); + if (message.parameterId != null && Object.hasOwnProperty.call(message, "parameterId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.parameterId); + return writer; + }; - /** - * Decodes an ExportIntentsMetadata message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ExportIntentsMetadata - * @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.ExportIntentsMetadata} ExportIntentsMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExportIntentsMetadata.decode = function decode(reader, length, error) { - 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.ExportIntentsMetadata(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Encodes the specified Part message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part + * @static + * @param {google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.IPart} message Part message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Part.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes an ExportIntentsMetadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ExportIntentsMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ExportIntentsMetadata} ExportIntentsMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExportIntentsMetadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a Part message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part + * @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.Intent.TrainingPhrase.Part} Part + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Part.decode = function decode(reader, length, error) { + 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.Intent.TrainingPhrase.Part(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.text = reader.string(); + break; + } + case 2: { + message.parameterId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Verifies an ExportIntentsMetadata message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ExportIntentsMetadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExportIntentsMetadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; + /** + * Decodes a Part message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part} Part + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Part.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates an ExportIntentsMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ExportIntentsMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ExportIntentsMetadata} ExportIntentsMetadata - */ - ExportIntentsMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ExportIntentsMetadata) - return object; - return new $root.google.cloud.dialogflow.cx.v3.ExportIntentsMetadata(); - }; + /** + * Verifies a Part message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Part.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.text != null && message.hasOwnProperty("text")) + if (!$util.isString(message.text)) + return "text: string expected"; + if (message.parameterId != null && message.hasOwnProperty("parameterId")) + if (!$util.isString(message.parameterId)) + return "parameterId: string expected"; + return null; + }; - /** - * Creates a plain object from an ExportIntentsMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ExportIntentsMetadata - * @static - * @param {google.cloud.dialogflow.cx.v3.ExportIntentsMetadata} message ExportIntentsMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExportIntentsMetadata.toObject = function toObject() { - return {}; - }; + /** + * Creates a Part message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part} Part + */ + Part.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part(); + if (object.text != null) + message.text = String(object.text); + if (object.parameterId != null) + message.parameterId = String(object.parameterId); + return message; + }; - /** - * Converts this ExportIntentsMetadata to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ExportIntentsMetadata - * @instance - * @returns {Object.} JSON object - */ - ExportIntentsMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a Part message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part + * @static + * @param {google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part} message Part + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Part.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.text = ""; + object.parameterId = ""; + } + if (message.text != null && message.hasOwnProperty("text")) + object.text = message.text; + if (message.parameterId != null && message.hasOwnProperty("parameterId")) + object.parameterId = message.parameterId; + return object; + }; - /** - * Gets the default type url for ExportIntentsMetadata - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.ExportIntentsMetadata - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExportIntentsMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; + /** + * Converts this Part to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part + * @instance + * @returns {Object.} JSON object + */ + Part.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Part + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Part.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part"; + }; + + return Part; + })(); + + return TrainingPhrase; + })(); + + Intent.Parameter = (function() { + + /** + * Properties of a Parameter. + * @memberof google.cloud.dialogflow.cx.v3.Intent + * @interface IParameter + * @property {string|null} [id] Parameter id + * @property {string|null} [entityType] Parameter entityType + * @property {boolean|null} [isList] Parameter isList + * @property {boolean|null} [redact] Parameter redact + */ + + /** + * Constructs a new Parameter. + * @memberof google.cloud.dialogflow.cx.v3.Intent + * @classdesc Represents a Parameter. + * @implements IParameter + * @constructor + * @param {google.cloud.dialogflow.cx.v3.Intent.IParameter=} [properties] Properties to set + */ + function Parameter(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]]; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ExportIntentsMetadata"; - }; - return ExportIntentsMetadata; + /** + * Parameter id. + * @member {string} id + * @memberof google.cloud.dialogflow.cx.v3.Intent.Parameter + * @instance + */ + Parameter.prototype.id = ""; + + /** + * Parameter entityType. + * @member {string} entityType + * @memberof google.cloud.dialogflow.cx.v3.Intent.Parameter + * @instance + */ + Parameter.prototype.entityType = ""; + + /** + * Parameter isList. + * @member {boolean} isList + * @memberof google.cloud.dialogflow.cx.v3.Intent.Parameter + * @instance + */ + Parameter.prototype.isList = false; + + /** + * Parameter redact. + * @member {boolean} redact + * @memberof google.cloud.dialogflow.cx.v3.Intent.Parameter + * @instance + */ + Parameter.prototype.redact = false; + + /** + * Creates a new Parameter instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.Intent.Parameter + * @static + * @param {google.cloud.dialogflow.cx.v3.Intent.IParameter=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.Intent.Parameter} Parameter instance + */ + Parameter.create = function create(properties) { + return new Parameter(properties); + }; + + /** + * Encodes the specified Parameter message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Intent.Parameter.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.Intent.Parameter + * @static + * @param {google.cloud.dialogflow.cx.v3.Intent.IParameter} message Parameter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Parameter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.entityType != null && Object.hasOwnProperty.call(message, "entityType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.entityType); + if (message.isList != null && Object.hasOwnProperty.call(message, "isList")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.isList); + if (message.redact != null && Object.hasOwnProperty.call(message, "redact")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.redact); + return writer; + }; + + /** + * Encodes the specified Parameter message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Intent.Parameter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Intent.Parameter + * @static + * @param {google.cloud.dialogflow.cx.v3.Intent.IParameter} message Parameter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Parameter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Parameter message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.Intent.Parameter + * @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.Intent.Parameter} Parameter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Parameter.decode = function decode(reader, length, error) { + 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.Intent.Parameter(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.id = reader.string(); + break; + } + case 2: { + message.entityType = reader.string(); + break; + } + case 3: { + message.isList = reader.bool(); + break; + } + case 4: { + message.redact = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Parameter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Intent.Parameter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.Intent.Parameter} Parameter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Parameter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Parameter message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.Intent.Parameter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Parameter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.entityType != null && message.hasOwnProperty("entityType")) + if (!$util.isString(message.entityType)) + return "entityType: string expected"; + if (message.isList != null && message.hasOwnProperty("isList")) + if (typeof message.isList !== "boolean") + return "isList: boolean expected"; + if (message.redact != null && message.hasOwnProperty("redact")) + if (typeof message.redact !== "boolean") + return "redact: boolean expected"; + return null; + }; + + /** + * Creates a Parameter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.Intent.Parameter + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.Intent.Parameter} Parameter + */ + Parameter.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.Intent.Parameter) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.Intent.Parameter(); + if (object.id != null) + message.id = String(object.id); + if (object.entityType != null) + message.entityType = String(object.entityType); + if (object.isList != null) + message.isList = Boolean(object.isList); + if (object.redact != null) + message.redact = Boolean(object.redact); + return message; + }; + + /** + * Creates a plain object from a Parameter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.Intent.Parameter + * @static + * @param {google.cloud.dialogflow.cx.v3.Intent.Parameter} message Parameter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Parameter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.id = ""; + object.entityType = ""; + object.isList = false; + object.redact = false; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.entityType != null && message.hasOwnProperty("entityType")) + object.entityType = message.entityType; + if (message.isList != null && message.hasOwnProperty("isList")) + object.isList = message.isList; + if (message.redact != null && message.hasOwnProperty("redact")) + object.redact = message.redact; + return object; + }; + + /** + * Converts this Parameter to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.Intent.Parameter + * @instance + * @returns {Object.} JSON object + */ + Parameter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Parameter + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.Intent.Parameter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Parameter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Intent.Parameter"; + }; + + return Parameter; + })(); + + return Intent; })(); - v3.Sessions = (function() { + v3.ListIntentsRequest = (function() { /** - * Constructs a new Sessions service. + * Properties of a ListIntentsRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a Sessions - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @interface IListIntentsRequest + * @property {string|null} [parent] ListIntentsRequest parent + * @property {string|null} [languageCode] ListIntentsRequest languageCode + * @property {google.cloud.dialogflow.cx.v3.IntentView|null} [intentView] ListIntentsRequest intentView + * @property {number|null} [pageSize] ListIntentsRequest pageSize + * @property {string|null} [pageToken] ListIntentsRequest pageToken */ - function Sessions(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (Sessions.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Sessions; /** - * Creates new Sessions service using the specified rpc implementation. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.Sessions - * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {Sessions} RPC service. Useful where requests and/or responses are streamed. + * Constructs a new ListIntentsRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a ListIntentsRequest. + * @implements IListIntentsRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IListIntentsRequest=} [properties] Properties to set */ - Sessions.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; + function ListIntentsRequest(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]]; + } /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Sessions|detectIntent}. - * @memberof google.cloud.dialogflow.cx.v3.Sessions - * @typedef DetectIntentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.DetectIntentResponse} [response] DetectIntentResponse + * ListIntentsRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.cx.v3.ListIntentsRequest + * @instance */ + ListIntentsRequest.prototype.parent = ""; /** - * Calls DetectIntent. - * @function detectIntent - * @memberof google.cloud.dialogflow.cx.v3.Sessions + * ListIntentsRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3.ListIntentsRequest * @instance - * @param {google.cloud.dialogflow.cx.v3.IDetectIntentRequest} request DetectIntentRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Sessions.DetectIntentCallback} callback Node-style callback called with the error, if any, and DetectIntentResponse - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(Sessions.prototype.detectIntent = function detectIntent(request, callback) { - return this.rpcCall(detectIntent, $root.google.cloud.dialogflow.cx.v3.DetectIntentRequest, $root.google.cloud.dialogflow.cx.v3.DetectIntentResponse, request, callback); - }, "name", { value: "DetectIntent" }); + ListIntentsRequest.prototype.languageCode = ""; /** - * Calls DetectIntent. - * @function detectIntent - * @memberof google.cloud.dialogflow.cx.v3.Sessions + * ListIntentsRequest intentView. + * @member {google.cloud.dialogflow.cx.v3.IntentView} intentView + * @memberof google.cloud.dialogflow.cx.v3.ListIntentsRequest * @instance - * @param {google.cloud.dialogflow.cx.v3.IDetectIntentRequest} request DetectIntentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + ListIntentsRequest.prototype.intentView = 0; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Sessions|serverStreamingDetectIntent}. - * @memberof google.cloud.dialogflow.cx.v3.Sessions - * @typedef ServerStreamingDetectIntentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.DetectIntentResponse} [response] DetectIntentResponse + * ListIntentsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dialogflow.cx.v3.ListIntentsRequest + * @instance */ + ListIntentsRequest.prototype.pageSize = 0; /** - * Calls ServerStreamingDetectIntent. - * @function serverStreamingDetectIntent - * @memberof google.cloud.dialogflow.cx.v3.Sessions + * ListIntentsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dialogflow.cx.v3.ListIntentsRequest * @instance - * @param {google.cloud.dialogflow.cx.v3.IDetectIntentRequest} request DetectIntentRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Sessions.ServerStreamingDetectIntentCallback} callback Node-style callback called with the error, if any, and DetectIntentResponse - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(Sessions.prototype.serverStreamingDetectIntent = function serverStreamingDetectIntent(request, callback) { - return this.rpcCall(serverStreamingDetectIntent, $root.google.cloud.dialogflow.cx.v3.DetectIntentRequest, $root.google.cloud.dialogflow.cx.v3.DetectIntentResponse, request, callback); - }, "name", { value: "ServerStreamingDetectIntent" }); - - /** - * Calls ServerStreamingDetectIntent. - * @function serverStreamingDetectIntent - * @memberof google.cloud.dialogflow.cx.v3.Sessions - * @instance - * @param {google.cloud.dialogflow.cx.v3.IDetectIntentRequest} request DetectIntentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Sessions|streamingDetectIntent}. - * @memberof google.cloud.dialogflow.cx.v3.Sessions - * @typedef StreamingDetectIntentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse} [response] StreamingDetectIntentResponse - */ - - /** - * Calls StreamingDetectIntent. - * @function streamingDetectIntent - * @memberof google.cloud.dialogflow.cx.v3.Sessions - * @instance - * @param {google.cloud.dialogflow.cx.v3.IStreamingDetectIntentRequest} request StreamingDetectIntentRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Sessions.StreamingDetectIntentCallback} callback Node-style callback called with the error, if any, and StreamingDetectIntentResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Sessions.prototype.streamingDetectIntent = function streamingDetectIntent(request, callback) { - return this.rpcCall(streamingDetectIntent, $root.google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest, $root.google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse, request, callback); - }, "name", { value: "StreamingDetectIntent" }); - - /** - * Calls StreamingDetectIntent. - * @function streamingDetectIntent - * @memberof google.cloud.dialogflow.cx.v3.Sessions - * @instance - * @param {google.cloud.dialogflow.cx.v3.IStreamingDetectIntentRequest} request StreamingDetectIntentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Sessions|matchIntent}. - * @memberof google.cloud.dialogflow.cx.v3.Sessions - * @typedef MatchIntentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.MatchIntentResponse} [response] MatchIntentResponse - */ - - /** - * Calls MatchIntent. - * @function matchIntent - * @memberof google.cloud.dialogflow.cx.v3.Sessions - * @instance - * @param {google.cloud.dialogflow.cx.v3.IMatchIntentRequest} request MatchIntentRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Sessions.MatchIntentCallback} callback Node-style callback called with the error, if any, and MatchIntentResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Sessions.prototype.matchIntent = function matchIntent(request, callback) { - return this.rpcCall(matchIntent, $root.google.cloud.dialogflow.cx.v3.MatchIntentRequest, $root.google.cloud.dialogflow.cx.v3.MatchIntentResponse, request, callback); - }, "name", { value: "MatchIntent" }); - - /** - * Calls MatchIntent. - * @function matchIntent - * @memberof google.cloud.dialogflow.cx.v3.Sessions - * @instance - * @param {google.cloud.dialogflow.cx.v3.IMatchIntentRequest} request MatchIntentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Sessions|fulfillIntent}. - * @memberof google.cloud.dialogflow.cx.v3.Sessions - * @typedef FulfillIntentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.FulfillIntentResponse} [response] FulfillIntentResponse - */ - - /** - * Calls FulfillIntent. - * @function fulfillIntent - * @memberof google.cloud.dialogflow.cx.v3.Sessions - * @instance - * @param {google.cloud.dialogflow.cx.v3.IFulfillIntentRequest} request FulfillIntentRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Sessions.FulfillIntentCallback} callback Node-style callback called with the error, if any, and FulfillIntentResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Sessions.prototype.fulfillIntent = function fulfillIntent(request, callback) { - return this.rpcCall(fulfillIntent, $root.google.cloud.dialogflow.cx.v3.FulfillIntentRequest, $root.google.cloud.dialogflow.cx.v3.FulfillIntentResponse, request, callback); - }, "name", { value: "FulfillIntent" }); - - /** - * Calls FulfillIntent. - * @function fulfillIntent - * @memberof google.cloud.dialogflow.cx.v3.Sessions - * @instance - * @param {google.cloud.dialogflow.cx.v3.IFulfillIntentRequest} request FulfillIntentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Sessions|submitAnswerFeedback}. - * @memberof google.cloud.dialogflow.cx.v3.Sessions - * @typedef SubmitAnswerFeedbackCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.AnswerFeedback} [response] AnswerFeedback - */ - - /** - * Calls SubmitAnswerFeedback. - * @function submitAnswerFeedback - * @memberof google.cloud.dialogflow.cx.v3.Sessions - * @instance - * @param {google.cloud.dialogflow.cx.v3.ISubmitAnswerFeedbackRequest} request SubmitAnswerFeedbackRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Sessions.SubmitAnswerFeedbackCallback} callback Node-style callback called with the error, if any, and AnswerFeedback - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Sessions.prototype.submitAnswerFeedback = function submitAnswerFeedback(request, callback) { - return this.rpcCall(submitAnswerFeedback, $root.google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest, $root.google.cloud.dialogflow.cx.v3.AnswerFeedback, request, callback); - }, "name", { value: "SubmitAnswerFeedback" }); - - /** - * Calls SubmitAnswerFeedback. - * @function submitAnswerFeedback - * @memberof google.cloud.dialogflow.cx.v3.Sessions - * @instance - * @param {google.cloud.dialogflow.cx.v3.ISubmitAnswerFeedbackRequest} request SubmitAnswerFeedbackRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Sessions; - })(); - - v3.AnswerFeedback = (function() { - - /** - * Properties of an AnswerFeedback. - * @memberof google.cloud.dialogflow.cx.v3 - * @interface IAnswerFeedback - * @property {google.cloud.dialogflow.cx.v3.AnswerFeedback.Rating|null} [rating] AnswerFeedback rating - * @property {google.cloud.dialogflow.cx.v3.AnswerFeedback.IRatingReason|null} [ratingReason] AnswerFeedback ratingReason - * @property {string|null} [customRating] AnswerFeedback customRating - */ - - /** - * Constructs a new AnswerFeedback. - * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents an AnswerFeedback. - * @implements IAnswerFeedback - * @constructor - * @param {google.cloud.dialogflow.cx.v3.IAnswerFeedback=} [properties] Properties to set - */ - function AnswerFeedback(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]]; - } - - /** - * AnswerFeedback rating. - * @member {google.cloud.dialogflow.cx.v3.AnswerFeedback.Rating} rating - * @memberof google.cloud.dialogflow.cx.v3.AnswerFeedback - * @instance - */ - AnswerFeedback.prototype.rating = 0; - - /** - * AnswerFeedback ratingReason. - * @member {google.cloud.dialogflow.cx.v3.AnswerFeedback.IRatingReason|null|undefined} ratingReason - * @memberof google.cloud.dialogflow.cx.v3.AnswerFeedback - * @instance - */ - AnswerFeedback.prototype.ratingReason = null; - - /** - * AnswerFeedback customRating. - * @member {string} customRating - * @memberof google.cloud.dialogflow.cx.v3.AnswerFeedback - * @instance - */ - AnswerFeedback.prototype.customRating = ""; + ListIntentsRequest.prototype.pageToken = ""; /** - * Creates a new AnswerFeedback instance using the specified properties. + * Creates a new ListIntentsRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.AnswerFeedback + * @memberof google.cloud.dialogflow.cx.v3.ListIntentsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IAnswerFeedback=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.AnswerFeedback} AnswerFeedback instance + * @param {google.cloud.dialogflow.cx.v3.IListIntentsRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ListIntentsRequest} ListIntentsRequest instance */ - AnswerFeedback.create = function create(properties) { - return new AnswerFeedback(properties); + ListIntentsRequest.create = function create(properties) { + return new ListIntentsRequest(properties); }; /** - * Encodes the specified AnswerFeedback message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.AnswerFeedback.verify|verify} messages. + * Encodes the specified ListIntentsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListIntentsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.AnswerFeedback + * @memberof google.cloud.dialogflow.cx.v3.ListIntentsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IAnswerFeedback} message AnswerFeedback message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListIntentsRequest} message ListIntentsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AnswerFeedback.encode = function encode(message, writer) { + ListIntentsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.rating != null && Object.hasOwnProperty.call(message, "rating")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.rating); - if (message.ratingReason != null && Object.hasOwnProperty.call(message, "ratingReason")) - $root.google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason.encode(message.ratingReason, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.customRating != null && Object.hasOwnProperty.call(message, "customRating")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.customRating); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); + if (message.intentView != null && Object.hasOwnProperty.call(message, "intentView")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.intentView); return writer; }; /** - * Encodes the specified AnswerFeedback message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.AnswerFeedback.verify|verify} messages. + * Encodes the specified ListIntentsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListIntentsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.AnswerFeedback + * @memberof google.cloud.dialogflow.cx.v3.ListIntentsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IAnswerFeedback} message AnswerFeedback message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListIntentsRequest} message ListIntentsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AnswerFeedback.encodeDelimited = function encodeDelimited(message, writer) { + ListIntentsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AnswerFeedback message from the specified reader or buffer. + * Decodes a ListIntentsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.AnswerFeedback + * @memberof google.cloud.dialogflow.cx.v3.ListIntentsRequest * @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.AnswerFeedback} AnswerFeedback + * @returns {google.cloud.dialogflow.cx.v3.ListIntentsRequest} ListIntentsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AnswerFeedback.decode = function decode(reader, length, error) { + ListIntentsRequest.decode = function decode(reader, length, error) { 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.AnswerFeedback(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ListIntentsRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.rating = reader.int32(); + message.parent = reader.string(); break; } case 2: { - message.ratingReason = $root.google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason.decode(reader, reader.uint32()); + message.languageCode = reader.string(); + break; + } + case 5: { + message.intentView = reader.int32(); break; } case 3: { - message.customRating = reader.string(); + message.pageSize = reader.int32(); + break; + } + case 4: { + message.pageToken = reader.string(); break; } default: @@ -59010,552 +58888,276 @@ }; /** - * Decodes an AnswerFeedback message from the specified reader or buffer, length delimited. + * Decodes a ListIntentsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.AnswerFeedback + * @memberof google.cloud.dialogflow.cx.v3.ListIntentsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.AnswerFeedback} AnswerFeedback + * @returns {google.cloud.dialogflow.cx.v3.ListIntentsRequest} ListIntentsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AnswerFeedback.decodeDelimited = function decodeDelimited(reader) { + ListIntentsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AnswerFeedback message. + * Verifies a ListIntentsRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.AnswerFeedback + * @memberof google.cloud.dialogflow.cx.v3.ListIntentsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AnswerFeedback.verify = function verify(message) { + ListIntentsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.rating != null && message.hasOwnProperty("rating")) - switch (message.rating) { + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; + if (message.intentView != null && message.hasOwnProperty("intentView")) + switch (message.intentView) { default: - return "rating: enum value expected"; + return "intentView: enum value expected"; case 0: case 1: case 2: break; } - if (message.ratingReason != null && message.hasOwnProperty("ratingReason")) { - var error = $root.google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason.verify(message.ratingReason); - if (error) - return "ratingReason." + error; - } - if (message.customRating != null && message.hasOwnProperty("customRating")) - if (!$util.isString(message.customRating)) - return "customRating: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; return null; }; /** - * Creates an AnswerFeedback message from a plain object. Also converts values to their respective internal types. + * Creates a ListIntentsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.AnswerFeedback + * @memberof google.cloud.dialogflow.cx.v3.ListIntentsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.AnswerFeedback} AnswerFeedback + * @returns {google.cloud.dialogflow.cx.v3.ListIntentsRequest} ListIntentsRequest */ - AnswerFeedback.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.AnswerFeedback) + ListIntentsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListIntentsRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.AnswerFeedback(); - switch (object.rating) { + var message = new $root.google.cloud.dialogflow.cx.v3.ListIntentsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.languageCode != null) + message.languageCode = String(object.languageCode); + switch (object.intentView) { default: - if (typeof object.rating === "number") { - message.rating = object.rating; + if (typeof object.intentView === "number") { + message.intentView = object.intentView; break; } break; - case "RATING_UNSPECIFIED": + case "INTENT_VIEW_UNSPECIFIED": case 0: - message.rating = 0; + message.intentView = 0; break; - case "THUMBS_UP": + case "INTENT_VIEW_PARTIAL": case 1: - message.rating = 1; + message.intentView = 1; break; - case "THUMBS_DOWN": + case "INTENT_VIEW_FULL": case 2: - message.rating = 2; + message.intentView = 2; break; } - if (object.ratingReason != null) { - if (typeof object.ratingReason !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.AnswerFeedback.ratingReason: object expected"); - message.ratingReason = $root.google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason.fromObject(object.ratingReason); - } - if (object.customRating != null) - message.customRating = String(object.customRating); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); return message; }; /** - * Creates a plain object from an AnswerFeedback message. Also converts values to other types if specified. + * Creates a plain object from a ListIntentsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.AnswerFeedback + * @memberof google.cloud.dialogflow.cx.v3.ListIntentsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.AnswerFeedback} message AnswerFeedback + * @param {google.cloud.dialogflow.cx.v3.ListIntentsRequest} message ListIntentsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AnswerFeedback.toObject = function toObject(message, options) { + ListIntentsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.rating = options.enums === String ? "RATING_UNSPECIFIED" : 0; - object.ratingReason = null; - object.customRating = ""; + object.parent = ""; + object.languageCode = ""; + object.pageSize = 0; + object.pageToken = ""; + object.intentView = options.enums === String ? "INTENT_VIEW_UNSPECIFIED" : 0; } - if (message.rating != null && message.hasOwnProperty("rating")) - object.rating = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.AnswerFeedback.Rating[message.rating] === undefined ? message.rating : $root.google.cloud.dialogflow.cx.v3.AnswerFeedback.Rating[message.rating] : message.rating; - if (message.ratingReason != null && message.hasOwnProperty("ratingReason")) - object.ratingReason = $root.google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason.toObject(message.ratingReason, options); - if (message.customRating != null && message.hasOwnProperty("customRating")) - object.customRating = message.customRating; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.intentView != null && message.hasOwnProperty("intentView")) + object.intentView = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.IntentView[message.intentView] === undefined ? message.intentView : $root.google.cloud.dialogflow.cx.v3.IntentView[message.intentView] : message.intentView; return object; }; /** - * Converts this AnswerFeedback to JSON. + * Converts this ListIntentsRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.AnswerFeedback + * @memberof google.cloud.dialogflow.cx.v3.ListIntentsRequest * @instance * @returns {Object.} JSON object */ - AnswerFeedback.prototype.toJSON = function toJSON() { + ListIntentsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AnswerFeedback + * Gets the default type url for ListIntentsRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.AnswerFeedback + * @memberof google.cloud.dialogflow.cx.v3.ListIntentsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AnswerFeedback.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListIntentsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.AnswerFeedback"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListIntentsRequest"; }; - /** - * Rating enum. - * @name google.cloud.dialogflow.cx.v3.AnswerFeedback.Rating - * @enum {number} - * @property {number} RATING_UNSPECIFIED=0 RATING_UNSPECIFIED value - * @property {number} THUMBS_UP=1 THUMBS_UP value - * @property {number} THUMBS_DOWN=2 THUMBS_DOWN value - */ - AnswerFeedback.Rating = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "RATING_UNSPECIFIED"] = 0; - values[valuesById[1] = "THUMBS_UP"] = 1; - values[valuesById[2] = "THUMBS_DOWN"] = 2; - return values; - })(); + return ListIntentsRequest; + })(); - AnswerFeedback.RatingReason = (function() { + v3.ListIntentsResponse = (function() { - /** - * Properties of a RatingReason. - * @memberof google.cloud.dialogflow.cx.v3.AnswerFeedback - * @interface IRatingReason - * @property {Array.|null} [reasonLabels] RatingReason reasonLabels - * @property {string|null} [feedback] RatingReason feedback - */ + /** + * Properties of a ListIntentsResponse. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IListIntentsResponse + * @property {Array.|null} [intents] ListIntentsResponse intents + * @property {string|null} [nextPageToken] ListIntentsResponse nextPageToken + */ - /** - * Constructs a new RatingReason. - * @memberof google.cloud.dialogflow.cx.v3.AnswerFeedback - * @classdesc Represents a RatingReason. - * @implements IRatingReason - * @constructor - * @param {google.cloud.dialogflow.cx.v3.AnswerFeedback.IRatingReason=} [properties] Properties to set - */ - function RatingReason(properties) { - this.reasonLabels = []; - 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]]; - } + /** + * Constructs a new ListIntentsResponse. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a ListIntentsResponse. + * @implements IListIntentsResponse + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IListIntentsResponse=} [properties] Properties to set + */ + function ListIntentsResponse(properties) { + this.intents = []; + 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]]; + } - /** - * RatingReason reasonLabels. - * @member {Array.} reasonLabels - * @memberof google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason - * @instance - */ - RatingReason.prototype.reasonLabels = $util.emptyArray; + /** + * ListIntentsResponse intents. + * @member {Array.} intents + * @memberof google.cloud.dialogflow.cx.v3.ListIntentsResponse + * @instance + */ + ListIntentsResponse.prototype.intents = $util.emptyArray; - /** - * RatingReason feedback. - * @member {string} feedback - * @memberof google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason - * @instance - */ - RatingReason.prototype.feedback = ""; + /** + * ListIntentsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dialogflow.cx.v3.ListIntentsResponse + * @instance + */ + ListIntentsResponse.prototype.nextPageToken = ""; - /** - * Creates a new RatingReason instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason - * @static - * @param {google.cloud.dialogflow.cx.v3.AnswerFeedback.IRatingReason=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason} RatingReason instance - */ - RatingReason.create = function create(properties) { - return new RatingReason(properties); - }; - - /** - * Encodes the specified RatingReason message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason - * @static - * @param {google.cloud.dialogflow.cx.v3.AnswerFeedback.IRatingReason} message RatingReason message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RatingReason.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.feedback != null && Object.hasOwnProperty.call(message, "feedback")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.feedback); - if (message.reasonLabels != null && message.reasonLabels.length) - for (var i = 0; i < message.reasonLabels.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.reasonLabels[i]); - return writer; - }; - - /** - * Encodes the specified RatingReason message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason - * @static - * @param {google.cloud.dialogflow.cx.v3.AnswerFeedback.IRatingReason} message RatingReason message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RatingReason.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RatingReason message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason - * @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.AnswerFeedback.RatingReason} RatingReason - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RatingReason.decode = function decode(reader, length, error) { - 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.AnswerFeedback.RatingReason(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 3: { - if (!(message.reasonLabels && message.reasonLabels.length)) - message.reasonLabels = []; - message.reasonLabels.push(reader.string()); - break; - } - case 2: { - message.feedback = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RatingReason message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason} RatingReason - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RatingReason.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RatingReason message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RatingReason.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.reasonLabels != null && message.hasOwnProperty("reasonLabels")) { - if (!Array.isArray(message.reasonLabels)) - return "reasonLabels: array expected"; - for (var i = 0; i < message.reasonLabels.length; ++i) - if (!$util.isString(message.reasonLabels[i])) - return "reasonLabels: string[] expected"; - } - if (message.feedback != null && message.hasOwnProperty("feedback")) - if (!$util.isString(message.feedback)) - return "feedback: string expected"; - return null; - }; - - /** - * Creates a RatingReason message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason} RatingReason - */ - RatingReason.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason(); - if (object.reasonLabels) { - if (!Array.isArray(object.reasonLabels)) - throw TypeError(".google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason.reasonLabels: array expected"); - message.reasonLabels = []; - for (var i = 0; i < object.reasonLabels.length; ++i) - message.reasonLabels[i] = String(object.reasonLabels[i]); - } - if (object.feedback != null) - message.feedback = String(object.feedback); - return message; - }; - - /** - * Creates a plain object from a RatingReason message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason - * @static - * @param {google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason} message RatingReason - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RatingReason.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.reasonLabels = []; - if (options.defaults) - object.feedback = ""; - if (message.feedback != null && message.hasOwnProperty("feedback")) - object.feedback = message.feedback; - if (message.reasonLabels && message.reasonLabels.length) { - object.reasonLabels = []; - for (var j = 0; j < message.reasonLabels.length; ++j) - object.reasonLabels[j] = message.reasonLabels[j]; - } - return object; - }; - - /** - * Converts this RatingReason to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason - * @instance - * @returns {Object.} JSON object - */ - RatingReason.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RatingReason - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RatingReason.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason"; - }; - - return RatingReason; - })(); - - return AnswerFeedback; - })(); - - v3.SubmitAnswerFeedbackRequest = (function() { - - /** - * Properties of a SubmitAnswerFeedbackRequest. - * @memberof google.cloud.dialogflow.cx.v3 - * @interface ISubmitAnswerFeedbackRequest - * @property {string|null} [session] SubmitAnswerFeedbackRequest session - * @property {string|null} [responseId] SubmitAnswerFeedbackRequest responseId - * @property {google.cloud.dialogflow.cx.v3.IAnswerFeedback|null} [answerFeedback] SubmitAnswerFeedbackRequest answerFeedback - * @property {google.protobuf.IFieldMask|null} [updateMask] SubmitAnswerFeedbackRequest updateMask - */ - - /** - * Constructs a new SubmitAnswerFeedbackRequest. - * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a SubmitAnswerFeedbackRequest. - * @implements ISubmitAnswerFeedbackRequest - * @constructor - * @param {google.cloud.dialogflow.cx.v3.ISubmitAnswerFeedbackRequest=} [properties] Properties to set - */ - function SubmitAnswerFeedbackRequest(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]]; - } - - /** - * SubmitAnswerFeedbackRequest session. - * @member {string} session - * @memberof google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest - * @instance - */ - SubmitAnswerFeedbackRequest.prototype.session = ""; - - /** - * SubmitAnswerFeedbackRequest responseId. - * @member {string} responseId - * @memberof google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest - * @instance - */ - SubmitAnswerFeedbackRequest.prototype.responseId = ""; - - /** - * SubmitAnswerFeedbackRequest answerFeedback. - * @member {google.cloud.dialogflow.cx.v3.IAnswerFeedback|null|undefined} answerFeedback - * @memberof google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest - * @instance - */ - SubmitAnswerFeedbackRequest.prototype.answerFeedback = null; - - /** - * SubmitAnswerFeedbackRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest - * @instance - */ - SubmitAnswerFeedbackRequest.prototype.updateMask = null; - - /** - * Creates a new SubmitAnswerFeedbackRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.ISubmitAnswerFeedbackRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest} SubmitAnswerFeedbackRequest instance - */ - SubmitAnswerFeedbackRequest.create = function create(properties) { - return new SubmitAnswerFeedbackRequest(properties); - }; + /** + * Creates a new ListIntentsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.ListIntentsResponse + * @static + * @param {google.cloud.dialogflow.cx.v3.IListIntentsResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ListIntentsResponse} ListIntentsResponse instance + */ + ListIntentsResponse.create = function create(properties) { + return new ListIntentsResponse(properties); + }; /** - * Encodes the specified SubmitAnswerFeedbackRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest.verify|verify} messages. + * Encodes the specified ListIntentsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListIntentsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest + * @memberof google.cloud.dialogflow.cx.v3.ListIntentsResponse * @static - * @param {google.cloud.dialogflow.cx.v3.ISubmitAnswerFeedbackRequest} message SubmitAnswerFeedbackRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListIntentsResponse} message ListIntentsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SubmitAnswerFeedbackRequest.encode = function encode(message, writer) { + ListIntentsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.session != null && Object.hasOwnProperty.call(message, "session")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.session); - if (message.responseId != null && Object.hasOwnProperty.call(message, "responseId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.responseId); - if (message.answerFeedback != null && Object.hasOwnProperty.call(message, "answerFeedback")) - $root.google.cloud.dialogflow.cx.v3.AnswerFeedback.encode(message.answerFeedback, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.intents != null && message.intents.length) + for (var i = 0; i < message.intents.length; ++i) + $root.google.cloud.dialogflow.cx.v3.Intent.encode(message.intents[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; /** - * Encodes the specified SubmitAnswerFeedbackRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest.verify|verify} messages. + * Encodes the specified ListIntentsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListIntentsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest + * @memberof google.cloud.dialogflow.cx.v3.ListIntentsResponse * @static - * @param {google.cloud.dialogflow.cx.v3.ISubmitAnswerFeedbackRequest} message SubmitAnswerFeedbackRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListIntentsResponse} message ListIntentsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SubmitAnswerFeedbackRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListIntentsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SubmitAnswerFeedbackRequest message from the specified reader or buffer. + * Decodes a ListIntentsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest + * @memberof google.cloud.dialogflow.cx.v3.ListIntentsResponse * @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.SubmitAnswerFeedbackRequest} SubmitAnswerFeedbackRequest + * @returns {google.cloud.dialogflow.cx.v3.ListIntentsResponse} ListIntentsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SubmitAnswerFeedbackRequest.decode = function decode(reader, length, error) { + ListIntentsResponse.decode = function decode(reader, length, error) { 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.SubmitAnswerFeedbackRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ListIntentsResponse(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.session = reader.string(); + if (!(message.intents && message.intents.length)) + message.intents = []; + message.intents.push($root.google.cloud.dialogflow.cx.v3.Intent.decode(reader, reader.uint32())); break; } case 2: { - message.responseId = reader.string(); - break; - } - case 3: { - message.answerFeedback = $root.google.cloud.dialogflow.cx.v3.AnswerFeedback.decode(reader, reader.uint32()); - break; - } - case 4: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.nextPageToken = reader.string(); break; } default: @@ -59567,160 +59169,149 @@ }; /** - * Decodes a SubmitAnswerFeedbackRequest message from the specified reader or buffer, length delimited. + * Decodes a ListIntentsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest + * @memberof google.cloud.dialogflow.cx.v3.ListIntentsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest} SubmitAnswerFeedbackRequest + * @returns {google.cloud.dialogflow.cx.v3.ListIntentsResponse} ListIntentsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SubmitAnswerFeedbackRequest.decodeDelimited = function decodeDelimited(reader) { + ListIntentsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SubmitAnswerFeedbackRequest message. + * Verifies a ListIntentsResponse message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest + * @memberof google.cloud.dialogflow.cx.v3.ListIntentsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SubmitAnswerFeedbackRequest.verify = function verify(message) { + ListIntentsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.session != null && message.hasOwnProperty("session")) - if (!$util.isString(message.session)) - return "session: string expected"; - if (message.responseId != null && message.hasOwnProperty("responseId")) - if (!$util.isString(message.responseId)) - return "responseId: string expected"; - if (message.answerFeedback != null && message.hasOwnProperty("answerFeedback")) { - var error = $root.google.cloud.dialogflow.cx.v3.AnswerFeedback.verify(message.answerFeedback); - if (error) - return "answerFeedback." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; + if (message.intents != null && message.hasOwnProperty("intents")) { + if (!Array.isArray(message.intents)) + return "intents: array expected"; + for (var i = 0; i < message.intents.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.Intent.verify(message.intents[i]); + if (error) + return "intents." + error; + } } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a SubmitAnswerFeedbackRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListIntentsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest + * @memberof google.cloud.dialogflow.cx.v3.ListIntentsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest} SubmitAnswerFeedbackRequest + * @returns {google.cloud.dialogflow.cx.v3.ListIntentsResponse} ListIntentsResponse */ - SubmitAnswerFeedbackRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest) + ListIntentsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListIntentsResponse) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest(); - if (object.session != null) - message.session = String(object.session); - if (object.responseId != null) - message.responseId = String(object.responseId); - if (object.answerFeedback != null) { - if (typeof object.answerFeedback !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest.answerFeedback: object expected"); - message.answerFeedback = $root.google.cloud.dialogflow.cx.v3.AnswerFeedback.fromObject(object.answerFeedback); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + var message = new $root.google.cloud.dialogflow.cx.v3.ListIntentsResponse(); + if (object.intents) { + if (!Array.isArray(object.intents)) + throw TypeError(".google.cloud.dialogflow.cx.v3.ListIntentsResponse.intents: array expected"); + message.intents = []; + for (var i = 0; i < object.intents.length; ++i) { + if (typeof object.intents[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.ListIntentsResponse.intents: object expected"); + message.intents[i] = $root.google.cloud.dialogflow.cx.v3.Intent.fromObject(object.intents[i]); + } } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a SubmitAnswerFeedbackRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListIntentsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest + * @memberof google.cloud.dialogflow.cx.v3.ListIntentsResponse * @static - * @param {google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest} message SubmitAnswerFeedbackRequest + * @param {google.cloud.dialogflow.cx.v3.ListIntentsResponse} message ListIntentsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SubmitAnswerFeedbackRequest.toObject = function toObject(message, options) { + ListIntentsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.session = ""; - object.responseId = ""; - object.answerFeedback = null; - object.updateMask = null; + if (options.arrays || options.defaults) + object.intents = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.intents && message.intents.length) { + object.intents = []; + for (var j = 0; j < message.intents.length; ++j) + object.intents[j] = $root.google.cloud.dialogflow.cx.v3.Intent.toObject(message.intents[j], options); } - if (message.session != null && message.hasOwnProperty("session")) - object.session = message.session; - if (message.responseId != null && message.hasOwnProperty("responseId")) - object.responseId = message.responseId; - if (message.answerFeedback != null && message.hasOwnProperty("answerFeedback")) - object.answerFeedback = $root.google.cloud.dialogflow.cx.v3.AnswerFeedback.toObject(message.answerFeedback, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this SubmitAnswerFeedbackRequest to JSON. + * Converts this ListIntentsResponse to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest + * @memberof google.cloud.dialogflow.cx.v3.ListIntentsResponse * @instance * @returns {Object.} JSON object */ - SubmitAnswerFeedbackRequest.prototype.toJSON = function toJSON() { + ListIntentsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SubmitAnswerFeedbackRequest + * Gets the default type url for ListIntentsResponse * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest + * @memberof google.cloud.dialogflow.cx.v3.ListIntentsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SubmitAnswerFeedbackRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListIntentsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListIntentsResponse"; }; - return SubmitAnswerFeedbackRequest; + return ListIntentsResponse; })(); - v3.DetectIntentRequest = (function() { + v3.GetIntentRequest = (function() { /** - * Properties of a DetectIntentRequest. + * Properties of a GetIntentRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IDetectIntentRequest - * @property {string|null} [session] DetectIntentRequest session - * @property {google.cloud.dialogflow.cx.v3.IQueryParameters|null} [queryParams] DetectIntentRequest queryParams - * @property {google.cloud.dialogflow.cx.v3.IQueryInput|null} [queryInput] DetectIntentRequest queryInput - * @property {google.cloud.dialogflow.cx.v3.IOutputAudioConfig|null} [outputAudioConfig] DetectIntentRequest outputAudioConfig + * @interface IGetIntentRequest + * @property {string|null} [name] GetIntentRequest name + * @property {string|null} [languageCode] GetIntentRequest languageCode */ /** - * Constructs a new DetectIntentRequest. + * Constructs a new GetIntentRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a DetectIntentRequest. - * @implements IDetectIntentRequest + * @classdesc Represents a GetIntentRequest. + * @implements IGetIntentRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IDetectIntentRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IGetIntentRequest=} [properties] Properties to set */ - function DetectIntentRequest(properties) { + function GetIntentRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -59728,119 +59319,91 @@ } /** - * DetectIntentRequest session. - * @member {string} session - * @memberof google.cloud.dialogflow.cx.v3.DetectIntentRequest - * @instance - */ - DetectIntentRequest.prototype.session = ""; - - /** - * DetectIntentRequest queryParams. - * @member {google.cloud.dialogflow.cx.v3.IQueryParameters|null|undefined} queryParams - * @memberof google.cloud.dialogflow.cx.v3.DetectIntentRequest - * @instance - */ - DetectIntentRequest.prototype.queryParams = null; - - /** - * DetectIntentRequest queryInput. - * @member {google.cloud.dialogflow.cx.v3.IQueryInput|null|undefined} queryInput - * @memberof google.cloud.dialogflow.cx.v3.DetectIntentRequest + * GetIntentRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.GetIntentRequest * @instance */ - DetectIntentRequest.prototype.queryInput = null; + GetIntentRequest.prototype.name = ""; /** - * DetectIntentRequest outputAudioConfig. - * @member {google.cloud.dialogflow.cx.v3.IOutputAudioConfig|null|undefined} outputAudioConfig - * @memberof google.cloud.dialogflow.cx.v3.DetectIntentRequest + * GetIntentRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3.GetIntentRequest * @instance */ - DetectIntentRequest.prototype.outputAudioConfig = null; + GetIntentRequest.prototype.languageCode = ""; /** - * Creates a new DetectIntentRequest instance using the specified properties. + * Creates a new GetIntentRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.DetectIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.GetIntentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IDetectIntentRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.DetectIntentRequest} DetectIntentRequest instance + * @param {google.cloud.dialogflow.cx.v3.IGetIntentRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.GetIntentRequest} GetIntentRequest instance */ - DetectIntentRequest.create = function create(properties) { - return new DetectIntentRequest(properties); + GetIntentRequest.create = function create(properties) { + return new GetIntentRequest(properties); }; /** - * Encodes the specified DetectIntentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DetectIntentRequest.verify|verify} messages. + * Encodes the specified GetIntentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetIntentRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.DetectIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.GetIntentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IDetectIntentRequest} message DetectIntentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IGetIntentRequest} message GetIntentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DetectIntentRequest.encode = function encode(message, writer) { + GetIntentRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.session != null && Object.hasOwnProperty.call(message, "session")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.session); - if (message.queryParams != null && Object.hasOwnProperty.call(message, "queryParams")) - $root.google.cloud.dialogflow.cx.v3.QueryParameters.encode(message.queryParams, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.queryInput != null && Object.hasOwnProperty.call(message, "queryInput")) - $root.google.cloud.dialogflow.cx.v3.QueryInput.encode(message.queryInput, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.outputAudioConfig != null && Object.hasOwnProperty.call(message, "outputAudioConfig")) - $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.encode(message.outputAudioConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); return writer; }; /** - * Encodes the specified DetectIntentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DetectIntentRequest.verify|verify} messages. + * Encodes the specified GetIntentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetIntentRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.DetectIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.GetIntentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IDetectIntentRequest} message DetectIntentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IGetIntentRequest} message GetIntentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DetectIntentRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetIntentRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DetectIntentRequest message from the specified reader or buffer. + * Decodes a GetIntentRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.DetectIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.GetIntentRequest * @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.DetectIntentRequest} DetectIntentRequest + * @returns {google.cloud.dialogflow.cx.v3.GetIntentRequest} GetIntentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DetectIntentRequest.decode = function decode(reader, length, error) { + GetIntentRequest.decode = function decode(reader, length, error) { 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.DetectIntentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.GetIntentRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.session = reader.string(); + message.name = reader.string(); break; } case 2: { - message.queryParams = $root.google.cloud.dialogflow.cx.v3.QueryParameters.decode(reader, reader.uint32()); - break; - } - case 3: { - message.queryInput = $root.google.cloud.dialogflow.cx.v3.QueryInput.decode(reader, reader.uint32()); - break; - } - case 4: { - message.outputAudioConfig = $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.decode(reader, reader.uint32()); + message.languageCode = reader.string(); break; } default: @@ -59852,167 +59415,133 @@ }; /** - * Decodes a DetectIntentRequest message from the specified reader or buffer, length delimited. + * Decodes a GetIntentRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.DetectIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.GetIntentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.DetectIntentRequest} DetectIntentRequest + * @returns {google.cloud.dialogflow.cx.v3.GetIntentRequest} GetIntentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DetectIntentRequest.decodeDelimited = function decodeDelimited(reader) { + GetIntentRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DetectIntentRequest message. + * Verifies a GetIntentRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.DetectIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.GetIntentRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DetectIntentRequest.verify = function verify(message) { + GetIntentRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.session != null && message.hasOwnProperty("session")) - if (!$util.isString(message.session)) - return "session: string expected"; - if (message.queryParams != null && message.hasOwnProperty("queryParams")) { - var error = $root.google.cloud.dialogflow.cx.v3.QueryParameters.verify(message.queryParams); - if (error) - return "queryParams." + error; - } - if (message.queryInput != null && message.hasOwnProperty("queryInput")) { - var error = $root.google.cloud.dialogflow.cx.v3.QueryInput.verify(message.queryInput); - if (error) - return "queryInput." + error; - } - if (message.outputAudioConfig != null && message.hasOwnProperty("outputAudioConfig")) { - var error = $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.verify(message.outputAudioConfig); - if (error) - return "outputAudioConfig." + error; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; return null; }; /** - * Creates a DetectIntentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetIntentRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.DetectIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.GetIntentRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.DetectIntentRequest} DetectIntentRequest + * @returns {google.cloud.dialogflow.cx.v3.GetIntentRequest} GetIntentRequest */ - DetectIntentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.DetectIntentRequest) + GetIntentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.GetIntentRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.DetectIntentRequest(); - if (object.session != null) - message.session = String(object.session); - if (object.queryParams != null) { - if (typeof object.queryParams !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.DetectIntentRequest.queryParams: object expected"); - message.queryParams = $root.google.cloud.dialogflow.cx.v3.QueryParameters.fromObject(object.queryParams); - } - if (object.queryInput != null) { - if (typeof object.queryInput !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.DetectIntentRequest.queryInput: object expected"); - message.queryInput = $root.google.cloud.dialogflow.cx.v3.QueryInput.fromObject(object.queryInput); - } - if (object.outputAudioConfig != null) { - if (typeof object.outputAudioConfig !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.DetectIntentRequest.outputAudioConfig: object expected"); - message.outputAudioConfig = $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.fromObject(object.outputAudioConfig); - } + var message = new $root.google.cloud.dialogflow.cx.v3.GetIntentRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.languageCode != null) + message.languageCode = String(object.languageCode); return message; }; /** - * Creates a plain object from a DetectIntentRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetIntentRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.DetectIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.GetIntentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.DetectIntentRequest} message DetectIntentRequest + * @param {google.cloud.dialogflow.cx.v3.GetIntentRequest} message GetIntentRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DetectIntentRequest.toObject = function toObject(message, options) { + GetIntentRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.session = ""; - object.queryParams = null; - object.queryInput = null; - object.outputAudioConfig = null; + object.name = ""; + object.languageCode = ""; } - if (message.session != null && message.hasOwnProperty("session")) - object.session = message.session; - if (message.queryParams != null && message.hasOwnProperty("queryParams")) - object.queryParams = $root.google.cloud.dialogflow.cx.v3.QueryParameters.toObject(message.queryParams, options); - if (message.queryInput != null && message.hasOwnProperty("queryInput")) - object.queryInput = $root.google.cloud.dialogflow.cx.v3.QueryInput.toObject(message.queryInput, options); - if (message.outputAudioConfig != null && message.hasOwnProperty("outputAudioConfig")) - object.outputAudioConfig = $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.toObject(message.outputAudioConfig, options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; return object; }; /** - * Converts this DetectIntentRequest to JSON. + * Converts this GetIntentRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.DetectIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.GetIntentRequest * @instance * @returns {Object.} JSON object */ - DetectIntentRequest.prototype.toJSON = function toJSON() { + GetIntentRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DetectIntentRequest + * Gets the default type url for GetIntentRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.DetectIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.GetIntentRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DetectIntentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetIntentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.DetectIntentRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.GetIntentRequest"; }; - return DetectIntentRequest; + return GetIntentRequest; })(); - v3.DetectIntentResponse = (function() { + v3.CreateIntentRequest = (function() { /** - * Properties of a DetectIntentResponse. + * Properties of a CreateIntentRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IDetectIntentResponse - * @property {string|null} [responseId] DetectIntentResponse responseId - * @property {google.cloud.dialogflow.cx.v3.IQueryResult|null} [queryResult] DetectIntentResponse queryResult - * @property {Uint8Array|null} [outputAudio] DetectIntentResponse outputAudio - * @property {google.cloud.dialogflow.cx.v3.IOutputAudioConfig|null} [outputAudioConfig] DetectIntentResponse outputAudioConfig - * @property {google.cloud.dialogflow.cx.v3.DetectIntentResponse.ResponseType|null} [responseType] DetectIntentResponse responseType - * @property {boolean|null} [allowCancellation] DetectIntentResponse allowCancellation + * @interface ICreateIntentRequest + * @property {string|null} [parent] CreateIntentRequest parent + * @property {google.cloud.dialogflow.cx.v3.IIntent|null} [intent] CreateIntentRequest intent + * @property {string|null} [languageCode] CreateIntentRequest languageCode */ /** - * Constructs a new DetectIntentResponse. + * Constructs a new CreateIntentRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a DetectIntentResponse. - * @implements IDetectIntentResponse + * @classdesc Represents a CreateIntentRequest. + * @implements ICreateIntentRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IDetectIntentResponse=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.ICreateIntentRequest=} [properties] Properties to set */ - function DetectIntentResponse(properties) { + function CreateIntentRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -60020,147 +59549,105 @@ } /** - * DetectIntentResponse responseId. - * @member {string} responseId - * @memberof google.cloud.dialogflow.cx.v3.DetectIntentResponse - * @instance - */ - DetectIntentResponse.prototype.responseId = ""; - - /** - * DetectIntentResponse queryResult. - * @member {google.cloud.dialogflow.cx.v3.IQueryResult|null|undefined} queryResult - * @memberof google.cloud.dialogflow.cx.v3.DetectIntentResponse - * @instance - */ - DetectIntentResponse.prototype.queryResult = null; - - /** - * DetectIntentResponse outputAudio. - * @member {Uint8Array} outputAudio - * @memberof google.cloud.dialogflow.cx.v3.DetectIntentResponse - * @instance - */ - DetectIntentResponse.prototype.outputAudio = $util.newBuffer([]); - - /** - * DetectIntentResponse outputAudioConfig. - * @member {google.cloud.dialogflow.cx.v3.IOutputAudioConfig|null|undefined} outputAudioConfig - * @memberof google.cloud.dialogflow.cx.v3.DetectIntentResponse + * CreateIntentRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.cx.v3.CreateIntentRequest * @instance */ - DetectIntentResponse.prototype.outputAudioConfig = null; + CreateIntentRequest.prototype.parent = ""; /** - * DetectIntentResponse responseType. - * @member {google.cloud.dialogflow.cx.v3.DetectIntentResponse.ResponseType} responseType - * @memberof google.cloud.dialogflow.cx.v3.DetectIntentResponse + * CreateIntentRequest intent. + * @member {google.cloud.dialogflow.cx.v3.IIntent|null|undefined} intent + * @memberof google.cloud.dialogflow.cx.v3.CreateIntentRequest * @instance */ - DetectIntentResponse.prototype.responseType = 0; + CreateIntentRequest.prototype.intent = null; /** - * DetectIntentResponse allowCancellation. - * @member {boolean} allowCancellation - * @memberof google.cloud.dialogflow.cx.v3.DetectIntentResponse + * CreateIntentRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3.CreateIntentRequest * @instance */ - DetectIntentResponse.prototype.allowCancellation = false; + CreateIntentRequest.prototype.languageCode = ""; /** - * Creates a new DetectIntentResponse instance using the specified properties. + * Creates a new CreateIntentRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.DetectIntentResponse + * @memberof google.cloud.dialogflow.cx.v3.CreateIntentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IDetectIntentResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.DetectIntentResponse} DetectIntentResponse instance + * @param {google.cloud.dialogflow.cx.v3.ICreateIntentRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.CreateIntentRequest} CreateIntentRequest instance */ - DetectIntentResponse.create = function create(properties) { - return new DetectIntentResponse(properties); + CreateIntentRequest.create = function create(properties) { + return new CreateIntentRequest(properties); }; /** - * Encodes the specified DetectIntentResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DetectIntentResponse.verify|verify} messages. + * Encodes the specified CreateIntentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateIntentRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.DetectIntentResponse + * @memberof google.cloud.dialogflow.cx.v3.CreateIntentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IDetectIntentResponse} message DetectIntentResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ICreateIntentRequest} message CreateIntentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DetectIntentResponse.encode = function encode(message, writer) { + CreateIntentRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.responseId != null && Object.hasOwnProperty.call(message, "responseId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.responseId); - if (message.queryResult != null && Object.hasOwnProperty.call(message, "queryResult")) - $root.google.cloud.dialogflow.cx.v3.QueryResult.encode(message.queryResult, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.outputAudio != null && Object.hasOwnProperty.call(message, "outputAudio")) - writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.outputAudio); - if (message.outputAudioConfig != null && Object.hasOwnProperty.call(message, "outputAudioConfig")) - $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.encode(message.outputAudioConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.responseType != null && Object.hasOwnProperty.call(message, "responseType")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.responseType); - if (message.allowCancellation != null && Object.hasOwnProperty.call(message, "allowCancellation")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.allowCancellation); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.intent != null && Object.hasOwnProperty.call(message, "intent")) + $root.google.cloud.dialogflow.cx.v3.Intent.encode(message.intent, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.languageCode); return writer; }; /** - * Encodes the specified DetectIntentResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DetectIntentResponse.verify|verify} messages. + * Encodes the specified CreateIntentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateIntentRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.DetectIntentResponse + * @memberof google.cloud.dialogflow.cx.v3.CreateIntentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IDetectIntentResponse} message DetectIntentResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ICreateIntentRequest} message CreateIntentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DetectIntentResponse.encodeDelimited = function encodeDelimited(message, writer) { + CreateIntentRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DetectIntentResponse message from the specified reader or buffer. + * Decodes a CreateIntentRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.DetectIntentResponse + * @memberof google.cloud.dialogflow.cx.v3.CreateIntentRequest * @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.DetectIntentResponse} DetectIntentResponse + * @returns {google.cloud.dialogflow.cx.v3.CreateIntentRequest} CreateIntentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DetectIntentResponse.decode = function decode(reader, length, error) { + CreateIntentRequest.decode = function decode(reader, length, error) { 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.DetectIntentResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.CreateIntentRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.responseId = reader.string(); + message.parent = reader.string(); break; } case 2: { - message.queryResult = $root.google.cloud.dialogflow.cx.v3.QueryResult.decode(reader, reader.uint32()); - break; - } - case 4: { - message.outputAudio = reader.bytes(); - break; - } - case 5: { - message.outputAudioConfig = $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.decode(reader, reader.uint32()); - break; - } - case 6: { - message.responseType = reader.int32(); + message.intent = $root.google.cloud.dialogflow.cx.v3.Intent.decode(reader, reader.uint32()); break; } - case 7: { - message.allowCancellation = reader.bool(); + case 3: { + message.languageCode = reader.string(); break; } default: @@ -60172,227 +59659,146 @@ }; /** - * Decodes a DetectIntentResponse message from the specified reader or buffer, length delimited. + * Decodes a CreateIntentRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.DetectIntentResponse + * @memberof google.cloud.dialogflow.cx.v3.CreateIntentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.DetectIntentResponse} DetectIntentResponse + * @returns {google.cloud.dialogflow.cx.v3.CreateIntentRequest} CreateIntentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DetectIntentResponse.decodeDelimited = function decodeDelimited(reader) { + CreateIntentRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DetectIntentResponse message. + * Verifies a CreateIntentRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.DetectIntentResponse + * @memberof google.cloud.dialogflow.cx.v3.CreateIntentRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DetectIntentResponse.verify = function verify(message) { + CreateIntentRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.responseId != null && message.hasOwnProperty("responseId")) - if (!$util.isString(message.responseId)) - return "responseId: string expected"; - if (message.queryResult != null && message.hasOwnProperty("queryResult")) { - var error = $root.google.cloud.dialogflow.cx.v3.QueryResult.verify(message.queryResult); - if (error) - return "queryResult." + error; - } - if (message.outputAudio != null && message.hasOwnProperty("outputAudio")) - if (!(message.outputAudio && typeof message.outputAudio.length === "number" || $util.isString(message.outputAudio))) - return "outputAudio: buffer expected"; - if (message.outputAudioConfig != null && message.hasOwnProperty("outputAudioConfig")) { - var error = $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.verify(message.outputAudioConfig); + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.intent != null && message.hasOwnProperty("intent")) { + var error = $root.google.cloud.dialogflow.cx.v3.Intent.verify(message.intent); if (error) - return "outputAudioConfig." + error; + return "intent." + error; } - if (message.responseType != null && message.hasOwnProperty("responseType")) - switch (message.responseType) { - default: - return "responseType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.allowCancellation != null && message.hasOwnProperty("allowCancellation")) - if (typeof message.allowCancellation !== "boolean") - return "allowCancellation: boolean expected"; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; return null; }; /** - * Creates a DetectIntentResponse message from a plain object. Also converts values to their respective internal types. + * Creates a CreateIntentRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.DetectIntentResponse + * @memberof google.cloud.dialogflow.cx.v3.CreateIntentRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.DetectIntentResponse} DetectIntentResponse + * @returns {google.cloud.dialogflow.cx.v3.CreateIntentRequest} CreateIntentRequest */ - DetectIntentResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.DetectIntentResponse) + CreateIntentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.CreateIntentRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.DetectIntentResponse(); - if (object.responseId != null) - message.responseId = String(object.responseId); - if (object.queryResult != null) { - if (typeof object.queryResult !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.DetectIntentResponse.queryResult: object expected"); - message.queryResult = $root.google.cloud.dialogflow.cx.v3.QueryResult.fromObject(object.queryResult); - } - if (object.outputAudio != null) - if (typeof object.outputAudio === "string") - $util.base64.decode(object.outputAudio, message.outputAudio = $util.newBuffer($util.base64.length(object.outputAudio)), 0); - else if (object.outputAudio.length >= 0) - message.outputAudio = object.outputAudio; - if (object.outputAudioConfig != null) { - if (typeof object.outputAudioConfig !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.DetectIntentResponse.outputAudioConfig: object expected"); - message.outputAudioConfig = $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.fromObject(object.outputAudioConfig); - } - switch (object.responseType) { - default: - if (typeof object.responseType === "number") { - message.responseType = object.responseType; - break; - } - break; - case "RESPONSE_TYPE_UNSPECIFIED": - case 0: - message.responseType = 0; - break; - case "PARTIAL": - case 1: - message.responseType = 1; - break; - case "FINAL": - case 2: - message.responseType = 2; - break; + var message = new $root.google.cloud.dialogflow.cx.v3.CreateIntentRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.intent != null) { + if (typeof object.intent !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.CreateIntentRequest.intent: object expected"); + message.intent = $root.google.cloud.dialogflow.cx.v3.Intent.fromObject(object.intent); } - if (object.allowCancellation != null) - message.allowCancellation = Boolean(object.allowCancellation); + if (object.languageCode != null) + message.languageCode = String(object.languageCode); return message; }; /** - * Creates a plain object from a DetectIntentResponse message. Also converts values to other types if specified. + * Creates a plain object from a CreateIntentRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.DetectIntentResponse + * @memberof google.cloud.dialogflow.cx.v3.CreateIntentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.DetectIntentResponse} message DetectIntentResponse + * @param {google.cloud.dialogflow.cx.v3.CreateIntentRequest} message CreateIntentRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DetectIntentResponse.toObject = function toObject(message, options) { + CreateIntentRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.responseId = ""; - object.queryResult = null; - if (options.bytes === String) - object.outputAudio = ""; - else { - object.outputAudio = []; - if (options.bytes !== Array) - object.outputAudio = $util.newBuffer(object.outputAudio); - } - object.outputAudioConfig = null; - object.responseType = options.enums === String ? "RESPONSE_TYPE_UNSPECIFIED" : 0; - object.allowCancellation = false; + object.parent = ""; + object.intent = null; + object.languageCode = ""; } - if (message.responseId != null && message.hasOwnProperty("responseId")) - object.responseId = message.responseId; - if (message.queryResult != null && message.hasOwnProperty("queryResult")) - object.queryResult = $root.google.cloud.dialogflow.cx.v3.QueryResult.toObject(message.queryResult, options); - if (message.outputAudio != null && message.hasOwnProperty("outputAudio")) - object.outputAudio = options.bytes === String ? $util.base64.encode(message.outputAudio, 0, message.outputAudio.length) : options.bytes === Array ? Array.prototype.slice.call(message.outputAudio) : message.outputAudio; - if (message.outputAudioConfig != null && message.hasOwnProperty("outputAudioConfig")) - object.outputAudioConfig = $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.toObject(message.outputAudioConfig, options); - if (message.responseType != null && message.hasOwnProperty("responseType")) - object.responseType = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.DetectIntentResponse.ResponseType[message.responseType] === undefined ? message.responseType : $root.google.cloud.dialogflow.cx.v3.DetectIntentResponse.ResponseType[message.responseType] : message.responseType; - if (message.allowCancellation != null && message.hasOwnProperty("allowCancellation")) - object.allowCancellation = message.allowCancellation; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.intent != null && message.hasOwnProperty("intent")) + object.intent = $root.google.cloud.dialogflow.cx.v3.Intent.toObject(message.intent, options); + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; return object; }; /** - * Converts this DetectIntentResponse to JSON. + * Converts this CreateIntentRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.DetectIntentResponse + * @memberof google.cloud.dialogflow.cx.v3.CreateIntentRequest * @instance * @returns {Object.} JSON object */ - DetectIntentResponse.prototype.toJSON = function toJSON() { + CreateIntentRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DetectIntentResponse + * Gets the default type url for CreateIntentRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.DetectIntentResponse + * @memberof google.cloud.dialogflow.cx.v3.CreateIntentRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DetectIntentResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateIntentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.DetectIntentResponse"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.CreateIntentRequest"; }; - /** - * ResponseType enum. - * @name google.cloud.dialogflow.cx.v3.DetectIntentResponse.ResponseType - * @enum {number} - * @property {number} RESPONSE_TYPE_UNSPECIFIED=0 RESPONSE_TYPE_UNSPECIFIED value - * @property {number} PARTIAL=1 PARTIAL value - * @property {number} FINAL=2 FINAL value - */ - DetectIntentResponse.ResponseType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "RESPONSE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "PARTIAL"] = 1; - values[valuesById[2] = "FINAL"] = 2; - return values; - })(); - - return DetectIntentResponse; + return CreateIntentRequest; })(); - v3.StreamingDetectIntentRequest = (function() { + v3.UpdateIntentRequest = (function() { /** - * Properties of a StreamingDetectIntentRequest. + * Properties of an UpdateIntentRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IStreamingDetectIntentRequest - * @property {string|null} [session] StreamingDetectIntentRequest session - * @property {google.cloud.dialogflow.cx.v3.IQueryParameters|null} [queryParams] StreamingDetectIntentRequest queryParams - * @property {google.cloud.dialogflow.cx.v3.IQueryInput|null} [queryInput] StreamingDetectIntentRequest queryInput - * @property {google.cloud.dialogflow.cx.v3.IOutputAudioConfig|null} [outputAudioConfig] StreamingDetectIntentRequest outputAudioConfig - * @property {boolean|null} [enablePartialResponse] StreamingDetectIntentRequest enablePartialResponse - * @property {boolean|null} [enableDebuggingInfo] StreamingDetectIntentRequest enableDebuggingInfo + * @interface IUpdateIntentRequest + * @property {google.cloud.dialogflow.cx.v3.IIntent|null} [intent] UpdateIntentRequest intent + * @property {string|null} [languageCode] UpdateIntentRequest languageCode + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateIntentRequest updateMask */ /** - * Constructs a new StreamingDetectIntentRequest. + * Constructs a new UpdateIntentRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a StreamingDetectIntentRequest. - * @implements IStreamingDetectIntentRequest + * @classdesc Represents an UpdateIntentRequest. + * @implements IUpdateIntentRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IStreamingDetectIntentRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IUpdateIntentRequest=} [properties] Properties to set */ - function StreamingDetectIntentRequest(properties) { + function UpdateIntentRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -60400,147 +59806,105 @@ } /** - * StreamingDetectIntentRequest session. - * @member {string} session - * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest - * @instance - */ - StreamingDetectIntentRequest.prototype.session = ""; - - /** - * StreamingDetectIntentRequest queryParams. - * @member {google.cloud.dialogflow.cx.v3.IQueryParameters|null|undefined} queryParams - * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest - * @instance - */ - StreamingDetectIntentRequest.prototype.queryParams = null; - - /** - * StreamingDetectIntentRequest queryInput. - * @member {google.cloud.dialogflow.cx.v3.IQueryInput|null|undefined} queryInput - * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest - * @instance - */ - StreamingDetectIntentRequest.prototype.queryInput = null; - - /** - * StreamingDetectIntentRequest outputAudioConfig. - * @member {google.cloud.dialogflow.cx.v3.IOutputAudioConfig|null|undefined} outputAudioConfig - * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest + * UpdateIntentRequest intent. + * @member {google.cloud.dialogflow.cx.v3.IIntent|null|undefined} intent + * @memberof google.cloud.dialogflow.cx.v3.UpdateIntentRequest * @instance */ - StreamingDetectIntentRequest.prototype.outputAudioConfig = null; + UpdateIntentRequest.prototype.intent = null; /** - * StreamingDetectIntentRequest enablePartialResponse. - * @member {boolean} enablePartialResponse - * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest + * UpdateIntentRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3.UpdateIntentRequest * @instance */ - StreamingDetectIntentRequest.prototype.enablePartialResponse = false; + UpdateIntentRequest.prototype.languageCode = ""; /** - * StreamingDetectIntentRequest enableDebuggingInfo. - * @member {boolean} enableDebuggingInfo - * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest + * UpdateIntentRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dialogflow.cx.v3.UpdateIntentRequest * @instance */ - StreamingDetectIntentRequest.prototype.enableDebuggingInfo = false; + UpdateIntentRequest.prototype.updateMask = null; /** - * Creates a new StreamingDetectIntentRequest instance using the specified properties. + * Creates a new UpdateIntentRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.UpdateIntentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IStreamingDetectIntentRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest} StreamingDetectIntentRequest instance + * @param {google.cloud.dialogflow.cx.v3.IUpdateIntentRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.UpdateIntentRequest} UpdateIntentRequest instance */ - StreamingDetectIntentRequest.create = function create(properties) { - return new StreamingDetectIntentRequest(properties); + UpdateIntentRequest.create = function create(properties) { + return new UpdateIntentRequest(properties); }; /** - * Encodes the specified StreamingDetectIntentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest.verify|verify} messages. + * Encodes the specified UpdateIntentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateIntentRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.UpdateIntentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IStreamingDetectIntentRequest} message StreamingDetectIntentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IUpdateIntentRequest} message UpdateIntentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StreamingDetectIntentRequest.encode = function encode(message, writer) { + UpdateIntentRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.session != null && Object.hasOwnProperty.call(message, "session")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.session); - if (message.queryParams != null && Object.hasOwnProperty.call(message, "queryParams")) - $root.google.cloud.dialogflow.cx.v3.QueryParameters.encode(message.queryParams, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.queryInput != null && Object.hasOwnProperty.call(message, "queryInput")) - $root.google.cloud.dialogflow.cx.v3.QueryInput.encode(message.queryInput, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.outputAudioConfig != null && Object.hasOwnProperty.call(message, "outputAudioConfig")) - $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.encode(message.outputAudioConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.enablePartialResponse != null && Object.hasOwnProperty.call(message, "enablePartialResponse")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.enablePartialResponse); - if (message.enableDebuggingInfo != null && Object.hasOwnProperty.call(message, "enableDebuggingInfo")) - writer.uint32(/* id 8, wireType 0 =*/64).bool(message.enableDebuggingInfo); + if (message.intent != null && Object.hasOwnProperty.call(message, "intent")) + $root.google.cloud.dialogflow.cx.v3.Intent.encode(message.intent, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified StreamingDetectIntentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest.verify|verify} messages. + * Encodes the specified UpdateIntentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateIntentRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.UpdateIntentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IStreamingDetectIntentRequest} message StreamingDetectIntentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IUpdateIntentRequest} message UpdateIntentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StreamingDetectIntentRequest.encodeDelimited = function encodeDelimited(message, writer) { + UpdateIntentRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a StreamingDetectIntentRequest message from the specified reader or buffer. + * Decodes an UpdateIntentRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.UpdateIntentRequest * @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.StreamingDetectIntentRequest} StreamingDetectIntentRequest + * @returns {google.cloud.dialogflow.cx.v3.UpdateIntentRequest} UpdateIntentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StreamingDetectIntentRequest.decode = function decode(reader, length, error) { + UpdateIntentRequest.decode = function decode(reader, length, error) { 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.StreamingDetectIntentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.UpdateIntentRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.session = reader.string(); + message.intent = $root.google.cloud.dialogflow.cx.v3.Intent.decode(reader, reader.uint32()); break; } case 2: { - message.queryParams = $root.google.cloud.dialogflow.cx.v3.QueryParameters.decode(reader, reader.uint32()); + message.languageCode = reader.string(); break; } case 3: { - message.queryInput = $root.google.cloud.dialogflow.cx.v3.QueryInput.decode(reader, reader.uint32()); - break; - } - case 4: { - message.outputAudioConfig = $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.decode(reader, reader.uint32()); - break; - } - case 5: { - message.enablePartialResponse = reader.bool(); - break; - } - case 8: { - message.enableDebuggingInfo = reader.bool(); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; } default: @@ -60552,199 +59916,149 @@ }; /** - * Decodes a StreamingDetectIntentRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateIntentRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.UpdateIntentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest} StreamingDetectIntentRequest + * @returns {google.cloud.dialogflow.cx.v3.UpdateIntentRequest} UpdateIntentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StreamingDetectIntentRequest.decodeDelimited = function decodeDelimited(reader) { + UpdateIntentRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a StreamingDetectIntentRequest message. + * Verifies an UpdateIntentRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.UpdateIntentRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - StreamingDetectIntentRequest.verify = function verify(message) { + UpdateIntentRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.session != null && message.hasOwnProperty("session")) - if (!$util.isString(message.session)) - return "session: string expected"; - if (message.queryParams != null && message.hasOwnProperty("queryParams")) { - var error = $root.google.cloud.dialogflow.cx.v3.QueryParameters.verify(message.queryParams); - if (error) - return "queryParams." + error; - } - if (message.queryInput != null && message.hasOwnProperty("queryInput")) { - var error = $root.google.cloud.dialogflow.cx.v3.QueryInput.verify(message.queryInput); + if (message.intent != null && message.hasOwnProperty("intent")) { + var error = $root.google.cloud.dialogflow.cx.v3.Intent.verify(message.intent); if (error) - return "queryInput." + error; + return "intent." + error; } - if (message.outputAudioConfig != null && message.hasOwnProperty("outputAudioConfig")) { - var error = $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.verify(message.outputAudioConfig); + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); if (error) - return "outputAudioConfig." + error; + return "updateMask." + error; } - if (message.enablePartialResponse != null && message.hasOwnProperty("enablePartialResponse")) - if (typeof message.enablePartialResponse !== "boolean") - return "enablePartialResponse: boolean expected"; - if (message.enableDebuggingInfo != null && message.hasOwnProperty("enableDebuggingInfo")) - if (typeof message.enableDebuggingInfo !== "boolean") - return "enableDebuggingInfo: boolean expected"; return null; }; /** - * Creates a StreamingDetectIntentRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateIntentRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.UpdateIntentRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest} StreamingDetectIntentRequest + * @returns {google.cloud.dialogflow.cx.v3.UpdateIntentRequest} UpdateIntentRequest */ - StreamingDetectIntentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest) + UpdateIntentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.UpdateIntentRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest(); - if (object.session != null) - message.session = String(object.session); - if (object.queryParams != null) { - if (typeof object.queryParams !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest.queryParams: object expected"); - message.queryParams = $root.google.cloud.dialogflow.cx.v3.QueryParameters.fromObject(object.queryParams); - } - if (object.queryInput != null) { - if (typeof object.queryInput !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest.queryInput: object expected"); - message.queryInput = $root.google.cloud.dialogflow.cx.v3.QueryInput.fromObject(object.queryInput); + var message = new $root.google.cloud.dialogflow.cx.v3.UpdateIntentRequest(); + if (object.intent != null) { + if (typeof object.intent !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.UpdateIntentRequest.intent: object expected"); + message.intent = $root.google.cloud.dialogflow.cx.v3.Intent.fromObject(object.intent); } - if (object.outputAudioConfig != null) { - if (typeof object.outputAudioConfig !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest.outputAudioConfig: object expected"); - message.outputAudioConfig = $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.fromObject(object.outputAudioConfig); + if (object.languageCode != null) + message.languageCode = String(object.languageCode); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.UpdateIntentRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } - if (object.enablePartialResponse != null) - message.enablePartialResponse = Boolean(object.enablePartialResponse); - if (object.enableDebuggingInfo != null) - message.enableDebuggingInfo = Boolean(object.enableDebuggingInfo); return message; }; /** - * Creates a plain object from a StreamingDetectIntentRequest message. Also converts values to other types if specified. + * Creates a plain object from an UpdateIntentRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.UpdateIntentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest} message StreamingDetectIntentRequest + * @param {google.cloud.dialogflow.cx.v3.UpdateIntentRequest} message UpdateIntentRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StreamingDetectIntentRequest.toObject = function toObject(message, options) { + UpdateIntentRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.session = ""; - object.queryParams = null; - object.queryInput = null; - object.outputAudioConfig = null; - object.enablePartialResponse = false; - object.enableDebuggingInfo = false; + object.intent = null; + object.languageCode = ""; + object.updateMask = null; } - if (message.session != null && message.hasOwnProperty("session")) - object.session = message.session; - if (message.queryParams != null && message.hasOwnProperty("queryParams")) - object.queryParams = $root.google.cloud.dialogflow.cx.v3.QueryParameters.toObject(message.queryParams, options); - if (message.queryInput != null && message.hasOwnProperty("queryInput")) - object.queryInput = $root.google.cloud.dialogflow.cx.v3.QueryInput.toObject(message.queryInput, options); - if (message.outputAudioConfig != null && message.hasOwnProperty("outputAudioConfig")) - object.outputAudioConfig = $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.toObject(message.outputAudioConfig, options); - if (message.enablePartialResponse != null && message.hasOwnProperty("enablePartialResponse")) - object.enablePartialResponse = message.enablePartialResponse; - if (message.enableDebuggingInfo != null && message.hasOwnProperty("enableDebuggingInfo")) - object.enableDebuggingInfo = message.enableDebuggingInfo; + if (message.intent != null && message.hasOwnProperty("intent")) + object.intent = $root.google.cloud.dialogflow.cx.v3.Intent.toObject(message.intent, options); + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; /** - * Converts this StreamingDetectIntentRequest to JSON. + * Converts this UpdateIntentRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.UpdateIntentRequest * @instance * @returns {Object.} JSON object */ - StreamingDetectIntentRequest.prototype.toJSON = function toJSON() { + UpdateIntentRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for StreamingDetectIntentRequest + * Gets the default type url for UpdateIntentRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.UpdateIntentRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - StreamingDetectIntentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UpdateIntentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.UpdateIntentRequest"; }; - return StreamingDetectIntentRequest; + return UpdateIntentRequest; })(); - v3.CloudConversationDebuggingInfo = (function() { + v3.DeleteIntentRequest = (function() { /** - * Properties of a CloudConversationDebuggingInfo. + * Properties of a DeleteIntentRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface ICloudConversationDebuggingInfo - * @property {number|null} [audioDataChunks] CloudConversationDebuggingInfo audioDataChunks - * @property {google.protobuf.IDuration|null} [resultEndTimeOffset] CloudConversationDebuggingInfo resultEndTimeOffset - * @property {google.protobuf.IDuration|null} [firstAudioDuration] CloudConversationDebuggingInfo firstAudioDuration - * @property {boolean|null} [singleUtterance] CloudConversationDebuggingInfo singleUtterance - * @property {Array.|null} [speechPartialResultsEndTimes] CloudConversationDebuggingInfo speechPartialResultsEndTimes - * @property {Array.|null} [speechFinalResultsEndTimes] CloudConversationDebuggingInfo speechFinalResultsEndTimes - * @property {number|null} [partialResponses] CloudConversationDebuggingInfo partialResponses - * @property {number|null} [speakerIdPassiveLatencyMsOffset] CloudConversationDebuggingInfo speakerIdPassiveLatencyMsOffset - * @property {boolean|null} [bargeinEventTriggered] CloudConversationDebuggingInfo bargeinEventTriggered - * @property {boolean|null} [speechSingleUtterance] CloudConversationDebuggingInfo speechSingleUtterance - * @property {Array.|null} [dtmfPartialResultsTimes] CloudConversationDebuggingInfo dtmfPartialResultsTimes - * @property {Array.|null} [dtmfFinalResultsTimes] CloudConversationDebuggingInfo dtmfFinalResultsTimes - * @property {google.protobuf.IDuration|null} [singleUtteranceEndTimeOffset] CloudConversationDebuggingInfo singleUtteranceEndTimeOffset - * @property {google.protobuf.IDuration|null} [noSpeechTimeout] CloudConversationDebuggingInfo noSpeechTimeout - * @property {google.protobuf.IDuration|null} [endpointingTimeout] CloudConversationDebuggingInfo endpointingTimeout - * @property {boolean|null} [isInputText] CloudConversationDebuggingInfo isInputText - * @property {google.protobuf.IDuration|null} [clientHalfCloseTimeOffset] CloudConversationDebuggingInfo clientHalfCloseTimeOffset - * @property {google.protobuf.IDuration|null} [clientHalfCloseStreamingTimeOffset] CloudConversationDebuggingInfo clientHalfCloseStreamingTimeOffset + * @interface IDeleteIntentRequest + * @property {string|null} [name] DeleteIntentRequest name */ /** - * Constructs a new CloudConversationDebuggingInfo. + * Constructs a new DeleteIntentRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a CloudConversationDebuggingInfo. - * @implements ICloudConversationDebuggingInfo + * @classdesc Represents a DeleteIntentRequest. + * @implements IDeleteIntentRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.ICloudConversationDebuggingInfo=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IDeleteIntentRequest=} [properties] Properties to set */ - function CloudConversationDebuggingInfo(properties) { - this.speechPartialResultsEndTimes = []; - this.speechFinalResultsEndTimes = []; - this.dtmfPartialResultsTimes = []; - this.dtmfFinalResultsTimes = []; + function DeleteIntentRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -60752,327 +60066,77 @@ } /** - * CloudConversationDebuggingInfo audioDataChunks. - * @member {number} audioDataChunks - * @memberof google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo - * @instance - */ - CloudConversationDebuggingInfo.prototype.audioDataChunks = 0; - - /** - * CloudConversationDebuggingInfo resultEndTimeOffset. - * @member {google.protobuf.IDuration|null|undefined} resultEndTimeOffset - * @memberof google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo - * @instance - */ - CloudConversationDebuggingInfo.prototype.resultEndTimeOffset = null; - - /** - * CloudConversationDebuggingInfo firstAudioDuration. - * @member {google.protobuf.IDuration|null|undefined} firstAudioDuration - * @memberof google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo - * @instance - */ - CloudConversationDebuggingInfo.prototype.firstAudioDuration = null; - - /** - * CloudConversationDebuggingInfo singleUtterance. - * @member {boolean} singleUtterance - * @memberof google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo - * @instance - */ - CloudConversationDebuggingInfo.prototype.singleUtterance = false; - - /** - * CloudConversationDebuggingInfo speechPartialResultsEndTimes. - * @member {Array.} speechPartialResultsEndTimes - * @memberof google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo - * @instance - */ - CloudConversationDebuggingInfo.prototype.speechPartialResultsEndTimes = $util.emptyArray; - - /** - * CloudConversationDebuggingInfo speechFinalResultsEndTimes. - * @member {Array.} speechFinalResultsEndTimes - * @memberof google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo - * @instance - */ - CloudConversationDebuggingInfo.prototype.speechFinalResultsEndTimes = $util.emptyArray; - - /** - * CloudConversationDebuggingInfo partialResponses. - * @member {number} partialResponses - * @memberof google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo - * @instance - */ - CloudConversationDebuggingInfo.prototype.partialResponses = 0; - - /** - * CloudConversationDebuggingInfo speakerIdPassiveLatencyMsOffset. - * @member {number} speakerIdPassiveLatencyMsOffset - * @memberof google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo - * @instance - */ - CloudConversationDebuggingInfo.prototype.speakerIdPassiveLatencyMsOffset = 0; - - /** - * CloudConversationDebuggingInfo bargeinEventTriggered. - * @member {boolean} bargeinEventTriggered - * @memberof google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo - * @instance - */ - CloudConversationDebuggingInfo.prototype.bargeinEventTriggered = false; - - /** - * CloudConversationDebuggingInfo speechSingleUtterance. - * @member {boolean} speechSingleUtterance - * @memberof google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo - * @instance - */ - CloudConversationDebuggingInfo.prototype.speechSingleUtterance = false; - - /** - * CloudConversationDebuggingInfo dtmfPartialResultsTimes. - * @member {Array.} dtmfPartialResultsTimes - * @memberof google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo - * @instance - */ - CloudConversationDebuggingInfo.prototype.dtmfPartialResultsTimes = $util.emptyArray; - - /** - * CloudConversationDebuggingInfo dtmfFinalResultsTimes. - * @member {Array.} dtmfFinalResultsTimes - * @memberof google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo - * @instance - */ - CloudConversationDebuggingInfo.prototype.dtmfFinalResultsTimes = $util.emptyArray; - - /** - * CloudConversationDebuggingInfo singleUtteranceEndTimeOffset. - * @member {google.protobuf.IDuration|null|undefined} singleUtteranceEndTimeOffset - * @memberof google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo - * @instance - */ - CloudConversationDebuggingInfo.prototype.singleUtteranceEndTimeOffset = null; - - /** - * CloudConversationDebuggingInfo noSpeechTimeout. - * @member {google.protobuf.IDuration|null|undefined} noSpeechTimeout - * @memberof google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo - * @instance - */ - CloudConversationDebuggingInfo.prototype.noSpeechTimeout = null; - - /** - * CloudConversationDebuggingInfo endpointingTimeout. - * @member {google.protobuf.IDuration|null|undefined} endpointingTimeout - * @memberof google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo - * @instance - */ - CloudConversationDebuggingInfo.prototype.endpointingTimeout = null; - - /** - * CloudConversationDebuggingInfo isInputText. - * @member {boolean} isInputText - * @memberof google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo - * @instance - */ - CloudConversationDebuggingInfo.prototype.isInputText = false; - - /** - * CloudConversationDebuggingInfo clientHalfCloseTimeOffset. - * @member {google.protobuf.IDuration|null|undefined} clientHalfCloseTimeOffset - * @memberof google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo - * @instance - */ - CloudConversationDebuggingInfo.prototype.clientHalfCloseTimeOffset = null; - - /** - * CloudConversationDebuggingInfo clientHalfCloseStreamingTimeOffset. - * @member {google.protobuf.IDuration|null|undefined} clientHalfCloseStreamingTimeOffset - * @memberof google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo + * DeleteIntentRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.DeleteIntentRequest * @instance */ - CloudConversationDebuggingInfo.prototype.clientHalfCloseStreamingTimeOffset = null; + DeleteIntentRequest.prototype.name = ""; /** - * Creates a new CloudConversationDebuggingInfo instance using the specified properties. + * Creates a new DeleteIntentRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo + * @memberof google.cloud.dialogflow.cx.v3.DeleteIntentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.ICloudConversationDebuggingInfo=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo} CloudConversationDebuggingInfo instance + * @param {google.cloud.dialogflow.cx.v3.IDeleteIntentRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.DeleteIntentRequest} DeleteIntentRequest instance */ - CloudConversationDebuggingInfo.create = function create(properties) { - return new CloudConversationDebuggingInfo(properties); + DeleteIntentRequest.create = function create(properties) { + return new DeleteIntentRequest(properties); }; /** - * Encodes the specified CloudConversationDebuggingInfo message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo.verify|verify} messages. + * Encodes the specified DeleteIntentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteIntentRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo + * @memberof google.cloud.dialogflow.cx.v3.DeleteIntentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.ICloudConversationDebuggingInfo} message CloudConversationDebuggingInfo message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IDeleteIntentRequest} message DeleteIntentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CloudConversationDebuggingInfo.encode = function encode(message, writer) { + DeleteIntentRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.audioDataChunks != null && Object.hasOwnProperty.call(message, "audioDataChunks")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.audioDataChunks); - if (message.resultEndTimeOffset != null && Object.hasOwnProperty.call(message, "resultEndTimeOffset")) - $root.google.protobuf.Duration.encode(message.resultEndTimeOffset, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.firstAudioDuration != null && Object.hasOwnProperty.call(message, "firstAudioDuration")) - $root.google.protobuf.Duration.encode(message.firstAudioDuration, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.singleUtterance != null && Object.hasOwnProperty.call(message, "singleUtterance")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.singleUtterance); - if (message.speechPartialResultsEndTimes != null && message.speechPartialResultsEndTimes.length) - for (var i = 0; i < message.speechPartialResultsEndTimes.length; ++i) - $root.google.protobuf.Duration.encode(message.speechPartialResultsEndTimes[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.speechFinalResultsEndTimes != null && message.speechFinalResultsEndTimes.length) - for (var i = 0; i < message.speechFinalResultsEndTimes.length; ++i) - $root.google.protobuf.Duration.encode(message.speechFinalResultsEndTimes[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.partialResponses != null && Object.hasOwnProperty.call(message, "partialResponses")) - writer.uint32(/* id 8, wireType 0 =*/64).int32(message.partialResponses); - if (message.speakerIdPassiveLatencyMsOffset != null && Object.hasOwnProperty.call(message, "speakerIdPassiveLatencyMsOffset")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.speakerIdPassiveLatencyMsOffset); - if (message.bargeinEventTriggered != null && Object.hasOwnProperty.call(message, "bargeinEventTriggered")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.bargeinEventTriggered); - if (message.speechSingleUtterance != null && Object.hasOwnProperty.call(message, "speechSingleUtterance")) - writer.uint32(/* id 11, wireType 0 =*/88).bool(message.speechSingleUtterance); - if (message.dtmfPartialResultsTimes != null && message.dtmfPartialResultsTimes.length) - for (var i = 0; i < message.dtmfPartialResultsTimes.length; ++i) - $root.google.protobuf.Duration.encode(message.dtmfPartialResultsTimes[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.dtmfFinalResultsTimes != null && message.dtmfFinalResultsTimes.length) - for (var i = 0; i < message.dtmfFinalResultsTimes.length; ++i) - $root.google.protobuf.Duration.encode(message.dtmfFinalResultsTimes[i], writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); - if (message.singleUtteranceEndTimeOffset != null && Object.hasOwnProperty.call(message, "singleUtteranceEndTimeOffset")) - $root.google.protobuf.Duration.encode(message.singleUtteranceEndTimeOffset, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - if (message.noSpeechTimeout != null && Object.hasOwnProperty.call(message, "noSpeechTimeout")) - $root.google.protobuf.Duration.encode(message.noSpeechTimeout, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); - if (message.isInputText != null && Object.hasOwnProperty.call(message, "isInputText")) - writer.uint32(/* id 16, wireType 0 =*/128).bool(message.isInputText); - if (message.clientHalfCloseTimeOffset != null && Object.hasOwnProperty.call(message, "clientHalfCloseTimeOffset")) - $root.google.protobuf.Duration.encode(message.clientHalfCloseTimeOffset, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); - if (message.clientHalfCloseStreamingTimeOffset != null && Object.hasOwnProperty.call(message, "clientHalfCloseStreamingTimeOffset")) - $root.google.protobuf.Duration.encode(message.clientHalfCloseStreamingTimeOffset, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); - if (message.endpointingTimeout != null && Object.hasOwnProperty.call(message, "endpointingTimeout")) - $root.google.protobuf.Duration.encode(message.endpointingTimeout, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified CloudConversationDebuggingInfo message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo.verify|verify} messages. + * Encodes the specified DeleteIntentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteIntentRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo + * @memberof google.cloud.dialogflow.cx.v3.DeleteIntentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.ICloudConversationDebuggingInfo} message CloudConversationDebuggingInfo message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IDeleteIntentRequest} message DeleteIntentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CloudConversationDebuggingInfo.encodeDelimited = function encodeDelimited(message, writer) { + DeleteIntentRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CloudConversationDebuggingInfo message from the specified reader or buffer. + * Decodes a DeleteIntentRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo + * @memberof google.cloud.dialogflow.cx.v3.DeleteIntentRequest * @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.CloudConversationDebuggingInfo} CloudConversationDebuggingInfo + * @returns {google.cloud.dialogflow.cx.v3.DeleteIntentRequest} DeleteIntentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CloudConversationDebuggingInfo.decode = function decode(reader, length, error) { + DeleteIntentRequest.decode = function decode(reader, length, error) { 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.CloudConversationDebuggingInfo(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.DeleteIntentRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.audioDataChunks = reader.int32(); - break; - } - case 2: { - message.resultEndTimeOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 3: { - message.firstAudioDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 5: { - message.singleUtterance = reader.bool(); - break; - } - case 6: { - if (!(message.speechPartialResultsEndTimes && message.speechPartialResultsEndTimes.length)) - message.speechPartialResultsEndTimes = []; - message.speechPartialResultsEndTimes.push($root.google.protobuf.Duration.decode(reader, reader.uint32())); - break; - } - case 7: { - if (!(message.speechFinalResultsEndTimes && message.speechFinalResultsEndTimes.length)) - message.speechFinalResultsEndTimes = []; - message.speechFinalResultsEndTimes.push($root.google.protobuf.Duration.decode(reader, reader.uint32())); - break; - } - case 8: { - message.partialResponses = reader.int32(); - break; - } - case 9: { - message.speakerIdPassiveLatencyMsOffset = reader.int32(); - break; - } - case 10: { - message.bargeinEventTriggered = reader.bool(); - break; - } - case 11: { - message.speechSingleUtterance = reader.bool(); - break; - } - case 12: { - if (!(message.dtmfPartialResultsTimes && message.dtmfPartialResultsTimes.length)) - message.dtmfPartialResultsTimes = []; - message.dtmfPartialResultsTimes.push($root.google.protobuf.Duration.decode(reader, reader.uint32())); - break; - } - case 13: { - if (!(message.dtmfFinalResultsTimes && message.dtmfFinalResultsTimes.length)) - message.dtmfFinalResultsTimes = []; - message.dtmfFinalResultsTimes.push($root.google.protobuf.Duration.decode(reader, reader.uint32())); - break; - } - case 14: { - message.singleUtteranceEndTimeOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 15: { - message.noSpeechTimeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 19: { - message.endpointingTimeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 16: { - message.isInputText = reader.bool(); - break; - } - case 17: { - message.clientHalfCloseTimeOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 18: { - message.clientHalfCloseStreamingTimeOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + message.name = reader.string(); break; } default: @@ -61084,366 +60148,141 @@ }; /** - * Decodes a CloudConversationDebuggingInfo message from the specified reader or buffer, length delimited. + * Decodes a DeleteIntentRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo + * @memberof google.cloud.dialogflow.cx.v3.DeleteIntentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo} CloudConversationDebuggingInfo + * @returns {google.cloud.dialogflow.cx.v3.DeleteIntentRequest} DeleteIntentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CloudConversationDebuggingInfo.decodeDelimited = function decodeDelimited(reader) { + DeleteIntentRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CloudConversationDebuggingInfo message. + * Verifies a DeleteIntentRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo + * @memberof google.cloud.dialogflow.cx.v3.DeleteIntentRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CloudConversationDebuggingInfo.verify = function verify(message) { + DeleteIntentRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.audioDataChunks != null && message.hasOwnProperty("audioDataChunks")) - if (!$util.isInteger(message.audioDataChunks)) - return "audioDataChunks: integer expected"; - if (message.resultEndTimeOffset != null && message.hasOwnProperty("resultEndTimeOffset")) { - var error = $root.google.protobuf.Duration.verify(message.resultEndTimeOffset); - if (error) - return "resultEndTimeOffset." + error; - } - if (message.firstAudioDuration != null && message.hasOwnProperty("firstAudioDuration")) { - var error = $root.google.protobuf.Duration.verify(message.firstAudioDuration); - if (error) - return "firstAudioDuration." + error; - } - if (message.singleUtterance != null && message.hasOwnProperty("singleUtterance")) - if (typeof message.singleUtterance !== "boolean") - return "singleUtterance: boolean expected"; - if (message.speechPartialResultsEndTimes != null && message.hasOwnProperty("speechPartialResultsEndTimes")) { - if (!Array.isArray(message.speechPartialResultsEndTimes)) - return "speechPartialResultsEndTimes: array expected"; - for (var i = 0; i < message.speechPartialResultsEndTimes.length; ++i) { - var error = $root.google.protobuf.Duration.verify(message.speechPartialResultsEndTimes[i]); - if (error) - return "speechPartialResultsEndTimes." + error; - } - } - if (message.speechFinalResultsEndTimes != null && message.hasOwnProperty("speechFinalResultsEndTimes")) { - if (!Array.isArray(message.speechFinalResultsEndTimes)) - return "speechFinalResultsEndTimes: array expected"; - for (var i = 0; i < message.speechFinalResultsEndTimes.length; ++i) { - var error = $root.google.protobuf.Duration.verify(message.speechFinalResultsEndTimes[i]); - if (error) - return "speechFinalResultsEndTimes." + error; - } - } - if (message.partialResponses != null && message.hasOwnProperty("partialResponses")) - if (!$util.isInteger(message.partialResponses)) - return "partialResponses: integer expected"; - if (message.speakerIdPassiveLatencyMsOffset != null && message.hasOwnProperty("speakerIdPassiveLatencyMsOffset")) - if (!$util.isInteger(message.speakerIdPassiveLatencyMsOffset)) - return "speakerIdPassiveLatencyMsOffset: integer expected"; - if (message.bargeinEventTriggered != null && message.hasOwnProperty("bargeinEventTriggered")) - if (typeof message.bargeinEventTriggered !== "boolean") - return "bargeinEventTriggered: boolean expected"; - if (message.speechSingleUtterance != null && message.hasOwnProperty("speechSingleUtterance")) - if (typeof message.speechSingleUtterance !== "boolean") - return "speechSingleUtterance: boolean expected"; - if (message.dtmfPartialResultsTimes != null && message.hasOwnProperty("dtmfPartialResultsTimes")) { - if (!Array.isArray(message.dtmfPartialResultsTimes)) - return "dtmfPartialResultsTimes: array expected"; - for (var i = 0; i < message.dtmfPartialResultsTimes.length; ++i) { - var error = $root.google.protobuf.Duration.verify(message.dtmfPartialResultsTimes[i]); - if (error) - return "dtmfPartialResultsTimes." + error; - } - } - if (message.dtmfFinalResultsTimes != null && message.hasOwnProperty("dtmfFinalResultsTimes")) { - if (!Array.isArray(message.dtmfFinalResultsTimes)) - return "dtmfFinalResultsTimes: array expected"; - for (var i = 0; i < message.dtmfFinalResultsTimes.length; ++i) { - var error = $root.google.protobuf.Duration.verify(message.dtmfFinalResultsTimes[i]); - if (error) - return "dtmfFinalResultsTimes." + error; - } - } - if (message.singleUtteranceEndTimeOffset != null && message.hasOwnProperty("singleUtteranceEndTimeOffset")) { - var error = $root.google.protobuf.Duration.verify(message.singleUtteranceEndTimeOffset); - if (error) - return "singleUtteranceEndTimeOffset." + error; - } - if (message.noSpeechTimeout != null && message.hasOwnProperty("noSpeechTimeout")) { - var error = $root.google.protobuf.Duration.verify(message.noSpeechTimeout); - if (error) - return "noSpeechTimeout." + error; - } - if (message.endpointingTimeout != null && message.hasOwnProperty("endpointingTimeout")) { - var error = $root.google.protobuf.Duration.verify(message.endpointingTimeout); - if (error) - return "endpointingTimeout." + error; - } - if (message.isInputText != null && message.hasOwnProperty("isInputText")) - if (typeof message.isInputText !== "boolean") - return "isInputText: boolean expected"; - if (message.clientHalfCloseTimeOffset != null && message.hasOwnProperty("clientHalfCloseTimeOffset")) { - var error = $root.google.protobuf.Duration.verify(message.clientHalfCloseTimeOffset); - if (error) - return "clientHalfCloseTimeOffset." + error; - } - if (message.clientHalfCloseStreamingTimeOffset != null && message.hasOwnProperty("clientHalfCloseStreamingTimeOffset")) { - var error = $root.google.protobuf.Duration.verify(message.clientHalfCloseStreamingTimeOffset); - if (error) - return "clientHalfCloseStreamingTimeOffset." + error; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a CloudConversationDebuggingInfo message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteIntentRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo + * @memberof google.cloud.dialogflow.cx.v3.DeleteIntentRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo} CloudConversationDebuggingInfo + * @returns {google.cloud.dialogflow.cx.v3.DeleteIntentRequest} DeleteIntentRequest */ - CloudConversationDebuggingInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo) + DeleteIntentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.DeleteIntentRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo(); - if (object.audioDataChunks != null) - message.audioDataChunks = object.audioDataChunks | 0; - if (object.resultEndTimeOffset != null) { - if (typeof object.resultEndTimeOffset !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo.resultEndTimeOffset: object expected"); - message.resultEndTimeOffset = $root.google.protobuf.Duration.fromObject(object.resultEndTimeOffset); - } - if (object.firstAudioDuration != null) { - if (typeof object.firstAudioDuration !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo.firstAudioDuration: object expected"); - message.firstAudioDuration = $root.google.protobuf.Duration.fromObject(object.firstAudioDuration); - } - if (object.singleUtterance != null) - message.singleUtterance = Boolean(object.singleUtterance); - if (object.speechPartialResultsEndTimes) { - if (!Array.isArray(object.speechPartialResultsEndTimes)) - throw TypeError(".google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo.speechPartialResultsEndTimes: array expected"); - message.speechPartialResultsEndTimes = []; - for (var i = 0; i < object.speechPartialResultsEndTimes.length; ++i) { - if (typeof object.speechPartialResultsEndTimes[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo.speechPartialResultsEndTimes: object expected"); - message.speechPartialResultsEndTimes[i] = $root.google.protobuf.Duration.fromObject(object.speechPartialResultsEndTimes[i]); - } - } - if (object.speechFinalResultsEndTimes) { - if (!Array.isArray(object.speechFinalResultsEndTimes)) - throw TypeError(".google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo.speechFinalResultsEndTimes: array expected"); - message.speechFinalResultsEndTimes = []; - for (var i = 0; i < object.speechFinalResultsEndTimes.length; ++i) { - if (typeof object.speechFinalResultsEndTimes[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo.speechFinalResultsEndTimes: object expected"); - message.speechFinalResultsEndTimes[i] = $root.google.protobuf.Duration.fromObject(object.speechFinalResultsEndTimes[i]); - } - } - if (object.partialResponses != null) - message.partialResponses = object.partialResponses | 0; - if (object.speakerIdPassiveLatencyMsOffset != null) - message.speakerIdPassiveLatencyMsOffset = object.speakerIdPassiveLatencyMsOffset | 0; - if (object.bargeinEventTriggered != null) - message.bargeinEventTriggered = Boolean(object.bargeinEventTriggered); - if (object.speechSingleUtterance != null) - message.speechSingleUtterance = Boolean(object.speechSingleUtterance); - if (object.dtmfPartialResultsTimes) { - if (!Array.isArray(object.dtmfPartialResultsTimes)) - throw TypeError(".google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo.dtmfPartialResultsTimes: array expected"); - message.dtmfPartialResultsTimes = []; - for (var i = 0; i < object.dtmfPartialResultsTimes.length; ++i) { - if (typeof object.dtmfPartialResultsTimes[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo.dtmfPartialResultsTimes: object expected"); - message.dtmfPartialResultsTimes[i] = $root.google.protobuf.Duration.fromObject(object.dtmfPartialResultsTimes[i]); - } - } - if (object.dtmfFinalResultsTimes) { - if (!Array.isArray(object.dtmfFinalResultsTimes)) - throw TypeError(".google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo.dtmfFinalResultsTimes: array expected"); - message.dtmfFinalResultsTimes = []; - for (var i = 0; i < object.dtmfFinalResultsTimes.length; ++i) { - if (typeof object.dtmfFinalResultsTimes[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo.dtmfFinalResultsTimes: object expected"); - message.dtmfFinalResultsTimes[i] = $root.google.protobuf.Duration.fromObject(object.dtmfFinalResultsTimes[i]); - } - } - if (object.singleUtteranceEndTimeOffset != null) { - if (typeof object.singleUtteranceEndTimeOffset !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo.singleUtteranceEndTimeOffset: object expected"); - message.singleUtteranceEndTimeOffset = $root.google.protobuf.Duration.fromObject(object.singleUtteranceEndTimeOffset); - } - if (object.noSpeechTimeout != null) { - if (typeof object.noSpeechTimeout !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo.noSpeechTimeout: object expected"); - message.noSpeechTimeout = $root.google.protobuf.Duration.fromObject(object.noSpeechTimeout); - } - if (object.endpointingTimeout != null) { - if (typeof object.endpointingTimeout !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo.endpointingTimeout: object expected"); - message.endpointingTimeout = $root.google.protobuf.Duration.fromObject(object.endpointingTimeout); - } - if (object.isInputText != null) - message.isInputText = Boolean(object.isInputText); - if (object.clientHalfCloseTimeOffset != null) { - if (typeof object.clientHalfCloseTimeOffset !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo.clientHalfCloseTimeOffset: object expected"); - message.clientHalfCloseTimeOffset = $root.google.protobuf.Duration.fromObject(object.clientHalfCloseTimeOffset); - } - if (object.clientHalfCloseStreamingTimeOffset != null) { - if (typeof object.clientHalfCloseStreamingTimeOffset !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo.clientHalfCloseStreamingTimeOffset: object expected"); - message.clientHalfCloseStreamingTimeOffset = $root.google.protobuf.Duration.fromObject(object.clientHalfCloseStreamingTimeOffset); - } + var message = new $root.google.cloud.dialogflow.cx.v3.DeleteIntentRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a CloudConversationDebuggingInfo message. Also converts values to other types if specified. + * Creates a plain object from a DeleteIntentRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo + * @memberof google.cloud.dialogflow.cx.v3.DeleteIntentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo} message CloudConversationDebuggingInfo + * @param {google.cloud.dialogflow.cx.v3.DeleteIntentRequest} message DeleteIntentRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CloudConversationDebuggingInfo.toObject = function toObject(message, options) { + DeleteIntentRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.speechPartialResultsEndTimes = []; - object.speechFinalResultsEndTimes = []; - object.dtmfPartialResultsTimes = []; - object.dtmfFinalResultsTimes = []; - } - if (options.defaults) { - object.audioDataChunks = 0; - object.resultEndTimeOffset = null; - object.firstAudioDuration = null; - object.singleUtterance = false; - object.partialResponses = 0; - object.speakerIdPassiveLatencyMsOffset = 0; - object.bargeinEventTriggered = false; - object.speechSingleUtterance = false; - object.singleUtteranceEndTimeOffset = null; - object.noSpeechTimeout = null; - object.isInputText = false; - object.clientHalfCloseTimeOffset = null; - object.clientHalfCloseStreamingTimeOffset = null; - object.endpointingTimeout = null; - } - if (message.audioDataChunks != null && message.hasOwnProperty("audioDataChunks")) - object.audioDataChunks = message.audioDataChunks; - if (message.resultEndTimeOffset != null && message.hasOwnProperty("resultEndTimeOffset")) - object.resultEndTimeOffset = $root.google.protobuf.Duration.toObject(message.resultEndTimeOffset, options); - if (message.firstAudioDuration != null && message.hasOwnProperty("firstAudioDuration")) - object.firstAudioDuration = $root.google.protobuf.Duration.toObject(message.firstAudioDuration, options); - if (message.singleUtterance != null && message.hasOwnProperty("singleUtterance")) - object.singleUtterance = message.singleUtterance; - if (message.speechPartialResultsEndTimes && message.speechPartialResultsEndTimes.length) { - object.speechPartialResultsEndTimes = []; - for (var j = 0; j < message.speechPartialResultsEndTimes.length; ++j) - object.speechPartialResultsEndTimes[j] = $root.google.protobuf.Duration.toObject(message.speechPartialResultsEndTimes[j], options); - } - if (message.speechFinalResultsEndTimes && message.speechFinalResultsEndTimes.length) { - object.speechFinalResultsEndTimes = []; - for (var j = 0; j < message.speechFinalResultsEndTimes.length; ++j) - object.speechFinalResultsEndTimes[j] = $root.google.protobuf.Duration.toObject(message.speechFinalResultsEndTimes[j], options); - } - if (message.partialResponses != null && message.hasOwnProperty("partialResponses")) - object.partialResponses = message.partialResponses; - if (message.speakerIdPassiveLatencyMsOffset != null && message.hasOwnProperty("speakerIdPassiveLatencyMsOffset")) - object.speakerIdPassiveLatencyMsOffset = message.speakerIdPassiveLatencyMsOffset; - if (message.bargeinEventTriggered != null && message.hasOwnProperty("bargeinEventTriggered")) - object.bargeinEventTriggered = message.bargeinEventTriggered; - if (message.speechSingleUtterance != null && message.hasOwnProperty("speechSingleUtterance")) - object.speechSingleUtterance = message.speechSingleUtterance; - if (message.dtmfPartialResultsTimes && message.dtmfPartialResultsTimes.length) { - object.dtmfPartialResultsTimes = []; - for (var j = 0; j < message.dtmfPartialResultsTimes.length; ++j) - object.dtmfPartialResultsTimes[j] = $root.google.protobuf.Duration.toObject(message.dtmfPartialResultsTimes[j], options); - } - if (message.dtmfFinalResultsTimes && message.dtmfFinalResultsTimes.length) { - object.dtmfFinalResultsTimes = []; - for (var j = 0; j < message.dtmfFinalResultsTimes.length; ++j) - object.dtmfFinalResultsTimes[j] = $root.google.protobuf.Duration.toObject(message.dtmfFinalResultsTimes[j], options); - } - if (message.singleUtteranceEndTimeOffset != null && message.hasOwnProperty("singleUtteranceEndTimeOffset")) - object.singleUtteranceEndTimeOffset = $root.google.protobuf.Duration.toObject(message.singleUtteranceEndTimeOffset, options); - if (message.noSpeechTimeout != null && message.hasOwnProperty("noSpeechTimeout")) - object.noSpeechTimeout = $root.google.protobuf.Duration.toObject(message.noSpeechTimeout, options); - if (message.isInputText != null && message.hasOwnProperty("isInputText")) - object.isInputText = message.isInputText; - if (message.clientHalfCloseTimeOffset != null && message.hasOwnProperty("clientHalfCloseTimeOffset")) - object.clientHalfCloseTimeOffset = $root.google.protobuf.Duration.toObject(message.clientHalfCloseTimeOffset, options); - if (message.clientHalfCloseStreamingTimeOffset != null && message.hasOwnProperty("clientHalfCloseStreamingTimeOffset")) - object.clientHalfCloseStreamingTimeOffset = $root.google.protobuf.Duration.toObject(message.clientHalfCloseStreamingTimeOffset, options); - if (message.endpointingTimeout != null && message.hasOwnProperty("endpointingTimeout")) - object.endpointingTimeout = $root.google.protobuf.Duration.toObject(message.endpointingTimeout, options); + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this CloudConversationDebuggingInfo to JSON. + * Converts this DeleteIntentRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo + * @memberof google.cloud.dialogflow.cx.v3.DeleteIntentRequest * @instance * @returns {Object.} JSON object */ - CloudConversationDebuggingInfo.prototype.toJSON = function toJSON() { + DeleteIntentRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CloudConversationDebuggingInfo + * Gets the default type url for DeleteIntentRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo + * @memberof google.cloud.dialogflow.cx.v3.DeleteIntentRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CloudConversationDebuggingInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeleteIntentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.DeleteIntentRequest"; }; - return CloudConversationDebuggingInfo; + return DeleteIntentRequest; })(); - v3.StreamingDetectIntentResponse = (function() { + /** + * IntentView enum. + * @name google.cloud.dialogflow.cx.v3.IntentView + * @enum {number} + * @property {number} INTENT_VIEW_UNSPECIFIED=0 INTENT_VIEW_UNSPECIFIED value + * @property {number} INTENT_VIEW_PARTIAL=1 INTENT_VIEW_PARTIAL value + * @property {number} INTENT_VIEW_FULL=2 INTENT_VIEW_FULL value + */ + v3.IntentView = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "INTENT_VIEW_UNSPECIFIED"] = 0; + values[valuesById[1] = "INTENT_VIEW_PARTIAL"] = 1; + values[valuesById[2] = "INTENT_VIEW_FULL"] = 2; + return values; + })(); + + v3.ImportIntentsRequest = (function() { /** - * Properties of a StreamingDetectIntentResponse. + * Properties of an ImportIntentsRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IStreamingDetectIntentResponse - * @property {google.cloud.dialogflow.cx.v3.IStreamingRecognitionResult|null} [recognitionResult] StreamingDetectIntentResponse recognitionResult - * @property {google.cloud.dialogflow.cx.v3.IDetectIntentResponse|null} [detectIntentResponse] StreamingDetectIntentResponse detectIntentResponse - * @property {google.cloud.dialogflow.cx.v3.ICloudConversationDebuggingInfo|null} [debuggingInfo] StreamingDetectIntentResponse debuggingInfo + * @interface IImportIntentsRequest + * @property {string|null} [parent] ImportIntentsRequest parent + * @property {string|null} [intentsUri] ImportIntentsRequest intentsUri + * @property {google.cloud.dialogflow.cx.v3.IInlineSource|null} [intentsContent] ImportIntentsRequest intentsContent + * @property {google.cloud.dialogflow.cx.v3.ImportIntentsRequest.MergeOption|null} [mergeOption] ImportIntentsRequest mergeOption */ /** - * Constructs a new StreamingDetectIntentResponse. + * Constructs a new ImportIntentsRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a StreamingDetectIntentResponse. - * @implements IStreamingDetectIntentResponse + * @classdesc Represents an ImportIntentsRequest. + * @implements IImportIntentsRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IStreamingDetectIntentResponse=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IImportIntentsRequest=} [properties] Properties to set */ - function StreamingDetectIntentResponse(properties) { + function ImportIntentsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -61451,119 +60290,133 @@ } /** - * StreamingDetectIntentResponse recognitionResult. - * @member {google.cloud.dialogflow.cx.v3.IStreamingRecognitionResult|null|undefined} recognitionResult - * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse + * ImportIntentsRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsRequest * @instance */ - StreamingDetectIntentResponse.prototype.recognitionResult = null; + ImportIntentsRequest.prototype.parent = ""; /** - * StreamingDetectIntentResponse detectIntentResponse. - * @member {google.cloud.dialogflow.cx.v3.IDetectIntentResponse|null|undefined} detectIntentResponse - * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse + * ImportIntentsRequest intentsUri. + * @member {string|null|undefined} intentsUri + * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsRequest * @instance */ - StreamingDetectIntentResponse.prototype.detectIntentResponse = null; + ImportIntentsRequest.prototype.intentsUri = null; /** - * StreamingDetectIntentResponse debuggingInfo. - * @member {google.cloud.dialogflow.cx.v3.ICloudConversationDebuggingInfo|null|undefined} debuggingInfo - * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse + * ImportIntentsRequest intentsContent. + * @member {google.cloud.dialogflow.cx.v3.IInlineSource|null|undefined} intentsContent + * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsRequest * @instance */ - StreamingDetectIntentResponse.prototype.debuggingInfo = null; + ImportIntentsRequest.prototype.intentsContent = null; + + /** + * ImportIntentsRequest mergeOption. + * @member {google.cloud.dialogflow.cx.v3.ImportIntentsRequest.MergeOption} mergeOption + * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsRequest + * @instance + */ + ImportIntentsRequest.prototype.mergeOption = 0; // OneOf field names bound to virtual getters and setters var $oneOfFields; /** - * StreamingDetectIntentResponse response. - * @member {"recognitionResult"|"detectIntentResponse"|undefined} response - * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse + * ImportIntentsRequest intents. + * @member {"intentsUri"|"intentsContent"|undefined} intents + * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsRequest * @instance */ - Object.defineProperty(StreamingDetectIntentResponse.prototype, "response", { - get: $util.oneOfGetter($oneOfFields = ["recognitionResult", "detectIntentResponse"]), + Object.defineProperty(ImportIntentsRequest.prototype, "intents", { + get: $util.oneOfGetter($oneOfFields = ["intentsUri", "intentsContent"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new StreamingDetectIntentResponse instance using the specified properties. + * Creates a new ImportIntentsRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse + * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IStreamingDetectIntentResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse} StreamingDetectIntentResponse instance + * @param {google.cloud.dialogflow.cx.v3.IImportIntentsRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ImportIntentsRequest} ImportIntentsRequest instance */ - StreamingDetectIntentResponse.create = function create(properties) { - return new StreamingDetectIntentResponse(properties); + ImportIntentsRequest.create = function create(properties) { + return new ImportIntentsRequest(properties); }; /** - * Encodes the specified StreamingDetectIntentResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse.verify|verify} messages. + * Encodes the specified ImportIntentsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportIntentsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse + * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IStreamingDetectIntentResponse} message StreamingDetectIntentResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IImportIntentsRequest} message ImportIntentsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StreamingDetectIntentResponse.encode = function encode(message, writer) { + ImportIntentsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.recognitionResult != null && Object.hasOwnProperty.call(message, "recognitionResult")) - $root.google.cloud.dialogflow.cx.v3.StreamingRecognitionResult.encode(message.recognitionResult, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.detectIntentResponse != null && Object.hasOwnProperty.call(message, "detectIntentResponse")) - $root.google.cloud.dialogflow.cx.v3.DetectIntentResponse.encode(message.detectIntentResponse, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.debuggingInfo != null && Object.hasOwnProperty.call(message, "debuggingInfo")) - $root.google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo.encode(message.debuggingInfo, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.intentsUri != null && Object.hasOwnProperty.call(message, "intentsUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.intentsUri); + if (message.intentsContent != null && Object.hasOwnProperty.call(message, "intentsContent")) + $root.google.cloud.dialogflow.cx.v3.InlineSource.encode(message.intentsContent, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.mergeOption != null && Object.hasOwnProperty.call(message, "mergeOption")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.mergeOption); return writer; }; /** - * Encodes the specified StreamingDetectIntentResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse.verify|verify} messages. + * Encodes the specified ImportIntentsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportIntentsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse + * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IStreamingDetectIntentResponse} message StreamingDetectIntentResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IImportIntentsRequest} message ImportIntentsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StreamingDetectIntentResponse.encodeDelimited = function encodeDelimited(message, writer) { + ImportIntentsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a StreamingDetectIntentResponse message from the specified reader or buffer. + * Decodes an ImportIntentsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse + * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsRequest * @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.StreamingDetectIntentResponse} StreamingDetectIntentResponse + * @returns {google.cloud.dialogflow.cx.v3.ImportIntentsRequest} ImportIntentsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StreamingDetectIntentResponse.decode = function decode(reader, length, error) { + ImportIntentsRequest.decode = function decode(reader, length, error) { 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.StreamingDetectIntentResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ImportIntentsRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.recognitionResult = $root.google.cloud.dialogflow.cx.v3.StreamingRecognitionResult.decode(reader, reader.uint32()); + message.parent = reader.string(); break; } case 2: { - message.detectIntentResponse = $root.google.cloud.dialogflow.cx.v3.DetectIntentResponse.decode(reader, reader.uint32()); + message.intentsUri = reader.string(); + break; + } + case 3: { + message.intentsContent = $root.google.cloud.dialogflow.cx.v3.InlineSource.decode(reader, reader.uint32()); break; } case 4: { - message.debuggingInfo = $root.google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo.decode(reader, reader.uint32()); + message.mergeOption = reader.int32(); break; } default: @@ -61575,174 +60428,234 @@ }; /** - * Decodes a StreamingDetectIntentResponse message from the specified reader or buffer, length delimited. + * Decodes an ImportIntentsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse + * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse} StreamingDetectIntentResponse + * @returns {google.cloud.dialogflow.cx.v3.ImportIntentsRequest} ImportIntentsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StreamingDetectIntentResponse.decodeDelimited = function decodeDelimited(reader) { + ImportIntentsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a StreamingDetectIntentResponse message. + * Verifies an ImportIntentsRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse + * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - StreamingDetectIntentResponse.verify = function verify(message) { + ImportIntentsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; - if (message.recognitionResult != null && message.hasOwnProperty("recognitionResult")) { - properties.response = 1; - { - var error = $root.google.cloud.dialogflow.cx.v3.StreamingRecognitionResult.verify(message.recognitionResult); - if (error) - return "recognitionResult." + error; - } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.intentsUri != null && message.hasOwnProperty("intentsUri")) { + properties.intents = 1; + if (!$util.isString(message.intentsUri)) + return "intentsUri: string expected"; } - if (message.detectIntentResponse != null && message.hasOwnProperty("detectIntentResponse")) { - if (properties.response === 1) - return "response: multiple values"; - properties.response = 1; + if (message.intentsContent != null && message.hasOwnProperty("intentsContent")) { + if (properties.intents === 1) + return "intents: multiple values"; + properties.intents = 1; { - var error = $root.google.cloud.dialogflow.cx.v3.DetectIntentResponse.verify(message.detectIntentResponse); + var error = $root.google.cloud.dialogflow.cx.v3.InlineSource.verify(message.intentsContent); if (error) - return "detectIntentResponse." + error; + return "intentsContent." + error; } } - if (message.debuggingInfo != null && message.hasOwnProperty("debuggingInfo")) { - var error = $root.google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo.verify(message.debuggingInfo); - if (error) - return "debuggingInfo." + error; - } + if (message.mergeOption != null && message.hasOwnProperty("mergeOption")) + switch (message.mergeOption) { + default: + return "mergeOption: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } return null; }; /** - * Creates a StreamingDetectIntentResponse message from a plain object. Also converts values to their respective internal types. + * Creates an ImportIntentsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse + * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse} StreamingDetectIntentResponse + * @returns {google.cloud.dialogflow.cx.v3.ImportIntentsRequest} ImportIntentsRequest */ - StreamingDetectIntentResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse) + ImportIntentsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ImportIntentsRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse(); - if (object.recognitionResult != null) { - if (typeof object.recognitionResult !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse.recognitionResult: object expected"); - message.recognitionResult = $root.google.cloud.dialogflow.cx.v3.StreamingRecognitionResult.fromObject(object.recognitionResult); - } - if (object.detectIntentResponse != null) { - if (typeof object.detectIntentResponse !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse.detectIntentResponse: object expected"); - message.detectIntentResponse = $root.google.cloud.dialogflow.cx.v3.DetectIntentResponse.fromObject(object.detectIntentResponse); + var message = new $root.google.cloud.dialogflow.cx.v3.ImportIntentsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.intentsUri != null) + message.intentsUri = String(object.intentsUri); + if (object.intentsContent != null) { + if (typeof object.intentsContent !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.ImportIntentsRequest.intentsContent: object expected"); + message.intentsContent = $root.google.cloud.dialogflow.cx.v3.InlineSource.fromObject(object.intentsContent); } - if (object.debuggingInfo != null) { - if (typeof object.debuggingInfo !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse.debuggingInfo: object expected"); - message.debuggingInfo = $root.google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo.fromObject(object.debuggingInfo); + switch (object.mergeOption) { + default: + if (typeof object.mergeOption === "number") { + message.mergeOption = object.mergeOption; + break; + } + break; + case "MERGE_OPTION_UNSPECIFIED": + case 0: + message.mergeOption = 0; + break; + case "REJECT": + case 1: + message.mergeOption = 1; + break; + case "REPLACE": + case 2: + message.mergeOption = 2; + break; + case "MERGE": + case 3: + message.mergeOption = 3; + break; + case "RENAME": + case 4: + message.mergeOption = 4; + break; + case "REPORT_CONFLICT": + case 5: + message.mergeOption = 5; + break; + case "KEEP": + case 6: + message.mergeOption = 6; + break; } return message; }; /** - * Creates a plain object from a StreamingDetectIntentResponse message. Also converts values to other types if specified. + * Creates a plain object from an ImportIntentsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse + * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse} message StreamingDetectIntentResponse + * @param {google.cloud.dialogflow.cx.v3.ImportIntentsRequest} message ImportIntentsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StreamingDetectIntentResponse.toObject = function toObject(message, options) { + ImportIntentsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.debuggingInfo = null; - if (message.recognitionResult != null && message.hasOwnProperty("recognitionResult")) { - object.recognitionResult = $root.google.cloud.dialogflow.cx.v3.StreamingRecognitionResult.toObject(message.recognitionResult, options); + if (options.defaults) { + object.parent = ""; + object.mergeOption = options.enums === String ? "MERGE_OPTION_UNSPECIFIED" : 0; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.intentsUri != null && message.hasOwnProperty("intentsUri")) { + object.intentsUri = message.intentsUri; if (options.oneofs) - object.response = "recognitionResult"; + object.intents = "intentsUri"; } - if (message.detectIntentResponse != null && message.hasOwnProperty("detectIntentResponse")) { - object.detectIntentResponse = $root.google.cloud.dialogflow.cx.v3.DetectIntentResponse.toObject(message.detectIntentResponse, options); + if (message.intentsContent != null && message.hasOwnProperty("intentsContent")) { + object.intentsContent = $root.google.cloud.dialogflow.cx.v3.InlineSource.toObject(message.intentsContent, options); if (options.oneofs) - object.response = "detectIntentResponse"; + object.intents = "intentsContent"; } - if (message.debuggingInfo != null && message.hasOwnProperty("debuggingInfo")) - object.debuggingInfo = $root.google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo.toObject(message.debuggingInfo, options); + if (message.mergeOption != null && message.hasOwnProperty("mergeOption")) + object.mergeOption = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.ImportIntentsRequest.MergeOption[message.mergeOption] === undefined ? message.mergeOption : $root.google.cloud.dialogflow.cx.v3.ImportIntentsRequest.MergeOption[message.mergeOption] : message.mergeOption; return object; }; /** - * Converts this StreamingDetectIntentResponse to JSON. + * Converts this ImportIntentsRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse + * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsRequest * @instance * @returns {Object.} JSON object */ - StreamingDetectIntentResponse.prototype.toJSON = function toJSON() { + ImportIntentsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for StreamingDetectIntentResponse + * Gets the default type url for ImportIntentsRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse + * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - StreamingDetectIntentResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ImportIntentsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ImportIntentsRequest"; }; - return StreamingDetectIntentResponse; + /** + * MergeOption enum. + * @name google.cloud.dialogflow.cx.v3.ImportIntentsRequest.MergeOption + * @enum {number} + * @property {number} MERGE_OPTION_UNSPECIFIED=0 MERGE_OPTION_UNSPECIFIED value + * @property {number} REJECT=1 REJECT value + * @property {number} REPLACE=2 REPLACE value + * @property {number} MERGE=3 MERGE value + * @property {number} RENAME=4 RENAME value + * @property {number} REPORT_CONFLICT=5 REPORT_CONFLICT value + * @property {number} KEEP=6 KEEP value + */ + ImportIntentsRequest.MergeOption = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MERGE_OPTION_UNSPECIFIED"] = 0; + values[valuesById[1] = "REJECT"] = 1; + values[valuesById[2] = "REPLACE"] = 2; + values[valuesById[3] = "MERGE"] = 3; + values[valuesById[4] = "RENAME"] = 4; + values[valuesById[5] = "REPORT_CONFLICT"] = 5; + values[valuesById[6] = "KEEP"] = 6; + return values; + })(); + + return ImportIntentsRequest; })(); - v3.StreamingRecognitionResult = (function() { + v3.ImportIntentsResponse = (function() { /** - * Properties of a StreamingRecognitionResult. + * Properties of an ImportIntentsResponse. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IStreamingRecognitionResult - * @property {google.cloud.dialogflow.cx.v3.StreamingRecognitionResult.MessageType|null} [messageType] StreamingRecognitionResult messageType - * @property {string|null} [transcript] StreamingRecognitionResult transcript - * @property {boolean|null} [isFinal] StreamingRecognitionResult isFinal - * @property {number|null} [confidence] StreamingRecognitionResult confidence - * @property {number|null} [stability] StreamingRecognitionResult stability - * @property {Array.|null} [speechWordInfo] StreamingRecognitionResult speechWordInfo - * @property {google.protobuf.IDuration|null} [speechEndOffset] StreamingRecognitionResult speechEndOffset - * @property {string|null} [languageCode] StreamingRecognitionResult languageCode + * @interface IImportIntentsResponse + * @property {Array.|null} [intents] ImportIntentsResponse intents + * @property {google.cloud.dialogflow.cx.v3.ImportIntentsResponse.IConflictingResources|null} [conflictingResources] ImportIntentsResponse conflictingResources */ /** - * Constructs a new StreamingRecognitionResult. + * Constructs a new ImportIntentsResponse. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a StreamingRecognitionResult. - * @implements IStreamingRecognitionResult + * @classdesc Represents an ImportIntentsResponse. + * @implements IImportIntentsResponse * @constructor - * @param {google.cloud.dialogflow.cx.v3.IStreamingRecognitionResult=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IImportIntentsResponse=} [properties] Properties to set */ - function StreamingRecognitionResult(properties) { - this.speechWordInfo = []; + function ImportIntentsResponse(properties) { + this.intents = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -61750,178 +60663,94 @@ } /** - * StreamingRecognitionResult messageType. - * @member {google.cloud.dialogflow.cx.v3.StreamingRecognitionResult.MessageType} messageType - * @memberof google.cloud.dialogflow.cx.v3.StreamingRecognitionResult - * @instance - */ - StreamingRecognitionResult.prototype.messageType = 0; - - /** - * StreamingRecognitionResult transcript. - * @member {string} transcript - * @memberof google.cloud.dialogflow.cx.v3.StreamingRecognitionResult - * @instance - */ - StreamingRecognitionResult.prototype.transcript = ""; - - /** - * StreamingRecognitionResult isFinal. - * @member {boolean} isFinal - * @memberof google.cloud.dialogflow.cx.v3.StreamingRecognitionResult - * @instance - */ - StreamingRecognitionResult.prototype.isFinal = false; - - /** - * StreamingRecognitionResult confidence. - * @member {number} confidence - * @memberof google.cloud.dialogflow.cx.v3.StreamingRecognitionResult - * @instance - */ - StreamingRecognitionResult.prototype.confidence = 0; - - /** - * StreamingRecognitionResult stability. - * @member {number} stability - * @memberof google.cloud.dialogflow.cx.v3.StreamingRecognitionResult - * @instance - */ - StreamingRecognitionResult.prototype.stability = 0; - - /** - * StreamingRecognitionResult speechWordInfo. - * @member {Array.} speechWordInfo - * @memberof google.cloud.dialogflow.cx.v3.StreamingRecognitionResult - * @instance - */ - StreamingRecognitionResult.prototype.speechWordInfo = $util.emptyArray; - - /** - * StreamingRecognitionResult speechEndOffset. - * @member {google.protobuf.IDuration|null|undefined} speechEndOffset - * @memberof google.cloud.dialogflow.cx.v3.StreamingRecognitionResult + * ImportIntentsResponse intents. + * @member {Array.} intents + * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsResponse * @instance */ - StreamingRecognitionResult.prototype.speechEndOffset = null; + ImportIntentsResponse.prototype.intents = $util.emptyArray; /** - * StreamingRecognitionResult languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3.StreamingRecognitionResult + * ImportIntentsResponse conflictingResources. + * @member {google.cloud.dialogflow.cx.v3.ImportIntentsResponse.IConflictingResources|null|undefined} conflictingResources + * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsResponse * @instance */ - StreamingRecognitionResult.prototype.languageCode = ""; + ImportIntentsResponse.prototype.conflictingResources = null; /** - * Creates a new StreamingRecognitionResult instance using the specified properties. + * Creates a new ImportIntentsResponse instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.StreamingRecognitionResult + * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IStreamingRecognitionResult=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.StreamingRecognitionResult} StreamingRecognitionResult instance + * @param {google.cloud.dialogflow.cx.v3.IImportIntentsResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ImportIntentsResponse} ImportIntentsResponse instance */ - StreamingRecognitionResult.create = function create(properties) { - return new StreamingRecognitionResult(properties); + ImportIntentsResponse.create = function create(properties) { + return new ImportIntentsResponse(properties); }; /** - * Encodes the specified StreamingRecognitionResult message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.StreamingRecognitionResult.verify|verify} messages. + * Encodes the specified ImportIntentsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportIntentsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.StreamingRecognitionResult + * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IStreamingRecognitionResult} message StreamingRecognitionResult message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IImportIntentsResponse} message ImportIntentsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StreamingRecognitionResult.encode = function encode(message, writer) { + ImportIntentsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.messageType != null && Object.hasOwnProperty.call(message, "messageType")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.messageType); - if (message.transcript != null && Object.hasOwnProperty.call(message, "transcript")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.transcript); - if (message.isFinal != null && Object.hasOwnProperty.call(message, "isFinal")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.isFinal); - if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) - writer.uint32(/* id 4, wireType 5 =*/37).float(message.confidence); - if (message.stability != null && Object.hasOwnProperty.call(message, "stability")) - writer.uint32(/* id 6, wireType 5 =*/53).float(message.stability); - if (message.speechWordInfo != null && message.speechWordInfo.length) - for (var i = 0; i < message.speechWordInfo.length; ++i) - $root.google.cloud.dialogflow.cx.v3.SpeechWordInfo.encode(message.speechWordInfo[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.speechEndOffset != null && Object.hasOwnProperty.call(message, "speechEndOffset")) - $root.google.protobuf.Duration.encode(message.speechEndOffset, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.languageCode); + if (message.intents != null && message.intents.length) + for (var i = 0; i < message.intents.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.intents[i]); + if (message.conflictingResources != null && Object.hasOwnProperty.call(message, "conflictingResources")) + $root.google.cloud.dialogflow.cx.v3.ImportIntentsResponse.ConflictingResources.encode(message.conflictingResources, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified StreamingRecognitionResult message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.StreamingRecognitionResult.verify|verify} messages. + * Encodes the specified ImportIntentsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportIntentsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.StreamingRecognitionResult + * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IStreamingRecognitionResult} message StreamingRecognitionResult message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IImportIntentsResponse} message ImportIntentsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StreamingRecognitionResult.encodeDelimited = function encodeDelimited(message, writer) { + ImportIntentsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a StreamingRecognitionResult message from the specified reader or buffer. + * Decodes an ImportIntentsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.StreamingRecognitionResult + * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsResponse * @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.StreamingRecognitionResult} StreamingRecognitionResult + * @returns {google.cloud.dialogflow.cx.v3.ImportIntentsResponse} ImportIntentsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StreamingRecognitionResult.decode = function decode(reader, length, error) { + ImportIntentsResponse.decode = function decode(reader, length, error) { 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.StreamingRecognitionResult(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ImportIntentsResponse(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.messageType = reader.int32(); + if (!(message.intents && message.intents.length)) + message.intents = []; + message.intents.push(reader.string()); break; } case 2: { - message.transcript = reader.string(); - break; - } - case 3: { - message.isFinal = reader.bool(); - break; - } - case 4: { - message.confidence = reader.float(); - break; - } - case 6: { - message.stability = reader.float(); - break; - } - case 7: { - if (!(message.speechWordInfo && message.speechWordInfo.length)) - message.speechWordInfo = []; - message.speechWordInfo.push($root.google.cloud.dialogflow.cx.v3.SpeechWordInfo.decode(reader, reader.uint32())); - break; - } - case 8: { - message.speechEndOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 10: { - message.languageCode = reader.string(); + message.conflictingResources = $root.google.cloud.dialogflow.cx.v3.ImportIntentsResponse.ConflictingResources.decode(reader, reader.uint32()); break; } default: @@ -61933,259 +60762,408 @@ }; /** - * Decodes a StreamingRecognitionResult message from the specified reader or buffer, length delimited. + * Decodes an ImportIntentsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.StreamingRecognitionResult + * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.StreamingRecognitionResult} StreamingRecognitionResult + * @returns {google.cloud.dialogflow.cx.v3.ImportIntentsResponse} ImportIntentsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StreamingRecognitionResult.decodeDelimited = function decodeDelimited(reader) { + ImportIntentsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a StreamingRecognitionResult message. + * Verifies an ImportIntentsResponse message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.StreamingRecognitionResult + * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - StreamingRecognitionResult.verify = function verify(message) { + ImportIntentsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.messageType != null && message.hasOwnProperty("messageType")) - switch (message.messageType) { - default: - return "messageType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.transcript != null && message.hasOwnProperty("transcript")) - if (!$util.isString(message.transcript)) - return "transcript: string expected"; - if (message.isFinal != null && message.hasOwnProperty("isFinal")) - if (typeof message.isFinal !== "boolean") - return "isFinal: boolean expected"; - if (message.confidence != null && message.hasOwnProperty("confidence")) - if (typeof message.confidence !== "number") - return "confidence: number expected"; - if (message.stability != null && message.hasOwnProperty("stability")) - if (typeof message.stability !== "number") - return "stability: number expected"; - if (message.speechWordInfo != null && message.hasOwnProperty("speechWordInfo")) { - if (!Array.isArray(message.speechWordInfo)) - return "speechWordInfo: array expected"; - for (var i = 0; i < message.speechWordInfo.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.SpeechWordInfo.verify(message.speechWordInfo[i]); - if (error) - return "speechWordInfo." + error; - } + if (message.intents != null && message.hasOwnProperty("intents")) { + if (!Array.isArray(message.intents)) + return "intents: array expected"; + for (var i = 0; i < message.intents.length; ++i) + if (!$util.isString(message.intents[i])) + return "intents: string[] expected"; } - if (message.speechEndOffset != null && message.hasOwnProperty("speechEndOffset")) { - var error = $root.google.protobuf.Duration.verify(message.speechEndOffset); + if (message.conflictingResources != null && message.hasOwnProperty("conflictingResources")) { + var error = $root.google.cloud.dialogflow.cx.v3.ImportIntentsResponse.ConflictingResources.verify(message.conflictingResources); if (error) - return "speechEndOffset." + error; + return "conflictingResources." + error; } - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; return null; }; /** - * Creates a StreamingRecognitionResult message from a plain object. Also converts values to their respective internal types. + * Creates an ImportIntentsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.StreamingRecognitionResult + * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.StreamingRecognitionResult} StreamingRecognitionResult + * @returns {google.cloud.dialogflow.cx.v3.ImportIntentsResponse} ImportIntentsResponse */ - StreamingRecognitionResult.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.StreamingRecognitionResult) + ImportIntentsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ImportIntentsResponse) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.StreamingRecognitionResult(); - switch (object.messageType) { - default: - if (typeof object.messageType === "number") { - message.messageType = object.messageType; - break; - } - break; - case "MESSAGE_TYPE_UNSPECIFIED": - case 0: - message.messageType = 0; - break; - case "TRANSCRIPT": - case 1: - message.messageType = 1; - break; - case "END_OF_SINGLE_UTTERANCE": - case 2: - message.messageType = 2; - break; + var message = new $root.google.cloud.dialogflow.cx.v3.ImportIntentsResponse(); + if (object.intents) { + if (!Array.isArray(object.intents)) + throw TypeError(".google.cloud.dialogflow.cx.v3.ImportIntentsResponse.intents: array expected"); + message.intents = []; + for (var i = 0; i < object.intents.length; ++i) + message.intents[i] = String(object.intents[i]); } - if (object.transcript != null) - message.transcript = String(object.transcript); - if (object.isFinal != null) - message.isFinal = Boolean(object.isFinal); - if (object.confidence != null) - message.confidence = Number(object.confidence); - if (object.stability != null) - message.stability = Number(object.stability); - if (object.speechWordInfo) { - if (!Array.isArray(object.speechWordInfo)) - throw TypeError(".google.cloud.dialogflow.cx.v3.StreamingRecognitionResult.speechWordInfo: array expected"); - message.speechWordInfo = []; - for (var i = 0; i < object.speechWordInfo.length; ++i) { - if (typeof object.speechWordInfo[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.StreamingRecognitionResult.speechWordInfo: object expected"); - message.speechWordInfo[i] = $root.google.cloud.dialogflow.cx.v3.SpeechWordInfo.fromObject(object.speechWordInfo[i]); - } - } - if (object.speechEndOffset != null) { - if (typeof object.speechEndOffset !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.StreamingRecognitionResult.speechEndOffset: object expected"); - message.speechEndOffset = $root.google.protobuf.Duration.fromObject(object.speechEndOffset); + if (object.conflictingResources != null) { + if (typeof object.conflictingResources !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.ImportIntentsResponse.conflictingResources: object expected"); + message.conflictingResources = $root.google.cloud.dialogflow.cx.v3.ImportIntentsResponse.ConflictingResources.fromObject(object.conflictingResources); } - if (object.languageCode != null) - message.languageCode = String(object.languageCode); return message; }; /** - * Creates a plain object from a StreamingRecognitionResult message. Also converts values to other types if specified. + * Creates a plain object from an ImportIntentsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.StreamingRecognitionResult + * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsResponse * @static - * @param {google.cloud.dialogflow.cx.v3.StreamingRecognitionResult} message StreamingRecognitionResult + * @param {google.cloud.dialogflow.cx.v3.ImportIntentsResponse} message ImportIntentsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StreamingRecognitionResult.toObject = function toObject(message, options) { + ImportIntentsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.speechWordInfo = []; - if (options.defaults) { - object.messageType = options.enums === String ? "MESSAGE_TYPE_UNSPECIFIED" : 0; - object.transcript = ""; - object.isFinal = false; - object.confidence = 0; - object.stability = 0; - object.speechEndOffset = null; - object.languageCode = ""; - } - if (message.messageType != null && message.hasOwnProperty("messageType")) - object.messageType = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.StreamingRecognitionResult.MessageType[message.messageType] === undefined ? message.messageType : $root.google.cloud.dialogflow.cx.v3.StreamingRecognitionResult.MessageType[message.messageType] : message.messageType; - if (message.transcript != null && message.hasOwnProperty("transcript")) - object.transcript = message.transcript; - if (message.isFinal != null && message.hasOwnProperty("isFinal")) - object.isFinal = message.isFinal; - if (message.confidence != null && message.hasOwnProperty("confidence")) - object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence; - if (message.stability != null && message.hasOwnProperty("stability")) - object.stability = options.json && !isFinite(message.stability) ? String(message.stability) : message.stability; - if (message.speechWordInfo && message.speechWordInfo.length) { - object.speechWordInfo = []; - for (var j = 0; j < message.speechWordInfo.length; ++j) - object.speechWordInfo[j] = $root.google.cloud.dialogflow.cx.v3.SpeechWordInfo.toObject(message.speechWordInfo[j], options); + object.intents = []; + if (options.defaults) + object.conflictingResources = null; + if (message.intents && message.intents.length) { + object.intents = []; + for (var j = 0; j < message.intents.length; ++j) + object.intents[j] = message.intents[j]; } - if (message.speechEndOffset != null && message.hasOwnProperty("speechEndOffset")) - object.speechEndOffset = $root.google.protobuf.Duration.toObject(message.speechEndOffset, options); - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; + if (message.conflictingResources != null && message.hasOwnProperty("conflictingResources")) + object.conflictingResources = $root.google.cloud.dialogflow.cx.v3.ImportIntentsResponse.ConflictingResources.toObject(message.conflictingResources, options); return object; }; /** - * Converts this StreamingRecognitionResult to JSON. + * Converts this ImportIntentsResponse to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.StreamingRecognitionResult + * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsResponse * @instance * @returns {Object.} JSON object */ - StreamingRecognitionResult.prototype.toJSON = function toJSON() { + ImportIntentsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for StreamingRecognitionResult + * Gets the default type url for ImportIntentsResponse * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.StreamingRecognitionResult + * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - StreamingRecognitionResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ImportIntentsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.StreamingRecognitionResult"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ImportIntentsResponse"; }; - /** - * MessageType enum. - * @name google.cloud.dialogflow.cx.v3.StreamingRecognitionResult.MessageType - * @enum {number} - * @property {number} MESSAGE_TYPE_UNSPECIFIED=0 MESSAGE_TYPE_UNSPECIFIED value - * @property {number} TRANSCRIPT=1 TRANSCRIPT value - * @property {number} END_OF_SINGLE_UTTERANCE=2 END_OF_SINGLE_UTTERANCE value - */ - StreamingRecognitionResult.MessageType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MESSAGE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "TRANSCRIPT"] = 1; - values[valuesById[2] = "END_OF_SINGLE_UTTERANCE"] = 2; - return values; + ImportIntentsResponse.ConflictingResources = (function() { + + /** + * Properties of a ConflictingResources. + * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsResponse + * @interface IConflictingResources + * @property {Array.|null} [intentDisplayNames] ConflictingResources intentDisplayNames + * @property {Array.|null} [entityDisplayNames] ConflictingResources entityDisplayNames + */ + + /** + * Constructs a new ConflictingResources. + * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsResponse + * @classdesc Represents a ConflictingResources. + * @implements IConflictingResources + * @constructor + * @param {google.cloud.dialogflow.cx.v3.ImportIntentsResponse.IConflictingResources=} [properties] Properties to set + */ + function ConflictingResources(properties) { + this.intentDisplayNames = []; + this.entityDisplayNames = []; + 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]]; + } + + /** + * ConflictingResources intentDisplayNames. + * @member {Array.} intentDisplayNames + * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsResponse.ConflictingResources + * @instance + */ + ConflictingResources.prototype.intentDisplayNames = $util.emptyArray; + + /** + * ConflictingResources entityDisplayNames. + * @member {Array.} entityDisplayNames + * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsResponse.ConflictingResources + * @instance + */ + ConflictingResources.prototype.entityDisplayNames = $util.emptyArray; + + /** + * Creates a new ConflictingResources instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsResponse.ConflictingResources + * @static + * @param {google.cloud.dialogflow.cx.v3.ImportIntentsResponse.IConflictingResources=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ImportIntentsResponse.ConflictingResources} ConflictingResources instance + */ + ConflictingResources.create = function create(properties) { + return new ConflictingResources(properties); + }; + + /** + * Encodes the specified ConflictingResources message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportIntentsResponse.ConflictingResources.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsResponse.ConflictingResources + * @static + * @param {google.cloud.dialogflow.cx.v3.ImportIntentsResponse.IConflictingResources} message ConflictingResources message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConflictingResources.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.intentDisplayNames != null && message.intentDisplayNames.length) + for (var i = 0; i < message.intentDisplayNames.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.intentDisplayNames[i]); + if (message.entityDisplayNames != null && message.entityDisplayNames.length) + for (var i = 0; i < message.entityDisplayNames.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.entityDisplayNames[i]); + return writer; + }; + + /** + * Encodes the specified ConflictingResources message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportIntentsResponse.ConflictingResources.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsResponse.ConflictingResources + * @static + * @param {google.cloud.dialogflow.cx.v3.ImportIntentsResponse.IConflictingResources} message ConflictingResources message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConflictingResources.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConflictingResources message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsResponse.ConflictingResources + * @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.ImportIntentsResponse.ConflictingResources} ConflictingResources + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConflictingResources.decode = function decode(reader, length, error) { + 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.ImportIntentsResponse.ConflictingResources(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.intentDisplayNames && message.intentDisplayNames.length)) + message.intentDisplayNames = []; + message.intentDisplayNames.push(reader.string()); + break; + } + case 2: { + if (!(message.entityDisplayNames && message.entityDisplayNames.length)) + message.entityDisplayNames = []; + message.entityDisplayNames.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ConflictingResources message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsResponse.ConflictingResources + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.ImportIntentsResponse.ConflictingResources} ConflictingResources + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConflictingResources.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConflictingResources message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsResponse.ConflictingResources + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConflictingResources.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.intentDisplayNames != null && message.hasOwnProperty("intentDisplayNames")) { + if (!Array.isArray(message.intentDisplayNames)) + return "intentDisplayNames: array expected"; + for (var i = 0; i < message.intentDisplayNames.length; ++i) + if (!$util.isString(message.intentDisplayNames[i])) + return "intentDisplayNames: string[] expected"; + } + if (message.entityDisplayNames != null && message.hasOwnProperty("entityDisplayNames")) { + if (!Array.isArray(message.entityDisplayNames)) + return "entityDisplayNames: array expected"; + for (var i = 0; i < message.entityDisplayNames.length; ++i) + if (!$util.isString(message.entityDisplayNames[i])) + return "entityDisplayNames: string[] expected"; + } + return null; + }; + + /** + * Creates a ConflictingResources message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsResponse.ConflictingResources + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.ImportIntentsResponse.ConflictingResources} ConflictingResources + */ + ConflictingResources.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ImportIntentsResponse.ConflictingResources) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.ImportIntentsResponse.ConflictingResources(); + if (object.intentDisplayNames) { + if (!Array.isArray(object.intentDisplayNames)) + throw TypeError(".google.cloud.dialogflow.cx.v3.ImportIntentsResponse.ConflictingResources.intentDisplayNames: array expected"); + message.intentDisplayNames = []; + for (var i = 0; i < object.intentDisplayNames.length; ++i) + message.intentDisplayNames[i] = String(object.intentDisplayNames[i]); + } + if (object.entityDisplayNames) { + if (!Array.isArray(object.entityDisplayNames)) + throw TypeError(".google.cloud.dialogflow.cx.v3.ImportIntentsResponse.ConflictingResources.entityDisplayNames: array expected"); + message.entityDisplayNames = []; + for (var i = 0; i < object.entityDisplayNames.length; ++i) + message.entityDisplayNames[i] = String(object.entityDisplayNames[i]); + } + return message; + }; + + /** + * Creates a plain object from a ConflictingResources message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsResponse.ConflictingResources + * @static + * @param {google.cloud.dialogflow.cx.v3.ImportIntentsResponse.ConflictingResources} message ConflictingResources + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConflictingResources.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.intentDisplayNames = []; + object.entityDisplayNames = []; + } + if (message.intentDisplayNames && message.intentDisplayNames.length) { + object.intentDisplayNames = []; + for (var j = 0; j < message.intentDisplayNames.length; ++j) + object.intentDisplayNames[j] = message.intentDisplayNames[j]; + } + if (message.entityDisplayNames && message.entityDisplayNames.length) { + object.entityDisplayNames = []; + for (var j = 0; j < message.entityDisplayNames.length; ++j) + object.entityDisplayNames[j] = message.entityDisplayNames[j]; + } + return object; + }; + + /** + * Converts this ConflictingResources to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsResponse.ConflictingResources + * @instance + * @returns {Object.} JSON object + */ + ConflictingResources.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ConflictingResources + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsResponse.ConflictingResources + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ConflictingResources.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ImportIntentsResponse.ConflictingResources"; + }; + + return ConflictingResources; })(); - return StreamingRecognitionResult; + return ImportIntentsResponse; })(); - v3.QueryParameters = (function() { + v3.ImportIntentsMetadata = (function() { /** - * Properties of a QueryParameters. + * Properties of an ImportIntentsMetadata. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IQueryParameters - * @property {string|null} [timeZone] QueryParameters timeZone - * @property {google.type.ILatLng|null} [geoLocation] QueryParameters geoLocation - * @property {Array.|null} [sessionEntityTypes] QueryParameters sessionEntityTypes - * @property {google.protobuf.IStruct|null} [payload] QueryParameters payload - * @property {google.protobuf.IStruct|null} [parameters] QueryParameters parameters - * @property {string|null} [currentPage] QueryParameters currentPage - * @property {boolean|null} [disableWebhook] QueryParameters disableWebhook - * @property {boolean|null} [analyzeQueryTextSentiment] QueryParameters analyzeQueryTextSentiment - * @property {Object.|null} [webhookHeaders] QueryParameters webhookHeaders - * @property {Array.|null} [flowVersions] QueryParameters flowVersions - * @property {string|null} [channel] QueryParameters channel - * @property {google.protobuf.IDuration|null} [sessionTtl] QueryParameters sessionTtl - * @property {google.protobuf.IStruct|null} [endUserMetadata] QueryParameters endUserMetadata - * @property {google.cloud.dialogflow.cx.v3.ISearchConfig|null} [searchConfig] QueryParameters searchConfig - * @property {boolean|null} [populateDataStoreConnectionSignals] QueryParameters populateDataStoreConnectionSignals + * @interface IImportIntentsMetadata */ /** - * Constructs a new QueryParameters. + * Constructs a new ImportIntentsMetadata. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a QueryParameters. - * @implements IQueryParameters + * @classdesc Represents an ImportIntentsMetadata. + * @implements IImportIntentsMetadata * @constructor - * @param {google.cloud.dialogflow.cx.v3.IQueryParameters=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IImportIntentsMetadata=} [properties] Properties to set */ - function QueryParameters(properties) { - this.sessionEntityTypes = []; - this.webhookHeaders = {}; - this.flowVersions = []; + function ImportIntentsMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -62193,299 +61171,333 @@ } /** - * QueryParameters timeZone. - * @member {string} timeZone - * @memberof google.cloud.dialogflow.cx.v3.QueryParameters - * @instance + * Creates a new ImportIntentsMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsMetadata + * @static + * @param {google.cloud.dialogflow.cx.v3.IImportIntentsMetadata=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ImportIntentsMetadata} ImportIntentsMetadata instance */ - QueryParameters.prototype.timeZone = ""; + ImportIntentsMetadata.create = function create(properties) { + return new ImportIntentsMetadata(properties); + }; /** - * QueryParameters geoLocation. - * @member {google.type.ILatLng|null|undefined} geoLocation - * @memberof google.cloud.dialogflow.cx.v3.QueryParameters - * @instance + * Encodes the specified ImportIntentsMetadata message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportIntentsMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsMetadata + * @static + * @param {google.cloud.dialogflow.cx.v3.IImportIntentsMetadata} message ImportIntentsMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - QueryParameters.prototype.geoLocation = null; + ImportIntentsMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; /** - * QueryParameters sessionEntityTypes. - * @member {Array.} sessionEntityTypes - * @memberof google.cloud.dialogflow.cx.v3.QueryParameters - * @instance + * Encodes the specified ImportIntentsMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportIntentsMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsMetadata + * @static + * @param {google.cloud.dialogflow.cx.v3.IImportIntentsMetadata} message ImportIntentsMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - QueryParameters.prototype.sessionEntityTypes = $util.emptyArray; + ImportIntentsMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * QueryParameters payload. - * @member {google.protobuf.IStruct|null|undefined} payload - * @memberof google.cloud.dialogflow.cx.v3.QueryParameters - * @instance + * Decodes an ImportIntentsMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsMetadata + * @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.ImportIntentsMetadata} ImportIntentsMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - QueryParameters.prototype.payload = null; + ImportIntentsMetadata.decode = function decode(reader, length, error) { + 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.ImportIntentsMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * QueryParameters parameters. - * @member {google.protobuf.IStruct|null|undefined} parameters - * @memberof google.cloud.dialogflow.cx.v3.QueryParameters - * @instance + * Decodes an ImportIntentsMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.ImportIntentsMetadata} ImportIntentsMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - QueryParameters.prototype.parameters = null; + ImportIntentsMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * QueryParameters currentPage. - * @member {string} currentPage - * @memberof google.cloud.dialogflow.cx.v3.QueryParameters - * @instance + * Verifies an ImportIntentsMetadata message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - QueryParameters.prototype.currentPage = ""; + ImportIntentsMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; /** - * QueryParameters disableWebhook. - * @member {boolean} disableWebhook - * @memberof google.cloud.dialogflow.cx.v3.QueryParameters - * @instance + * Creates an ImportIntentsMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.ImportIntentsMetadata} ImportIntentsMetadata */ - QueryParameters.prototype.disableWebhook = false; + ImportIntentsMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ImportIntentsMetadata) + return object; + return new $root.google.cloud.dialogflow.cx.v3.ImportIntentsMetadata(); + }; /** - * QueryParameters analyzeQueryTextSentiment. - * @member {boolean} analyzeQueryTextSentiment - * @memberof google.cloud.dialogflow.cx.v3.QueryParameters - * @instance + * Creates a plain object from an ImportIntentsMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsMetadata + * @static + * @param {google.cloud.dialogflow.cx.v3.ImportIntentsMetadata} message ImportIntentsMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - QueryParameters.prototype.analyzeQueryTextSentiment = false; + ImportIntentsMetadata.toObject = function toObject() { + return {}; + }; /** - * QueryParameters webhookHeaders. - * @member {Object.} webhookHeaders - * @memberof google.cloud.dialogflow.cx.v3.QueryParameters + * Converts this ImportIntentsMetadata to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsMetadata * @instance + * @returns {Object.} JSON object */ - QueryParameters.prototype.webhookHeaders = $util.emptyObject; + ImportIntentsMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * QueryParameters flowVersions. - * @member {Array.} flowVersions - * @memberof google.cloud.dialogflow.cx.v3.QueryParameters + * Gets the default type url for ImportIntentsMetadata + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.ImportIntentsMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ImportIntentsMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ImportIntentsMetadata"; + }; + + return ImportIntentsMetadata; + })(); + + v3.ExportIntentsRequest = (function() { + + /** + * Properties of an ExportIntentsRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IExportIntentsRequest + * @property {string|null} [parent] ExportIntentsRequest parent + * @property {Array.|null} [intents] ExportIntentsRequest intents + * @property {string|null} [intentsUri] ExportIntentsRequest intentsUri + * @property {boolean|null} [intentsContentInline] ExportIntentsRequest intentsContentInline + * @property {google.cloud.dialogflow.cx.v3.ExportIntentsRequest.DataFormat|null} [dataFormat] ExportIntentsRequest dataFormat + */ + + /** + * Constructs a new ExportIntentsRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents an ExportIntentsRequest. + * @implements IExportIntentsRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IExportIntentsRequest=} [properties] Properties to set + */ + function ExportIntentsRequest(properties) { + this.intents = []; + 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]]; + } + + /** + * ExportIntentsRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.cx.v3.ExportIntentsRequest * @instance */ - QueryParameters.prototype.flowVersions = $util.emptyArray; + ExportIntentsRequest.prototype.parent = ""; /** - * QueryParameters channel. - * @member {string} channel - * @memberof google.cloud.dialogflow.cx.v3.QueryParameters + * ExportIntentsRequest intents. + * @member {Array.} intents + * @memberof google.cloud.dialogflow.cx.v3.ExportIntentsRequest * @instance */ - QueryParameters.prototype.channel = ""; + ExportIntentsRequest.prototype.intents = $util.emptyArray; /** - * QueryParameters sessionTtl. - * @member {google.protobuf.IDuration|null|undefined} sessionTtl - * @memberof google.cloud.dialogflow.cx.v3.QueryParameters + * ExportIntentsRequest intentsUri. + * @member {string|null|undefined} intentsUri + * @memberof google.cloud.dialogflow.cx.v3.ExportIntentsRequest * @instance */ - QueryParameters.prototype.sessionTtl = null; + ExportIntentsRequest.prototype.intentsUri = null; /** - * QueryParameters endUserMetadata. - * @member {google.protobuf.IStruct|null|undefined} endUserMetadata - * @memberof google.cloud.dialogflow.cx.v3.QueryParameters + * ExportIntentsRequest intentsContentInline. + * @member {boolean|null|undefined} intentsContentInline + * @memberof google.cloud.dialogflow.cx.v3.ExportIntentsRequest * @instance */ - QueryParameters.prototype.endUserMetadata = null; + ExportIntentsRequest.prototype.intentsContentInline = null; /** - * QueryParameters searchConfig. - * @member {google.cloud.dialogflow.cx.v3.ISearchConfig|null|undefined} searchConfig - * @memberof google.cloud.dialogflow.cx.v3.QueryParameters + * ExportIntentsRequest dataFormat. + * @member {google.cloud.dialogflow.cx.v3.ExportIntentsRequest.DataFormat} dataFormat + * @memberof google.cloud.dialogflow.cx.v3.ExportIntentsRequest * @instance */ - QueryParameters.prototype.searchConfig = null; + ExportIntentsRequest.prototype.dataFormat = 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * QueryParameters populateDataStoreConnectionSignals. - * @member {boolean} populateDataStoreConnectionSignals - * @memberof google.cloud.dialogflow.cx.v3.QueryParameters + * ExportIntentsRequest destination. + * @member {"intentsUri"|"intentsContentInline"|undefined} destination + * @memberof google.cloud.dialogflow.cx.v3.ExportIntentsRequest * @instance */ - QueryParameters.prototype.populateDataStoreConnectionSignals = false; + Object.defineProperty(ExportIntentsRequest.prototype, "destination", { + get: $util.oneOfGetter($oneOfFields = ["intentsUri", "intentsContentInline"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new QueryParameters instance using the specified properties. + * Creates a new ExportIntentsRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.QueryParameters + * @memberof google.cloud.dialogflow.cx.v3.ExportIntentsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IQueryParameters=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.QueryParameters} QueryParameters instance + * @param {google.cloud.dialogflow.cx.v3.IExportIntentsRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ExportIntentsRequest} ExportIntentsRequest instance */ - QueryParameters.create = function create(properties) { - return new QueryParameters(properties); + ExportIntentsRequest.create = function create(properties) { + return new ExportIntentsRequest(properties); }; /** - * Encodes the specified QueryParameters message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.QueryParameters.verify|verify} messages. + * Encodes the specified ExportIntentsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ExportIntentsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.QueryParameters + * @memberof google.cloud.dialogflow.cx.v3.ExportIntentsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IQueryParameters} message QueryParameters message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IExportIntentsRequest} message ExportIntentsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - QueryParameters.encode = function encode(message, writer) { + ExportIntentsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.timeZone != null && Object.hasOwnProperty.call(message, "timeZone")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.timeZone); - if (message.geoLocation != null && Object.hasOwnProperty.call(message, "geoLocation")) - $root.google.type.LatLng.encode(message.geoLocation, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.sessionEntityTypes != null && message.sessionEntityTypes.length) - for (var i = 0; i < message.sessionEntityTypes.length; ++i) - $root.google.cloud.dialogflow.cx.v3.SessionEntityType.encode(message.sessionEntityTypes[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.payload != null && Object.hasOwnProperty.call(message, "payload")) - $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.currentPage != null && Object.hasOwnProperty.call(message, "currentPage")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.currentPage); - 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")) - for (var keys = Object.keys(message.webhookHeaders), i = 0; i < keys.length; ++i) - writer.uint32(/* id 10, wireType 2 =*/82).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.webhookHeaders[keys[i]]).ldelim(); - if (message.flowVersions != null && message.flowVersions.length) - for (var i = 0; i < message.flowVersions.length; ++i) - writer.uint32(/* id 14, wireType 2 =*/114).string(message.flowVersions[i]); - if (message.channel != null && Object.hasOwnProperty.call(message, "channel")) - writer.uint32(/* id 15, wireType 2 =*/122).string(message.channel); - if (message.sessionTtl != null && Object.hasOwnProperty.call(message, "sessionTtl")) - $root.google.protobuf.Duration.encode(message.sessionTtl, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); - if (message.endUserMetadata != null && Object.hasOwnProperty.call(message, "endUserMetadata")) - $root.google.protobuf.Struct.encode(message.endUserMetadata, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); - if (message.searchConfig != null && Object.hasOwnProperty.call(message, "searchConfig")) - $root.google.cloud.dialogflow.cx.v3.SearchConfig.encode(message.searchConfig, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); - if (message.populateDataStoreConnectionSignals != null && Object.hasOwnProperty.call(message, "populateDataStoreConnectionSignals")) - writer.uint32(/* id 25, wireType 0 =*/200).bool(message.populateDataStoreConnectionSignals); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.intents != null && message.intents.length) + for (var i = 0; i < message.intents.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.intents[i]); + if (message.intentsUri != null && Object.hasOwnProperty.call(message, "intentsUri")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.intentsUri); + if (message.intentsContentInline != null && Object.hasOwnProperty.call(message, "intentsContentInline")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.intentsContentInline); + if (message.dataFormat != null && Object.hasOwnProperty.call(message, "dataFormat")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.dataFormat); return writer; }; /** - * Encodes the specified QueryParameters message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.QueryParameters.verify|verify} messages. + * Encodes the specified ExportIntentsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ExportIntentsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.QueryParameters + * @memberof google.cloud.dialogflow.cx.v3.ExportIntentsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IQueryParameters} message QueryParameters message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IExportIntentsRequest} message ExportIntentsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - QueryParameters.encodeDelimited = function encodeDelimited(message, writer) { + ExportIntentsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a QueryParameters message from the specified reader or buffer. + * Decodes an ExportIntentsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.QueryParameters + * @memberof google.cloud.dialogflow.cx.v3.ExportIntentsRequest * @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.QueryParameters} QueryParameters + * @returns {google.cloud.dialogflow.cx.v3.ExportIntentsRequest} ExportIntentsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - QueryParameters.decode = function decode(reader, length, error) { + ExportIntentsRequest.decode = function decode(reader, length, error) { 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.QueryParameters(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ExportIntentsRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.timeZone = reader.string(); + message.parent = reader.string(); break; } case 2: { - message.geoLocation = $root.google.type.LatLng.decode(reader, reader.uint32()); + if (!(message.intents && message.intents.length)) + message.intents = []; + message.intents.push(reader.string()); break; } case 3: { - if (!(message.sessionEntityTypes && message.sessionEntityTypes.length)) - message.sessionEntityTypes = []; - message.sessionEntityTypes.push($root.google.cloud.dialogflow.cx.v3.SessionEntityType.decode(reader, reader.uint32())); + message.intentsUri = reader.string(); break; } case 4: { - message.payload = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + message.intentsContentInline = reader.bool(); break; } case 5: { - message.parameters = $root.google.protobuf.Struct.decode(reader, reader.uint32()); - break; - } - case 6: { - message.currentPage = reader.string(); - break; - } - case 7: { - message.disableWebhook = reader.bool(); - break; - } - case 8: { - message.analyzeQueryTextSentiment = reader.bool(); - break; - } - case 10: { - if (message.webhookHeaders === $util.emptyObject) - message.webhookHeaders = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.webhookHeaders[key] = value; - break; - } - case 14: { - if (!(message.flowVersions && message.flowVersions.length)) - message.flowVersions = []; - message.flowVersions.push(reader.string()); - break; - } - case 15: { - message.channel = reader.string(); - break; - } - case 16: { - message.sessionTtl = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 18: { - message.endUserMetadata = $root.google.protobuf.Struct.decode(reader, reader.uint32()); - break; - } - case 20: { - message.searchConfig = $root.google.cloud.dialogflow.cx.v3.SearchConfig.decode(reader, reader.uint32()); - break; - } - case 25: { - message.populateDataStoreConnectionSignals = reader.bool(); + message.dataFormat = reader.int32(); break; } default: @@ -62497,314 +61509,227 @@ }; /** - * Decodes a QueryParameters message from the specified reader or buffer, length delimited. + * Decodes an ExportIntentsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.QueryParameters + * @memberof google.cloud.dialogflow.cx.v3.ExportIntentsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.QueryParameters} QueryParameters + * @returns {google.cloud.dialogflow.cx.v3.ExportIntentsRequest} ExportIntentsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - QueryParameters.decodeDelimited = function decodeDelimited(reader) { + ExportIntentsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a QueryParameters message. + * Verifies an ExportIntentsRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.QueryParameters + * @memberof google.cloud.dialogflow.cx.v3.ExportIntentsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - QueryParameters.verify = function verify(message) { + ExportIntentsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.timeZone != null && message.hasOwnProperty("timeZone")) - if (!$util.isString(message.timeZone)) - return "timeZone: string expected"; - if (message.geoLocation != null && message.hasOwnProperty("geoLocation")) { - var error = $root.google.type.LatLng.verify(message.geoLocation); - if (error) - return "geoLocation." + error; - } - if (message.sessionEntityTypes != null && message.hasOwnProperty("sessionEntityTypes")) { - if (!Array.isArray(message.sessionEntityTypes)) - return "sessionEntityTypes: array expected"; - for (var i = 0; i < message.sessionEntityTypes.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.SessionEntityType.verify(message.sessionEntityTypes[i]); - if (error) - return "sessionEntityTypes." + error; - } - } - if (message.payload != null && message.hasOwnProperty("payload")) { - var error = $root.google.protobuf.Struct.verify(message.payload); - if (error) - return "payload." + error; - } - if (message.parameters != null && message.hasOwnProperty("parameters")) { - var error = $root.google.protobuf.Struct.verify(message.parameters); - if (error) - return "parameters." + error; - } - if (message.currentPage != null && message.hasOwnProperty("currentPage")) - if (!$util.isString(message.currentPage)) - return "currentPage: string expected"; - 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"; - if (message.webhookHeaders != null && message.hasOwnProperty("webhookHeaders")) { - if (!$util.isObject(message.webhookHeaders)) - return "webhookHeaders: object expected"; - var key = Object.keys(message.webhookHeaders); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.webhookHeaders[key[i]])) - return "webhookHeaders: string{k:string} expected"; - } - if (message.flowVersions != null && message.hasOwnProperty("flowVersions")) { - if (!Array.isArray(message.flowVersions)) - return "flowVersions: array expected"; - for (var i = 0; i < message.flowVersions.length; ++i) - if (!$util.isString(message.flowVersions[i])) - return "flowVersions: string[] expected"; - } - if (message.channel != null && message.hasOwnProperty("channel")) - if (!$util.isString(message.channel)) - return "channel: string expected"; - if (message.sessionTtl != null && message.hasOwnProperty("sessionTtl")) { - var error = $root.google.protobuf.Duration.verify(message.sessionTtl); - if (error) - return "sessionTtl." + error; + var properties = {}; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.intents != null && message.hasOwnProperty("intents")) { + if (!Array.isArray(message.intents)) + return "intents: array expected"; + for (var i = 0; i < message.intents.length; ++i) + if (!$util.isString(message.intents[i])) + return "intents: string[] expected"; } - if (message.endUserMetadata != null && message.hasOwnProperty("endUserMetadata")) { - var error = $root.google.protobuf.Struct.verify(message.endUserMetadata); - if (error) - return "endUserMetadata." + error; + if (message.intentsUri != null && message.hasOwnProperty("intentsUri")) { + properties.destination = 1; + if (!$util.isString(message.intentsUri)) + return "intentsUri: string expected"; } - if (message.searchConfig != null && message.hasOwnProperty("searchConfig")) { - var error = $root.google.cloud.dialogflow.cx.v3.SearchConfig.verify(message.searchConfig); - if (error) - return "searchConfig." + error; + if (message.intentsContentInline != null && message.hasOwnProperty("intentsContentInline")) { + if (properties.destination === 1) + return "destination: multiple values"; + properties.destination = 1; + if (typeof message.intentsContentInline !== "boolean") + return "intentsContentInline: boolean expected"; } - if (message.populateDataStoreConnectionSignals != null && message.hasOwnProperty("populateDataStoreConnectionSignals")) - if (typeof message.populateDataStoreConnectionSignals !== "boolean") - return "populateDataStoreConnectionSignals: boolean expected"; + if (message.dataFormat != null && message.hasOwnProperty("dataFormat")) + switch (message.dataFormat) { + default: + return "dataFormat: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } return null; }; /** - * Creates a QueryParameters message from a plain object. Also converts values to their respective internal types. + * Creates an ExportIntentsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.QueryParameters + * @memberof google.cloud.dialogflow.cx.v3.ExportIntentsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.QueryParameters} QueryParameters + * @returns {google.cloud.dialogflow.cx.v3.ExportIntentsRequest} ExportIntentsRequest */ - QueryParameters.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.QueryParameters) + ExportIntentsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ExportIntentsRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.QueryParameters(); - if (object.timeZone != null) - message.timeZone = String(object.timeZone); - if (object.geoLocation != null) { - if (typeof object.geoLocation !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.QueryParameters.geoLocation: object expected"); - message.geoLocation = $root.google.type.LatLng.fromObject(object.geoLocation); + var message = new $root.google.cloud.dialogflow.cx.v3.ExportIntentsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.intents) { + if (!Array.isArray(object.intents)) + throw TypeError(".google.cloud.dialogflow.cx.v3.ExportIntentsRequest.intents: array expected"); + message.intents = []; + for (var i = 0; i < object.intents.length; ++i) + message.intents[i] = String(object.intents[i]); } - if (object.sessionEntityTypes) { - if (!Array.isArray(object.sessionEntityTypes)) - throw TypeError(".google.cloud.dialogflow.cx.v3.QueryParameters.sessionEntityTypes: array expected"); - message.sessionEntityTypes = []; - for (var i = 0; i < object.sessionEntityTypes.length; ++i) { - if (typeof object.sessionEntityTypes[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.QueryParameters.sessionEntityTypes: object expected"); - message.sessionEntityTypes[i] = $root.google.cloud.dialogflow.cx.v3.SessionEntityType.fromObject(object.sessionEntityTypes[i]); + if (object.intentsUri != null) + message.intentsUri = String(object.intentsUri); + if (object.intentsContentInline != null) + message.intentsContentInline = Boolean(object.intentsContentInline); + switch (object.dataFormat) { + default: + if (typeof object.dataFormat === "number") { + message.dataFormat = object.dataFormat; + break; } + break; + case "DATA_FORMAT_UNSPECIFIED": + case 0: + message.dataFormat = 0; + break; + case "BLOB": + case 1: + message.dataFormat = 1; + break; + case "JSON": + case 2: + message.dataFormat = 2; + break; + case "CSV": + case 3: + message.dataFormat = 3; + break; } - if (object.payload != null) { - if (typeof object.payload !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.QueryParameters.payload: object expected"); - message.payload = $root.google.protobuf.Struct.fromObject(object.payload); - } - if (object.parameters != null) { - if (typeof object.parameters !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.QueryParameters.parameters: object expected"); - message.parameters = $root.google.protobuf.Struct.fromObject(object.parameters); - } - if (object.currentPage != null) - message.currentPage = String(object.currentPage); - if (object.disableWebhook != null) - message.disableWebhook = Boolean(object.disableWebhook); - if (object.analyzeQueryTextSentiment != null) - message.analyzeQueryTextSentiment = Boolean(object.analyzeQueryTextSentiment); - if (object.webhookHeaders) { - if (typeof object.webhookHeaders !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.QueryParameters.webhookHeaders: object expected"); - message.webhookHeaders = {}; - for (var keys = Object.keys(object.webhookHeaders), i = 0; i < keys.length; ++i) - message.webhookHeaders[keys[i]] = String(object.webhookHeaders[keys[i]]); - } - if (object.flowVersions) { - if (!Array.isArray(object.flowVersions)) - throw TypeError(".google.cloud.dialogflow.cx.v3.QueryParameters.flowVersions: array expected"); - message.flowVersions = []; - for (var i = 0; i < object.flowVersions.length; ++i) - message.flowVersions[i] = String(object.flowVersions[i]); - } - if (object.channel != null) - message.channel = String(object.channel); - if (object.sessionTtl != null) { - if (typeof object.sessionTtl !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.QueryParameters.sessionTtl: object expected"); - message.sessionTtl = $root.google.protobuf.Duration.fromObject(object.sessionTtl); - } - if (object.endUserMetadata != null) { - if (typeof object.endUserMetadata !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.QueryParameters.endUserMetadata: object expected"); - message.endUserMetadata = $root.google.protobuf.Struct.fromObject(object.endUserMetadata); - } - if (object.searchConfig != null) { - if (typeof object.searchConfig !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.QueryParameters.searchConfig: object expected"); - message.searchConfig = $root.google.cloud.dialogflow.cx.v3.SearchConfig.fromObject(object.searchConfig); - } - if (object.populateDataStoreConnectionSignals != null) - message.populateDataStoreConnectionSignals = Boolean(object.populateDataStoreConnectionSignals); return message; }; /** - * Creates a plain object from a QueryParameters message. Also converts values to other types if specified. + * Creates a plain object from an ExportIntentsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.QueryParameters + * @memberof google.cloud.dialogflow.cx.v3.ExportIntentsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.QueryParameters} message QueryParameters + * @param {google.cloud.dialogflow.cx.v3.ExportIntentsRequest} message ExportIntentsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - QueryParameters.toObject = function toObject(message, options) { + ExportIntentsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.sessionEntityTypes = []; - object.flowVersions = []; - } - if (options.objects || options.defaults) - object.webhookHeaders = {}; + if (options.arrays || options.defaults) + object.intents = []; if (options.defaults) { - object.timeZone = ""; - object.geoLocation = null; - object.payload = null; - object.parameters = null; - object.currentPage = ""; - object.disableWebhook = false; - object.analyzeQueryTextSentiment = false; - object.channel = ""; - object.sessionTtl = null; - object.endUserMetadata = null; - object.searchConfig = null; - object.populateDataStoreConnectionSignals = false; + object.parent = ""; + object.dataFormat = options.enums === String ? "DATA_FORMAT_UNSPECIFIED" : 0; } - if (message.timeZone != null && message.hasOwnProperty("timeZone")) - object.timeZone = message.timeZone; - if (message.geoLocation != null && message.hasOwnProperty("geoLocation")) - object.geoLocation = $root.google.type.LatLng.toObject(message.geoLocation, options); - if (message.sessionEntityTypes && message.sessionEntityTypes.length) { - object.sessionEntityTypes = []; - for (var j = 0; j < message.sessionEntityTypes.length; ++j) - object.sessionEntityTypes[j] = $root.google.cloud.dialogflow.cx.v3.SessionEntityType.toObject(message.sessionEntityTypes[j], options); + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.intents && message.intents.length) { + object.intents = []; + for (var j = 0; j < message.intents.length; ++j) + object.intents[j] = message.intents[j]; } - if (message.payload != null && message.hasOwnProperty("payload")) - 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.currentPage != null && message.hasOwnProperty("currentPage")) - object.currentPage = message.currentPage; - if (message.disableWebhook != null && message.hasOwnProperty("disableWebhook")) - object.disableWebhook = message.disableWebhook; - if (message.analyzeQueryTextSentiment != null && message.hasOwnProperty("analyzeQueryTextSentiment")) - object.analyzeQueryTextSentiment = message.analyzeQueryTextSentiment; - var keys2; - if (message.webhookHeaders && (keys2 = Object.keys(message.webhookHeaders)).length) { - object.webhookHeaders = {}; - for (var j = 0; j < keys2.length; ++j) - object.webhookHeaders[keys2[j]] = message.webhookHeaders[keys2[j]]; + if (message.intentsUri != null && message.hasOwnProperty("intentsUri")) { + object.intentsUri = message.intentsUri; + if (options.oneofs) + object.destination = "intentsUri"; } - if (message.flowVersions && message.flowVersions.length) { - object.flowVersions = []; - for (var j = 0; j < message.flowVersions.length; ++j) - object.flowVersions[j] = message.flowVersions[j]; + if (message.intentsContentInline != null && message.hasOwnProperty("intentsContentInline")) { + object.intentsContentInline = message.intentsContentInline; + if (options.oneofs) + object.destination = "intentsContentInline"; } - if (message.channel != null && message.hasOwnProperty("channel")) - object.channel = message.channel; - if (message.sessionTtl != null && message.hasOwnProperty("sessionTtl")) - object.sessionTtl = $root.google.protobuf.Duration.toObject(message.sessionTtl, options); - if (message.endUserMetadata != null && message.hasOwnProperty("endUserMetadata")) - object.endUserMetadata = $root.google.protobuf.Struct.toObject(message.endUserMetadata, options); - if (message.searchConfig != null && message.hasOwnProperty("searchConfig")) - object.searchConfig = $root.google.cloud.dialogflow.cx.v3.SearchConfig.toObject(message.searchConfig, options); - if (message.populateDataStoreConnectionSignals != null && message.hasOwnProperty("populateDataStoreConnectionSignals")) - object.populateDataStoreConnectionSignals = message.populateDataStoreConnectionSignals; + if (message.dataFormat != null && message.hasOwnProperty("dataFormat")) + object.dataFormat = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.ExportIntentsRequest.DataFormat[message.dataFormat] === undefined ? message.dataFormat : $root.google.cloud.dialogflow.cx.v3.ExportIntentsRequest.DataFormat[message.dataFormat] : message.dataFormat; return object; }; /** - * Converts this QueryParameters to JSON. + * Converts this ExportIntentsRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.QueryParameters + * @memberof google.cloud.dialogflow.cx.v3.ExportIntentsRequest * @instance * @returns {Object.} JSON object */ - QueryParameters.prototype.toJSON = function toJSON() { + ExportIntentsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for QueryParameters + * Gets the default type url for ExportIntentsRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.QueryParameters + * @memberof google.cloud.dialogflow.cx.v3.ExportIntentsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - QueryParameters.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ExportIntentsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.QueryParameters"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ExportIntentsRequest"; }; - return QueryParameters; + /** + * DataFormat enum. + * @name google.cloud.dialogflow.cx.v3.ExportIntentsRequest.DataFormat + * @enum {number} + * @property {number} DATA_FORMAT_UNSPECIFIED=0 DATA_FORMAT_UNSPECIFIED value + * @property {number} BLOB=1 BLOB value + * @property {number} JSON=2 JSON value + * @property {number} CSV=3 CSV value + */ + ExportIntentsRequest.DataFormat = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DATA_FORMAT_UNSPECIFIED"] = 0; + values[valuesById[1] = "BLOB"] = 1; + values[valuesById[2] = "JSON"] = 2; + values[valuesById[3] = "CSV"] = 3; + return values; + })(); + + return ExportIntentsRequest; })(); - v3.SearchConfig = (function() { + v3.ExportIntentsResponse = (function() { /** - * Properties of a SearchConfig. + * Properties of an ExportIntentsResponse. * @memberof google.cloud.dialogflow.cx.v3 - * @interface ISearchConfig - * @property {Array.|null} [boostSpecs] SearchConfig boostSpecs - * @property {Array.|null} [filterSpecs] SearchConfig filterSpecs + * @interface IExportIntentsResponse + * @property {string|null} [intentsUri] ExportIntentsResponse intentsUri + * @property {google.cloud.dialogflow.cx.v3.IInlineDestination|null} [intentsContent] ExportIntentsResponse intentsContent */ /** - * Constructs a new SearchConfig. + * Constructs a new ExportIntentsResponse. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a SearchConfig. - * @implements ISearchConfig + * @classdesc Represents an ExportIntentsResponse. + * @implements IExportIntentsResponse * @constructor - * @param {google.cloud.dialogflow.cx.v3.ISearchConfig=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IExportIntentsResponse=} [properties] Properties to set */ - function SearchConfig(properties) { - this.boostSpecs = []; - this.filterSpecs = []; + function ExportIntentsResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -62812,97 +61737,105 @@ } /** - * SearchConfig boostSpecs. - * @member {Array.} boostSpecs - * @memberof google.cloud.dialogflow.cx.v3.SearchConfig + * ExportIntentsResponse intentsUri. + * @member {string|null|undefined} intentsUri + * @memberof google.cloud.dialogflow.cx.v3.ExportIntentsResponse * @instance */ - SearchConfig.prototype.boostSpecs = $util.emptyArray; + ExportIntentsResponse.prototype.intentsUri = null; /** - * SearchConfig filterSpecs. - * @member {Array.} filterSpecs - * @memberof google.cloud.dialogflow.cx.v3.SearchConfig + * ExportIntentsResponse intentsContent. + * @member {google.cloud.dialogflow.cx.v3.IInlineDestination|null|undefined} intentsContent + * @memberof google.cloud.dialogflow.cx.v3.ExportIntentsResponse * @instance */ - SearchConfig.prototype.filterSpecs = $util.emptyArray; + ExportIntentsResponse.prototype.intentsContent = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * Creates a new SearchConfig instance using the specified properties. + * ExportIntentsResponse intents. + * @member {"intentsUri"|"intentsContent"|undefined} intents + * @memberof google.cloud.dialogflow.cx.v3.ExportIntentsResponse + * @instance + */ + Object.defineProperty(ExportIntentsResponse.prototype, "intents", { + get: $util.oneOfGetter($oneOfFields = ["intentsUri", "intentsContent"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ExportIntentsResponse instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.SearchConfig + * @memberof google.cloud.dialogflow.cx.v3.ExportIntentsResponse * @static - * @param {google.cloud.dialogflow.cx.v3.ISearchConfig=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.SearchConfig} SearchConfig instance + * @param {google.cloud.dialogflow.cx.v3.IExportIntentsResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ExportIntentsResponse} ExportIntentsResponse instance */ - SearchConfig.create = function create(properties) { - return new SearchConfig(properties); + ExportIntentsResponse.create = function create(properties) { + return new ExportIntentsResponse(properties); }; /** - * Encodes the specified SearchConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SearchConfig.verify|verify} messages. + * Encodes the specified ExportIntentsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ExportIntentsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.SearchConfig + * @memberof google.cloud.dialogflow.cx.v3.ExportIntentsResponse * @static - * @param {google.cloud.dialogflow.cx.v3.ISearchConfig} message SearchConfig message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IExportIntentsResponse} message ExportIntentsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SearchConfig.encode = function encode(message, writer) { + ExportIntentsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.boostSpecs != null && message.boostSpecs.length) - for (var i = 0; i < message.boostSpecs.length; ++i) - $root.google.cloud.dialogflow.cx.v3.BoostSpecs.encode(message.boostSpecs[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.filterSpecs != null && message.filterSpecs.length) - for (var i = 0; i < message.filterSpecs.length; ++i) - $root.google.cloud.dialogflow.cx.v3.FilterSpecs.encode(message.filterSpecs[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.intentsUri != null && Object.hasOwnProperty.call(message, "intentsUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.intentsUri); + if (message.intentsContent != null && Object.hasOwnProperty.call(message, "intentsContent")) + $root.google.cloud.dialogflow.cx.v3.InlineDestination.encode(message.intentsContent, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified SearchConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SearchConfig.verify|verify} messages. + * Encodes the specified ExportIntentsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ExportIntentsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.SearchConfig + * @memberof google.cloud.dialogflow.cx.v3.ExportIntentsResponse * @static - * @param {google.cloud.dialogflow.cx.v3.ISearchConfig} message SearchConfig message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IExportIntentsResponse} message ExportIntentsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SearchConfig.encodeDelimited = function encodeDelimited(message, writer) { + ExportIntentsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SearchConfig message from the specified reader or buffer. + * Decodes an ExportIntentsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.SearchConfig + * @memberof google.cloud.dialogflow.cx.v3.ExportIntentsResponse * @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.SearchConfig} SearchConfig + * @returns {google.cloud.dialogflow.cx.v3.ExportIntentsResponse} ExportIntentsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SearchConfig.decode = function decode(reader, length, error) { + ExportIntentsResponse.decode = function decode(reader, length, error) { 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.SearchConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ExportIntentsResponse(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - if (!(message.boostSpecs && message.boostSpecs.length)) - message.boostSpecs = []; - message.boostSpecs.push($root.google.cloud.dialogflow.cx.v3.BoostSpecs.decode(reader, reader.uint32())); + message.intentsUri = reader.string(); break; } case 2: { - if (!(message.filterSpecs && message.filterSpecs.length)) - message.filterSpecs = []; - message.filterSpecs.push($root.google.cloud.dialogflow.cx.v3.FilterSpecs.decode(reader, reader.uint32())); + message.intentsContent = $root.google.cloud.dialogflow.cx.v3.InlineDestination.decode(reader, reader.uint32()); break; } default: @@ -62914,166 +61847,145 @@ }; /** - * Decodes a SearchConfig message from the specified reader or buffer, length delimited. + * Decodes an ExportIntentsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.SearchConfig + * @memberof google.cloud.dialogflow.cx.v3.ExportIntentsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.SearchConfig} SearchConfig + * @returns {google.cloud.dialogflow.cx.v3.ExportIntentsResponse} ExportIntentsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SearchConfig.decodeDelimited = function decodeDelimited(reader) { + ExportIntentsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SearchConfig message. + * Verifies an ExportIntentsResponse message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.SearchConfig + * @memberof google.cloud.dialogflow.cx.v3.ExportIntentsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SearchConfig.verify = function verify(message) { + ExportIntentsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.boostSpecs != null && message.hasOwnProperty("boostSpecs")) { - if (!Array.isArray(message.boostSpecs)) - return "boostSpecs: array expected"; - for (var i = 0; i < message.boostSpecs.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.BoostSpecs.verify(message.boostSpecs[i]); - if (error) - return "boostSpecs." + error; - } + var properties = {}; + if (message.intentsUri != null && message.hasOwnProperty("intentsUri")) { + properties.intents = 1; + if (!$util.isString(message.intentsUri)) + return "intentsUri: string expected"; } - if (message.filterSpecs != null && message.hasOwnProperty("filterSpecs")) { - if (!Array.isArray(message.filterSpecs)) - return "filterSpecs: array expected"; - for (var i = 0; i < message.filterSpecs.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.FilterSpecs.verify(message.filterSpecs[i]); + if (message.intentsContent != null && message.hasOwnProperty("intentsContent")) { + if (properties.intents === 1) + return "intents: multiple values"; + properties.intents = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3.InlineDestination.verify(message.intentsContent); if (error) - return "filterSpecs." + error; + return "intentsContent." + error; } } return null; }; /** - * Creates a SearchConfig message from a plain object. Also converts values to their respective internal types. + * Creates an ExportIntentsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.SearchConfig + * @memberof google.cloud.dialogflow.cx.v3.ExportIntentsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.SearchConfig} SearchConfig + * @returns {google.cloud.dialogflow.cx.v3.ExportIntentsResponse} ExportIntentsResponse */ - SearchConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.SearchConfig) + ExportIntentsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ExportIntentsResponse) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.SearchConfig(); - if (object.boostSpecs) { - if (!Array.isArray(object.boostSpecs)) - throw TypeError(".google.cloud.dialogflow.cx.v3.SearchConfig.boostSpecs: array expected"); - message.boostSpecs = []; - for (var i = 0; i < object.boostSpecs.length; ++i) { - if (typeof object.boostSpecs[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.SearchConfig.boostSpecs: object expected"); - message.boostSpecs[i] = $root.google.cloud.dialogflow.cx.v3.BoostSpecs.fromObject(object.boostSpecs[i]); - } - } - if (object.filterSpecs) { - if (!Array.isArray(object.filterSpecs)) - throw TypeError(".google.cloud.dialogflow.cx.v3.SearchConfig.filterSpecs: array expected"); - message.filterSpecs = []; - for (var i = 0; i < object.filterSpecs.length; ++i) { - if (typeof object.filterSpecs[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.SearchConfig.filterSpecs: object expected"); - message.filterSpecs[i] = $root.google.cloud.dialogflow.cx.v3.FilterSpecs.fromObject(object.filterSpecs[i]); - } + var message = new $root.google.cloud.dialogflow.cx.v3.ExportIntentsResponse(); + if (object.intentsUri != null) + message.intentsUri = String(object.intentsUri); + if (object.intentsContent != null) { + if (typeof object.intentsContent !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.ExportIntentsResponse.intentsContent: object expected"); + message.intentsContent = $root.google.cloud.dialogflow.cx.v3.InlineDestination.fromObject(object.intentsContent); } return message; }; /** - * Creates a plain object from a SearchConfig message. Also converts values to other types if specified. + * Creates a plain object from an ExportIntentsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.SearchConfig + * @memberof google.cloud.dialogflow.cx.v3.ExportIntentsResponse * @static - * @param {google.cloud.dialogflow.cx.v3.SearchConfig} message SearchConfig + * @param {google.cloud.dialogflow.cx.v3.ExportIntentsResponse} message ExportIntentsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SearchConfig.toObject = function toObject(message, options) { + ExportIntentsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.boostSpecs = []; - object.filterSpecs = []; - } - if (message.boostSpecs && message.boostSpecs.length) { - object.boostSpecs = []; - for (var j = 0; j < message.boostSpecs.length; ++j) - object.boostSpecs[j] = $root.google.cloud.dialogflow.cx.v3.BoostSpecs.toObject(message.boostSpecs[j], options); + if (message.intentsUri != null && message.hasOwnProperty("intentsUri")) { + object.intentsUri = message.intentsUri; + if (options.oneofs) + object.intents = "intentsUri"; } - if (message.filterSpecs && message.filterSpecs.length) { - object.filterSpecs = []; - for (var j = 0; j < message.filterSpecs.length; ++j) - object.filterSpecs[j] = $root.google.cloud.dialogflow.cx.v3.FilterSpecs.toObject(message.filterSpecs[j], options); + if (message.intentsContent != null && message.hasOwnProperty("intentsContent")) { + object.intentsContent = $root.google.cloud.dialogflow.cx.v3.InlineDestination.toObject(message.intentsContent, options); + if (options.oneofs) + object.intents = "intentsContent"; } return object; }; /** - * Converts this SearchConfig to JSON. + * Converts this ExportIntentsResponse to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.SearchConfig + * @memberof google.cloud.dialogflow.cx.v3.ExportIntentsResponse * @instance * @returns {Object.} JSON object */ - SearchConfig.prototype.toJSON = function toJSON() { + ExportIntentsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SearchConfig + * Gets the default type url for ExportIntentsResponse * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.SearchConfig + * @memberof google.cloud.dialogflow.cx.v3.ExportIntentsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SearchConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ExportIntentsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.SearchConfig"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ExportIntentsResponse"; }; - return SearchConfig; + return ExportIntentsResponse; })(); - v3.BoostSpec = (function() { + v3.ExportIntentsMetadata = (function() { /** - * Properties of a BoostSpec. + * Properties of an ExportIntentsMetadata. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IBoostSpec - * @property {Array.|null} [conditionBoostSpecs] BoostSpec conditionBoostSpecs + * @interface IExportIntentsMetadata */ /** - * Constructs a new BoostSpec. + * Constructs a new ExportIntentsMetadata. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a BoostSpec. - * @implements IBoostSpec + * @classdesc Represents an ExportIntentsMetadata. + * @implements IExportIntentsMetadata * @constructor - * @param {google.cloud.dialogflow.cx.v3.IBoostSpec=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IExportIntentsMetadata=} [properties] Properties to set */ - function BoostSpec(properties) { - this.conditionBoostSpecs = []; + function ExportIntentsMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -63081,82 +61993,65 @@ } /** - * BoostSpec conditionBoostSpecs. - * @member {Array.} conditionBoostSpecs - * @memberof google.cloud.dialogflow.cx.v3.BoostSpec - * @instance - */ - BoostSpec.prototype.conditionBoostSpecs = $util.emptyArray; - - /** - * Creates a new BoostSpec instance using the specified properties. + * Creates a new ExportIntentsMetadata instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.BoostSpec + * @memberof google.cloud.dialogflow.cx.v3.ExportIntentsMetadata * @static - * @param {google.cloud.dialogflow.cx.v3.IBoostSpec=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.BoostSpec} BoostSpec instance + * @param {google.cloud.dialogflow.cx.v3.IExportIntentsMetadata=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ExportIntentsMetadata} ExportIntentsMetadata instance */ - BoostSpec.create = function create(properties) { - return new BoostSpec(properties); + ExportIntentsMetadata.create = function create(properties) { + return new ExportIntentsMetadata(properties); }; /** - * Encodes the specified BoostSpec message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.BoostSpec.verify|verify} messages. + * Encodes the specified ExportIntentsMetadata message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ExportIntentsMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.BoostSpec + * @memberof google.cloud.dialogflow.cx.v3.ExportIntentsMetadata * @static - * @param {google.cloud.dialogflow.cx.v3.IBoostSpec} message BoostSpec message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IExportIntentsMetadata} message ExportIntentsMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BoostSpec.encode = function encode(message, writer) { + ExportIntentsMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.conditionBoostSpecs != null && message.conditionBoostSpecs.length) - for (var i = 0; i < message.conditionBoostSpecs.length; ++i) - $root.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.encode(message.conditionBoostSpecs[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified BoostSpec message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.BoostSpec.verify|verify} messages. + * Encodes the specified ExportIntentsMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ExportIntentsMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.BoostSpec + * @memberof google.cloud.dialogflow.cx.v3.ExportIntentsMetadata * @static - * @param {google.cloud.dialogflow.cx.v3.IBoostSpec} message BoostSpec message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IExportIntentsMetadata} message ExportIntentsMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BoostSpec.encodeDelimited = function encodeDelimited(message, writer) { + ExportIntentsMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BoostSpec message from the specified reader or buffer. + * Decodes an ExportIntentsMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.BoostSpec + * @memberof google.cloud.dialogflow.cx.v3.ExportIntentsMetadata * @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.BoostSpec} BoostSpec + * @returns {google.cloud.dialogflow.cx.v3.ExportIntentsMetadata} ExportIntentsMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BoostSpec.decode = function decode(reader, length, error) { + ExportIntentsMetadata.decode = function decode(reader, length, error) { 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.BoostSpec(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ExportIntentsMetadata(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { - case 1: { - if (!(message.conditionBoostSpecs && message.conditionBoostSpecs.length)) - message.conditionBoostSpecs = []; - message.conditionBoostSpecs.push($root.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.decode(reader, reader.uint32())); - break; - } default: reader.skipType(tag & 7); break; @@ -63166,998 +62061,887 @@ }; /** - * Decodes a BoostSpec message from the specified reader or buffer, length delimited. + * Decodes an ExportIntentsMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.BoostSpec + * @memberof google.cloud.dialogflow.cx.v3.ExportIntentsMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.BoostSpec} BoostSpec + * @returns {google.cloud.dialogflow.cx.v3.ExportIntentsMetadata} ExportIntentsMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BoostSpec.decodeDelimited = function decodeDelimited(reader) { + ExportIntentsMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BoostSpec message. + * Verifies an ExportIntentsMetadata message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.BoostSpec + * @memberof google.cloud.dialogflow.cx.v3.ExportIntentsMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BoostSpec.verify = function verify(message) { + ExportIntentsMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.conditionBoostSpecs != null && message.hasOwnProperty("conditionBoostSpecs")) { - if (!Array.isArray(message.conditionBoostSpecs)) - return "conditionBoostSpecs: array expected"; - for (var i = 0; i < message.conditionBoostSpecs.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.verify(message.conditionBoostSpecs[i]); - if (error) - return "conditionBoostSpecs." + error; - } - } return null; }; /** - * Creates a BoostSpec message from a plain object. Also converts values to their respective internal types. + * Creates an ExportIntentsMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.BoostSpec + * @memberof google.cloud.dialogflow.cx.v3.ExportIntentsMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.BoostSpec} BoostSpec + * @returns {google.cloud.dialogflow.cx.v3.ExportIntentsMetadata} ExportIntentsMetadata */ - BoostSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.BoostSpec) + ExportIntentsMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ExportIntentsMetadata) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.BoostSpec(); - if (object.conditionBoostSpecs) { - if (!Array.isArray(object.conditionBoostSpecs)) - throw TypeError(".google.cloud.dialogflow.cx.v3.BoostSpec.conditionBoostSpecs: array expected"); - message.conditionBoostSpecs = []; - for (var i = 0; i < object.conditionBoostSpecs.length; ++i) { - if (typeof object.conditionBoostSpecs[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.BoostSpec.conditionBoostSpecs: object expected"); - message.conditionBoostSpecs[i] = $root.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.fromObject(object.conditionBoostSpecs[i]); - } - } - return message; + return new $root.google.cloud.dialogflow.cx.v3.ExportIntentsMetadata(); }; /** - * Creates a plain object from a BoostSpec message. Also converts values to other types if specified. + * Creates a plain object from an ExportIntentsMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.BoostSpec + * @memberof google.cloud.dialogflow.cx.v3.ExportIntentsMetadata * @static - * @param {google.cloud.dialogflow.cx.v3.BoostSpec} message BoostSpec + * @param {google.cloud.dialogflow.cx.v3.ExportIntentsMetadata} message ExportIntentsMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BoostSpec.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.conditionBoostSpecs = []; - if (message.conditionBoostSpecs && message.conditionBoostSpecs.length) { - object.conditionBoostSpecs = []; - for (var j = 0; j < message.conditionBoostSpecs.length; ++j) - object.conditionBoostSpecs[j] = $root.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.toObject(message.conditionBoostSpecs[j], options); - } - return object; + ExportIntentsMetadata.toObject = function toObject() { + return {}; }; /** - * Converts this BoostSpec to JSON. + * Converts this ExportIntentsMetadata to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.BoostSpec + * @memberof google.cloud.dialogflow.cx.v3.ExportIntentsMetadata * @instance * @returns {Object.} JSON object */ - BoostSpec.prototype.toJSON = function toJSON() { + ExportIntentsMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for BoostSpec + * Gets the default type url for ExportIntentsMetadata * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.BoostSpec + * @memberof google.cloud.dialogflow.cx.v3.ExportIntentsMetadata * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - BoostSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ExportIntentsMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.BoostSpec"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ExportIntentsMetadata"; }; - BoostSpec.ConditionBoostSpec = (function() { + return ExportIntentsMetadata; + })(); - /** - * Properties of a ConditionBoostSpec. - * @memberof google.cloud.dialogflow.cx.v3.BoostSpec - * @interface IConditionBoostSpec - * @property {string|null} [condition] ConditionBoostSpec condition - * @property {number|null} [boost] ConditionBoostSpec boost - * @property {google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.IBoostControlSpec|null} [boostControlSpec] ConditionBoostSpec boostControlSpec - */ + v3.Sessions = (function() { - /** - * Constructs a new ConditionBoostSpec. - * @memberof google.cloud.dialogflow.cx.v3.BoostSpec - * @classdesc Represents a ConditionBoostSpec. - * @implements IConditionBoostSpec - * @constructor - * @param {google.cloud.dialogflow.cx.v3.BoostSpec.IConditionBoostSpec=} [properties] Properties to set - */ - function ConditionBoostSpec(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]]; - } + /** + * Constructs a new Sessions service. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a Sessions + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Sessions(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } - /** - * ConditionBoostSpec condition. - * @member {string} condition - * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec - * @instance - */ - ConditionBoostSpec.prototype.condition = ""; + (Sessions.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Sessions; - /** - * ConditionBoostSpec boost. - * @member {number} boost - * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec - * @instance - */ - ConditionBoostSpec.prototype.boost = 0; + /** + * Creates new Sessions service using the specified rpc implementation. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.Sessions + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Sessions} RPC service. Useful where requests and/or responses are streamed. + */ + Sessions.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; - /** - * ConditionBoostSpec boostControlSpec. - * @member {google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.IBoostControlSpec|null|undefined} boostControlSpec - * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec - * @instance - */ - ConditionBoostSpec.prototype.boostControlSpec = null; + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Sessions|detectIntent}. + * @memberof google.cloud.dialogflow.cx.v3.Sessions + * @typedef DetectIntentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.DetectIntentResponse} [response] DetectIntentResponse + */ - /** - * Creates a new ConditionBoostSpec instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec - * @static - * @param {google.cloud.dialogflow.cx.v3.BoostSpec.IConditionBoostSpec=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec} ConditionBoostSpec instance - */ - ConditionBoostSpec.create = function create(properties) { - return new ConditionBoostSpec(properties); - }; + /** + * Calls DetectIntent. + * @function detectIntent + * @memberof google.cloud.dialogflow.cx.v3.Sessions + * @instance + * @param {google.cloud.dialogflow.cx.v3.IDetectIntentRequest} request DetectIntentRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Sessions.DetectIntentCallback} callback Node-style callback called with the error, if any, and DetectIntentResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Sessions.prototype.detectIntent = function detectIntent(request, callback) { + return this.rpcCall(detectIntent, $root.google.cloud.dialogflow.cx.v3.DetectIntentRequest, $root.google.cloud.dialogflow.cx.v3.DetectIntentResponse, request, callback); + }, "name", { value: "DetectIntent" }); - /** - * Encodes the specified ConditionBoostSpec message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec - * @static - * @param {google.cloud.dialogflow.cx.v3.BoostSpec.IConditionBoostSpec} message ConditionBoostSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConditionBoostSpec.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.condition); - if (message.boost != null && Object.hasOwnProperty.call(message, "boost")) - writer.uint32(/* id 2, wireType 5 =*/21).float(message.boost); - if (message.boostControlSpec != null && Object.hasOwnProperty.call(message, "boostControlSpec")) - $root.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.encode(message.boostControlSpec, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; + /** + * Calls DetectIntent. + * @function detectIntent + * @memberof google.cloud.dialogflow.cx.v3.Sessions + * @instance + * @param {google.cloud.dialogflow.cx.v3.IDetectIntentRequest} request DetectIntentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Encodes the specified ConditionBoostSpec message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec - * @static - * @param {google.cloud.dialogflow.cx.v3.BoostSpec.IConditionBoostSpec} message ConditionBoostSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConditionBoostSpec.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Sessions|serverStreamingDetectIntent}. + * @memberof google.cloud.dialogflow.cx.v3.Sessions + * @typedef ServerStreamingDetectIntentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.DetectIntentResponse} [response] DetectIntentResponse + */ - /** - * Decodes a ConditionBoostSpec message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec - * @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.BoostSpec.ConditionBoostSpec} ConditionBoostSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConditionBoostSpec.decode = function decode(reader, length, error) { - 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.BoostSpec.ConditionBoostSpec(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.condition = reader.string(); - break; - } - case 2: { - message.boost = reader.float(); - break; - } - case 4: { - message.boostControlSpec = $root.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Calls ServerStreamingDetectIntent. + * @function serverStreamingDetectIntent + * @memberof google.cloud.dialogflow.cx.v3.Sessions + * @instance + * @param {google.cloud.dialogflow.cx.v3.IDetectIntentRequest} request DetectIntentRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Sessions.ServerStreamingDetectIntentCallback} callback Node-style callback called with the error, if any, and DetectIntentResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Sessions.prototype.serverStreamingDetectIntent = function serverStreamingDetectIntent(request, callback) { + return this.rpcCall(serverStreamingDetectIntent, $root.google.cloud.dialogflow.cx.v3.DetectIntentRequest, $root.google.cloud.dialogflow.cx.v3.DetectIntentResponse, request, callback); + }, "name", { value: "ServerStreamingDetectIntent" }); - /** - * Decodes a ConditionBoostSpec message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec} ConditionBoostSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConditionBoostSpec.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Calls ServerStreamingDetectIntent. + * @function serverStreamingDetectIntent + * @memberof google.cloud.dialogflow.cx.v3.Sessions + * @instance + * @param {google.cloud.dialogflow.cx.v3.IDetectIntentRequest} request DetectIntentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Verifies a ConditionBoostSpec message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ConditionBoostSpec.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.condition != null && message.hasOwnProperty("condition")) - if (!$util.isString(message.condition)) - return "condition: string expected"; - if (message.boost != null && message.hasOwnProperty("boost")) - if (typeof message.boost !== "number") - return "boost: number expected"; - if (message.boostControlSpec != null && message.hasOwnProperty("boostControlSpec")) { - var error = $root.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.verify(message.boostControlSpec); - if (error) - return "boostControlSpec." + error; - } - return null; - }; + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Sessions|streamingDetectIntent}. + * @memberof google.cloud.dialogflow.cx.v3.Sessions + * @typedef StreamingDetectIntentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse} [response] StreamingDetectIntentResponse + */ - /** - * Creates a ConditionBoostSpec message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec} ConditionBoostSpec - */ - ConditionBoostSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec(); - if (object.condition != null) - message.condition = String(object.condition); - if (object.boost != null) - message.boost = Number(object.boost); - if (object.boostControlSpec != null) { - if (typeof object.boostControlSpec !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.boostControlSpec: object expected"); - message.boostControlSpec = $root.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.fromObject(object.boostControlSpec); - } - return message; - }; + /** + * Calls StreamingDetectIntent. + * @function streamingDetectIntent + * @memberof google.cloud.dialogflow.cx.v3.Sessions + * @instance + * @param {google.cloud.dialogflow.cx.v3.IStreamingDetectIntentRequest} request StreamingDetectIntentRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Sessions.StreamingDetectIntentCallback} callback Node-style callback called with the error, if any, and StreamingDetectIntentResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Sessions.prototype.streamingDetectIntent = function streamingDetectIntent(request, callback) { + return this.rpcCall(streamingDetectIntent, $root.google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest, $root.google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse, request, callback); + }, "name", { value: "StreamingDetectIntent" }); - /** - * Creates a plain object from a ConditionBoostSpec message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec - * @static - * @param {google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec} message ConditionBoostSpec - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ConditionBoostSpec.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.condition = ""; - object.boost = 0; - object.boostControlSpec = null; - } - if (message.condition != null && message.hasOwnProperty("condition")) - object.condition = message.condition; - if (message.boost != null && message.hasOwnProperty("boost")) - object.boost = options.json && !isFinite(message.boost) ? String(message.boost) : message.boost; - if (message.boostControlSpec != null && message.hasOwnProperty("boostControlSpec")) - object.boostControlSpec = $root.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.toObject(message.boostControlSpec, options); - return object; - }; + /** + * Calls StreamingDetectIntent. + * @function streamingDetectIntent + * @memberof google.cloud.dialogflow.cx.v3.Sessions + * @instance + * @param {google.cloud.dialogflow.cx.v3.IStreamingDetectIntentRequest} request StreamingDetectIntentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Converts this ConditionBoostSpec to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec - * @instance - * @returns {Object.} JSON object - */ - ConditionBoostSpec.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Sessions|matchIntent}. + * @memberof google.cloud.dialogflow.cx.v3.Sessions + * @typedef MatchIntentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.MatchIntentResponse} [response] MatchIntentResponse + */ - /** - * Gets the default type url for ConditionBoostSpec - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ConditionBoostSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec"; - }; + /** + * Calls MatchIntent. + * @function matchIntent + * @memberof google.cloud.dialogflow.cx.v3.Sessions + * @instance + * @param {google.cloud.dialogflow.cx.v3.IMatchIntentRequest} request MatchIntentRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Sessions.MatchIntentCallback} callback Node-style callback called with the error, if any, and MatchIntentResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Sessions.prototype.matchIntent = function matchIntent(request, callback) { + return this.rpcCall(matchIntent, $root.google.cloud.dialogflow.cx.v3.MatchIntentRequest, $root.google.cloud.dialogflow.cx.v3.MatchIntentResponse, request, callback); + }, "name", { value: "MatchIntent" }); - ConditionBoostSpec.BoostControlSpec = (function() { + /** + * Calls MatchIntent. + * @function matchIntent + * @memberof google.cloud.dialogflow.cx.v3.Sessions + * @instance + * @param {google.cloud.dialogflow.cx.v3.IMatchIntentRequest} request MatchIntentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Properties of a BoostControlSpec. - * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec - * @interface IBoostControlSpec - * @property {string|null} [fieldName] BoostControlSpec fieldName - * @property {google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.AttributeType|null} [attributeType] BoostControlSpec attributeType - * @property {google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.InterpolationType|null} [interpolationType] BoostControlSpec interpolationType - * @property {Array.|null} [controlPoints] BoostControlSpec controlPoints - */ + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Sessions|fulfillIntent}. + * @memberof google.cloud.dialogflow.cx.v3.Sessions + * @typedef FulfillIntentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.FulfillIntentResponse} [response] FulfillIntentResponse + */ - /** - * Constructs a new BoostControlSpec. - * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec - * @classdesc Represents a BoostControlSpec. - * @implements IBoostControlSpec - * @constructor - * @param {google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.IBoostControlSpec=} [properties] Properties to set - */ - function BoostControlSpec(properties) { - this.controlPoints = []; - 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]]; - } + /** + * Calls FulfillIntent. + * @function fulfillIntent + * @memberof google.cloud.dialogflow.cx.v3.Sessions + * @instance + * @param {google.cloud.dialogflow.cx.v3.IFulfillIntentRequest} request FulfillIntentRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Sessions.FulfillIntentCallback} callback Node-style callback called with the error, if any, and FulfillIntentResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Sessions.prototype.fulfillIntent = function fulfillIntent(request, callback) { + return this.rpcCall(fulfillIntent, $root.google.cloud.dialogflow.cx.v3.FulfillIntentRequest, $root.google.cloud.dialogflow.cx.v3.FulfillIntentResponse, request, callback); + }, "name", { value: "FulfillIntent" }); - /** - * BoostControlSpec fieldName. - * @member {string} fieldName - * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec - * @instance - */ - BoostControlSpec.prototype.fieldName = ""; + /** + * Calls FulfillIntent. + * @function fulfillIntent + * @memberof google.cloud.dialogflow.cx.v3.Sessions + * @instance + * @param {google.cloud.dialogflow.cx.v3.IFulfillIntentRequest} request FulfillIntentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * BoostControlSpec attributeType. - * @member {google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.AttributeType} attributeType - * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec - * @instance - */ - BoostControlSpec.prototype.attributeType = 0; + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Sessions|submitAnswerFeedback}. + * @memberof google.cloud.dialogflow.cx.v3.Sessions + * @typedef SubmitAnswerFeedbackCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.AnswerFeedback} [response] AnswerFeedback + */ - /** - * BoostControlSpec interpolationType. - * @member {google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.InterpolationType} interpolationType - * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec - * @instance - */ - BoostControlSpec.prototype.interpolationType = 0; + /** + * Calls SubmitAnswerFeedback. + * @function submitAnswerFeedback + * @memberof google.cloud.dialogflow.cx.v3.Sessions + * @instance + * @param {google.cloud.dialogflow.cx.v3.ISubmitAnswerFeedbackRequest} request SubmitAnswerFeedbackRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Sessions.SubmitAnswerFeedbackCallback} callback Node-style callback called with the error, if any, and AnswerFeedback + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Sessions.prototype.submitAnswerFeedback = function submitAnswerFeedback(request, callback) { + return this.rpcCall(submitAnswerFeedback, $root.google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest, $root.google.cloud.dialogflow.cx.v3.AnswerFeedback, request, callback); + }, "name", { value: "SubmitAnswerFeedback" }); - /** - * BoostControlSpec controlPoints. - * @member {Array.} controlPoints - * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec - * @instance - */ - BoostControlSpec.prototype.controlPoints = $util.emptyArray; + /** + * Calls SubmitAnswerFeedback. + * @function submitAnswerFeedback + * @memberof google.cloud.dialogflow.cx.v3.Sessions + * @instance + * @param {google.cloud.dialogflow.cx.v3.ISubmitAnswerFeedbackRequest} request SubmitAnswerFeedbackRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Creates a new BoostControlSpec instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec - * @static - * @param {google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.IBoostControlSpec=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec} BoostControlSpec instance - */ - BoostControlSpec.create = function create(properties) { - return new BoostControlSpec(properties); - }; + return Sessions; + })(); - /** - * Encodes the specified BoostControlSpec message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec - * @static - * @param {google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.IBoostControlSpec} message BoostControlSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BoostControlSpec.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.fieldName != null && Object.hasOwnProperty.call(message, "fieldName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.fieldName); - if (message.attributeType != null && Object.hasOwnProperty.call(message, "attributeType")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.attributeType); - if (message.interpolationType != null && Object.hasOwnProperty.call(message, "interpolationType")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.interpolationType); - if (message.controlPoints != null && message.controlPoints.length) - for (var i = 0; i < message.controlPoints.length; ++i) - $root.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint.encode(message.controlPoints[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; + v3.AnswerFeedback = (function() { - /** - * Encodes the specified BoostControlSpec message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec - * @static - * @param {google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.IBoostControlSpec} message BoostControlSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BoostControlSpec.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Properties of an AnswerFeedback. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IAnswerFeedback + * @property {google.cloud.dialogflow.cx.v3.AnswerFeedback.Rating|null} [rating] AnswerFeedback rating + * @property {google.cloud.dialogflow.cx.v3.AnswerFeedback.IRatingReason|null} [ratingReason] AnswerFeedback ratingReason + * @property {string|null} [customRating] AnswerFeedback customRating + */ - /** - * Decodes a BoostControlSpec message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec - * @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.BoostSpec.ConditionBoostSpec.BoostControlSpec} BoostControlSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BoostControlSpec.decode = function decode(reader, length, error) { - 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.BoostSpec.ConditionBoostSpec.BoostControlSpec(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.fieldName = reader.string(); - break; - } - case 2: { - message.attributeType = reader.int32(); - break; - } - case 3: { - message.interpolationType = reader.int32(); - break; - } - case 4: { - if (!(message.controlPoints && message.controlPoints.length)) - message.controlPoints = []; - message.controlPoints.push($root.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Constructs a new AnswerFeedback. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents an AnswerFeedback. + * @implements IAnswerFeedback + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IAnswerFeedback=} [properties] Properties to set + */ + function AnswerFeedback(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]]; + } - /** - * Decodes a BoostControlSpec message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec} BoostControlSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BoostControlSpec.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * AnswerFeedback rating. + * @member {google.cloud.dialogflow.cx.v3.AnswerFeedback.Rating} rating + * @memberof google.cloud.dialogflow.cx.v3.AnswerFeedback + * @instance + */ + AnswerFeedback.prototype.rating = 0; - /** - * Verifies a BoostControlSpec message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BoostControlSpec.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.fieldName != null && message.hasOwnProperty("fieldName")) - if (!$util.isString(message.fieldName)) - return "fieldName: string expected"; - if (message.attributeType != null && message.hasOwnProperty("attributeType")) - switch (message.attributeType) { - default: - return "attributeType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.interpolationType != null && message.hasOwnProperty("interpolationType")) - switch (message.interpolationType) { - default: - return "interpolationType: enum value expected"; - case 0: - case 1: - break; - } - if (message.controlPoints != null && message.hasOwnProperty("controlPoints")) { - if (!Array.isArray(message.controlPoints)) - return "controlPoints: array expected"; - for (var i = 0; i < message.controlPoints.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint.verify(message.controlPoints[i]); - if (error) - return "controlPoints." + error; - } - } - return null; - }; + /** + * AnswerFeedback ratingReason. + * @member {google.cloud.dialogflow.cx.v3.AnswerFeedback.IRatingReason|null|undefined} ratingReason + * @memberof google.cloud.dialogflow.cx.v3.AnswerFeedback + * @instance + */ + AnswerFeedback.prototype.ratingReason = null; - /** - * Creates a BoostControlSpec message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec} BoostControlSpec - */ - BoostControlSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec(); - if (object.fieldName != null) - message.fieldName = String(object.fieldName); - switch (object.attributeType) { - default: - if (typeof object.attributeType === "number") { - message.attributeType = object.attributeType; - break; - } - break; - case "ATTRIBUTE_TYPE_UNSPECIFIED": - case 0: - message.attributeType = 0; - break; - case "NUMERICAL": - case 1: - message.attributeType = 1; - break; - case "FRESHNESS": - case 2: - message.attributeType = 2; + /** + * AnswerFeedback customRating. + * @member {string} customRating + * @memberof google.cloud.dialogflow.cx.v3.AnswerFeedback + * @instance + */ + AnswerFeedback.prototype.customRating = ""; + + /** + * Creates a new AnswerFeedback instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.AnswerFeedback + * @static + * @param {google.cloud.dialogflow.cx.v3.IAnswerFeedback=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.AnswerFeedback} AnswerFeedback instance + */ + AnswerFeedback.create = function create(properties) { + return new AnswerFeedback(properties); + }; + + /** + * Encodes the specified AnswerFeedback message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.AnswerFeedback.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.AnswerFeedback + * @static + * @param {google.cloud.dialogflow.cx.v3.IAnswerFeedback} message AnswerFeedback message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnswerFeedback.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rating != null && Object.hasOwnProperty.call(message, "rating")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.rating); + if (message.ratingReason != null && Object.hasOwnProperty.call(message, "ratingReason")) + $root.google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason.encode(message.ratingReason, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.customRating != null && Object.hasOwnProperty.call(message, "customRating")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.customRating); + return writer; + }; + + /** + * Encodes the specified AnswerFeedback message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.AnswerFeedback.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.AnswerFeedback + * @static + * @param {google.cloud.dialogflow.cx.v3.IAnswerFeedback} message AnswerFeedback message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnswerFeedback.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AnswerFeedback message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.AnswerFeedback + * @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.AnswerFeedback} AnswerFeedback + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnswerFeedback.decode = function decode(reader, length, error) { + 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.AnswerFeedback(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.rating = reader.int32(); break; } - switch (object.interpolationType) { - default: - if (typeof object.interpolationType === "number") { - message.interpolationType = object.interpolationType; - break; - } - break; - case "INTERPOLATION_TYPE_UNSPECIFIED": - case 0: - message.interpolationType = 0; - break; - case "LINEAR": - case 1: - message.interpolationType = 1; + case 2: { + message.ratingReason = $root.google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason.decode(reader, reader.uint32()); break; } - if (object.controlPoints) { - if (!Array.isArray(object.controlPoints)) - throw TypeError(".google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.controlPoints: array expected"); - message.controlPoints = []; - for (var i = 0; i < object.controlPoints.length; ++i) { - if (typeof object.controlPoints[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.controlPoints: object expected"); - message.controlPoints[i] = $root.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint.fromObject(object.controlPoints[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a BoostControlSpec message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec - * @static - * @param {google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec} message BoostControlSpec - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BoostControlSpec.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.controlPoints = []; - if (options.defaults) { - object.fieldName = ""; - object.attributeType = options.enums === String ? "ATTRIBUTE_TYPE_UNSPECIFIED" : 0; - object.interpolationType = options.enums === String ? "INTERPOLATION_TYPE_UNSPECIFIED" : 0; - } - if (message.fieldName != null && message.hasOwnProperty("fieldName")) - object.fieldName = message.fieldName; - if (message.attributeType != null && message.hasOwnProperty("attributeType")) - object.attributeType = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.AttributeType[message.attributeType] === undefined ? message.attributeType : $root.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.AttributeType[message.attributeType] : message.attributeType; - if (message.interpolationType != null && message.hasOwnProperty("interpolationType")) - object.interpolationType = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.InterpolationType[message.interpolationType] === undefined ? message.interpolationType : $root.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.InterpolationType[message.interpolationType] : message.interpolationType; - if (message.controlPoints && message.controlPoints.length) { - object.controlPoints = []; - for (var j = 0; j < message.controlPoints.length; ++j) - object.controlPoints[j] = $root.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint.toObject(message.controlPoints[j], options); + case 3: { + message.customRating = reader.string(); + break; } - return object; - }; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Converts this BoostControlSpec to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec - * @instance - * @returns {Object.} JSON object - */ - BoostControlSpec.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Decodes an AnswerFeedback message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.AnswerFeedback + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.AnswerFeedback} AnswerFeedback + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnswerFeedback.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Gets the default type url for BoostControlSpec - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BoostControlSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec"; - }; + /** + * Verifies an AnswerFeedback message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.AnswerFeedback + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AnswerFeedback.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rating != null && message.hasOwnProperty("rating")) + switch (message.rating) { + default: + return "rating: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.ratingReason != null && message.hasOwnProperty("ratingReason")) { + var error = $root.google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason.verify(message.ratingReason); + if (error) + return "ratingReason." + error; + } + if (message.customRating != null && message.hasOwnProperty("customRating")) + if (!$util.isString(message.customRating)) + return "customRating: string expected"; + return null; + }; - /** - * AttributeType enum. - * @name google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.AttributeType - * @enum {number} - * @property {number} ATTRIBUTE_TYPE_UNSPECIFIED=0 ATTRIBUTE_TYPE_UNSPECIFIED value - * @property {number} NUMERICAL=1 NUMERICAL value - * @property {number} FRESHNESS=2 FRESHNESS value - */ - BoostControlSpec.AttributeType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ATTRIBUTE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "NUMERICAL"] = 1; - values[valuesById[2] = "FRESHNESS"] = 2; - return values; - })(); + /** + * Creates an AnswerFeedback message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.AnswerFeedback + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.AnswerFeedback} AnswerFeedback + */ + AnswerFeedback.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.AnswerFeedback) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.AnswerFeedback(); + switch (object.rating) { + default: + if (typeof object.rating === "number") { + message.rating = object.rating; + break; + } + break; + case "RATING_UNSPECIFIED": + case 0: + message.rating = 0; + break; + case "THUMBS_UP": + case 1: + message.rating = 1; + break; + case "THUMBS_DOWN": + case 2: + message.rating = 2; + break; + } + if (object.ratingReason != null) { + if (typeof object.ratingReason !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.AnswerFeedback.ratingReason: object expected"); + message.ratingReason = $root.google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason.fromObject(object.ratingReason); + } + if (object.customRating != null) + message.customRating = String(object.customRating); + return message; + }; - /** - * InterpolationType enum. - * @name google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.InterpolationType - * @enum {number} - * @property {number} INTERPOLATION_TYPE_UNSPECIFIED=0 INTERPOLATION_TYPE_UNSPECIFIED value - * @property {number} LINEAR=1 LINEAR value - */ - BoostControlSpec.InterpolationType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "INTERPOLATION_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "LINEAR"] = 1; - return values; - })(); + /** + * Creates a plain object from an AnswerFeedback message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.AnswerFeedback + * @static + * @param {google.cloud.dialogflow.cx.v3.AnswerFeedback} message AnswerFeedback + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AnswerFeedback.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.rating = options.enums === String ? "RATING_UNSPECIFIED" : 0; + object.ratingReason = null; + object.customRating = ""; + } + if (message.rating != null && message.hasOwnProperty("rating")) + object.rating = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.AnswerFeedback.Rating[message.rating] === undefined ? message.rating : $root.google.cloud.dialogflow.cx.v3.AnswerFeedback.Rating[message.rating] : message.rating; + if (message.ratingReason != null && message.hasOwnProperty("ratingReason")) + object.ratingReason = $root.google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason.toObject(message.ratingReason, options); + if (message.customRating != null && message.hasOwnProperty("customRating")) + object.customRating = message.customRating; + return object; + }; - BoostControlSpec.ControlPoint = (function() { + /** + * Converts this AnswerFeedback to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.AnswerFeedback + * @instance + * @returns {Object.} JSON object + */ + AnswerFeedback.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Properties of a ControlPoint. - * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec - * @interface IControlPoint - * @property {string|null} [attributeValue] ControlPoint attributeValue - * @property {number|null} [boostAmount] ControlPoint boostAmount - */ - - /** - * Constructs a new ControlPoint. - * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec - * @classdesc Represents a ControlPoint. - * @implements IControlPoint - * @constructor - * @param {google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.IControlPoint=} [properties] Properties to set - */ - function ControlPoint(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]]; - } + /** + * Gets the default type url for AnswerFeedback + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.AnswerFeedback + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AnswerFeedback.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.AnswerFeedback"; + }; - /** - * ControlPoint attributeValue. - * @member {string} attributeValue - * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint - * @instance - */ - ControlPoint.prototype.attributeValue = ""; + /** + * Rating enum. + * @name google.cloud.dialogflow.cx.v3.AnswerFeedback.Rating + * @enum {number} + * @property {number} RATING_UNSPECIFIED=0 RATING_UNSPECIFIED value + * @property {number} THUMBS_UP=1 THUMBS_UP value + * @property {number} THUMBS_DOWN=2 THUMBS_DOWN value + */ + AnswerFeedback.Rating = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RATING_UNSPECIFIED"] = 0; + values[valuesById[1] = "THUMBS_UP"] = 1; + values[valuesById[2] = "THUMBS_DOWN"] = 2; + return values; + })(); - /** - * ControlPoint boostAmount. - * @member {number} boostAmount - * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint - * @instance - */ - ControlPoint.prototype.boostAmount = 0; + AnswerFeedback.RatingReason = (function() { - /** - * Creates a new ControlPoint instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint - * @static - * @param {google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.IControlPoint=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint} ControlPoint instance - */ - ControlPoint.create = function create(properties) { - return new ControlPoint(properties); - }; + /** + * Properties of a RatingReason. + * @memberof google.cloud.dialogflow.cx.v3.AnswerFeedback + * @interface IRatingReason + * @property {Array.|null} [reasonLabels] RatingReason reasonLabels + * @property {string|null} [feedback] RatingReason feedback + */ - /** - * Encodes the specified ControlPoint message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint - * @static - * @param {google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.IControlPoint} message ControlPoint message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ControlPoint.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.attributeValue != null && Object.hasOwnProperty.call(message, "attributeValue")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.attributeValue); - if (message.boostAmount != null && Object.hasOwnProperty.call(message, "boostAmount")) - writer.uint32(/* id 2, wireType 5 =*/21).float(message.boostAmount); - return writer; - }; + /** + * Constructs a new RatingReason. + * @memberof google.cloud.dialogflow.cx.v3.AnswerFeedback + * @classdesc Represents a RatingReason. + * @implements IRatingReason + * @constructor + * @param {google.cloud.dialogflow.cx.v3.AnswerFeedback.IRatingReason=} [properties] Properties to set + */ + function RatingReason(properties) { + this.reasonLabels = []; + 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]]; + } - /** - * Encodes the specified ControlPoint message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint - * @static - * @param {google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.IControlPoint} message ControlPoint message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ControlPoint.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * RatingReason reasonLabels. + * @member {Array.} reasonLabels + * @memberof google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason + * @instance + */ + RatingReason.prototype.reasonLabels = $util.emptyArray; - /** - * Decodes a ControlPoint message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint - * @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.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint} ControlPoint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ControlPoint.decode = function decode(reader, length, error) { - 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.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.attributeValue = reader.string(); - break; - } - case 2: { - message.boostAmount = reader.float(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * RatingReason feedback. + * @member {string} feedback + * @memberof google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason + * @instance + */ + RatingReason.prototype.feedback = ""; - /** - * Decodes a ControlPoint message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint} ControlPoint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ControlPoint.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a new RatingReason instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason + * @static + * @param {google.cloud.dialogflow.cx.v3.AnswerFeedback.IRatingReason=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason} RatingReason instance + */ + RatingReason.create = function create(properties) { + return new RatingReason(properties); + }; - /** - * Verifies a ControlPoint message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ControlPoint.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.attributeValue != null && message.hasOwnProperty("attributeValue")) - if (!$util.isString(message.attributeValue)) - return "attributeValue: string expected"; - if (message.boostAmount != null && message.hasOwnProperty("boostAmount")) - if (typeof message.boostAmount !== "number") - return "boostAmount: number expected"; - return null; - }; + /** + * Encodes the specified RatingReason message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason + * @static + * @param {google.cloud.dialogflow.cx.v3.AnswerFeedback.IRatingReason} message RatingReason message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RatingReason.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.feedback != null && Object.hasOwnProperty.call(message, "feedback")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.feedback); + if (message.reasonLabels != null && message.reasonLabels.length) + for (var i = 0; i < message.reasonLabels.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.reasonLabels[i]); + return writer; + }; - /** - * Creates a ControlPoint message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint} ControlPoint - */ - ControlPoint.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint(); - if (object.attributeValue != null) - message.attributeValue = String(object.attributeValue); - if (object.boostAmount != null) - message.boostAmount = Number(object.boostAmount); - return message; - }; + /** + * Encodes the specified RatingReason message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason + * @static + * @param {google.cloud.dialogflow.cx.v3.AnswerFeedback.IRatingReason} message RatingReason message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RatingReason.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates a plain object from a ControlPoint message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint - * @static - * @param {google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint} message ControlPoint - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ControlPoint.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.attributeValue = ""; - object.boostAmount = 0; + /** + * Decodes a RatingReason message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason + * @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.AnswerFeedback.RatingReason} RatingReason + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RatingReason.decode = function decode(reader, length, error) { + 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.AnswerFeedback.RatingReason(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 3: { + if (!(message.reasonLabels && message.reasonLabels.length)) + message.reasonLabels = []; + message.reasonLabels.push(reader.string()); + break; } - if (message.attributeValue != null && message.hasOwnProperty("attributeValue")) - object.attributeValue = message.attributeValue; - if (message.boostAmount != null && message.hasOwnProperty("boostAmount")) - object.boostAmount = options.json && !isFinite(message.boostAmount) ? String(message.boostAmount) : message.boostAmount; - return object; - }; + case 2: { + message.feedback = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Converts this ControlPoint to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint - * @instance - * @returns {Object.} JSON object - */ - ControlPoint.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Decodes a RatingReason message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason} RatingReason + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RatingReason.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Gets the default type url for ControlPoint - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ControlPoint.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint"; - }; + /** + * Verifies a RatingReason message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RatingReason.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.reasonLabels != null && message.hasOwnProperty("reasonLabels")) { + if (!Array.isArray(message.reasonLabels)) + return "reasonLabels: array expected"; + for (var i = 0; i < message.reasonLabels.length; ++i) + if (!$util.isString(message.reasonLabels[i])) + return "reasonLabels: string[] expected"; + } + if (message.feedback != null && message.hasOwnProperty("feedback")) + if (!$util.isString(message.feedback)) + return "feedback: string expected"; + return null; + }; - return ControlPoint; - })(); + /** + * Creates a RatingReason message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason} RatingReason + */ + RatingReason.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason(); + if (object.reasonLabels) { + if (!Array.isArray(object.reasonLabels)) + throw TypeError(".google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason.reasonLabels: array expected"); + message.reasonLabels = []; + for (var i = 0; i < object.reasonLabels.length; ++i) + message.reasonLabels[i] = String(object.reasonLabels[i]); + } + if (object.feedback != null) + message.feedback = String(object.feedback); + return message; + }; - return BoostControlSpec; - })(); + /** + * Creates a plain object from a RatingReason message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason + * @static + * @param {google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason} message RatingReason + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RatingReason.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.reasonLabels = []; + if (options.defaults) + object.feedback = ""; + if (message.feedback != null && message.hasOwnProperty("feedback")) + object.feedback = message.feedback; + if (message.reasonLabels && message.reasonLabels.length) { + object.reasonLabels = []; + for (var j = 0; j < message.reasonLabels.length; ++j) + object.reasonLabels[j] = message.reasonLabels[j]; + } + return object; + }; - return ConditionBoostSpec; + /** + * Converts this RatingReason to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason + * @instance + * @returns {Object.} JSON object + */ + RatingReason.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RatingReason + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RatingReason.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason"; + }; + + return RatingReason; })(); - return BoostSpec; + return AnswerFeedback; })(); - v3.BoostSpecs = (function() { + v3.SubmitAnswerFeedbackRequest = (function() { /** - * Properties of a BoostSpecs. + * Properties of a SubmitAnswerFeedbackRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IBoostSpecs - * @property {Array.|null} [dataStores] BoostSpecs dataStores - * @property {Array.|null} [spec] BoostSpecs spec + * @interface ISubmitAnswerFeedbackRequest + * @property {string|null} [session] SubmitAnswerFeedbackRequest session + * @property {string|null} [responseId] SubmitAnswerFeedbackRequest responseId + * @property {google.cloud.dialogflow.cx.v3.IAnswerFeedback|null} [answerFeedback] SubmitAnswerFeedbackRequest answerFeedback + * @property {google.protobuf.IFieldMask|null} [updateMask] SubmitAnswerFeedbackRequest updateMask */ /** - * Constructs a new BoostSpecs. + * Constructs a new SubmitAnswerFeedbackRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a BoostSpecs. - * @implements IBoostSpecs + * @classdesc Represents a SubmitAnswerFeedbackRequest. + * @implements ISubmitAnswerFeedbackRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IBoostSpecs=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.ISubmitAnswerFeedbackRequest=} [properties] Properties to set */ - function BoostSpecs(properties) { - this.dataStores = []; - this.spec = []; + function SubmitAnswerFeedbackRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -64165,97 +62949,119 @@ } /** - * BoostSpecs dataStores. - * @member {Array.} dataStores - * @memberof google.cloud.dialogflow.cx.v3.BoostSpecs + * SubmitAnswerFeedbackRequest session. + * @member {string} session + * @memberof google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest * @instance */ - BoostSpecs.prototype.dataStores = $util.emptyArray; + SubmitAnswerFeedbackRequest.prototype.session = ""; /** - * BoostSpecs spec. - * @member {Array.} spec - * @memberof google.cloud.dialogflow.cx.v3.BoostSpecs + * SubmitAnswerFeedbackRequest responseId. + * @member {string} responseId + * @memberof google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest * @instance */ - BoostSpecs.prototype.spec = $util.emptyArray; + SubmitAnswerFeedbackRequest.prototype.responseId = ""; /** - * Creates a new BoostSpecs instance using the specified properties. + * SubmitAnswerFeedbackRequest answerFeedback. + * @member {google.cloud.dialogflow.cx.v3.IAnswerFeedback|null|undefined} answerFeedback + * @memberof google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest + * @instance + */ + SubmitAnswerFeedbackRequest.prototype.answerFeedback = null; + + /** + * SubmitAnswerFeedbackRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest + * @instance + */ + SubmitAnswerFeedbackRequest.prototype.updateMask = null; + + /** + * Creates a new SubmitAnswerFeedbackRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.BoostSpecs + * @memberof google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IBoostSpecs=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.BoostSpecs} BoostSpecs instance + * @param {google.cloud.dialogflow.cx.v3.ISubmitAnswerFeedbackRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest} SubmitAnswerFeedbackRequest instance */ - BoostSpecs.create = function create(properties) { - return new BoostSpecs(properties); + SubmitAnswerFeedbackRequest.create = function create(properties) { + return new SubmitAnswerFeedbackRequest(properties); }; /** - * Encodes the specified BoostSpecs message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.BoostSpecs.verify|verify} messages. + * Encodes the specified SubmitAnswerFeedbackRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.BoostSpecs + * @memberof google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IBoostSpecs} message BoostSpecs message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ISubmitAnswerFeedbackRequest} message SubmitAnswerFeedbackRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BoostSpecs.encode = function encode(message, writer) { + SubmitAnswerFeedbackRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.dataStores != null && message.dataStores.length) - for (var i = 0; i < message.dataStores.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.dataStores[i]); - if (message.spec != null && message.spec.length) - for (var i = 0; i < message.spec.length; ++i) - $root.google.cloud.dialogflow.cx.v3.BoostSpec.encode(message.spec[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.session != null && Object.hasOwnProperty.call(message, "session")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.session); + if (message.responseId != null && Object.hasOwnProperty.call(message, "responseId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.responseId); + if (message.answerFeedback != null && Object.hasOwnProperty.call(message, "answerFeedback")) + $root.google.cloud.dialogflow.cx.v3.AnswerFeedback.encode(message.answerFeedback, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified BoostSpecs message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.BoostSpecs.verify|verify} messages. + * Encodes the specified SubmitAnswerFeedbackRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.BoostSpecs + * @memberof google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IBoostSpecs} message BoostSpecs message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ISubmitAnswerFeedbackRequest} message SubmitAnswerFeedbackRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BoostSpecs.encodeDelimited = function encodeDelimited(message, writer) { + SubmitAnswerFeedbackRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BoostSpecs message from the specified reader or buffer. + * Decodes a SubmitAnswerFeedbackRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.BoostSpecs + * @memberof google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest * @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.BoostSpecs} BoostSpecs + * @returns {google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest} SubmitAnswerFeedbackRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BoostSpecs.decode = function decode(reader, length, error) { + SubmitAnswerFeedbackRequest.decode = function decode(reader, length, error) { 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.BoostSpecs(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - if (!(message.dataStores && message.dataStores.length)) - message.dataStores = []; - message.dataStores.push(reader.string()); + message.session = reader.string(); break; } case 2: { - if (!(message.spec && message.spec.length)) - message.spec = []; - message.spec.push($root.google.cloud.dialogflow.cx.v3.BoostSpec.decode(reader, reader.uint32())); + message.responseId = reader.string(); + break; + } + case 3: { + message.answerFeedback = $root.google.cloud.dialogflow.cx.v3.AnswerFeedback.decode(reader, reader.uint32()); + break; + } + case 4: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; } default: @@ -64267,162 +63073,161 @@ }; /** - * Decodes a BoostSpecs message from the specified reader or buffer, length delimited. + * Decodes a SubmitAnswerFeedbackRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.BoostSpecs + * @memberof google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.BoostSpecs} BoostSpecs + * @returns {google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest} SubmitAnswerFeedbackRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BoostSpecs.decodeDelimited = function decodeDelimited(reader) { + SubmitAnswerFeedbackRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BoostSpecs message. + * Verifies a SubmitAnswerFeedbackRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.BoostSpecs + * @memberof google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BoostSpecs.verify = function verify(message) { + SubmitAnswerFeedbackRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.dataStores != null && message.hasOwnProperty("dataStores")) { - if (!Array.isArray(message.dataStores)) - return "dataStores: array expected"; - for (var i = 0; i < message.dataStores.length; ++i) - if (!$util.isString(message.dataStores[i])) - return "dataStores: string[] expected"; + if (message.session != null && message.hasOwnProperty("session")) + if (!$util.isString(message.session)) + return "session: string expected"; + if (message.responseId != null && message.hasOwnProperty("responseId")) + if (!$util.isString(message.responseId)) + return "responseId: string expected"; + if (message.answerFeedback != null && message.hasOwnProperty("answerFeedback")) { + var error = $root.google.cloud.dialogflow.cx.v3.AnswerFeedback.verify(message.answerFeedback); + if (error) + return "answerFeedback." + error; } - if (message.spec != null && message.hasOwnProperty("spec")) { - if (!Array.isArray(message.spec)) - return "spec: array expected"; - for (var i = 0; i < message.spec.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.BoostSpec.verify(message.spec[i]); - if (error) - return "spec." + error; - } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; } return null; }; /** - * Creates a BoostSpecs message from a plain object. Also converts values to their respective internal types. + * Creates a SubmitAnswerFeedbackRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.BoostSpecs + * @memberof google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.BoostSpecs} BoostSpecs + * @returns {google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest} SubmitAnswerFeedbackRequest */ - BoostSpecs.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.BoostSpecs) + SubmitAnswerFeedbackRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.BoostSpecs(); - if (object.dataStores) { - if (!Array.isArray(object.dataStores)) - throw TypeError(".google.cloud.dialogflow.cx.v3.BoostSpecs.dataStores: array expected"); - message.dataStores = []; - for (var i = 0; i < object.dataStores.length; ++i) - message.dataStores[i] = String(object.dataStores[i]); + var message = new $root.google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest(); + if (object.session != null) + message.session = String(object.session); + if (object.responseId != null) + message.responseId = String(object.responseId); + if (object.answerFeedback != null) { + if (typeof object.answerFeedback !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest.answerFeedback: object expected"); + message.answerFeedback = $root.google.cloud.dialogflow.cx.v3.AnswerFeedback.fromObject(object.answerFeedback); } - if (object.spec) { - if (!Array.isArray(object.spec)) - throw TypeError(".google.cloud.dialogflow.cx.v3.BoostSpecs.spec: array expected"); - message.spec = []; - for (var i = 0; i < object.spec.length; ++i) { - if (typeof object.spec[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.BoostSpecs.spec: object expected"); - message.spec[i] = $root.google.cloud.dialogflow.cx.v3.BoostSpec.fromObject(object.spec[i]); - } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } return message; }; /** - * Creates a plain object from a BoostSpecs message. Also converts values to other types if specified. + * Creates a plain object from a SubmitAnswerFeedbackRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.BoostSpecs + * @memberof google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest * @static - * @param {google.cloud.dialogflow.cx.v3.BoostSpecs} message BoostSpecs + * @param {google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest} message SubmitAnswerFeedbackRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BoostSpecs.toObject = function toObject(message, options) { + SubmitAnswerFeedbackRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.dataStores = []; - object.spec = []; - } - if (message.dataStores && message.dataStores.length) { - object.dataStores = []; - for (var j = 0; j < message.dataStores.length; ++j) - object.dataStores[j] = message.dataStores[j]; - } - if (message.spec && message.spec.length) { - object.spec = []; - for (var j = 0; j < message.spec.length; ++j) - object.spec[j] = $root.google.cloud.dialogflow.cx.v3.BoostSpec.toObject(message.spec[j], options); + if (options.defaults) { + object.session = ""; + object.responseId = ""; + object.answerFeedback = null; + object.updateMask = null; } + if (message.session != null && message.hasOwnProperty("session")) + object.session = message.session; + if (message.responseId != null && message.hasOwnProperty("responseId")) + object.responseId = message.responseId; + if (message.answerFeedback != null && message.hasOwnProperty("answerFeedback")) + object.answerFeedback = $root.google.cloud.dialogflow.cx.v3.AnswerFeedback.toObject(message.answerFeedback, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; /** - * Converts this BoostSpecs to JSON. + * Converts this SubmitAnswerFeedbackRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.BoostSpecs + * @memberof google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest * @instance * @returns {Object.} JSON object */ - BoostSpecs.prototype.toJSON = function toJSON() { + SubmitAnswerFeedbackRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for BoostSpecs + * Gets the default type url for SubmitAnswerFeedbackRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.BoostSpecs + * @memberof google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - BoostSpecs.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SubmitAnswerFeedbackRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.BoostSpecs"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest"; }; - return BoostSpecs; + return SubmitAnswerFeedbackRequest; })(); - v3.FilterSpecs = (function() { + v3.DetectIntentRequest = (function() { /** - * Properties of a FilterSpecs. + * Properties of a DetectIntentRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IFilterSpecs - * @property {Array.|null} [dataStores] FilterSpecs dataStores - * @property {string|null} [filter] FilterSpecs filter + * @interface IDetectIntentRequest + * @property {string|null} [session] DetectIntentRequest session + * @property {google.cloud.dialogflow.cx.v3.IQueryParameters|null} [queryParams] DetectIntentRequest queryParams + * @property {google.cloud.dialogflow.cx.v3.IQueryInput|null} [queryInput] DetectIntentRequest queryInput + * @property {google.cloud.dialogflow.cx.v3.IOutputAudioConfig|null} [outputAudioConfig] DetectIntentRequest outputAudioConfig + * @property {google.cloud.dialogflow.cx.v3.DetectIntentResponseView|null} [responseView] DetectIntentRequest responseView */ /** - * Constructs a new FilterSpecs. + * Constructs a new DetectIntentRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a FilterSpecs. - * @implements IFilterSpecs + * @classdesc Represents a DetectIntentRequest. + * @implements IDetectIntentRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IFilterSpecs=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IDetectIntentRequest=} [properties] Properties to set */ - function FilterSpecs(properties) { - this.dataStores = []; + function DetectIntentRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -64430,94 +63235,133 @@ } /** - * FilterSpecs dataStores. - * @member {Array.} dataStores - * @memberof google.cloud.dialogflow.cx.v3.FilterSpecs + * DetectIntentRequest session. + * @member {string} session + * @memberof google.cloud.dialogflow.cx.v3.DetectIntentRequest * @instance */ - FilterSpecs.prototype.dataStores = $util.emptyArray; + DetectIntentRequest.prototype.session = ""; /** - * FilterSpecs filter. - * @member {string} filter - * @memberof google.cloud.dialogflow.cx.v3.FilterSpecs + * DetectIntentRequest queryParams. + * @member {google.cloud.dialogflow.cx.v3.IQueryParameters|null|undefined} queryParams + * @memberof google.cloud.dialogflow.cx.v3.DetectIntentRequest * @instance */ - FilterSpecs.prototype.filter = ""; + DetectIntentRequest.prototype.queryParams = null; /** - * Creates a new FilterSpecs instance using the specified properties. + * DetectIntentRequest queryInput. + * @member {google.cloud.dialogflow.cx.v3.IQueryInput|null|undefined} queryInput + * @memberof google.cloud.dialogflow.cx.v3.DetectIntentRequest + * @instance + */ + DetectIntentRequest.prototype.queryInput = null; + + /** + * DetectIntentRequest outputAudioConfig. + * @member {google.cloud.dialogflow.cx.v3.IOutputAudioConfig|null|undefined} outputAudioConfig + * @memberof google.cloud.dialogflow.cx.v3.DetectIntentRequest + * @instance + */ + DetectIntentRequest.prototype.outputAudioConfig = null; + + /** + * DetectIntentRequest responseView. + * @member {google.cloud.dialogflow.cx.v3.DetectIntentResponseView} responseView + * @memberof google.cloud.dialogflow.cx.v3.DetectIntentRequest + * @instance + */ + DetectIntentRequest.prototype.responseView = 0; + + /** + * Creates a new DetectIntentRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.FilterSpecs + * @memberof google.cloud.dialogflow.cx.v3.DetectIntentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IFilterSpecs=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.FilterSpecs} FilterSpecs instance + * @param {google.cloud.dialogflow.cx.v3.IDetectIntentRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.DetectIntentRequest} DetectIntentRequest instance */ - FilterSpecs.create = function create(properties) { - return new FilterSpecs(properties); + DetectIntentRequest.create = function create(properties) { + return new DetectIntentRequest(properties); }; /** - * Encodes the specified FilterSpecs message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.FilterSpecs.verify|verify} messages. + * Encodes the specified DetectIntentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DetectIntentRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.FilterSpecs + * @memberof google.cloud.dialogflow.cx.v3.DetectIntentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IFilterSpecs} message FilterSpecs message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IDetectIntentRequest} message DetectIntentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FilterSpecs.encode = function encode(message, writer) { + DetectIntentRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.dataStores != null && message.dataStores.length) - for (var i = 0; i < message.dataStores.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.dataStores[i]); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); + if (message.session != null && Object.hasOwnProperty.call(message, "session")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.session); + if (message.queryParams != null && Object.hasOwnProperty.call(message, "queryParams")) + $root.google.cloud.dialogflow.cx.v3.QueryParameters.encode(message.queryParams, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.queryInput != null && Object.hasOwnProperty.call(message, "queryInput")) + $root.google.cloud.dialogflow.cx.v3.QueryInput.encode(message.queryInput, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.outputAudioConfig != null && Object.hasOwnProperty.call(message, "outputAudioConfig")) + $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.encode(message.outputAudioConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.responseView != null && Object.hasOwnProperty.call(message, "responseView")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.responseView); return writer; }; /** - * Encodes the specified FilterSpecs message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.FilterSpecs.verify|verify} messages. + * Encodes the specified DetectIntentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DetectIntentRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.FilterSpecs + * @memberof google.cloud.dialogflow.cx.v3.DetectIntentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IFilterSpecs} message FilterSpecs message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IDetectIntentRequest} message DetectIntentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FilterSpecs.encodeDelimited = function encodeDelimited(message, writer) { + DetectIntentRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FilterSpecs message from the specified reader or buffer. + * Decodes a DetectIntentRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.FilterSpecs + * @memberof google.cloud.dialogflow.cx.v3.DetectIntentRequest * @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.FilterSpecs} FilterSpecs + * @returns {google.cloud.dialogflow.cx.v3.DetectIntentRequest} DetectIntentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FilterSpecs.decode = function decode(reader, length, error) { + DetectIntentRequest.decode = function decode(reader, length, error) { 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.FilterSpecs(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.DetectIntentRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - if (!(message.dataStores && message.dataStores.length)) - message.dataStores = []; - message.dataStores.push(reader.string()); + message.session = reader.string(); break; } case 2: { - message.filter = reader.string(); + message.queryParams = $root.google.cloud.dialogflow.cx.v3.QueryParameters.decode(reader, reader.uint32()); + break; + } + case 3: { + message.queryInput = $root.google.cloud.dialogflow.cx.v3.QueryInput.decode(reader, reader.uint32()); + break; + } + case 4: { + message.outputAudioConfig = $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.decode(reader, reader.uint32()); + break; + } + case 9: { + message.responseView = reader.int32(); break; } default: @@ -64529,148 +63373,204 @@ }; /** - * Decodes a FilterSpecs message from the specified reader or buffer, length delimited. + * Decodes a DetectIntentRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.FilterSpecs + * @memberof google.cloud.dialogflow.cx.v3.DetectIntentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.FilterSpecs} FilterSpecs + * @returns {google.cloud.dialogflow.cx.v3.DetectIntentRequest} DetectIntentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FilterSpecs.decodeDelimited = function decodeDelimited(reader) { + DetectIntentRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FilterSpecs message. + * Verifies a DetectIntentRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.FilterSpecs + * @memberof google.cloud.dialogflow.cx.v3.DetectIntentRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FilterSpecs.verify = function verify(message) { + DetectIntentRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.dataStores != null && message.hasOwnProperty("dataStores")) { - if (!Array.isArray(message.dataStores)) - return "dataStores: array expected"; - for (var i = 0; i < message.dataStores.length; ++i) - if (!$util.isString(message.dataStores[i])) - return "dataStores: string[] expected"; + if (message.session != null && message.hasOwnProperty("session")) + if (!$util.isString(message.session)) + return "session: string expected"; + if (message.queryParams != null && message.hasOwnProperty("queryParams")) { + var error = $root.google.cloud.dialogflow.cx.v3.QueryParameters.verify(message.queryParams); + if (error) + return "queryParams." + error; } - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; + if (message.queryInput != null && message.hasOwnProperty("queryInput")) { + var error = $root.google.cloud.dialogflow.cx.v3.QueryInput.verify(message.queryInput); + if (error) + return "queryInput." + error; + } + if (message.outputAudioConfig != null && message.hasOwnProperty("outputAudioConfig")) { + var error = $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.verify(message.outputAudioConfig); + if (error) + return "outputAudioConfig." + error; + } + if (message.responseView != null && message.hasOwnProperty("responseView")) + switch (message.responseView) { + default: + return "responseView: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } return null; }; /** - * Creates a FilterSpecs message from a plain object. Also converts values to their respective internal types. + * Creates a DetectIntentRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.FilterSpecs + * @memberof google.cloud.dialogflow.cx.v3.DetectIntentRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.FilterSpecs} FilterSpecs + * @returns {google.cloud.dialogflow.cx.v3.DetectIntentRequest} DetectIntentRequest */ - FilterSpecs.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.FilterSpecs) + DetectIntentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.DetectIntentRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.FilterSpecs(); - if (object.dataStores) { - if (!Array.isArray(object.dataStores)) - throw TypeError(".google.cloud.dialogflow.cx.v3.FilterSpecs.dataStores: array expected"); - message.dataStores = []; - for (var i = 0; i < object.dataStores.length; ++i) - message.dataStores[i] = String(object.dataStores[i]); + var message = new $root.google.cloud.dialogflow.cx.v3.DetectIntentRequest(); + if (object.session != null) + message.session = String(object.session); + if (object.queryParams != null) { + if (typeof object.queryParams !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.DetectIntentRequest.queryParams: object expected"); + message.queryParams = $root.google.cloud.dialogflow.cx.v3.QueryParameters.fromObject(object.queryParams); + } + if (object.queryInput != null) { + if (typeof object.queryInput !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.DetectIntentRequest.queryInput: object expected"); + message.queryInput = $root.google.cloud.dialogflow.cx.v3.QueryInput.fromObject(object.queryInput); + } + if (object.outputAudioConfig != null) { + if (typeof object.outputAudioConfig !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.DetectIntentRequest.outputAudioConfig: object expected"); + message.outputAudioConfig = $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.fromObject(object.outputAudioConfig); + } + switch (object.responseView) { + default: + if (typeof object.responseView === "number") { + message.responseView = object.responseView; + break; + } + break; + case "DETECT_INTENT_RESPONSE_VIEW_UNSPECIFIED": + case 0: + message.responseView = 0; + break; + case "DETECT_INTENT_RESPONSE_VIEW_FULL": + case 1: + message.responseView = 1; + break; + case "DETECT_INTENT_RESPONSE_VIEW_BASIC": + case 2: + message.responseView = 2; + break; + case "DETECT_INTENT_RESPONSE_VIEW_DEFAULT": + case 3: + message.responseView = 3; + break; } - if (object.filter != null) - message.filter = String(object.filter); return message; }; /** - * Creates a plain object from a FilterSpecs message. Also converts values to other types if specified. + * Creates a plain object from a DetectIntentRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.FilterSpecs + * @memberof google.cloud.dialogflow.cx.v3.DetectIntentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.FilterSpecs} message FilterSpecs + * @param {google.cloud.dialogflow.cx.v3.DetectIntentRequest} message DetectIntentRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FilterSpecs.toObject = function toObject(message, options) { + DetectIntentRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.dataStores = []; - if (options.defaults) - object.filter = ""; - if (message.dataStores && message.dataStores.length) { - object.dataStores = []; - for (var j = 0; j < message.dataStores.length; ++j) - object.dataStores[j] = message.dataStores[j]; + if (options.defaults) { + object.session = ""; + object.queryParams = null; + object.queryInput = null; + object.outputAudioConfig = null; + object.responseView = options.enums === String ? "DETECT_INTENT_RESPONSE_VIEW_UNSPECIFIED" : 0; } - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; + if (message.session != null && message.hasOwnProperty("session")) + object.session = message.session; + if (message.queryParams != null && message.hasOwnProperty("queryParams")) + object.queryParams = $root.google.cloud.dialogflow.cx.v3.QueryParameters.toObject(message.queryParams, options); + if (message.queryInput != null && message.hasOwnProperty("queryInput")) + object.queryInput = $root.google.cloud.dialogflow.cx.v3.QueryInput.toObject(message.queryInput, options); + if (message.outputAudioConfig != null && message.hasOwnProperty("outputAudioConfig")) + object.outputAudioConfig = $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.toObject(message.outputAudioConfig, options); + if (message.responseView != null && message.hasOwnProperty("responseView")) + object.responseView = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.DetectIntentResponseView[message.responseView] === undefined ? message.responseView : $root.google.cloud.dialogflow.cx.v3.DetectIntentResponseView[message.responseView] : message.responseView; return object; }; /** - * Converts this FilterSpecs to JSON. + * Converts this DetectIntentRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.FilterSpecs + * @memberof google.cloud.dialogflow.cx.v3.DetectIntentRequest * @instance * @returns {Object.} JSON object */ - FilterSpecs.prototype.toJSON = function toJSON() { + DetectIntentRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for FilterSpecs + * Gets the default type url for DetectIntentRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.FilterSpecs + * @memberof google.cloud.dialogflow.cx.v3.DetectIntentRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - FilterSpecs.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DetectIntentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.FilterSpecs"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.DetectIntentRequest"; }; - return FilterSpecs; + return DetectIntentRequest; })(); - v3.QueryInput = (function() { + v3.DetectIntentResponse = (function() { /** - * Properties of a QueryInput. + * Properties of a DetectIntentResponse. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IQueryInput - * @property {google.cloud.dialogflow.cx.v3.ITextInput|null} [text] QueryInput text - * @property {google.cloud.dialogflow.cx.v3.IIntentInput|null} [intent] QueryInput intent - * @property {google.cloud.dialogflow.cx.v3.IAudioInput|null} [audio] QueryInput audio - * @property {google.cloud.dialogflow.cx.v3.IEventInput|null} [event] QueryInput event - * @property {google.cloud.dialogflow.cx.v3.IDtmfInput|null} [dtmf] QueryInput dtmf - * @property {string|null} [languageCode] QueryInput languageCode + * @interface IDetectIntentResponse + * @property {string|null} [responseId] DetectIntentResponse responseId + * @property {google.cloud.dialogflow.cx.v3.IQueryResult|null} [queryResult] DetectIntentResponse queryResult + * @property {Uint8Array|null} [outputAudio] DetectIntentResponse outputAudio + * @property {google.cloud.dialogflow.cx.v3.IOutputAudioConfig|null} [outputAudioConfig] DetectIntentResponse outputAudioConfig + * @property {google.cloud.dialogflow.cx.v3.DetectIntentResponse.ResponseType|null} [responseType] DetectIntentResponse responseType + * @property {boolean|null} [allowCancellation] DetectIntentResponse allowCancellation */ /** - * Constructs a new QueryInput. + * Constructs a new DetectIntentResponse. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a QueryInput. - * @implements IQueryInput + * @classdesc Represents a DetectIntentResponse. + * @implements IDetectIntentResponse * @constructor - * @param {google.cloud.dialogflow.cx.v3.IQueryInput=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IDetectIntentResponse=} [properties] Properties to set */ - function QueryInput(properties) { + function DetectIntentResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -64678,161 +63578,147 @@ } /** - * QueryInput text. - * @member {google.cloud.dialogflow.cx.v3.ITextInput|null|undefined} text - * @memberof google.cloud.dialogflow.cx.v3.QueryInput - * @instance - */ - QueryInput.prototype.text = null; - - /** - * QueryInput intent. - * @member {google.cloud.dialogflow.cx.v3.IIntentInput|null|undefined} intent - * @memberof google.cloud.dialogflow.cx.v3.QueryInput + * DetectIntentResponse responseId. + * @member {string} responseId + * @memberof google.cloud.dialogflow.cx.v3.DetectIntentResponse * @instance */ - QueryInput.prototype.intent = null; + DetectIntentResponse.prototype.responseId = ""; /** - * QueryInput audio. - * @member {google.cloud.dialogflow.cx.v3.IAudioInput|null|undefined} audio - * @memberof google.cloud.dialogflow.cx.v3.QueryInput + * DetectIntentResponse queryResult. + * @member {google.cloud.dialogflow.cx.v3.IQueryResult|null|undefined} queryResult + * @memberof google.cloud.dialogflow.cx.v3.DetectIntentResponse * @instance */ - QueryInput.prototype.audio = null; + DetectIntentResponse.prototype.queryResult = null; /** - * QueryInput event. - * @member {google.cloud.dialogflow.cx.v3.IEventInput|null|undefined} event - * @memberof google.cloud.dialogflow.cx.v3.QueryInput + * DetectIntentResponse outputAudio. + * @member {Uint8Array} outputAudio + * @memberof google.cloud.dialogflow.cx.v3.DetectIntentResponse * @instance */ - QueryInput.prototype.event = null; + DetectIntentResponse.prototype.outputAudio = $util.newBuffer([]); /** - * QueryInput dtmf. - * @member {google.cloud.dialogflow.cx.v3.IDtmfInput|null|undefined} dtmf - * @memberof google.cloud.dialogflow.cx.v3.QueryInput + * DetectIntentResponse outputAudioConfig. + * @member {google.cloud.dialogflow.cx.v3.IOutputAudioConfig|null|undefined} outputAudioConfig + * @memberof google.cloud.dialogflow.cx.v3.DetectIntentResponse * @instance */ - QueryInput.prototype.dtmf = null; + DetectIntentResponse.prototype.outputAudioConfig = null; /** - * QueryInput languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3.QueryInput + * DetectIntentResponse responseType. + * @member {google.cloud.dialogflow.cx.v3.DetectIntentResponse.ResponseType} responseType + * @memberof google.cloud.dialogflow.cx.v3.DetectIntentResponse * @instance */ - QueryInput.prototype.languageCode = ""; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + DetectIntentResponse.prototype.responseType = 0; /** - * QueryInput input. - * @member {"text"|"intent"|"audio"|"event"|"dtmf"|undefined} input - * @memberof google.cloud.dialogflow.cx.v3.QueryInput + * DetectIntentResponse allowCancellation. + * @member {boolean} allowCancellation + * @memberof google.cloud.dialogflow.cx.v3.DetectIntentResponse * @instance */ - Object.defineProperty(QueryInput.prototype, "input", { - get: $util.oneOfGetter($oneOfFields = ["text", "intent", "audio", "event", "dtmf"]), - set: $util.oneOfSetter($oneOfFields) - }); + DetectIntentResponse.prototype.allowCancellation = false; /** - * Creates a new QueryInput instance using the specified properties. + * Creates a new DetectIntentResponse instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.QueryInput + * @memberof google.cloud.dialogflow.cx.v3.DetectIntentResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IQueryInput=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.QueryInput} QueryInput instance + * @param {google.cloud.dialogflow.cx.v3.IDetectIntentResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.DetectIntentResponse} DetectIntentResponse instance */ - QueryInput.create = function create(properties) { - return new QueryInput(properties); + DetectIntentResponse.create = function create(properties) { + return new DetectIntentResponse(properties); }; /** - * Encodes the specified QueryInput message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.QueryInput.verify|verify} messages. + * Encodes the specified DetectIntentResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DetectIntentResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.QueryInput + * @memberof google.cloud.dialogflow.cx.v3.DetectIntentResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IQueryInput} message QueryInput message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IDetectIntentResponse} message DetectIntentResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - QueryInput.encode = function encode(message, writer) { + DetectIntentResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.text != null && Object.hasOwnProperty.call(message, "text")) - $root.google.cloud.dialogflow.cx.v3.TextInput.encode(message.text, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.intent != null && Object.hasOwnProperty.call(message, "intent")) - $root.google.cloud.dialogflow.cx.v3.IntentInput.encode(message.intent, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.languageCode); - if (message.audio != null && Object.hasOwnProperty.call(message, "audio")) - $root.google.cloud.dialogflow.cx.v3.AudioInput.encode(message.audio, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.event != null && Object.hasOwnProperty.call(message, "event")) - $root.google.cloud.dialogflow.cx.v3.EventInput.encode(message.event, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.dtmf != null && Object.hasOwnProperty.call(message, "dtmf")) - $root.google.cloud.dialogflow.cx.v3.DtmfInput.encode(message.dtmf, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.responseId != null && Object.hasOwnProperty.call(message, "responseId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.responseId); + if (message.queryResult != null && Object.hasOwnProperty.call(message, "queryResult")) + $root.google.cloud.dialogflow.cx.v3.QueryResult.encode(message.queryResult, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.outputAudio != null && Object.hasOwnProperty.call(message, "outputAudio")) + writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.outputAudio); + if (message.outputAudioConfig != null && Object.hasOwnProperty.call(message, "outputAudioConfig")) + $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.encode(message.outputAudioConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.responseType != null && Object.hasOwnProperty.call(message, "responseType")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.responseType); + if (message.allowCancellation != null && Object.hasOwnProperty.call(message, "allowCancellation")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.allowCancellation); return writer; }; /** - * Encodes the specified QueryInput message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.QueryInput.verify|verify} messages. + * Encodes the specified DetectIntentResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DetectIntentResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.QueryInput + * @memberof google.cloud.dialogflow.cx.v3.DetectIntentResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IQueryInput} message QueryInput message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IDetectIntentResponse} message DetectIntentResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - QueryInput.encodeDelimited = function encodeDelimited(message, writer) { + DetectIntentResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a QueryInput message from the specified reader or buffer. + * Decodes a DetectIntentResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.QueryInput + * @memberof google.cloud.dialogflow.cx.v3.DetectIntentResponse * @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.QueryInput} QueryInput + * @returns {google.cloud.dialogflow.cx.v3.DetectIntentResponse} DetectIntentResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - QueryInput.decode = function decode(reader, length, error) { + DetectIntentResponse.decode = function decode(reader, length, error) { 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.QueryInput(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.DetectIntentResponse(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { + case 1: { + message.responseId = reader.string(); + break; + } case 2: { - message.text = $root.google.cloud.dialogflow.cx.v3.TextInput.decode(reader, reader.uint32()); + message.queryResult = $root.google.cloud.dialogflow.cx.v3.QueryResult.decode(reader, reader.uint32()); break; } - case 3: { - message.intent = $root.google.cloud.dialogflow.cx.v3.IntentInput.decode(reader, reader.uint32()); + case 4: { + message.outputAudio = reader.bytes(); break; } case 5: { - message.audio = $root.google.cloud.dialogflow.cx.v3.AudioInput.decode(reader, reader.uint32()); + message.outputAudioConfig = $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.decode(reader, reader.uint32()); break; } case 6: { - message.event = $root.google.cloud.dialogflow.cx.v3.EventInput.decode(reader, reader.uint32()); + message.responseType = reader.int32(); break; } case 7: { - message.dtmf = $root.google.cloud.dialogflow.cx.v3.DtmfInput.decode(reader, reader.uint32()); - break; - } - case 4: { - message.languageCode = reader.string(); + message.allowCancellation = reader.bool(); break; } default: @@ -64844,251 +63730,228 @@ }; /** - * Decodes a QueryInput message from the specified reader or buffer, length delimited. + * Decodes a DetectIntentResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.QueryInput + * @memberof google.cloud.dialogflow.cx.v3.DetectIntentResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.QueryInput} QueryInput + * @returns {google.cloud.dialogflow.cx.v3.DetectIntentResponse} DetectIntentResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - QueryInput.decodeDelimited = function decodeDelimited(reader) { + DetectIntentResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a QueryInput message. + * Verifies a DetectIntentResponse message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.QueryInput + * @memberof google.cloud.dialogflow.cx.v3.DetectIntentResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - QueryInput.verify = function verify(message) { + DetectIntentResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.text != null && message.hasOwnProperty("text")) { - properties.input = 1; - { - var error = $root.google.cloud.dialogflow.cx.v3.TextInput.verify(message.text); - if (error) - return "text." + error; - } - } - if (message.intent != null && message.hasOwnProperty("intent")) { - if (properties.input === 1) - return "input: multiple values"; - properties.input = 1; - { - var error = $root.google.cloud.dialogflow.cx.v3.IntentInput.verify(message.intent); - if (error) - return "intent." + error; - } - } - if (message.audio != null && message.hasOwnProperty("audio")) { - if (properties.input === 1) - return "input: multiple values"; - properties.input = 1; - { - var error = $root.google.cloud.dialogflow.cx.v3.AudioInput.verify(message.audio); - if (error) - return "audio." + error; - } + if (message.responseId != null && message.hasOwnProperty("responseId")) + if (!$util.isString(message.responseId)) + return "responseId: string expected"; + if (message.queryResult != null && message.hasOwnProperty("queryResult")) { + var error = $root.google.cloud.dialogflow.cx.v3.QueryResult.verify(message.queryResult); + if (error) + return "queryResult." + error; } - if (message.event != null && message.hasOwnProperty("event")) { - if (properties.input === 1) - return "input: multiple values"; - properties.input = 1; - { - var error = $root.google.cloud.dialogflow.cx.v3.EventInput.verify(message.event); - if (error) - return "event." + error; - } + if (message.outputAudio != null && message.hasOwnProperty("outputAudio")) + if (!(message.outputAudio && typeof message.outputAudio.length === "number" || $util.isString(message.outputAudio))) + return "outputAudio: buffer expected"; + if (message.outputAudioConfig != null && message.hasOwnProperty("outputAudioConfig")) { + var error = $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.verify(message.outputAudioConfig); + if (error) + return "outputAudioConfig." + error; } - if (message.dtmf != null && message.hasOwnProperty("dtmf")) { - if (properties.input === 1) - return "input: multiple values"; - properties.input = 1; - { - var error = $root.google.cloud.dialogflow.cx.v3.DtmfInput.verify(message.dtmf); - if (error) - return "dtmf." + error; + if (message.responseType != null && message.hasOwnProperty("responseType")) + switch (message.responseType) { + default: + return "responseType: enum value expected"; + case 0: + case 1: + case 2: + break; } - } - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; + if (message.allowCancellation != null && message.hasOwnProperty("allowCancellation")) + if (typeof message.allowCancellation !== "boolean") + return "allowCancellation: boolean expected"; return null; }; /** - * Creates a QueryInput message from a plain object. Also converts values to their respective internal types. + * Creates a DetectIntentResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.QueryInput + * @memberof google.cloud.dialogflow.cx.v3.DetectIntentResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.QueryInput} QueryInput + * @returns {google.cloud.dialogflow.cx.v3.DetectIntentResponse} DetectIntentResponse */ - QueryInput.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.QueryInput) + DetectIntentResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.DetectIntentResponse) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.QueryInput(); - if (object.text != null) { - if (typeof object.text !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.QueryInput.text: object expected"); - message.text = $root.google.cloud.dialogflow.cx.v3.TextInput.fromObject(object.text); - } - if (object.intent != null) { - if (typeof object.intent !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.QueryInput.intent: object expected"); - message.intent = $root.google.cloud.dialogflow.cx.v3.IntentInput.fromObject(object.intent); - } - if (object.audio != null) { - if (typeof object.audio !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.QueryInput.audio: object expected"); - message.audio = $root.google.cloud.dialogflow.cx.v3.AudioInput.fromObject(object.audio); + var message = new $root.google.cloud.dialogflow.cx.v3.DetectIntentResponse(); + if (object.responseId != null) + message.responseId = String(object.responseId); + if (object.queryResult != null) { + if (typeof object.queryResult !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.DetectIntentResponse.queryResult: object expected"); + message.queryResult = $root.google.cloud.dialogflow.cx.v3.QueryResult.fromObject(object.queryResult); } - if (object.event != null) { - if (typeof object.event !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.QueryInput.event: object expected"); - message.event = $root.google.cloud.dialogflow.cx.v3.EventInput.fromObject(object.event); + if (object.outputAudio != null) + if (typeof object.outputAudio === "string") + $util.base64.decode(object.outputAudio, message.outputAudio = $util.newBuffer($util.base64.length(object.outputAudio)), 0); + else if (object.outputAudio.length >= 0) + message.outputAudio = object.outputAudio; + if (object.outputAudioConfig != null) { + if (typeof object.outputAudioConfig !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.DetectIntentResponse.outputAudioConfig: object expected"); + message.outputAudioConfig = $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.fromObject(object.outputAudioConfig); } - if (object.dtmf != null) { - if (typeof object.dtmf !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.QueryInput.dtmf: object expected"); - message.dtmf = $root.google.cloud.dialogflow.cx.v3.DtmfInput.fromObject(object.dtmf); + switch (object.responseType) { + default: + if (typeof object.responseType === "number") { + message.responseType = object.responseType; + break; + } + break; + case "RESPONSE_TYPE_UNSPECIFIED": + case 0: + message.responseType = 0; + break; + case "PARTIAL": + case 1: + message.responseType = 1; + break; + case "FINAL": + case 2: + message.responseType = 2; + break; } - if (object.languageCode != null) - message.languageCode = String(object.languageCode); + if (object.allowCancellation != null) + message.allowCancellation = Boolean(object.allowCancellation); return message; }; /** - * Creates a plain object from a QueryInput message. Also converts values to other types if specified. + * Creates a plain object from a DetectIntentResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.QueryInput + * @memberof google.cloud.dialogflow.cx.v3.DetectIntentResponse * @static - * @param {google.cloud.dialogflow.cx.v3.QueryInput} message QueryInput + * @param {google.cloud.dialogflow.cx.v3.DetectIntentResponse} message DetectIntentResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - QueryInput.toObject = function toObject(message, options) { + DetectIntentResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.languageCode = ""; - if (message.text != null && message.hasOwnProperty("text")) { - object.text = $root.google.cloud.dialogflow.cx.v3.TextInput.toObject(message.text, options); - if (options.oneofs) - object.input = "text"; - } - if (message.intent != null && message.hasOwnProperty("intent")) { - object.intent = $root.google.cloud.dialogflow.cx.v3.IntentInput.toObject(message.intent, options); - if (options.oneofs) - object.input = "intent"; - } - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; - if (message.audio != null && message.hasOwnProperty("audio")) { - object.audio = $root.google.cloud.dialogflow.cx.v3.AudioInput.toObject(message.audio, options); - if (options.oneofs) - object.input = "audio"; - } - if (message.event != null && message.hasOwnProperty("event")) { - object.event = $root.google.cloud.dialogflow.cx.v3.EventInput.toObject(message.event, options); - if (options.oneofs) - object.input = "event"; - } - if (message.dtmf != null && message.hasOwnProperty("dtmf")) { - object.dtmf = $root.google.cloud.dialogflow.cx.v3.DtmfInput.toObject(message.dtmf, options); - if (options.oneofs) - object.input = "dtmf"; + if (options.defaults) { + object.responseId = ""; + object.queryResult = null; + if (options.bytes === String) + object.outputAudio = ""; + else { + object.outputAudio = []; + if (options.bytes !== Array) + object.outputAudio = $util.newBuffer(object.outputAudio); + } + object.outputAudioConfig = null; + object.responseType = options.enums === String ? "RESPONSE_TYPE_UNSPECIFIED" : 0; + object.allowCancellation = false; } + if (message.responseId != null && message.hasOwnProperty("responseId")) + object.responseId = message.responseId; + if (message.queryResult != null && message.hasOwnProperty("queryResult")) + object.queryResult = $root.google.cloud.dialogflow.cx.v3.QueryResult.toObject(message.queryResult, options); + if (message.outputAudio != null && message.hasOwnProperty("outputAudio")) + object.outputAudio = options.bytes === String ? $util.base64.encode(message.outputAudio, 0, message.outputAudio.length) : options.bytes === Array ? Array.prototype.slice.call(message.outputAudio) : message.outputAudio; + if (message.outputAudioConfig != null && message.hasOwnProperty("outputAudioConfig")) + object.outputAudioConfig = $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.toObject(message.outputAudioConfig, options); + if (message.responseType != null && message.hasOwnProperty("responseType")) + object.responseType = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.DetectIntentResponse.ResponseType[message.responseType] === undefined ? message.responseType : $root.google.cloud.dialogflow.cx.v3.DetectIntentResponse.ResponseType[message.responseType] : message.responseType; + if (message.allowCancellation != null && message.hasOwnProperty("allowCancellation")) + object.allowCancellation = message.allowCancellation; return object; }; /** - * Converts this QueryInput to JSON. + * Converts this DetectIntentResponse to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.QueryInput + * @memberof google.cloud.dialogflow.cx.v3.DetectIntentResponse * @instance * @returns {Object.} JSON object */ - QueryInput.prototype.toJSON = function toJSON() { + DetectIntentResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for QueryInput + * Gets the default type url for DetectIntentResponse * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.QueryInput + * @memberof google.cloud.dialogflow.cx.v3.DetectIntentResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - QueryInput.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DetectIntentResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.QueryInput"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.DetectIntentResponse"; }; - return QueryInput; + /** + * ResponseType enum. + * @name google.cloud.dialogflow.cx.v3.DetectIntentResponse.ResponseType + * @enum {number} + * @property {number} RESPONSE_TYPE_UNSPECIFIED=0 RESPONSE_TYPE_UNSPECIFIED value + * @property {number} PARTIAL=1 PARTIAL value + * @property {number} FINAL=2 FINAL value + */ + DetectIntentResponse.ResponseType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RESPONSE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PARTIAL"] = 1; + values[valuesById[2] = "FINAL"] = 2; + return values; + })(); + + return DetectIntentResponse; })(); - v3.QueryResult = (function() { + v3.StreamingDetectIntentRequest = (function() { /** - * Properties of a QueryResult. + * Properties of a StreamingDetectIntentRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IQueryResult - * @property {string|null} [text] QueryResult text - * @property {string|null} [triggerIntent] QueryResult triggerIntent - * @property {string|null} [transcript] QueryResult transcript - * @property {string|null} [triggerEvent] QueryResult triggerEvent - * @property {google.cloud.dialogflow.cx.v3.IDtmfInput|null} [dtmf] QueryResult dtmf - * @property {string|null} [languageCode] QueryResult languageCode - * @property {google.protobuf.IStruct|null} [parameters] QueryResult parameters - * @property {Array.|null} [responseMessages] QueryResult responseMessages - * @property {Array.|null} [webhookIds] QueryResult webhookIds - * @property {Array.|null} [webhookDisplayNames] QueryResult webhookDisplayNames - * @property {Array.|null} [webhookLatencies] QueryResult webhookLatencies - * @property {Array.|null} [webhookTags] QueryResult webhookTags - * @property {Array.|null} [webhookStatuses] QueryResult webhookStatuses - * @property {Array.|null} [webhookPayloads] QueryResult webhookPayloads - * @property {google.cloud.dialogflow.cx.v3.IPage|null} [currentPage] QueryResult currentPage - * @property {google.cloud.dialogflow.cx.v3.IFlow|null} [currentFlow] QueryResult currentFlow - * @property {google.cloud.dialogflow.cx.v3.IIntent|null} [intent] QueryResult intent - * @property {number|null} [intentDetectionConfidence] QueryResult intentDetectionConfidence - * @property {google.cloud.dialogflow.cx.v3.IMatch|null} [match] QueryResult match - * @property {google.protobuf.IStruct|null} [diagnosticInfo] QueryResult diagnosticInfo - * @property {google.cloud.dialogflow.cx.v3.ISentimentAnalysisResult|null} [sentimentAnalysisResult] QueryResult sentimentAnalysisResult - * @property {google.cloud.dialogflow.cx.v3.IAdvancedSettings|null} [advancedSettings] QueryResult advancedSettings - * @property {boolean|null} [allowAnswerFeedback] QueryResult allowAnswerFeedback - * @property {google.cloud.dialogflow.cx.v3.IDataStoreConnectionSignals|null} [dataStoreConnectionSignals] QueryResult dataStoreConnectionSignals + * @interface IStreamingDetectIntentRequest + * @property {string|null} [session] StreamingDetectIntentRequest session + * @property {google.cloud.dialogflow.cx.v3.IQueryParameters|null} [queryParams] StreamingDetectIntentRequest queryParams + * @property {google.cloud.dialogflow.cx.v3.IQueryInput|null} [queryInput] StreamingDetectIntentRequest queryInput + * @property {google.cloud.dialogflow.cx.v3.IOutputAudioConfig|null} [outputAudioConfig] StreamingDetectIntentRequest outputAudioConfig + * @property {boolean|null} [enablePartialResponse] StreamingDetectIntentRequest enablePartialResponse + * @property {boolean|null} [enableDebuggingInfo] StreamingDetectIntentRequest enableDebuggingInfo + * @property {google.cloud.dialogflow.cx.v3.DetectIntentResponseView|null} [responseView] StreamingDetectIntentRequest responseView */ /** - * Constructs a new QueryResult. + * Constructs a new StreamingDetectIntentRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a QueryResult. - * @implements IQueryResult + * @classdesc Represents a StreamingDetectIntentRequest. + * @implements IStreamingDetectIntentRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IQueryResult=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IStreamingDetectIntentRequest=} [properties] Properties to set */ - function QueryResult(properties) { - this.responseMessages = []; - this.webhookIds = []; - this.webhookDisplayNames = []; - this.webhookLatencies = []; - this.webhookTags = []; - this.webhookStatuses = []; - this.webhookPayloads = []; + function StreamingDetectIntentRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -65096,434 +63959,161 @@ } /** - * QueryResult text. - * @member {string|null|undefined} text - * @memberof google.cloud.dialogflow.cx.v3.QueryResult + * StreamingDetectIntentRequest session. + * @member {string} session + * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest * @instance */ - QueryResult.prototype.text = null; + StreamingDetectIntentRequest.prototype.session = ""; /** - * QueryResult triggerIntent. - * @member {string|null|undefined} triggerIntent - * @memberof google.cloud.dialogflow.cx.v3.QueryResult + * StreamingDetectIntentRequest queryParams. + * @member {google.cloud.dialogflow.cx.v3.IQueryParameters|null|undefined} queryParams + * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest * @instance */ - QueryResult.prototype.triggerIntent = null; + StreamingDetectIntentRequest.prototype.queryParams = null; /** - * QueryResult transcript. - * @member {string|null|undefined} transcript - * @memberof google.cloud.dialogflow.cx.v3.QueryResult + * StreamingDetectIntentRequest queryInput. + * @member {google.cloud.dialogflow.cx.v3.IQueryInput|null|undefined} queryInput + * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest * @instance */ - QueryResult.prototype.transcript = null; + StreamingDetectIntentRequest.prototype.queryInput = null; /** - * QueryResult triggerEvent. - * @member {string|null|undefined} triggerEvent - * @memberof google.cloud.dialogflow.cx.v3.QueryResult + * StreamingDetectIntentRequest outputAudioConfig. + * @member {google.cloud.dialogflow.cx.v3.IOutputAudioConfig|null|undefined} outputAudioConfig + * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest * @instance */ - QueryResult.prototype.triggerEvent = null; + StreamingDetectIntentRequest.prototype.outputAudioConfig = null; /** - * QueryResult dtmf. - * @member {google.cloud.dialogflow.cx.v3.IDtmfInput|null|undefined} dtmf - * @memberof google.cloud.dialogflow.cx.v3.QueryResult + * StreamingDetectIntentRequest enablePartialResponse. + * @member {boolean} enablePartialResponse + * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest * @instance */ - QueryResult.prototype.dtmf = null; + StreamingDetectIntentRequest.prototype.enablePartialResponse = false; /** - * QueryResult languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3.QueryResult - * @instance - */ - QueryResult.prototype.languageCode = ""; - - /** - * QueryResult parameters. - * @member {google.protobuf.IStruct|null|undefined} parameters - * @memberof google.cloud.dialogflow.cx.v3.QueryResult - * @instance - */ - QueryResult.prototype.parameters = null; - - /** - * QueryResult responseMessages. - * @member {Array.} responseMessages - * @memberof google.cloud.dialogflow.cx.v3.QueryResult - * @instance - */ - QueryResult.prototype.responseMessages = $util.emptyArray; - - /** - * QueryResult webhookIds. - * @member {Array.} webhookIds - * @memberof google.cloud.dialogflow.cx.v3.QueryResult - * @instance - */ - QueryResult.prototype.webhookIds = $util.emptyArray; - - /** - * QueryResult webhookDisplayNames. - * @member {Array.} webhookDisplayNames - * @memberof google.cloud.dialogflow.cx.v3.QueryResult - * @instance - */ - QueryResult.prototype.webhookDisplayNames = $util.emptyArray; - - /** - * QueryResult webhookLatencies. - * @member {Array.} webhookLatencies - * @memberof google.cloud.dialogflow.cx.v3.QueryResult - * @instance - */ - QueryResult.prototype.webhookLatencies = $util.emptyArray; - - /** - * QueryResult webhookTags. - * @member {Array.} webhookTags - * @memberof google.cloud.dialogflow.cx.v3.QueryResult - * @instance - */ - QueryResult.prototype.webhookTags = $util.emptyArray; - - /** - * QueryResult webhookStatuses. - * @member {Array.} webhookStatuses - * @memberof google.cloud.dialogflow.cx.v3.QueryResult - * @instance - */ - QueryResult.prototype.webhookStatuses = $util.emptyArray; - - /** - * QueryResult webhookPayloads. - * @member {Array.} webhookPayloads - * @memberof google.cloud.dialogflow.cx.v3.QueryResult - * @instance - */ - QueryResult.prototype.webhookPayloads = $util.emptyArray; - - /** - * QueryResult currentPage. - * @member {google.cloud.dialogflow.cx.v3.IPage|null|undefined} currentPage - * @memberof google.cloud.dialogflow.cx.v3.QueryResult - * @instance - */ - QueryResult.prototype.currentPage = null; - - /** - * QueryResult currentFlow. - * @member {google.cloud.dialogflow.cx.v3.IFlow|null|undefined} currentFlow - * @memberof google.cloud.dialogflow.cx.v3.QueryResult - * @instance - */ - QueryResult.prototype.currentFlow = null; - - /** - * QueryResult intent. - * @member {google.cloud.dialogflow.cx.v3.IIntent|null|undefined} intent - * @memberof google.cloud.dialogflow.cx.v3.QueryResult - * @instance - */ - QueryResult.prototype.intent = null; - - /** - * QueryResult intentDetectionConfidence. - * @member {number} intentDetectionConfidence - * @memberof google.cloud.dialogflow.cx.v3.QueryResult - * @instance - */ - QueryResult.prototype.intentDetectionConfidence = 0; - - /** - * QueryResult match. - * @member {google.cloud.dialogflow.cx.v3.IMatch|null|undefined} match - * @memberof google.cloud.dialogflow.cx.v3.QueryResult - * @instance - */ - QueryResult.prototype.match = null; - - /** - * QueryResult diagnosticInfo. - * @member {google.protobuf.IStruct|null|undefined} diagnosticInfo - * @memberof google.cloud.dialogflow.cx.v3.QueryResult - * @instance - */ - QueryResult.prototype.diagnosticInfo = null; - - /** - * QueryResult sentimentAnalysisResult. - * @member {google.cloud.dialogflow.cx.v3.ISentimentAnalysisResult|null|undefined} sentimentAnalysisResult - * @memberof google.cloud.dialogflow.cx.v3.QueryResult - * @instance - */ - QueryResult.prototype.sentimentAnalysisResult = null; - - /** - * QueryResult advancedSettings. - * @member {google.cloud.dialogflow.cx.v3.IAdvancedSettings|null|undefined} advancedSettings - * @memberof google.cloud.dialogflow.cx.v3.QueryResult - * @instance - */ - QueryResult.prototype.advancedSettings = null; - - /** - * QueryResult allowAnswerFeedback. - * @member {boolean} allowAnswerFeedback - * @memberof google.cloud.dialogflow.cx.v3.QueryResult - * @instance - */ - QueryResult.prototype.allowAnswerFeedback = false; - - /** - * QueryResult dataStoreConnectionSignals. - * @member {google.cloud.dialogflow.cx.v3.IDataStoreConnectionSignals|null|undefined} dataStoreConnectionSignals - * @memberof google.cloud.dialogflow.cx.v3.QueryResult + * StreamingDetectIntentRequest enableDebuggingInfo. + * @member {boolean} enableDebuggingInfo + * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest * @instance */ - QueryResult.prototype.dataStoreConnectionSignals = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + StreamingDetectIntentRequest.prototype.enableDebuggingInfo = false; /** - * QueryResult query. - * @member {"text"|"triggerIntent"|"transcript"|"triggerEvent"|"dtmf"|undefined} query - * @memberof google.cloud.dialogflow.cx.v3.QueryResult + * StreamingDetectIntentRequest responseView. + * @member {google.cloud.dialogflow.cx.v3.DetectIntentResponseView} responseView + * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest * @instance */ - Object.defineProperty(QueryResult.prototype, "query", { - get: $util.oneOfGetter($oneOfFields = ["text", "triggerIntent", "transcript", "triggerEvent", "dtmf"]), - set: $util.oneOfSetter($oneOfFields) - }); + StreamingDetectIntentRequest.prototype.responseView = 0; /** - * Creates a new QueryResult instance using the specified properties. + * Creates a new StreamingDetectIntentRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.QueryResult + * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IQueryResult=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.QueryResult} QueryResult instance + * @param {google.cloud.dialogflow.cx.v3.IStreamingDetectIntentRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest} StreamingDetectIntentRequest instance */ - QueryResult.create = function create(properties) { - return new QueryResult(properties); + StreamingDetectIntentRequest.create = function create(properties) { + return new StreamingDetectIntentRequest(properties); }; /** - * Encodes the specified QueryResult message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.QueryResult.verify|verify} messages. + * Encodes the specified StreamingDetectIntentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.QueryResult + * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IQueryResult} message QueryResult message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IStreamingDetectIntentRequest} message StreamingDetectIntentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - QueryResult.encode = function encode(message, writer) { + StreamingDetectIntentRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.text != null && Object.hasOwnProperty.call(message, "text")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.text); - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); - if (message.parameters != null && Object.hasOwnProperty.call(message, "parameters")) - $root.google.protobuf.Struct.encode(message.parameters, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.responseMessages != null && message.responseMessages.length) - for (var i = 0; i < message.responseMessages.length; ++i) - $root.google.cloud.dialogflow.cx.v3.ResponseMessage.encode(message.responseMessages[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.webhookPayloads != null && message.webhookPayloads.length) - for (var i = 0; i < message.webhookPayloads.length; ++i) - $root.google.protobuf.Struct.encode(message.webhookPayloads[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.currentPage != null && Object.hasOwnProperty.call(message, "currentPage")) - $root.google.cloud.dialogflow.cx.v3.Page.encode(message.currentPage, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.intent != null && Object.hasOwnProperty.call(message, "intent")) - $root.google.cloud.dialogflow.cx.v3.Intent.encode(message.intent, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.intentDetectionConfidence != null && Object.hasOwnProperty.call(message, "intentDetectionConfidence")) - writer.uint32(/* id 9, wireType 5 =*/77).float(message.intentDetectionConfidence); - if (message.diagnosticInfo != null && Object.hasOwnProperty.call(message, "diagnosticInfo")) - $root.google.protobuf.Struct.encode(message.diagnosticInfo, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.triggerIntent != null && Object.hasOwnProperty.call(message, "triggerIntent")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.triggerIntent); - if (message.transcript != null && Object.hasOwnProperty.call(message, "transcript")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.transcript); - if (message.webhookStatuses != null && message.webhookStatuses.length) - for (var i = 0; i < message.webhookStatuses.length; ++i) - $root.google.rpc.Status.encode(message.webhookStatuses[i], writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); - if (message.triggerEvent != null && Object.hasOwnProperty.call(message, "triggerEvent")) - writer.uint32(/* id 14, wireType 2 =*/114).string(message.triggerEvent); - if (message.match != null && Object.hasOwnProperty.call(message, "match")) - $root.google.cloud.dialogflow.cx.v3.Match.encode(message.match, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); - if (message.sentimentAnalysisResult != null && Object.hasOwnProperty.call(message, "sentimentAnalysisResult")) - $root.google.cloud.dialogflow.cx.v3.SentimentAnalysisResult.encode(message.sentimentAnalysisResult, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); - if (message.advancedSettings != null && Object.hasOwnProperty.call(message, "advancedSettings")) - $root.google.cloud.dialogflow.cx.v3.AdvancedSettings.encode(message.advancedSettings, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); - if (message.dtmf != null && Object.hasOwnProperty.call(message, "dtmf")) - $root.google.cloud.dialogflow.cx.v3.DtmfInput.encode(message.dtmf, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); - if (message.webhookIds != null && message.webhookIds.length) - for (var i = 0; i < message.webhookIds.length; ++i) - writer.uint32(/* id 25, wireType 2 =*/202).string(message.webhookIds[i]); - if (message.webhookDisplayNames != null && message.webhookDisplayNames.length) - for (var i = 0; i < message.webhookDisplayNames.length; ++i) - writer.uint32(/* id 26, wireType 2 =*/210).string(message.webhookDisplayNames[i]); - if (message.webhookLatencies != null && message.webhookLatencies.length) - for (var i = 0; i < message.webhookLatencies.length; ++i) - $root.google.protobuf.Duration.encode(message.webhookLatencies[i], writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); - if (message.webhookTags != null && message.webhookTags.length) - for (var i = 0; i < message.webhookTags.length; ++i) - writer.uint32(/* id 29, wireType 2 =*/234).string(message.webhookTags[i]); - if (message.currentFlow != null && Object.hasOwnProperty.call(message, "currentFlow")) - $root.google.cloud.dialogflow.cx.v3.Flow.encode(message.currentFlow, writer.uint32(/* id 31, wireType 2 =*/250).fork()).ldelim(); - if (message.allowAnswerFeedback != null && Object.hasOwnProperty.call(message, "allowAnswerFeedback")) - writer.uint32(/* id 32, wireType 0 =*/256).bool(message.allowAnswerFeedback); - if (message.dataStoreConnectionSignals != null && Object.hasOwnProperty.call(message, "dataStoreConnectionSignals")) - $root.google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.encode(message.dataStoreConnectionSignals, writer.uint32(/* id 35, wireType 2 =*/282).fork()).ldelim(); + if (message.session != null && Object.hasOwnProperty.call(message, "session")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.session); + if (message.queryParams != null && Object.hasOwnProperty.call(message, "queryParams")) + $root.google.cloud.dialogflow.cx.v3.QueryParameters.encode(message.queryParams, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.queryInput != null && Object.hasOwnProperty.call(message, "queryInput")) + $root.google.cloud.dialogflow.cx.v3.QueryInput.encode(message.queryInput, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.outputAudioConfig != null && Object.hasOwnProperty.call(message, "outputAudioConfig")) + $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.encode(message.outputAudioConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.enablePartialResponse != null && Object.hasOwnProperty.call(message, "enablePartialResponse")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.enablePartialResponse); + if (message.enableDebuggingInfo != null && Object.hasOwnProperty.call(message, "enableDebuggingInfo")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.enableDebuggingInfo); + if (message.responseView != null && Object.hasOwnProperty.call(message, "responseView")) + writer.uint32(/* id 16, wireType 0 =*/128).int32(message.responseView); return writer; }; /** - * Encodes the specified QueryResult message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.QueryResult.verify|verify} messages. + * Encodes the specified StreamingDetectIntentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.QueryResult + * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IQueryResult} message QueryResult message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IStreamingDetectIntentRequest} message StreamingDetectIntentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - QueryResult.encodeDelimited = function encodeDelimited(message, writer) { + StreamingDetectIntentRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a QueryResult message from the specified reader or buffer. + * Decodes a StreamingDetectIntentRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.QueryResult + * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest * @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.QueryResult} QueryResult + * @returns {google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest} StreamingDetectIntentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - QueryResult.decode = function decode(reader, length, error) { + StreamingDetectIntentRequest.decode = function decode(reader, length, error) { 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.QueryResult(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.text = reader.string(); - break; - } - case 11: { - message.triggerIntent = reader.string(); - break; - } - case 12: { - message.transcript = reader.string(); - break; - } - case 14: { - message.triggerEvent = reader.string(); - break; - } - case 23: { - message.dtmf = $root.google.cloud.dialogflow.cx.v3.DtmfInput.decode(reader, reader.uint32()); + message.session = reader.string(); break; } case 2: { - message.languageCode = reader.string(); + message.queryParams = $root.google.cloud.dialogflow.cx.v3.QueryParameters.decode(reader, reader.uint32()); break; } case 3: { - message.parameters = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + message.queryInput = $root.google.cloud.dialogflow.cx.v3.QueryInput.decode(reader, reader.uint32()); break; } case 4: { - if (!(message.responseMessages && message.responseMessages.length)) - message.responseMessages = []; - message.responseMessages.push($root.google.cloud.dialogflow.cx.v3.ResponseMessage.decode(reader, reader.uint32())); - break; - } - case 25: { - if (!(message.webhookIds && message.webhookIds.length)) - message.webhookIds = []; - message.webhookIds.push(reader.string()); - break; - } - case 26: { - if (!(message.webhookDisplayNames && message.webhookDisplayNames.length)) - message.webhookDisplayNames = []; - message.webhookDisplayNames.push(reader.string()); - break; - } - case 27: { - if (!(message.webhookLatencies && message.webhookLatencies.length)) - message.webhookLatencies = []; - message.webhookLatencies.push($root.google.protobuf.Duration.decode(reader, reader.uint32())); - break; - } - case 29: { - if (!(message.webhookTags && message.webhookTags.length)) - message.webhookTags = []; - message.webhookTags.push(reader.string()); - break; - } - case 13: { - if (!(message.webhookStatuses && message.webhookStatuses.length)) - message.webhookStatuses = []; - message.webhookStatuses.push($root.google.rpc.Status.decode(reader, reader.uint32())); - break; - } - case 6: { - if (!(message.webhookPayloads && message.webhookPayloads.length)) - message.webhookPayloads = []; - message.webhookPayloads.push($root.google.protobuf.Struct.decode(reader, reader.uint32())); - break; - } - case 7: { - message.currentPage = $root.google.cloud.dialogflow.cx.v3.Page.decode(reader, reader.uint32()); + message.outputAudioConfig = $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.decode(reader, reader.uint32()); break; } - case 31: { - message.currentFlow = $root.google.cloud.dialogflow.cx.v3.Flow.decode(reader, reader.uint32()); + case 5: { + message.enablePartialResponse = reader.bool(); break; } case 8: { - message.intent = $root.google.cloud.dialogflow.cx.v3.Intent.decode(reader, reader.uint32()); - break; - } - case 9: { - message.intentDetectionConfidence = reader.float(); - break; - } - case 15: { - message.match = $root.google.cloud.dialogflow.cx.v3.Match.decode(reader, reader.uint32()); - break; - } - case 10: { - message.diagnosticInfo = $root.google.protobuf.Struct.decode(reader, reader.uint32()); - break; - } - case 17: { - message.sentimentAnalysisResult = $root.google.cloud.dialogflow.cx.v3.SentimentAnalysisResult.decode(reader, reader.uint32()); - break; - } - case 21: { - message.advancedSettings = $root.google.cloud.dialogflow.cx.v3.AdvancedSettings.decode(reader, reader.uint32()); - break; - } - case 32: { - message.allowAnswerFeedback = reader.bool(); + message.enableDebuggingInfo = reader.bool(); break; } - case 35: { - message.dataStoreConnectionSignals = $root.google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.decode(reader, reader.uint32()); + case 16: { + message.responseView = reader.int32(); break; } default: @@ -65535,493 +64125,236 @@ }; /** - * Decodes a QueryResult message from the specified reader or buffer, length delimited. + * Decodes a StreamingDetectIntentRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.QueryResult + * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.QueryResult} QueryResult + * @returns {google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest} StreamingDetectIntentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - QueryResult.decodeDelimited = function decodeDelimited(reader) { + StreamingDetectIntentRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a QueryResult message. + * Verifies a StreamingDetectIntentRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.QueryResult + * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - QueryResult.verify = function verify(message) { + StreamingDetectIntentRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.text != null && message.hasOwnProperty("text")) { - properties.query = 1; - if (!$util.isString(message.text)) - return "text: string expected"; - } - if (message.triggerIntent != null && message.hasOwnProperty("triggerIntent")) { - if (properties.query === 1) - return "query: multiple values"; - properties.query = 1; - if (!$util.isString(message.triggerIntent)) - return "triggerIntent: string expected"; - } - if (message.transcript != null && message.hasOwnProperty("transcript")) { - if (properties.query === 1) - return "query: multiple values"; - properties.query = 1; - if (!$util.isString(message.transcript)) - return "transcript: string expected"; - } - if (message.triggerEvent != null && message.hasOwnProperty("triggerEvent")) { - if (properties.query === 1) - return "query: multiple values"; - properties.query = 1; - if (!$util.isString(message.triggerEvent)) - return "triggerEvent: string expected"; + if (message.session != null && message.hasOwnProperty("session")) + if (!$util.isString(message.session)) + return "session: string expected"; + if (message.queryParams != null && message.hasOwnProperty("queryParams")) { + var error = $root.google.cloud.dialogflow.cx.v3.QueryParameters.verify(message.queryParams); + if (error) + return "queryParams." + error; } - if (message.dtmf != null && message.hasOwnProperty("dtmf")) { - if (properties.query === 1) - return "query: multiple values"; - properties.query = 1; - { - var error = $root.google.cloud.dialogflow.cx.v3.DtmfInput.verify(message.dtmf); - if (error) - return "dtmf." + error; - } + if (message.queryInput != null && message.hasOwnProperty("queryInput")) { + var error = $root.google.cloud.dialogflow.cx.v3.QueryInput.verify(message.queryInput); + if (error) + return "queryInput." + error; } - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; - if (message.parameters != null && message.hasOwnProperty("parameters")) { - var error = $root.google.protobuf.Struct.verify(message.parameters); + if (message.outputAudioConfig != null && message.hasOwnProperty("outputAudioConfig")) { + var error = $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.verify(message.outputAudioConfig); if (error) - return "parameters." + error; + return "outputAudioConfig." + error; } - if (message.responseMessages != null && message.hasOwnProperty("responseMessages")) { - if (!Array.isArray(message.responseMessages)) - return "responseMessages: array expected"; - for (var i = 0; i < message.responseMessages.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.verify(message.responseMessages[i]); - if (error) - return "responseMessages." + error; + if (message.enablePartialResponse != null && message.hasOwnProperty("enablePartialResponse")) + if (typeof message.enablePartialResponse !== "boolean") + return "enablePartialResponse: boolean expected"; + if (message.enableDebuggingInfo != null && message.hasOwnProperty("enableDebuggingInfo")) + if (typeof message.enableDebuggingInfo !== "boolean") + return "enableDebuggingInfo: boolean expected"; + if (message.responseView != null && message.hasOwnProperty("responseView")) + switch (message.responseView) { + default: + return "responseView: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; } + return null; + }; + + /** + * Creates a StreamingDetectIntentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest} StreamingDetectIntentRequest + */ + StreamingDetectIntentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest(); + if (object.session != null) + message.session = String(object.session); + if (object.queryParams != null) { + if (typeof object.queryParams !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest.queryParams: object expected"); + message.queryParams = $root.google.cloud.dialogflow.cx.v3.QueryParameters.fromObject(object.queryParams); } - if (message.webhookIds != null && message.hasOwnProperty("webhookIds")) { - if (!Array.isArray(message.webhookIds)) - return "webhookIds: array expected"; - for (var i = 0; i < message.webhookIds.length; ++i) - if (!$util.isString(message.webhookIds[i])) - return "webhookIds: string[] expected"; - } - if (message.webhookDisplayNames != null && message.hasOwnProperty("webhookDisplayNames")) { - if (!Array.isArray(message.webhookDisplayNames)) - return "webhookDisplayNames: array expected"; - for (var i = 0; i < message.webhookDisplayNames.length; ++i) - if (!$util.isString(message.webhookDisplayNames[i])) - return "webhookDisplayNames: string[] expected"; + if (object.queryInput != null) { + if (typeof object.queryInput !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest.queryInput: object expected"); + message.queryInput = $root.google.cloud.dialogflow.cx.v3.QueryInput.fromObject(object.queryInput); } - if (message.webhookLatencies != null && message.hasOwnProperty("webhookLatencies")) { - if (!Array.isArray(message.webhookLatencies)) - return "webhookLatencies: array expected"; - for (var i = 0; i < message.webhookLatencies.length; ++i) { - var error = $root.google.protobuf.Duration.verify(message.webhookLatencies[i]); - if (error) - return "webhookLatencies." + error; - } + if (object.outputAudioConfig != null) { + if (typeof object.outputAudioConfig !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest.outputAudioConfig: object expected"); + message.outputAudioConfig = $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.fromObject(object.outputAudioConfig); } - if (message.webhookTags != null && message.hasOwnProperty("webhookTags")) { - if (!Array.isArray(message.webhookTags)) - return "webhookTags: array expected"; - for (var i = 0; i < message.webhookTags.length; ++i) - if (!$util.isString(message.webhookTags[i])) - return "webhookTags: string[] expected"; - } - if (message.webhookStatuses != null && message.hasOwnProperty("webhookStatuses")) { - if (!Array.isArray(message.webhookStatuses)) - return "webhookStatuses: array expected"; - for (var i = 0; i < message.webhookStatuses.length; ++i) { - var error = $root.google.rpc.Status.verify(message.webhookStatuses[i]); - if (error) - return "webhookStatuses." + error; - } - } - if (message.webhookPayloads != null && message.hasOwnProperty("webhookPayloads")) { - if (!Array.isArray(message.webhookPayloads)) - return "webhookPayloads: array expected"; - for (var i = 0; i < message.webhookPayloads.length; ++i) { - var error = $root.google.protobuf.Struct.verify(message.webhookPayloads[i]); - if (error) - return "webhookPayloads." + error; - } - } - if (message.currentPage != null && message.hasOwnProperty("currentPage")) { - var error = $root.google.cloud.dialogflow.cx.v3.Page.verify(message.currentPage); - if (error) - return "currentPage." + error; - } - if (message.currentFlow != null && message.hasOwnProperty("currentFlow")) { - var error = $root.google.cloud.dialogflow.cx.v3.Flow.verify(message.currentFlow); - if (error) - return "currentFlow." + error; - } - if (message.intent != null && message.hasOwnProperty("intent")) { - var error = $root.google.cloud.dialogflow.cx.v3.Intent.verify(message.intent); - if (error) - return "intent." + error; - } - if (message.intentDetectionConfidence != null && message.hasOwnProperty("intentDetectionConfidence")) - if (typeof message.intentDetectionConfidence !== "number") - return "intentDetectionConfidence: number expected"; - if (message.match != null && message.hasOwnProperty("match")) { - var error = $root.google.cloud.dialogflow.cx.v3.Match.verify(message.match); - if (error) - return "match." + error; - } - if (message.diagnosticInfo != null && message.hasOwnProperty("diagnosticInfo")) { - var error = $root.google.protobuf.Struct.verify(message.diagnosticInfo); - if (error) - return "diagnosticInfo." + error; - } - if (message.sentimentAnalysisResult != null && message.hasOwnProperty("sentimentAnalysisResult")) { - var error = $root.google.cloud.dialogflow.cx.v3.SentimentAnalysisResult.verify(message.sentimentAnalysisResult); - if (error) - return "sentimentAnalysisResult." + error; - } - if (message.advancedSettings != null && message.hasOwnProperty("advancedSettings")) { - var error = $root.google.cloud.dialogflow.cx.v3.AdvancedSettings.verify(message.advancedSettings); - if (error) - return "advancedSettings." + error; - } - if (message.allowAnswerFeedback != null && message.hasOwnProperty("allowAnswerFeedback")) - if (typeof message.allowAnswerFeedback !== "boolean") - return "allowAnswerFeedback: boolean expected"; - if (message.dataStoreConnectionSignals != null && message.hasOwnProperty("dataStoreConnectionSignals")) { - var error = $root.google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.verify(message.dataStoreConnectionSignals); - if (error) - return "dataStoreConnectionSignals." + error; - } - return null; - }; - - /** - * Creates a QueryResult message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.QueryResult - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.QueryResult} QueryResult - */ - QueryResult.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.QueryResult) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.QueryResult(); - if (object.text != null) - message.text = String(object.text); - if (object.triggerIntent != null) - message.triggerIntent = String(object.triggerIntent); - if (object.transcript != null) - message.transcript = String(object.transcript); - if (object.triggerEvent != null) - message.triggerEvent = String(object.triggerEvent); - if (object.dtmf != null) { - if (typeof object.dtmf !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.QueryResult.dtmf: object expected"); - message.dtmf = $root.google.cloud.dialogflow.cx.v3.DtmfInput.fromObject(object.dtmf); - } - if (object.languageCode != null) - message.languageCode = String(object.languageCode); - if (object.parameters != null) { - if (typeof object.parameters !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.QueryResult.parameters: object expected"); - message.parameters = $root.google.protobuf.Struct.fromObject(object.parameters); - } - if (object.responseMessages) { - if (!Array.isArray(object.responseMessages)) - throw TypeError(".google.cloud.dialogflow.cx.v3.QueryResult.responseMessages: array expected"); - message.responseMessages = []; - for (var i = 0; i < object.responseMessages.length; ++i) { - if (typeof object.responseMessages[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.QueryResult.responseMessages: object expected"); - message.responseMessages[i] = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.fromObject(object.responseMessages[i]); - } - } - if (object.webhookIds) { - if (!Array.isArray(object.webhookIds)) - throw TypeError(".google.cloud.dialogflow.cx.v3.QueryResult.webhookIds: array expected"); - message.webhookIds = []; - for (var i = 0; i < object.webhookIds.length; ++i) - message.webhookIds[i] = String(object.webhookIds[i]); - } - if (object.webhookDisplayNames) { - if (!Array.isArray(object.webhookDisplayNames)) - throw TypeError(".google.cloud.dialogflow.cx.v3.QueryResult.webhookDisplayNames: array expected"); - message.webhookDisplayNames = []; - for (var i = 0; i < object.webhookDisplayNames.length; ++i) - message.webhookDisplayNames[i] = String(object.webhookDisplayNames[i]); - } - if (object.webhookLatencies) { - if (!Array.isArray(object.webhookLatencies)) - throw TypeError(".google.cloud.dialogflow.cx.v3.QueryResult.webhookLatencies: array expected"); - message.webhookLatencies = []; - for (var i = 0; i < object.webhookLatencies.length; ++i) { - if (typeof object.webhookLatencies[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.QueryResult.webhookLatencies: object expected"); - message.webhookLatencies[i] = $root.google.protobuf.Duration.fromObject(object.webhookLatencies[i]); - } - } - if (object.webhookTags) { - if (!Array.isArray(object.webhookTags)) - throw TypeError(".google.cloud.dialogflow.cx.v3.QueryResult.webhookTags: array expected"); - message.webhookTags = []; - for (var i = 0; i < object.webhookTags.length; ++i) - message.webhookTags[i] = String(object.webhookTags[i]); - } - if (object.webhookStatuses) { - if (!Array.isArray(object.webhookStatuses)) - throw TypeError(".google.cloud.dialogflow.cx.v3.QueryResult.webhookStatuses: array expected"); - message.webhookStatuses = []; - for (var i = 0; i < object.webhookStatuses.length; ++i) { - if (typeof object.webhookStatuses[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.QueryResult.webhookStatuses: object expected"); - message.webhookStatuses[i] = $root.google.rpc.Status.fromObject(object.webhookStatuses[i]); - } - } - if (object.webhookPayloads) { - if (!Array.isArray(object.webhookPayloads)) - throw TypeError(".google.cloud.dialogflow.cx.v3.QueryResult.webhookPayloads: array expected"); - message.webhookPayloads = []; - for (var i = 0; i < object.webhookPayloads.length; ++i) { - if (typeof object.webhookPayloads[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.QueryResult.webhookPayloads: object expected"); - message.webhookPayloads[i] = $root.google.protobuf.Struct.fromObject(object.webhookPayloads[i]); + if (object.enablePartialResponse != null) + message.enablePartialResponse = Boolean(object.enablePartialResponse); + if (object.enableDebuggingInfo != null) + message.enableDebuggingInfo = Boolean(object.enableDebuggingInfo); + switch (object.responseView) { + default: + if (typeof object.responseView === "number") { + message.responseView = object.responseView; + break; } - } - if (object.currentPage != null) { - if (typeof object.currentPage !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.QueryResult.currentPage: object expected"); - message.currentPage = $root.google.cloud.dialogflow.cx.v3.Page.fromObject(object.currentPage); - } - if (object.currentFlow != null) { - if (typeof object.currentFlow !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.QueryResult.currentFlow: object expected"); - message.currentFlow = $root.google.cloud.dialogflow.cx.v3.Flow.fromObject(object.currentFlow); - } - if (object.intent != null) { - if (typeof object.intent !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.QueryResult.intent: object expected"); - message.intent = $root.google.cloud.dialogflow.cx.v3.Intent.fromObject(object.intent); - } - if (object.intentDetectionConfidence != null) - message.intentDetectionConfidence = Number(object.intentDetectionConfidence); - if (object.match != null) { - if (typeof object.match !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.QueryResult.match: object expected"); - message.match = $root.google.cloud.dialogflow.cx.v3.Match.fromObject(object.match); - } - if (object.diagnosticInfo != null) { - if (typeof object.diagnosticInfo !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.QueryResult.diagnosticInfo: object expected"); - message.diagnosticInfo = $root.google.protobuf.Struct.fromObject(object.diagnosticInfo); - } - if (object.sentimentAnalysisResult != null) { - if (typeof object.sentimentAnalysisResult !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.QueryResult.sentimentAnalysisResult: object expected"); - message.sentimentAnalysisResult = $root.google.cloud.dialogflow.cx.v3.SentimentAnalysisResult.fromObject(object.sentimentAnalysisResult); - } - if (object.advancedSettings != null) { - if (typeof object.advancedSettings !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.QueryResult.advancedSettings: object expected"); - message.advancedSettings = $root.google.cloud.dialogflow.cx.v3.AdvancedSettings.fromObject(object.advancedSettings); - } - if (object.allowAnswerFeedback != null) - message.allowAnswerFeedback = Boolean(object.allowAnswerFeedback); - if (object.dataStoreConnectionSignals != null) { - if (typeof object.dataStoreConnectionSignals !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.QueryResult.dataStoreConnectionSignals: object expected"); - message.dataStoreConnectionSignals = $root.google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.fromObject(object.dataStoreConnectionSignals); + break; + case "DETECT_INTENT_RESPONSE_VIEW_UNSPECIFIED": + case 0: + message.responseView = 0; + break; + case "DETECT_INTENT_RESPONSE_VIEW_FULL": + case 1: + message.responseView = 1; + break; + case "DETECT_INTENT_RESPONSE_VIEW_BASIC": + case 2: + message.responseView = 2; + break; + case "DETECT_INTENT_RESPONSE_VIEW_DEFAULT": + case 3: + message.responseView = 3; + break; } return message; }; /** - * Creates a plain object from a QueryResult message. Also converts values to other types if specified. + * Creates a plain object from a StreamingDetectIntentRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.QueryResult + * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.QueryResult} message QueryResult + * @param {google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest} message StreamingDetectIntentRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - QueryResult.toObject = function toObject(message, options) { + StreamingDetectIntentRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.responseMessages = []; - object.webhookPayloads = []; - object.webhookStatuses = []; - object.webhookIds = []; - object.webhookDisplayNames = []; - object.webhookLatencies = []; - object.webhookTags = []; - } if (options.defaults) { - object.languageCode = ""; - object.parameters = null; - object.currentPage = null; - object.intent = null; - object.intentDetectionConfidence = 0; - object.diagnosticInfo = null; - object.match = null; - object.sentimentAnalysisResult = null; - object.advancedSettings = null; - object.currentFlow = null; - object.allowAnswerFeedback = false; - object.dataStoreConnectionSignals = null; - } - if (message.text != null && message.hasOwnProperty("text")) { - object.text = message.text; - if (options.oneofs) - object.query = "text"; - } - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; - if (message.parameters != null && message.hasOwnProperty("parameters")) - object.parameters = $root.google.protobuf.Struct.toObject(message.parameters, options); - if (message.responseMessages && message.responseMessages.length) { - object.responseMessages = []; - for (var j = 0; j < message.responseMessages.length; ++j) - object.responseMessages[j] = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.toObject(message.responseMessages[j], options); - } - if (message.webhookPayloads && message.webhookPayloads.length) { - object.webhookPayloads = []; - for (var j = 0; j < message.webhookPayloads.length; ++j) - object.webhookPayloads[j] = $root.google.protobuf.Struct.toObject(message.webhookPayloads[j], options); - } - if (message.currentPage != null && message.hasOwnProperty("currentPage")) - object.currentPage = $root.google.cloud.dialogflow.cx.v3.Page.toObject(message.currentPage, options); - if (message.intent != null && message.hasOwnProperty("intent")) - object.intent = $root.google.cloud.dialogflow.cx.v3.Intent.toObject(message.intent, options); - if (message.intentDetectionConfidence != null && message.hasOwnProperty("intentDetectionConfidence")) - object.intentDetectionConfidence = options.json && !isFinite(message.intentDetectionConfidence) ? String(message.intentDetectionConfidence) : message.intentDetectionConfidence; - if (message.diagnosticInfo != null && message.hasOwnProperty("diagnosticInfo")) - object.diagnosticInfo = $root.google.protobuf.Struct.toObject(message.diagnosticInfo, options); - if (message.triggerIntent != null && message.hasOwnProperty("triggerIntent")) { - object.triggerIntent = message.triggerIntent; - if (options.oneofs) - object.query = "triggerIntent"; - } - if (message.transcript != null && message.hasOwnProperty("transcript")) { - object.transcript = message.transcript; - if (options.oneofs) - object.query = "transcript"; - } - if (message.webhookStatuses && message.webhookStatuses.length) { - object.webhookStatuses = []; - for (var j = 0; j < message.webhookStatuses.length; ++j) - object.webhookStatuses[j] = $root.google.rpc.Status.toObject(message.webhookStatuses[j], options); - } - if (message.triggerEvent != null && message.hasOwnProperty("triggerEvent")) { - object.triggerEvent = message.triggerEvent; - if (options.oneofs) - object.query = "triggerEvent"; - } - if (message.match != null && message.hasOwnProperty("match")) - object.match = $root.google.cloud.dialogflow.cx.v3.Match.toObject(message.match, options); - if (message.sentimentAnalysisResult != null && message.hasOwnProperty("sentimentAnalysisResult")) - object.sentimentAnalysisResult = $root.google.cloud.dialogflow.cx.v3.SentimentAnalysisResult.toObject(message.sentimentAnalysisResult, options); - if (message.advancedSettings != null && message.hasOwnProperty("advancedSettings")) - object.advancedSettings = $root.google.cloud.dialogflow.cx.v3.AdvancedSettings.toObject(message.advancedSettings, options); - if (message.dtmf != null && message.hasOwnProperty("dtmf")) { - object.dtmf = $root.google.cloud.dialogflow.cx.v3.DtmfInput.toObject(message.dtmf, options); - if (options.oneofs) - object.query = "dtmf"; - } - if (message.webhookIds && message.webhookIds.length) { - object.webhookIds = []; - for (var j = 0; j < message.webhookIds.length; ++j) - object.webhookIds[j] = message.webhookIds[j]; - } - if (message.webhookDisplayNames && message.webhookDisplayNames.length) { - object.webhookDisplayNames = []; - for (var j = 0; j < message.webhookDisplayNames.length; ++j) - object.webhookDisplayNames[j] = message.webhookDisplayNames[j]; - } - if (message.webhookLatencies && message.webhookLatencies.length) { - object.webhookLatencies = []; - for (var j = 0; j < message.webhookLatencies.length; ++j) - object.webhookLatencies[j] = $root.google.protobuf.Duration.toObject(message.webhookLatencies[j], options); - } - if (message.webhookTags && message.webhookTags.length) { - object.webhookTags = []; - for (var j = 0; j < message.webhookTags.length; ++j) - object.webhookTags[j] = message.webhookTags[j]; + object.session = ""; + object.queryParams = null; + object.queryInput = null; + object.outputAudioConfig = null; + object.enablePartialResponse = false; + object.enableDebuggingInfo = false; + object.responseView = options.enums === String ? "DETECT_INTENT_RESPONSE_VIEW_UNSPECIFIED" : 0; } - if (message.currentFlow != null && message.hasOwnProperty("currentFlow")) - object.currentFlow = $root.google.cloud.dialogflow.cx.v3.Flow.toObject(message.currentFlow, options); - if (message.allowAnswerFeedback != null && message.hasOwnProperty("allowAnswerFeedback")) - object.allowAnswerFeedback = message.allowAnswerFeedback; - if (message.dataStoreConnectionSignals != null && message.hasOwnProperty("dataStoreConnectionSignals")) - object.dataStoreConnectionSignals = $root.google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.toObject(message.dataStoreConnectionSignals, options); + if (message.session != null && message.hasOwnProperty("session")) + object.session = message.session; + if (message.queryParams != null && message.hasOwnProperty("queryParams")) + object.queryParams = $root.google.cloud.dialogflow.cx.v3.QueryParameters.toObject(message.queryParams, options); + if (message.queryInput != null && message.hasOwnProperty("queryInput")) + object.queryInput = $root.google.cloud.dialogflow.cx.v3.QueryInput.toObject(message.queryInput, options); + if (message.outputAudioConfig != null && message.hasOwnProperty("outputAudioConfig")) + object.outputAudioConfig = $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.toObject(message.outputAudioConfig, options); + if (message.enablePartialResponse != null && message.hasOwnProperty("enablePartialResponse")) + object.enablePartialResponse = message.enablePartialResponse; + if (message.enableDebuggingInfo != null && message.hasOwnProperty("enableDebuggingInfo")) + object.enableDebuggingInfo = message.enableDebuggingInfo; + if (message.responseView != null && message.hasOwnProperty("responseView")) + object.responseView = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.DetectIntentResponseView[message.responseView] === undefined ? message.responseView : $root.google.cloud.dialogflow.cx.v3.DetectIntentResponseView[message.responseView] : message.responseView; return object; }; /** - * Converts this QueryResult to JSON. + * Converts this StreamingDetectIntentRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.QueryResult + * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest * @instance * @returns {Object.} JSON object */ - QueryResult.prototype.toJSON = function toJSON() { + StreamingDetectIntentRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for QueryResult + * Gets the default type url for StreamingDetectIntentRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.QueryResult + * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - QueryResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + StreamingDetectIntentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.QueryResult"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest"; }; - return QueryResult; + return StreamingDetectIntentRequest; })(); - v3.TextInput = (function() { + v3.CloudConversationDebuggingInfo = (function() { /** - * Properties of a TextInput. + * Properties of a CloudConversationDebuggingInfo. * @memberof google.cloud.dialogflow.cx.v3 - * @interface ITextInput - * @property {string|null} [text] TextInput text + * @interface ICloudConversationDebuggingInfo + * @property {number|null} [audioDataChunks] CloudConversationDebuggingInfo audioDataChunks + * @property {google.protobuf.IDuration|null} [resultEndTimeOffset] CloudConversationDebuggingInfo resultEndTimeOffset + * @property {google.protobuf.IDuration|null} [firstAudioDuration] CloudConversationDebuggingInfo firstAudioDuration + * @property {boolean|null} [singleUtterance] CloudConversationDebuggingInfo singleUtterance + * @property {Array.|null} [speechPartialResultsEndTimes] CloudConversationDebuggingInfo speechPartialResultsEndTimes + * @property {Array.|null} [speechFinalResultsEndTimes] CloudConversationDebuggingInfo speechFinalResultsEndTimes + * @property {number|null} [partialResponses] CloudConversationDebuggingInfo partialResponses + * @property {number|null} [speakerIdPassiveLatencyMsOffset] CloudConversationDebuggingInfo speakerIdPassiveLatencyMsOffset + * @property {boolean|null} [bargeinEventTriggered] CloudConversationDebuggingInfo bargeinEventTriggered + * @property {boolean|null} [speechSingleUtterance] CloudConversationDebuggingInfo speechSingleUtterance + * @property {Array.|null} [dtmfPartialResultsTimes] CloudConversationDebuggingInfo dtmfPartialResultsTimes + * @property {Array.|null} [dtmfFinalResultsTimes] CloudConversationDebuggingInfo dtmfFinalResultsTimes + * @property {google.protobuf.IDuration|null} [singleUtteranceEndTimeOffset] CloudConversationDebuggingInfo singleUtteranceEndTimeOffset + * @property {google.protobuf.IDuration|null} [noSpeechTimeout] CloudConversationDebuggingInfo noSpeechTimeout + * @property {google.protobuf.IDuration|null} [endpointingTimeout] CloudConversationDebuggingInfo endpointingTimeout + * @property {boolean|null} [isInputText] CloudConversationDebuggingInfo isInputText + * @property {google.protobuf.IDuration|null} [clientHalfCloseTimeOffset] CloudConversationDebuggingInfo clientHalfCloseTimeOffset + * @property {google.protobuf.IDuration|null} [clientHalfCloseStreamingTimeOffset] CloudConversationDebuggingInfo clientHalfCloseStreamingTimeOffset */ /** - * Constructs a new TextInput. + * Constructs a new CloudConversationDebuggingInfo. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a TextInput. - * @implements ITextInput + * @classdesc Represents a CloudConversationDebuggingInfo. + * @implements ICloudConversationDebuggingInfo * @constructor - * @param {google.cloud.dialogflow.cx.v3.ITextInput=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.ICloudConversationDebuggingInfo=} [properties] Properties to set */ - function TextInput(properties) { + function CloudConversationDebuggingInfo(properties) { + this.speechPartialResultsEndTimes = []; + this.speechFinalResultsEndTimes = []; + this.dtmfPartialResultsTimes = []; + this.dtmfFinalResultsTimes = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -66029,282 +64362,327 @@ } /** - * TextInput text. - * @member {string} text - * @memberof google.cloud.dialogflow.cx.v3.TextInput + * CloudConversationDebuggingInfo audioDataChunks. + * @member {number} audioDataChunks + * @memberof google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo * @instance */ - TextInput.prototype.text = ""; + CloudConversationDebuggingInfo.prototype.audioDataChunks = 0; /** - * Creates a new TextInput instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.TextInput - * @static - * @param {google.cloud.dialogflow.cx.v3.ITextInput=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.TextInput} TextInput instance + * CloudConversationDebuggingInfo resultEndTimeOffset. + * @member {google.protobuf.IDuration|null|undefined} resultEndTimeOffset + * @memberof google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo + * @instance */ - TextInput.create = function create(properties) { - return new TextInput(properties); - }; + CloudConversationDebuggingInfo.prototype.resultEndTimeOffset = null; /** - * Encodes the specified TextInput message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TextInput.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.TextInput - * @static - * @param {google.cloud.dialogflow.cx.v3.ITextInput} message TextInput message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * CloudConversationDebuggingInfo firstAudioDuration. + * @member {google.protobuf.IDuration|null|undefined} firstAudioDuration + * @memberof google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo + * @instance */ - TextInput.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.text != null && Object.hasOwnProperty.call(message, "text")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.text); - return writer; - }; + CloudConversationDebuggingInfo.prototype.firstAudioDuration = null; /** - * Encodes the specified TextInput message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TextInput.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.TextInput - * @static - * @param {google.cloud.dialogflow.cx.v3.ITextInput} message TextInput message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * CloudConversationDebuggingInfo singleUtterance. + * @member {boolean} singleUtterance + * @memberof google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo + * @instance */ - TextInput.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + CloudConversationDebuggingInfo.prototype.singleUtterance = false; /** - * Decodes a TextInput message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.TextInput - * @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.TextInput} TextInput - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * CloudConversationDebuggingInfo speechPartialResultsEndTimes. + * @member {Array.} speechPartialResultsEndTimes + * @memberof google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo + * @instance */ - TextInput.decode = function decode(reader, length, error) { - 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.TextInput(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.text = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + CloudConversationDebuggingInfo.prototype.speechPartialResultsEndTimes = $util.emptyArray; /** - * Decodes a TextInput message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.TextInput - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.TextInput} TextInput - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * CloudConversationDebuggingInfo speechFinalResultsEndTimes. + * @member {Array.} speechFinalResultsEndTimes + * @memberof google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo + * @instance */ - TextInput.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + CloudConversationDebuggingInfo.prototype.speechFinalResultsEndTimes = $util.emptyArray; /** - * Verifies a TextInput message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.TextInput - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * CloudConversationDebuggingInfo partialResponses. + * @member {number} partialResponses + * @memberof google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo + * @instance */ - TextInput.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.text != null && message.hasOwnProperty("text")) - if (!$util.isString(message.text)) - return "text: string expected"; - return null; - }; + CloudConversationDebuggingInfo.prototype.partialResponses = 0; /** - * Creates a TextInput message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.TextInput - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.TextInput} TextInput + * CloudConversationDebuggingInfo speakerIdPassiveLatencyMsOffset. + * @member {number} speakerIdPassiveLatencyMsOffset + * @memberof google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo + * @instance */ - TextInput.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.TextInput) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.TextInput(); - if (object.text != null) - message.text = String(object.text); - return message; - }; + CloudConversationDebuggingInfo.prototype.speakerIdPassiveLatencyMsOffset = 0; /** - * Creates a plain object from a TextInput message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.TextInput - * @static - * @param {google.cloud.dialogflow.cx.v3.TextInput} message TextInput - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * CloudConversationDebuggingInfo bargeinEventTriggered. + * @member {boolean} bargeinEventTriggered + * @memberof google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo + * @instance */ - TextInput.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.text = ""; - if (message.text != null && message.hasOwnProperty("text")) - object.text = message.text; - return object; - }; + CloudConversationDebuggingInfo.prototype.bargeinEventTriggered = false; /** - * Converts this TextInput to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.TextInput + * CloudConversationDebuggingInfo speechSingleUtterance. + * @member {boolean} speechSingleUtterance + * @memberof google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo * @instance - * @returns {Object.} JSON object */ - TextInput.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + CloudConversationDebuggingInfo.prototype.speechSingleUtterance = false; /** - * Gets the default type url for TextInput - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.TextInput - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * CloudConversationDebuggingInfo dtmfPartialResultsTimes. + * @member {Array.} dtmfPartialResultsTimes + * @memberof google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo + * @instance */ - TextInput.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.TextInput"; - }; + CloudConversationDebuggingInfo.prototype.dtmfPartialResultsTimes = $util.emptyArray; - return TextInput; - })(); + /** + * CloudConversationDebuggingInfo dtmfFinalResultsTimes. + * @member {Array.} dtmfFinalResultsTimes + * @memberof google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo + * @instance + */ + CloudConversationDebuggingInfo.prototype.dtmfFinalResultsTimes = $util.emptyArray; - v3.IntentInput = (function() { + /** + * CloudConversationDebuggingInfo singleUtteranceEndTimeOffset. + * @member {google.protobuf.IDuration|null|undefined} singleUtteranceEndTimeOffset + * @memberof google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo + * @instance + */ + CloudConversationDebuggingInfo.prototype.singleUtteranceEndTimeOffset = null; /** - * Properties of an IntentInput. - * @memberof google.cloud.dialogflow.cx.v3 - * @interface IIntentInput - * @property {string|null} [intent] IntentInput intent + * CloudConversationDebuggingInfo noSpeechTimeout. + * @member {google.protobuf.IDuration|null|undefined} noSpeechTimeout + * @memberof google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo + * @instance */ + CloudConversationDebuggingInfo.prototype.noSpeechTimeout = null; /** - * Constructs a new IntentInput. - * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents an IntentInput. - * @implements IIntentInput - * @constructor - * @param {google.cloud.dialogflow.cx.v3.IIntentInput=} [properties] Properties to set + * CloudConversationDebuggingInfo endpointingTimeout. + * @member {google.protobuf.IDuration|null|undefined} endpointingTimeout + * @memberof google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo + * @instance */ - function IntentInput(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]]; - } + CloudConversationDebuggingInfo.prototype.endpointingTimeout = null; /** - * IntentInput intent. - * @member {string} intent - * @memberof google.cloud.dialogflow.cx.v3.IntentInput + * CloudConversationDebuggingInfo isInputText. + * @member {boolean} isInputText + * @memberof google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo * @instance */ - IntentInput.prototype.intent = ""; + CloudConversationDebuggingInfo.prototype.isInputText = false; /** - * Creates a new IntentInput instance using the specified properties. + * CloudConversationDebuggingInfo clientHalfCloseTimeOffset. + * @member {google.protobuf.IDuration|null|undefined} clientHalfCloseTimeOffset + * @memberof google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo + * @instance + */ + CloudConversationDebuggingInfo.prototype.clientHalfCloseTimeOffset = null; + + /** + * CloudConversationDebuggingInfo clientHalfCloseStreamingTimeOffset. + * @member {google.protobuf.IDuration|null|undefined} clientHalfCloseStreamingTimeOffset + * @memberof google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo + * @instance + */ + CloudConversationDebuggingInfo.prototype.clientHalfCloseStreamingTimeOffset = null; + + /** + * Creates a new CloudConversationDebuggingInfo instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.IntentInput + * @memberof google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo * @static - * @param {google.cloud.dialogflow.cx.v3.IIntentInput=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.IntentInput} IntentInput instance + * @param {google.cloud.dialogflow.cx.v3.ICloudConversationDebuggingInfo=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo} CloudConversationDebuggingInfo instance */ - IntentInput.create = function create(properties) { - return new IntentInput(properties); + CloudConversationDebuggingInfo.create = function create(properties) { + return new CloudConversationDebuggingInfo(properties); }; /** - * Encodes the specified IntentInput message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.IntentInput.verify|verify} messages. + * Encodes the specified CloudConversationDebuggingInfo message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.IntentInput + * @memberof google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo * @static - * @param {google.cloud.dialogflow.cx.v3.IIntentInput} message IntentInput message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ICloudConversationDebuggingInfo} message CloudConversationDebuggingInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - IntentInput.encode = function encode(message, writer) { + CloudConversationDebuggingInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.intent != null && Object.hasOwnProperty.call(message, "intent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.intent); + if (message.audioDataChunks != null && Object.hasOwnProperty.call(message, "audioDataChunks")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.audioDataChunks); + if (message.resultEndTimeOffset != null && Object.hasOwnProperty.call(message, "resultEndTimeOffset")) + $root.google.protobuf.Duration.encode(message.resultEndTimeOffset, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.firstAudioDuration != null && Object.hasOwnProperty.call(message, "firstAudioDuration")) + $root.google.protobuf.Duration.encode(message.firstAudioDuration, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.singleUtterance != null && Object.hasOwnProperty.call(message, "singleUtterance")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.singleUtterance); + if (message.speechPartialResultsEndTimes != null && message.speechPartialResultsEndTimes.length) + for (var i = 0; i < message.speechPartialResultsEndTimes.length; ++i) + $root.google.protobuf.Duration.encode(message.speechPartialResultsEndTimes[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.speechFinalResultsEndTimes != null && message.speechFinalResultsEndTimes.length) + for (var i = 0; i < message.speechFinalResultsEndTimes.length; ++i) + $root.google.protobuf.Duration.encode(message.speechFinalResultsEndTimes[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.partialResponses != null && Object.hasOwnProperty.call(message, "partialResponses")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.partialResponses); + if (message.speakerIdPassiveLatencyMsOffset != null && Object.hasOwnProperty.call(message, "speakerIdPassiveLatencyMsOffset")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.speakerIdPassiveLatencyMsOffset); + if (message.bargeinEventTriggered != null && Object.hasOwnProperty.call(message, "bargeinEventTriggered")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.bargeinEventTriggered); + if (message.speechSingleUtterance != null && Object.hasOwnProperty.call(message, "speechSingleUtterance")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.speechSingleUtterance); + if (message.dtmfPartialResultsTimes != null && message.dtmfPartialResultsTimes.length) + for (var i = 0; i < message.dtmfPartialResultsTimes.length; ++i) + $root.google.protobuf.Duration.encode(message.dtmfPartialResultsTimes[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.dtmfFinalResultsTimes != null && message.dtmfFinalResultsTimes.length) + for (var i = 0; i < message.dtmfFinalResultsTimes.length; ++i) + $root.google.protobuf.Duration.encode(message.dtmfFinalResultsTimes[i], writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.singleUtteranceEndTimeOffset != null && Object.hasOwnProperty.call(message, "singleUtteranceEndTimeOffset")) + $root.google.protobuf.Duration.encode(message.singleUtteranceEndTimeOffset, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.noSpeechTimeout != null && Object.hasOwnProperty.call(message, "noSpeechTimeout")) + $root.google.protobuf.Duration.encode(message.noSpeechTimeout, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.isInputText != null && Object.hasOwnProperty.call(message, "isInputText")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.isInputText); + if (message.clientHalfCloseTimeOffset != null && Object.hasOwnProperty.call(message, "clientHalfCloseTimeOffset")) + $root.google.protobuf.Duration.encode(message.clientHalfCloseTimeOffset, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + if (message.clientHalfCloseStreamingTimeOffset != null && Object.hasOwnProperty.call(message, "clientHalfCloseStreamingTimeOffset")) + $root.google.protobuf.Duration.encode(message.clientHalfCloseStreamingTimeOffset, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + if (message.endpointingTimeout != null && Object.hasOwnProperty.call(message, "endpointingTimeout")) + $root.google.protobuf.Duration.encode(message.endpointingTimeout, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); return writer; }; /** - * Encodes the specified IntentInput message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.IntentInput.verify|verify} messages. + * Encodes the specified CloudConversationDebuggingInfo message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.IntentInput + * @memberof google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo * @static - * @param {google.cloud.dialogflow.cx.v3.IIntentInput} message IntentInput message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ICloudConversationDebuggingInfo} message CloudConversationDebuggingInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - IntentInput.encodeDelimited = function encodeDelimited(message, writer) { + CloudConversationDebuggingInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an IntentInput message from the specified reader or buffer. + * Decodes a CloudConversationDebuggingInfo message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.IntentInput + * @memberof google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo * @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.IntentInput} IntentInput + * @returns {google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo} CloudConversationDebuggingInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - IntentInput.decode = function decode(reader, length, error) { + CloudConversationDebuggingInfo.decode = function decode(reader, length, error) { 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.IntentInput(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.intent = reader.string(); + message.audioDataChunks = reader.int32(); + break; + } + case 2: { + message.resultEndTimeOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 3: { + message.firstAudioDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 5: { + message.singleUtterance = reader.bool(); + break; + } + case 6: { + if (!(message.speechPartialResultsEndTimes && message.speechPartialResultsEndTimes.length)) + message.speechPartialResultsEndTimes = []; + message.speechPartialResultsEndTimes.push($root.google.protobuf.Duration.decode(reader, reader.uint32())); + break; + } + case 7: { + if (!(message.speechFinalResultsEndTimes && message.speechFinalResultsEndTimes.length)) + message.speechFinalResultsEndTimes = []; + message.speechFinalResultsEndTimes.push($root.google.protobuf.Duration.decode(reader, reader.uint32())); + break; + } + case 8: { + message.partialResponses = reader.int32(); + break; + } + case 9: { + message.speakerIdPassiveLatencyMsOffset = reader.int32(); + break; + } + case 10: { + message.bargeinEventTriggered = reader.bool(); + break; + } + case 11: { + message.speechSingleUtterance = reader.bool(); + break; + } + case 12: { + if (!(message.dtmfPartialResultsTimes && message.dtmfPartialResultsTimes.length)) + message.dtmfPartialResultsTimes = []; + message.dtmfPartialResultsTimes.push($root.google.protobuf.Duration.decode(reader, reader.uint32())); + break; + } + case 13: { + if (!(message.dtmfFinalResultsTimes && message.dtmfFinalResultsTimes.length)) + message.dtmfFinalResultsTimes = []; + message.dtmfFinalResultsTimes.push($root.google.protobuf.Duration.decode(reader, reader.uint32())); + break; + } + case 14: { + message.singleUtteranceEndTimeOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 15: { + message.noSpeechTimeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 19: { + message.endpointingTimeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 16: { + message.isInputText = reader.bool(); + break; + } + case 17: { + message.clientHalfCloseTimeOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 18: { + message.clientHalfCloseStreamingTimeOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); break; } default: @@ -66316,123 +64694,366 @@ }; /** - * Decodes an IntentInput message from the specified reader or buffer, length delimited. + * Decodes a CloudConversationDebuggingInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.IntentInput + * @memberof google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.IntentInput} IntentInput + * @returns {google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo} CloudConversationDebuggingInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - IntentInput.decodeDelimited = function decodeDelimited(reader) { + CloudConversationDebuggingInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an IntentInput message. + * Verifies a CloudConversationDebuggingInfo message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.IntentInput + * @memberof google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - IntentInput.verify = function verify(message) { + CloudConversationDebuggingInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.intent != null && message.hasOwnProperty("intent")) - if (!$util.isString(message.intent)) - return "intent: string expected"; + if (message.audioDataChunks != null && message.hasOwnProperty("audioDataChunks")) + if (!$util.isInteger(message.audioDataChunks)) + return "audioDataChunks: integer expected"; + if (message.resultEndTimeOffset != null && message.hasOwnProperty("resultEndTimeOffset")) { + var error = $root.google.protobuf.Duration.verify(message.resultEndTimeOffset); + if (error) + return "resultEndTimeOffset." + error; + } + if (message.firstAudioDuration != null && message.hasOwnProperty("firstAudioDuration")) { + var error = $root.google.protobuf.Duration.verify(message.firstAudioDuration); + if (error) + return "firstAudioDuration." + error; + } + if (message.singleUtterance != null && message.hasOwnProperty("singleUtterance")) + if (typeof message.singleUtterance !== "boolean") + return "singleUtterance: boolean expected"; + if (message.speechPartialResultsEndTimes != null && message.hasOwnProperty("speechPartialResultsEndTimes")) { + if (!Array.isArray(message.speechPartialResultsEndTimes)) + return "speechPartialResultsEndTimes: array expected"; + for (var i = 0; i < message.speechPartialResultsEndTimes.length; ++i) { + var error = $root.google.protobuf.Duration.verify(message.speechPartialResultsEndTimes[i]); + if (error) + return "speechPartialResultsEndTimes." + error; + } + } + if (message.speechFinalResultsEndTimes != null && message.hasOwnProperty("speechFinalResultsEndTimes")) { + if (!Array.isArray(message.speechFinalResultsEndTimes)) + return "speechFinalResultsEndTimes: array expected"; + for (var i = 0; i < message.speechFinalResultsEndTimes.length; ++i) { + var error = $root.google.protobuf.Duration.verify(message.speechFinalResultsEndTimes[i]); + if (error) + return "speechFinalResultsEndTimes." + error; + } + } + if (message.partialResponses != null && message.hasOwnProperty("partialResponses")) + if (!$util.isInteger(message.partialResponses)) + return "partialResponses: integer expected"; + if (message.speakerIdPassiveLatencyMsOffset != null && message.hasOwnProperty("speakerIdPassiveLatencyMsOffset")) + if (!$util.isInteger(message.speakerIdPassiveLatencyMsOffset)) + return "speakerIdPassiveLatencyMsOffset: integer expected"; + if (message.bargeinEventTriggered != null && message.hasOwnProperty("bargeinEventTriggered")) + if (typeof message.bargeinEventTriggered !== "boolean") + return "bargeinEventTriggered: boolean expected"; + if (message.speechSingleUtterance != null && message.hasOwnProperty("speechSingleUtterance")) + if (typeof message.speechSingleUtterance !== "boolean") + return "speechSingleUtterance: boolean expected"; + if (message.dtmfPartialResultsTimes != null && message.hasOwnProperty("dtmfPartialResultsTimes")) { + if (!Array.isArray(message.dtmfPartialResultsTimes)) + return "dtmfPartialResultsTimes: array expected"; + for (var i = 0; i < message.dtmfPartialResultsTimes.length; ++i) { + var error = $root.google.protobuf.Duration.verify(message.dtmfPartialResultsTimes[i]); + if (error) + return "dtmfPartialResultsTimes." + error; + } + } + if (message.dtmfFinalResultsTimes != null && message.hasOwnProperty("dtmfFinalResultsTimes")) { + if (!Array.isArray(message.dtmfFinalResultsTimes)) + return "dtmfFinalResultsTimes: array expected"; + for (var i = 0; i < message.dtmfFinalResultsTimes.length; ++i) { + var error = $root.google.protobuf.Duration.verify(message.dtmfFinalResultsTimes[i]); + if (error) + return "dtmfFinalResultsTimes." + error; + } + } + if (message.singleUtteranceEndTimeOffset != null && message.hasOwnProperty("singleUtteranceEndTimeOffset")) { + var error = $root.google.protobuf.Duration.verify(message.singleUtteranceEndTimeOffset); + if (error) + return "singleUtteranceEndTimeOffset." + error; + } + if (message.noSpeechTimeout != null && message.hasOwnProperty("noSpeechTimeout")) { + var error = $root.google.protobuf.Duration.verify(message.noSpeechTimeout); + if (error) + return "noSpeechTimeout." + error; + } + if (message.endpointingTimeout != null && message.hasOwnProperty("endpointingTimeout")) { + var error = $root.google.protobuf.Duration.verify(message.endpointingTimeout); + if (error) + return "endpointingTimeout." + error; + } + if (message.isInputText != null && message.hasOwnProperty("isInputText")) + if (typeof message.isInputText !== "boolean") + return "isInputText: boolean expected"; + if (message.clientHalfCloseTimeOffset != null && message.hasOwnProperty("clientHalfCloseTimeOffset")) { + var error = $root.google.protobuf.Duration.verify(message.clientHalfCloseTimeOffset); + if (error) + return "clientHalfCloseTimeOffset." + error; + } + if (message.clientHalfCloseStreamingTimeOffset != null && message.hasOwnProperty("clientHalfCloseStreamingTimeOffset")) { + var error = $root.google.protobuf.Duration.verify(message.clientHalfCloseStreamingTimeOffset); + if (error) + return "clientHalfCloseStreamingTimeOffset." + error; + } return null; }; /** - * Creates an IntentInput message from a plain object. Also converts values to their respective internal types. + * Creates a CloudConversationDebuggingInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.IntentInput + * @memberof google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.IntentInput} IntentInput + * @returns {google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo} CloudConversationDebuggingInfo */ - IntentInput.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.IntentInput) + CloudConversationDebuggingInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.IntentInput(); - if (object.intent != null) - message.intent = String(object.intent); - return message; - }; - - /** - * Creates a plain object from an IntentInput message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.IntentInput - * @static - * @param {google.cloud.dialogflow.cx.v3.IntentInput} message IntentInput - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - IntentInput.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.intent = ""; - if (message.intent != null && message.hasOwnProperty("intent")) - object.intent = message.intent; - return object; - }; - - /** - * Converts this IntentInput to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.IntentInput - * @instance - * @returns {Object.} JSON object - */ - IntentInput.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for IntentInput - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.IntentInput - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - IntentInput.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; + var message = new $root.google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo(); + if (object.audioDataChunks != null) + message.audioDataChunks = object.audioDataChunks | 0; + if (object.resultEndTimeOffset != null) { + if (typeof object.resultEndTimeOffset !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo.resultEndTimeOffset: object expected"); + message.resultEndTimeOffset = $root.google.protobuf.Duration.fromObject(object.resultEndTimeOffset); } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.IntentInput"; - }; - - return IntentInput; - })(); - - v3.AudioInput = (function() { - - /** - * Properties of an AudioInput. - * @memberof google.cloud.dialogflow.cx.v3 - * @interface IAudioInput - * @property {google.cloud.dialogflow.cx.v3.IInputAudioConfig|null} [config] AudioInput config - * @property {Uint8Array|null} [audio] AudioInput audio - */ + if (object.firstAudioDuration != null) { + if (typeof object.firstAudioDuration !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo.firstAudioDuration: object expected"); + message.firstAudioDuration = $root.google.protobuf.Duration.fromObject(object.firstAudioDuration); + } + if (object.singleUtterance != null) + message.singleUtterance = Boolean(object.singleUtterance); + if (object.speechPartialResultsEndTimes) { + if (!Array.isArray(object.speechPartialResultsEndTimes)) + throw TypeError(".google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo.speechPartialResultsEndTimes: array expected"); + message.speechPartialResultsEndTimes = []; + for (var i = 0; i < object.speechPartialResultsEndTimes.length; ++i) { + if (typeof object.speechPartialResultsEndTimes[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo.speechPartialResultsEndTimes: object expected"); + message.speechPartialResultsEndTimes[i] = $root.google.protobuf.Duration.fromObject(object.speechPartialResultsEndTimes[i]); + } + } + if (object.speechFinalResultsEndTimes) { + if (!Array.isArray(object.speechFinalResultsEndTimes)) + throw TypeError(".google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo.speechFinalResultsEndTimes: array expected"); + message.speechFinalResultsEndTimes = []; + for (var i = 0; i < object.speechFinalResultsEndTimes.length; ++i) { + if (typeof object.speechFinalResultsEndTimes[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo.speechFinalResultsEndTimes: object expected"); + message.speechFinalResultsEndTimes[i] = $root.google.protobuf.Duration.fromObject(object.speechFinalResultsEndTimes[i]); + } + } + if (object.partialResponses != null) + message.partialResponses = object.partialResponses | 0; + if (object.speakerIdPassiveLatencyMsOffset != null) + message.speakerIdPassiveLatencyMsOffset = object.speakerIdPassiveLatencyMsOffset | 0; + if (object.bargeinEventTriggered != null) + message.bargeinEventTriggered = Boolean(object.bargeinEventTriggered); + if (object.speechSingleUtterance != null) + message.speechSingleUtterance = Boolean(object.speechSingleUtterance); + if (object.dtmfPartialResultsTimes) { + if (!Array.isArray(object.dtmfPartialResultsTimes)) + throw TypeError(".google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo.dtmfPartialResultsTimes: array expected"); + message.dtmfPartialResultsTimes = []; + for (var i = 0; i < object.dtmfPartialResultsTimes.length; ++i) { + if (typeof object.dtmfPartialResultsTimes[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo.dtmfPartialResultsTimes: object expected"); + message.dtmfPartialResultsTimes[i] = $root.google.protobuf.Duration.fromObject(object.dtmfPartialResultsTimes[i]); + } + } + if (object.dtmfFinalResultsTimes) { + if (!Array.isArray(object.dtmfFinalResultsTimes)) + throw TypeError(".google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo.dtmfFinalResultsTimes: array expected"); + message.dtmfFinalResultsTimes = []; + for (var i = 0; i < object.dtmfFinalResultsTimes.length; ++i) { + if (typeof object.dtmfFinalResultsTimes[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo.dtmfFinalResultsTimes: object expected"); + message.dtmfFinalResultsTimes[i] = $root.google.protobuf.Duration.fromObject(object.dtmfFinalResultsTimes[i]); + } + } + if (object.singleUtteranceEndTimeOffset != null) { + if (typeof object.singleUtteranceEndTimeOffset !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo.singleUtteranceEndTimeOffset: object expected"); + message.singleUtteranceEndTimeOffset = $root.google.protobuf.Duration.fromObject(object.singleUtteranceEndTimeOffset); + } + if (object.noSpeechTimeout != null) { + if (typeof object.noSpeechTimeout !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo.noSpeechTimeout: object expected"); + message.noSpeechTimeout = $root.google.protobuf.Duration.fromObject(object.noSpeechTimeout); + } + if (object.endpointingTimeout != null) { + if (typeof object.endpointingTimeout !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo.endpointingTimeout: object expected"); + message.endpointingTimeout = $root.google.protobuf.Duration.fromObject(object.endpointingTimeout); + } + if (object.isInputText != null) + message.isInputText = Boolean(object.isInputText); + if (object.clientHalfCloseTimeOffset != null) { + if (typeof object.clientHalfCloseTimeOffset !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo.clientHalfCloseTimeOffset: object expected"); + message.clientHalfCloseTimeOffset = $root.google.protobuf.Duration.fromObject(object.clientHalfCloseTimeOffset); + } + if (object.clientHalfCloseStreamingTimeOffset != null) { + if (typeof object.clientHalfCloseStreamingTimeOffset !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo.clientHalfCloseStreamingTimeOffset: object expected"); + message.clientHalfCloseStreamingTimeOffset = $root.google.protobuf.Duration.fromObject(object.clientHalfCloseStreamingTimeOffset); + } + return message; + }; /** - * Constructs a new AudioInput. + * Creates a plain object from a CloudConversationDebuggingInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo + * @static + * @param {google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo} message CloudConversationDebuggingInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CloudConversationDebuggingInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.speechPartialResultsEndTimes = []; + object.speechFinalResultsEndTimes = []; + object.dtmfPartialResultsTimes = []; + object.dtmfFinalResultsTimes = []; + } + if (options.defaults) { + object.audioDataChunks = 0; + object.resultEndTimeOffset = null; + object.firstAudioDuration = null; + object.singleUtterance = false; + object.partialResponses = 0; + object.speakerIdPassiveLatencyMsOffset = 0; + object.bargeinEventTriggered = false; + object.speechSingleUtterance = false; + object.singleUtteranceEndTimeOffset = null; + object.noSpeechTimeout = null; + object.isInputText = false; + object.clientHalfCloseTimeOffset = null; + object.clientHalfCloseStreamingTimeOffset = null; + object.endpointingTimeout = null; + } + if (message.audioDataChunks != null && message.hasOwnProperty("audioDataChunks")) + object.audioDataChunks = message.audioDataChunks; + if (message.resultEndTimeOffset != null && message.hasOwnProperty("resultEndTimeOffset")) + object.resultEndTimeOffset = $root.google.protobuf.Duration.toObject(message.resultEndTimeOffset, options); + if (message.firstAudioDuration != null && message.hasOwnProperty("firstAudioDuration")) + object.firstAudioDuration = $root.google.protobuf.Duration.toObject(message.firstAudioDuration, options); + if (message.singleUtterance != null && message.hasOwnProperty("singleUtterance")) + object.singleUtterance = message.singleUtterance; + if (message.speechPartialResultsEndTimes && message.speechPartialResultsEndTimes.length) { + object.speechPartialResultsEndTimes = []; + for (var j = 0; j < message.speechPartialResultsEndTimes.length; ++j) + object.speechPartialResultsEndTimes[j] = $root.google.protobuf.Duration.toObject(message.speechPartialResultsEndTimes[j], options); + } + if (message.speechFinalResultsEndTimes && message.speechFinalResultsEndTimes.length) { + object.speechFinalResultsEndTimes = []; + for (var j = 0; j < message.speechFinalResultsEndTimes.length; ++j) + object.speechFinalResultsEndTimes[j] = $root.google.protobuf.Duration.toObject(message.speechFinalResultsEndTimes[j], options); + } + if (message.partialResponses != null && message.hasOwnProperty("partialResponses")) + object.partialResponses = message.partialResponses; + if (message.speakerIdPassiveLatencyMsOffset != null && message.hasOwnProperty("speakerIdPassiveLatencyMsOffset")) + object.speakerIdPassiveLatencyMsOffset = message.speakerIdPassiveLatencyMsOffset; + if (message.bargeinEventTriggered != null && message.hasOwnProperty("bargeinEventTriggered")) + object.bargeinEventTriggered = message.bargeinEventTriggered; + if (message.speechSingleUtterance != null && message.hasOwnProperty("speechSingleUtterance")) + object.speechSingleUtterance = message.speechSingleUtterance; + if (message.dtmfPartialResultsTimes && message.dtmfPartialResultsTimes.length) { + object.dtmfPartialResultsTimes = []; + for (var j = 0; j < message.dtmfPartialResultsTimes.length; ++j) + object.dtmfPartialResultsTimes[j] = $root.google.protobuf.Duration.toObject(message.dtmfPartialResultsTimes[j], options); + } + if (message.dtmfFinalResultsTimes && message.dtmfFinalResultsTimes.length) { + object.dtmfFinalResultsTimes = []; + for (var j = 0; j < message.dtmfFinalResultsTimes.length; ++j) + object.dtmfFinalResultsTimes[j] = $root.google.protobuf.Duration.toObject(message.dtmfFinalResultsTimes[j], options); + } + if (message.singleUtteranceEndTimeOffset != null && message.hasOwnProperty("singleUtteranceEndTimeOffset")) + object.singleUtteranceEndTimeOffset = $root.google.protobuf.Duration.toObject(message.singleUtteranceEndTimeOffset, options); + if (message.noSpeechTimeout != null && message.hasOwnProperty("noSpeechTimeout")) + object.noSpeechTimeout = $root.google.protobuf.Duration.toObject(message.noSpeechTimeout, options); + if (message.isInputText != null && message.hasOwnProperty("isInputText")) + object.isInputText = message.isInputText; + if (message.clientHalfCloseTimeOffset != null && message.hasOwnProperty("clientHalfCloseTimeOffset")) + object.clientHalfCloseTimeOffset = $root.google.protobuf.Duration.toObject(message.clientHalfCloseTimeOffset, options); + if (message.clientHalfCloseStreamingTimeOffset != null && message.hasOwnProperty("clientHalfCloseStreamingTimeOffset")) + object.clientHalfCloseStreamingTimeOffset = $root.google.protobuf.Duration.toObject(message.clientHalfCloseStreamingTimeOffset, options); + if (message.endpointingTimeout != null && message.hasOwnProperty("endpointingTimeout")) + object.endpointingTimeout = $root.google.protobuf.Duration.toObject(message.endpointingTimeout, options); + return object; + }; + + /** + * Converts this CloudConversationDebuggingInfo to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo + * @instance + * @returns {Object.} JSON object + */ + CloudConversationDebuggingInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CloudConversationDebuggingInfo + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CloudConversationDebuggingInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo"; + }; + + return CloudConversationDebuggingInfo; + })(); + + v3.StreamingDetectIntentResponse = (function() { + + /** + * Properties of a StreamingDetectIntentResponse. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents an AudioInput. - * @implements IAudioInput + * @interface IStreamingDetectIntentResponse + * @property {google.cloud.dialogflow.cx.v3.IStreamingRecognitionResult|null} [recognitionResult] StreamingDetectIntentResponse recognitionResult + * @property {google.cloud.dialogflow.cx.v3.IDetectIntentResponse|null} [detectIntentResponse] StreamingDetectIntentResponse detectIntentResponse + * @property {google.cloud.dialogflow.cx.v3.ICloudConversationDebuggingInfo|null} [debuggingInfo] StreamingDetectIntentResponse debuggingInfo + */ + + /** + * Constructs a new StreamingDetectIntentResponse. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a StreamingDetectIntentResponse. + * @implements IStreamingDetectIntentResponse * @constructor - * @param {google.cloud.dialogflow.cx.v3.IAudioInput=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IStreamingDetectIntentResponse=} [properties] Properties to set */ - function AudioInput(properties) { + function StreamingDetectIntentResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -66440,91 +65061,119 @@ } /** - * AudioInput config. - * @member {google.cloud.dialogflow.cx.v3.IInputAudioConfig|null|undefined} config - * @memberof google.cloud.dialogflow.cx.v3.AudioInput + * StreamingDetectIntentResponse recognitionResult. + * @member {google.cloud.dialogflow.cx.v3.IStreamingRecognitionResult|null|undefined} recognitionResult + * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse * @instance */ - AudioInput.prototype.config = null; + StreamingDetectIntentResponse.prototype.recognitionResult = null; /** - * AudioInput audio. - * @member {Uint8Array} audio - * @memberof google.cloud.dialogflow.cx.v3.AudioInput + * StreamingDetectIntentResponse detectIntentResponse. + * @member {google.cloud.dialogflow.cx.v3.IDetectIntentResponse|null|undefined} detectIntentResponse + * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse * @instance */ - AudioInput.prototype.audio = $util.newBuffer([]); + StreamingDetectIntentResponse.prototype.detectIntentResponse = null; /** - * Creates a new AudioInput instance using the specified properties. + * StreamingDetectIntentResponse debuggingInfo. + * @member {google.cloud.dialogflow.cx.v3.ICloudConversationDebuggingInfo|null|undefined} debuggingInfo + * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse + * @instance + */ + StreamingDetectIntentResponse.prototype.debuggingInfo = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * StreamingDetectIntentResponse response. + * @member {"recognitionResult"|"detectIntentResponse"|undefined} response + * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse + * @instance + */ + Object.defineProperty(StreamingDetectIntentResponse.prototype, "response", { + get: $util.oneOfGetter($oneOfFields = ["recognitionResult", "detectIntentResponse"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new StreamingDetectIntentResponse instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.AudioInput + * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IAudioInput=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.AudioInput} AudioInput instance + * @param {google.cloud.dialogflow.cx.v3.IStreamingDetectIntentResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse} StreamingDetectIntentResponse instance */ - AudioInput.create = function create(properties) { - return new AudioInput(properties); + StreamingDetectIntentResponse.create = function create(properties) { + return new StreamingDetectIntentResponse(properties); }; /** - * Encodes the specified AudioInput message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.AudioInput.verify|verify} messages. + * Encodes the specified StreamingDetectIntentResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.AudioInput + * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IAudioInput} message AudioInput message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IStreamingDetectIntentResponse} message StreamingDetectIntentResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AudioInput.encode = function encode(message, writer) { + StreamingDetectIntentResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.config != null && Object.hasOwnProperty.call(message, "config")) - $root.google.cloud.dialogflow.cx.v3.InputAudioConfig.encode(message.config, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.audio != null && Object.hasOwnProperty.call(message, "audio")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.audio); + if (message.recognitionResult != null && Object.hasOwnProperty.call(message, "recognitionResult")) + $root.google.cloud.dialogflow.cx.v3.StreamingRecognitionResult.encode(message.recognitionResult, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.detectIntentResponse != null && Object.hasOwnProperty.call(message, "detectIntentResponse")) + $root.google.cloud.dialogflow.cx.v3.DetectIntentResponse.encode(message.detectIntentResponse, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.debuggingInfo != null && Object.hasOwnProperty.call(message, "debuggingInfo")) + $root.google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo.encode(message.debuggingInfo, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified AudioInput message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.AudioInput.verify|verify} messages. + * Encodes the specified StreamingDetectIntentResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.AudioInput + * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IAudioInput} message AudioInput message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IStreamingDetectIntentResponse} message StreamingDetectIntentResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AudioInput.encodeDelimited = function encodeDelimited(message, writer) { + StreamingDetectIntentResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AudioInput message from the specified reader or buffer. + * Decodes a StreamingDetectIntentResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.AudioInput + * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse * @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.AudioInput} AudioInput + * @returns {google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse} StreamingDetectIntentResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AudioInput.decode = function decode(reader, length, error) { + StreamingDetectIntentResponse.decode = function decode(reader, length, error) { 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.AudioInput(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.config = $root.google.cloud.dialogflow.cx.v3.InputAudioConfig.decode(reader, reader.uint32()); + message.recognitionResult = $root.google.cloud.dialogflow.cx.v3.StreamingRecognitionResult.decode(reader, reader.uint32()); break; } case 2: { - message.audio = reader.bytes(); + message.detectIntentResponse = $root.google.cloud.dialogflow.cx.v3.DetectIntentResponse.decode(reader, reader.uint32()); + break; + } + case 4: { + message.debuggingInfo = $root.google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo.decode(reader, reader.uint32()); break; } default: @@ -66536,145 +65185,174 @@ }; /** - * Decodes an AudioInput message from the specified reader or buffer, length delimited. + * Decodes a StreamingDetectIntentResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.AudioInput + * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.AudioInput} AudioInput + * @returns {google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse} StreamingDetectIntentResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AudioInput.decodeDelimited = function decodeDelimited(reader) { + StreamingDetectIntentResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AudioInput message. + * Verifies a StreamingDetectIntentResponse message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.AudioInput + * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AudioInput.verify = function verify(message) { + StreamingDetectIntentResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.config != null && message.hasOwnProperty("config")) { - var error = $root.google.cloud.dialogflow.cx.v3.InputAudioConfig.verify(message.config); + var properties = {}; + if (message.recognitionResult != null && message.hasOwnProperty("recognitionResult")) { + properties.response = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3.StreamingRecognitionResult.verify(message.recognitionResult); + if (error) + return "recognitionResult." + error; + } + } + if (message.detectIntentResponse != null && message.hasOwnProperty("detectIntentResponse")) { + if (properties.response === 1) + return "response: multiple values"; + properties.response = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3.DetectIntentResponse.verify(message.detectIntentResponse); + if (error) + return "detectIntentResponse." + error; + } + } + if (message.debuggingInfo != null && message.hasOwnProperty("debuggingInfo")) { + var error = $root.google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo.verify(message.debuggingInfo); if (error) - return "config." + error; + return "debuggingInfo." + error; } - if (message.audio != null && message.hasOwnProperty("audio")) - if (!(message.audio && typeof message.audio.length === "number" || $util.isString(message.audio))) - return "audio: buffer expected"; return null; }; /** - * Creates an AudioInput message from a plain object. Also converts values to their respective internal types. + * Creates a StreamingDetectIntentResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.AudioInput + * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.AudioInput} AudioInput + * @returns {google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse} StreamingDetectIntentResponse */ - AudioInput.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.AudioInput) + StreamingDetectIntentResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.AudioInput(); - if (object.config != null) { - if (typeof object.config !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.AudioInput.config: object expected"); - message.config = $root.google.cloud.dialogflow.cx.v3.InputAudioConfig.fromObject(object.config); + var message = new $root.google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse(); + if (object.recognitionResult != null) { + if (typeof object.recognitionResult !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse.recognitionResult: object expected"); + message.recognitionResult = $root.google.cloud.dialogflow.cx.v3.StreamingRecognitionResult.fromObject(object.recognitionResult); + } + if (object.detectIntentResponse != null) { + if (typeof object.detectIntentResponse !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse.detectIntentResponse: object expected"); + message.detectIntentResponse = $root.google.cloud.dialogflow.cx.v3.DetectIntentResponse.fromObject(object.detectIntentResponse); + } + if (object.debuggingInfo != null) { + if (typeof object.debuggingInfo !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse.debuggingInfo: object expected"); + message.debuggingInfo = $root.google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo.fromObject(object.debuggingInfo); } - if (object.audio != null) - if (typeof object.audio === "string") - $util.base64.decode(object.audio, message.audio = $util.newBuffer($util.base64.length(object.audio)), 0); - else if (object.audio.length >= 0) - message.audio = object.audio; return message; }; /** - * Creates a plain object from an AudioInput message. Also converts values to other types if specified. + * Creates a plain object from a StreamingDetectIntentResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.AudioInput + * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse * @static - * @param {google.cloud.dialogflow.cx.v3.AudioInput} message AudioInput + * @param {google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse} message StreamingDetectIntentResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AudioInput.toObject = function toObject(message, options) { + StreamingDetectIntentResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.config = null; - if (options.bytes === String) - object.audio = ""; - else { - object.audio = []; - if (options.bytes !== Array) - object.audio = $util.newBuffer(object.audio); - } + if (options.defaults) + object.debuggingInfo = null; + if (message.recognitionResult != null && message.hasOwnProperty("recognitionResult")) { + object.recognitionResult = $root.google.cloud.dialogflow.cx.v3.StreamingRecognitionResult.toObject(message.recognitionResult, options); + if (options.oneofs) + object.response = "recognitionResult"; } - if (message.config != null && message.hasOwnProperty("config")) - object.config = $root.google.cloud.dialogflow.cx.v3.InputAudioConfig.toObject(message.config, options); - if (message.audio != null && message.hasOwnProperty("audio")) - object.audio = options.bytes === String ? $util.base64.encode(message.audio, 0, message.audio.length) : options.bytes === Array ? Array.prototype.slice.call(message.audio) : message.audio; + if (message.detectIntentResponse != null && message.hasOwnProperty("detectIntentResponse")) { + object.detectIntentResponse = $root.google.cloud.dialogflow.cx.v3.DetectIntentResponse.toObject(message.detectIntentResponse, options); + if (options.oneofs) + object.response = "detectIntentResponse"; + } + if (message.debuggingInfo != null && message.hasOwnProperty("debuggingInfo")) + object.debuggingInfo = $root.google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo.toObject(message.debuggingInfo, options); return object; }; /** - * Converts this AudioInput to JSON. + * Converts this StreamingDetectIntentResponse to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.AudioInput + * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse * @instance * @returns {Object.} JSON object */ - AudioInput.prototype.toJSON = function toJSON() { + StreamingDetectIntentResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AudioInput + * Gets the default type url for StreamingDetectIntentResponse * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.AudioInput + * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AudioInput.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + StreamingDetectIntentResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.AudioInput"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse"; }; - return AudioInput; + return StreamingDetectIntentResponse; })(); - v3.EventInput = (function() { + v3.StreamingRecognitionResult = (function() { /** - * Properties of an EventInput. + * Properties of a StreamingRecognitionResult. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IEventInput - * @property {string|null} [event] EventInput event + * @interface IStreamingRecognitionResult + * @property {google.cloud.dialogflow.cx.v3.StreamingRecognitionResult.MessageType|null} [messageType] StreamingRecognitionResult messageType + * @property {string|null} [transcript] StreamingRecognitionResult transcript + * @property {boolean|null} [isFinal] StreamingRecognitionResult isFinal + * @property {number|null} [confidence] StreamingRecognitionResult confidence + * @property {number|null} [stability] StreamingRecognitionResult stability + * @property {Array.|null} [speechWordInfo] StreamingRecognitionResult speechWordInfo + * @property {google.protobuf.IDuration|null} [speechEndOffset] StreamingRecognitionResult speechEndOffset + * @property {string|null} [languageCode] StreamingRecognitionResult languageCode */ /** - * Constructs a new EventInput. + * Constructs a new StreamingRecognitionResult. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents an EventInput. - * @implements IEventInput + * @classdesc Represents a StreamingRecognitionResult. + * @implements IStreamingRecognitionResult * @constructor - * @param {google.cloud.dialogflow.cx.v3.IEventInput=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IStreamingRecognitionResult=} [properties] Properties to set */ - function EventInput(properties) { + function StreamingRecognitionResult(properties) { + this.speechWordInfo = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -66682,297 +65360,178 @@ } /** - * EventInput event. - * @member {string} event - * @memberof google.cloud.dialogflow.cx.v3.EventInput + * StreamingRecognitionResult messageType. + * @member {google.cloud.dialogflow.cx.v3.StreamingRecognitionResult.MessageType} messageType + * @memberof google.cloud.dialogflow.cx.v3.StreamingRecognitionResult * @instance */ - EventInput.prototype.event = ""; + StreamingRecognitionResult.prototype.messageType = 0; /** - * Creates a new EventInput instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.EventInput - * @static - * @param {google.cloud.dialogflow.cx.v3.IEventInput=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.EventInput} EventInput instance + * StreamingRecognitionResult transcript. + * @member {string} transcript + * @memberof google.cloud.dialogflow.cx.v3.StreamingRecognitionResult + * @instance */ - EventInput.create = function create(properties) { - return new EventInput(properties); - }; + StreamingRecognitionResult.prototype.transcript = ""; /** - * Encodes the specified EventInput message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.EventInput.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.EventInput - * @static - * @param {google.cloud.dialogflow.cx.v3.IEventInput} message EventInput message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * StreamingRecognitionResult isFinal. + * @member {boolean} isFinal + * @memberof google.cloud.dialogflow.cx.v3.StreamingRecognitionResult + * @instance */ - EventInput.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.event != null && Object.hasOwnProperty.call(message, "event")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.event); - return writer; - }; + StreamingRecognitionResult.prototype.isFinal = false; /** - * Encodes the specified EventInput message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.EventInput.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.EventInput - * @static - * @param {google.cloud.dialogflow.cx.v3.IEventInput} message EventInput message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EventInput.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EventInput message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.EventInput - * @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.EventInput} EventInput - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EventInput.decode = function decode(reader, length, error) { - 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.EventInput(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.event = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EventInput message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.EventInput - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.EventInput} EventInput - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EventInput.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EventInput message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.EventInput - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EventInput.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.event != null && message.hasOwnProperty("event")) - if (!$util.isString(message.event)) - return "event: string expected"; - return null; - }; - - /** - * Creates an EventInput message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.EventInput - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.EventInput} EventInput - */ - EventInput.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.EventInput) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.EventInput(); - if (object.event != null) - message.event = String(object.event); - return message; - }; - - /** - * Creates a plain object from an EventInput message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.EventInput - * @static - * @param {google.cloud.dialogflow.cx.v3.EventInput} message EventInput - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EventInput.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.event = ""; - if (message.event != null && message.hasOwnProperty("event")) - object.event = message.event; - return object; - }; - - /** - * Converts this EventInput to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.EventInput + * StreamingRecognitionResult confidence. + * @member {number} confidence + * @memberof google.cloud.dialogflow.cx.v3.StreamingRecognitionResult * @instance - * @returns {Object.} JSON object - */ - EventInput.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EventInput - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.EventInput - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url */ - EventInput.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.EventInput"; - }; - - return EventInput; - })(); - - v3.DtmfInput = (function() { + StreamingRecognitionResult.prototype.confidence = 0; /** - * Properties of a DtmfInput. - * @memberof google.cloud.dialogflow.cx.v3 - * @interface IDtmfInput - * @property {string|null} [digits] DtmfInput digits - * @property {string|null} [finishDigit] DtmfInput finishDigit + * StreamingRecognitionResult stability. + * @member {number} stability + * @memberof google.cloud.dialogflow.cx.v3.StreamingRecognitionResult + * @instance */ + StreamingRecognitionResult.prototype.stability = 0; /** - * Constructs a new DtmfInput. - * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a DtmfInput. - * @implements IDtmfInput - * @constructor - * @param {google.cloud.dialogflow.cx.v3.IDtmfInput=} [properties] Properties to set + * StreamingRecognitionResult speechWordInfo. + * @member {Array.} speechWordInfo + * @memberof google.cloud.dialogflow.cx.v3.StreamingRecognitionResult + * @instance */ - function DtmfInput(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]]; - } + StreamingRecognitionResult.prototype.speechWordInfo = $util.emptyArray; /** - * DtmfInput digits. - * @member {string} digits - * @memberof google.cloud.dialogflow.cx.v3.DtmfInput + * StreamingRecognitionResult speechEndOffset. + * @member {google.protobuf.IDuration|null|undefined} speechEndOffset + * @memberof google.cloud.dialogflow.cx.v3.StreamingRecognitionResult * @instance */ - DtmfInput.prototype.digits = ""; + StreamingRecognitionResult.prototype.speechEndOffset = null; /** - * DtmfInput finishDigit. - * @member {string} finishDigit - * @memberof google.cloud.dialogflow.cx.v3.DtmfInput + * StreamingRecognitionResult languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3.StreamingRecognitionResult * @instance */ - DtmfInput.prototype.finishDigit = ""; + StreamingRecognitionResult.prototype.languageCode = ""; /** - * Creates a new DtmfInput instance using the specified properties. + * Creates a new StreamingRecognitionResult instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.DtmfInput + * @memberof google.cloud.dialogflow.cx.v3.StreamingRecognitionResult * @static - * @param {google.cloud.dialogflow.cx.v3.IDtmfInput=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.DtmfInput} DtmfInput instance + * @param {google.cloud.dialogflow.cx.v3.IStreamingRecognitionResult=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.StreamingRecognitionResult} StreamingRecognitionResult instance */ - DtmfInput.create = function create(properties) { - return new DtmfInput(properties); + StreamingRecognitionResult.create = function create(properties) { + return new StreamingRecognitionResult(properties); }; /** - * Encodes the specified DtmfInput message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DtmfInput.verify|verify} messages. + * Encodes the specified StreamingRecognitionResult message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.StreamingRecognitionResult.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.DtmfInput + * @memberof google.cloud.dialogflow.cx.v3.StreamingRecognitionResult * @static - * @param {google.cloud.dialogflow.cx.v3.IDtmfInput} message DtmfInput message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IStreamingRecognitionResult} message StreamingRecognitionResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DtmfInput.encode = function encode(message, writer) { + StreamingRecognitionResult.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.digits != null && Object.hasOwnProperty.call(message, "digits")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.digits); - if (message.finishDigit != null && Object.hasOwnProperty.call(message, "finishDigit")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.finishDigit); + if (message.messageType != null && Object.hasOwnProperty.call(message, "messageType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.messageType); + if (message.transcript != null && Object.hasOwnProperty.call(message, "transcript")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.transcript); + if (message.isFinal != null && Object.hasOwnProperty.call(message, "isFinal")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.isFinal); + if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) + writer.uint32(/* id 4, wireType 5 =*/37).float(message.confidence); + if (message.stability != null && Object.hasOwnProperty.call(message, "stability")) + writer.uint32(/* id 6, wireType 5 =*/53).float(message.stability); + if (message.speechWordInfo != null && message.speechWordInfo.length) + for (var i = 0; i < message.speechWordInfo.length; ++i) + $root.google.cloud.dialogflow.cx.v3.SpeechWordInfo.encode(message.speechWordInfo[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.speechEndOffset != null && Object.hasOwnProperty.call(message, "speechEndOffset")) + $root.google.protobuf.Duration.encode(message.speechEndOffset, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.languageCode); return writer; }; /** - * Encodes the specified DtmfInput message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DtmfInput.verify|verify} messages. + * Encodes the specified StreamingRecognitionResult message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.StreamingRecognitionResult.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.DtmfInput + * @memberof google.cloud.dialogflow.cx.v3.StreamingRecognitionResult * @static - * @param {google.cloud.dialogflow.cx.v3.IDtmfInput} message DtmfInput message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IStreamingRecognitionResult} message StreamingRecognitionResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DtmfInput.encodeDelimited = function encodeDelimited(message, writer) { + StreamingRecognitionResult.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DtmfInput message from the specified reader or buffer. + * Decodes a StreamingRecognitionResult message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.DtmfInput + * @memberof google.cloud.dialogflow.cx.v3.StreamingRecognitionResult * @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.DtmfInput} DtmfInput + * @returns {google.cloud.dialogflow.cx.v3.StreamingRecognitionResult} StreamingRecognitionResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DtmfInput.decode = function decode(reader, length, error) { + StreamingRecognitionResult.decode = function decode(reader, length, error) { 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.DtmfInput(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.StreamingRecognitionResult(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.digits = reader.string(); + message.messageType = reader.int32(); break; } case 2: { - message.finishDigit = reader.string(); + message.transcript = reader.string(); + break; + } + case 3: { + message.isFinal = reader.bool(); + break; + } + case 4: { + message.confidence = reader.float(); + break; + } + case 6: { + message.stability = reader.float(); + break; + } + case 7: { + if (!(message.speechWordInfo && message.speechWordInfo.length)) + message.speechWordInfo = []; + message.speechWordInfo.push($root.google.cloud.dialogflow.cx.v3.SpeechWordInfo.decode(reader, reader.uint32())); + break; + } + case 8: { + message.speechEndOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 10: { + message.languageCode = reader.string(); break; } default: @@ -66984,136 +65543,262 @@ }; /** - * Decodes a DtmfInput message from the specified reader or buffer, length delimited. + * Decodes a StreamingRecognitionResult message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.DtmfInput + * @memberof google.cloud.dialogflow.cx.v3.StreamingRecognitionResult * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.DtmfInput} DtmfInput + * @returns {google.cloud.dialogflow.cx.v3.StreamingRecognitionResult} StreamingRecognitionResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DtmfInput.decodeDelimited = function decodeDelimited(reader) { + StreamingRecognitionResult.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DtmfInput message. + * Verifies a StreamingRecognitionResult message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.DtmfInput + * @memberof google.cloud.dialogflow.cx.v3.StreamingRecognitionResult * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DtmfInput.verify = function verify(message) { + StreamingRecognitionResult.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.digits != null && message.hasOwnProperty("digits")) - if (!$util.isString(message.digits)) - return "digits: string expected"; - if (message.finishDigit != null && message.hasOwnProperty("finishDigit")) - if (!$util.isString(message.finishDigit)) - return "finishDigit: string expected"; + if (message.messageType != null && message.hasOwnProperty("messageType")) + switch (message.messageType) { + default: + return "messageType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.transcript != null && message.hasOwnProperty("transcript")) + if (!$util.isString(message.transcript)) + return "transcript: string expected"; + if (message.isFinal != null && message.hasOwnProperty("isFinal")) + if (typeof message.isFinal !== "boolean") + return "isFinal: boolean expected"; + if (message.confidence != null && message.hasOwnProperty("confidence")) + if (typeof message.confidence !== "number") + return "confidence: number expected"; + if (message.stability != null && message.hasOwnProperty("stability")) + if (typeof message.stability !== "number") + return "stability: number expected"; + if (message.speechWordInfo != null && message.hasOwnProperty("speechWordInfo")) { + if (!Array.isArray(message.speechWordInfo)) + return "speechWordInfo: array expected"; + for (var i = 0; i < message.speechWordInfo.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.SpeechWordInfo.verify(message.speechWordInfo[i]); + if (error) + return "speechWordInfo." + error; + } + } + if (message.speechEndOffset != null && message.hasOwnProperty("speechEndOffset")) { + var error = $root.google.protobuf.Duration.verify(message.speechEndOffset); + if (error) + return "speechEndOffset." + error; + } + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; return null; }; /** - * Creates a DtmfInput message from a plain object. Also converts values to their respective internal types. + * Creates a StreamingRecognitionResult message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.DtmfInput + * @memberof google.cloud.dialogflow.cx.v3.StreamingRecognitionResult * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.DtmfInput} DtmfInput + * @returns {google.cloud.dialogflow.cx.v3.StreamingRecognitionResult} StreamingRecognitionResult */ - DtmfInput.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.DtmfInput) + StreamingRecognitionResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.StreamingRecognitionResult) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.DtmfInput(); - if (object.digits != null) - message.digits = String(object.digits); - if (object.finishDigit != null) - message.finishDigit = String(object.finishDigit); + var message = new $root.google.cloud.dialogflow.cx.v3.StreamingRecognitionResult(); + switch (object.messageType) { + default: + if (typeof object.messageType === "number") { + message.messageType = object.messageType; + break; + } + break; + case "MESSAGE_TYPE_UNSPECIFIED": + case 0: + message.messageType = 0; + break; + case "TRANSCRIPT": + case 1: + message.messageType = 1; + break; + case "END_OF_SINGLE_UTTERANCE": + case 2: + message.messageType = 2; + break; + } + if (object.transcript != null) + message.transcript = String(object.transcript); + if (object.isFinal != null) + message.isFinal = Boolean(object.isFinal); + if (object.confidence != null) + message.confidence = Number(object.confidence); + if (object.stability != null) + message.stability = Number(object.stability); + if (object.speechWordInfo) { + if (!Array.isArray(object.speechWordInfo)) + throw TypeError(".google.cloud.dialogflow.cx.v3.StreamingRecognitionResult.speechWordInfo: array expected"); + message.speechWordInfo = []; + for (var i = 0; i < object.speechWordInfo.length; ++i) { + if (typeof object.speechWordInfo[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.StreamingRecognitionResult.speechWordInfo: object expected"); + message.speechWordInfo[i] = $root.google.cloud.dialogflow.cx.v3.SpeechWordInfo.fromObject(object.speechWordInfo[i]); + } + } + if (object.speechEndOffset != null) { + if (typeof object.speechEndOffset !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.StreamingRecognitionResult.speechEndOffset: object expected"); + message.speechEndOffset = $root.google.protobuf.Duration.fromObject(object.speechEndOffset); + } + if (object.languageCode != null) + message.languageCode = String(object.languageCode); return message; }; /** - * Creates a plain object from a DtmfInput message. Also converts values to other types if specified. + * Creates a plain object from a StreamingRecognitionResult message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.DtmfInput + * @memberof google.cloud.dialogflow.cx.v3.StreamingRecognitionResult * @static - * @param {google.cloud.dialogflow.cx.v3.DtmfInput} message DtmfInput + * @param {google.cloud.dialogflow.cx.v3.StreamingRecognitionResult} message StreamingRecognitionResult * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DtmfInput.toObject = function toObject(message, options) { + StreamingRecognitionResult.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.speechWordInfo = []; if (options.defaults) { - object.digits = ""; - object.finishDigit = ""; + object.messageType = options.enums === String ? "MESSAGE_TYPE_UNSPECIFIED" : 0; + object.transcript = ""; + object.isFinal = false; + object.confidence = 0; + object.stability = 0; + object.speechEndOffset = null; + object.languageCode = ""; } - if (message.digits != null && message.hasOwnProperty("digits")) - object.digits = message.digits; - if (message.finishDigit != null && message.hasOwnProperty("finishDigit")) - object.finishDigit = message.finishDigit; + if (message.messageType != null && message.hasOwnProperty("messageType")) + object.messageType = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.StreamingRecognitionResult.MessageType[message.messageType] === undefined ? message.messageType : $root.google.cloud.dialogflow.cx.v3.StreamingRecognitionResult.MessageType[message.messageType] : message.messageType; + if (message.transcript != null && message.hasOwnProperty("transcript")) + object.transcript = message.transcript; + if (message.isFinal != null && message.hasOwnProperty("isFinal")) + object.isFinal = message.isFinal; + if (message.confidence != null && message.hasOwnProperty("confidence")) + object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence; + if (message.stability != null && message.hasOwnProperty("stability")) + object.stability = options.json && !isFinite(message.stability) ? String(message.stability) : message.stability; + if (message.speechWordInfo && message.speechWordInfo.length) { + object.speechWordInfo = []; + for (var j = 0; j < message.speechWordInfo.length; ++j) + object.speechWordInfo[j] = $root.google.cloud.dialogflow.cx.v3.SpeechWordInfo.toObject(message.speechWordInfo[j], options); + } + if (message.speechEndOffset != null && message.hasOwnProperty("speechEndOffset")) + object.speechEndOffset = $root.google.protobuf.Duration.toObject(message.speechEndOffset, options); + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; return object; }; /** - * Converts this DtmfInput to JSON. + * Converts this StreamingRecognitionResult to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.DtmfInput + * @memberof google.cloud.dialogflow.cx.v3.StreamingRecognitionResult * @instance * @returns {Object.} JSON object */ - DtmfInput.prototype.toJSON = function toJSON() { + StreamingRecognitionResult.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DtmfInput + * Gets the default type url for StreamingRecognitionResult * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.DtmfInput + * @memberof google.cloud.dialogflow.cx.v3.StreamingRecognitionResult * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DtmfInput.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + StreamingRecognitionResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.DtmfInput"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.StreamingRecognitionResult"; }; - return DtmfInput; + /** + * MessageType enum. + * @name google.cloud.dialogflow.cx.v3.StreamingRecognitionResult.MessageType + * @enum {number} + * @property {number} MESSAGE_TYPE_UNSPECIFIED=0 MESSAGE_TYPE_UNSPECIFIED value + * @property {number} TRANSCRIPT=1 TRANSCRIPT value + * @property {number} END_OF_SINGLE_UTTERANCE=2 END_OF_SINGLE_UTTERANCE value + */ + StreamingRecognitionResult.MessageType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MESSAGE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "TRANSCRIPT"] = 1; + values[valuesById[2] = "END_OF_SINGLE_UTTERANCE"] = 2; + return values; + })(); + + return StreamingRecognitionResult; })(); - v3.Match = (function() { + v3.QueryParameters = (function() { /** - * Properties of a Match. + * Properties of a QueryParameters. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IMatch - * @property {google.cloud.dialogflow.cx.v3.IIntent|null} [intent] Match intent - * @property {string|null} [event] Match event - * @property {google.protobuf.IStruct|null} [parameters] Match parameters - * @property {string|null} [resolvedInput] Match resolvedInput - * @property {google.cloud.dialogflow.cx.v3.Match.MatchType|null} [matchType] Match matchType - * @property {number|null} [confidence] Match confidence + * @interface IQueryParameters + * @property {string|null} [timeZone] QueryParameters timeZone + * @property {google.type.ILatLng|null} [geoLocation] QueryParameters geoLocation + * @property {Array.|null} [sessionEntityTypes] QueryParameters sessionEntityTypes + * @property {google.protobuf.IStruct|null} [payload] QueryParameters payload + * @property {google.protobuf.IStruct|null} [parameters] QueryParameters parameters + * @property {string|null} [parameterScope] QueryParameters parameterScope + * @property {string|null} [currentPage] QueryParameters currentPage + * @property {boolean|null} [disableWebhook] QueryParameters disableWebhook + * @property {boolean|null} [analyzeQueryTextSentiment] QueryParameters analyzeQueryTextSentiment + * @property {Object.|null} [webhookHeaders] QueryParameters webhookHeaders + * @property {Array.|null} [flowVersions] QueryParameters flowVersions + * @property {string|null} [currentPlaybook] QueryParameters currentPlaybook + * @property {google.cloud.dialogflow.cx.v3.ILlmModelSettings|null} [llmModelSettings] QueryParameters llmModelSettings + * @property {string|null} [channel] QueryParameters channel + * @property {google.protobuf.IDuration|null} [sessionTtl] QueryParameters sessionTtl + * @property {google.protobuf.IStruct|null} [endUserMetadata] QueryParameters endUserMetadata + * @property {google.cloud.dialogflow.cx.v3.ISearchConfig|null} [searchConfig] QueryParameters searchConfig + * @property {boolean|null} [populateDataStoreConnectionSignals] QueryParameters populateDataStoreConnectionSignals */ /** - * Constructs a new Match. + * Constructs a new QueryParameters. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a Match. - * @implements IMatch + * @classdesc Represents a QueryParameters. + * @implements IQueryParameters * @constructor - * @param {google.cloud.dialogflow.cx.v3.IMatch=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IQueryParameters=} [properties] Properties to set */ - function Match(properties) { + function QueryParameters(properties) { + this.sessionEntityTypes = []; + this.webhookHeaders = {}; + this.flowVersions = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -67121,147 +65806,341 @@ } /** - * Match intent. - * @member {google.cloud.dialogflow.cx.v3.IIntent|null|undefined} intent - * @memberof google.cloud.dialogflow.cx.v3.Match + * QueryParameters timeZone. + * @member {string} timeZone + * @memberof google.cloud.dialogflow.cx.v3.QueryParameters * @instance */ - Match.prototype.intent = null; + QueryParameters.prototype.timeZone = ""; /** - * Match event. - * @member {string} event - * @memberof google.cloud.dialogflow.cx.v3.Match + * QueryParameters geoLocation. + * @member {google.type.ILatLng|null|undefined} geoLocation + * @memberof google.cloud.dialogflow.cx.v3.QueryParameters * @instance */ - Match.prototype.event = ""; + QueryParameters.prototype.geoLocation = null; /** - * Match parameters. + * QueryParameters sessionEntityTypes. + * @member {Array.} sessionEntityTypes + * @memberof google.cloud.dialogflow.cx.v3.QueryParameters + * @instance + */ + QueryParameters.prototype.sessionEntityTypes = $util.emptyArray; + + /** + * QueryParameters payload. + * @member {google.protobuf.IStruct|null|undefined} payload + * @memberof google.cloud.dialogflow.cx.v3.QueryParameters + * @instance + */ + QueryParameters.prototype.payload = null; + + /** + * QueryParameters parameters. * @member {google.protobuf.IStruct|null|undefined} parameters - * @memberof google.cloud.dialogflow.cx.v3.Match + * @memberof google.cloud.dialogflow.cx.v3.QueryParameters * @instance */ - Match.prototype.parameters = null; + QueryParameters.prototype.parameters = null; /** - * Match resolvedInput. - * @member {string} resolvedInput - * @memberof google.cloud.dialogflow.cx.v3.Match + * QueryParameters parameterScope. + * @member {string} parameterScope + * @memberof google.cloud.dialogflow.cx.v3.QueryParameters * @instance */ - Match.prototype.resolvedInput = ""; + QueryParameters.prototype.parameterScope = ""; /** - * Match matchType. - * @member {google.cloud.dialogflow.cx.v3.Match.MatchType} matchType - * @memberof google.cloud.dialogflow.cx.v3.Match + * QueryParameters currentPage. + * @member {string} currentPage + * @memberof google.cloud.dialogflow.cx.v3.QueryParameters * @instance */ - Match.prototype.matchType = 0; + QueryParameters.prototype.currentPage = ""; /** - * Match confidence. - * @member {number} confidence - * @memberof google.cloud.dialogflow.cx.v3.Match + * QueryParameters disableWebhook. + * @member {boolean} disableWebhook + * @memberof google.cloud.dialogflow.cx.v3.QueryParameters * @instance */ - Match.prototype.confidence = 0; + QueryParameters.prototype.disableWebhook = false; /** - * Creates a new Match instance using the specified properties. + * QueryParameters analyzeQueryTextSentiment. + * @member {boolean} analyzeQueryTextSentiment + * @memberof google.cloud.dialogflow.cx.v3.QueryParameters + * @instance + */ + QueryParameters.prototype.analyzeQueryTextSentiment = false; + + /** + * QueryParameters webhookHeaders. + * @member {Object.} webhookHeaders + * @memberof google.cloud.dialogflow.cx.v3.QueryParameters + * @instance + */ + QueryParameters.prototype.webhookHeaders = $util.emptyObject; + + /** + * QueryParameters flowVersions. + * @member {Array.} flowVersions + * @memberof google.cloud.dialogflow.cx.v3.QueryParameters + * @instance + */ + QueryParameters.prototype.flowVersions = $util.emptyArray; + + /** + * QueryParameters currentPlaybook. + * @member {string} currentPlaybook + * @memberof google.cloud.dialogflow.cx.v3.QueryParameters + * @instance + */ + QueryParameters.prototype.currentPlaybook = ""; + + /** + * QueryParameters llmModelSettings. + * @member {google.cloud.dialogflow.cx.v3.ILlmModelSettings|null|undefined} llmModelSettings + * @memberof google.cloud.dialogflow.cx.v3.QueryParameters + * @instance + */ + QueryParameters.prototype.llmModelSettings = null; + + /** + * QueryParameters channel. + * @member {string} channel + * @memberof google.cloud.dialogflow.cx.v3.QueryParameters + * @instance + */ + QueryParameters.prototype.channel = ""; + + /** + * QueryParameters sessionTtl. + * @member {google.protobuf.IDuration|null|undefined} sessionTtl + * @memberof google.cloud.dialogflow.cx.v3.QueryParameters + * @instance + */ + QueryParameters.prototype.sessionTtl = null; + + /** + * QueryParameters endUserMetadata. + * @member {google.protobuf.IStruct|null|undefined} endUserMetadata + * @memberof google.cloud.dialogflow.cx.v3.QueryParameters + * @instance + */ + QueryParameters.prototype.endUserMetadata = null; + + /** + * QueryParameters searchConfig. + * @member {google.cloud.dialogflow.cx.v3.ISearchConfig|null|undefined} searchConfig + * @memberof google.cloud.dialogflow.cx.v3.QueryParameters + * @instance + */ + QueryParameters.prototype.searchConfig = null; + + /** + * QueryParameters populateDataStoreConnectionSignals. + * @member {boolean} populateDataStoreConnectionSignals + * @memberof google.cloud.dialogflow.cx.v3.QueryParameters + * @instance + */ + QueryParameters.prototype.populateDataStoreConnectionSignals = false; + + /** + * Creates a new QueryParameters instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.Match + * @memberof google.cloud.dialogflow.cx.v3.QueryParameters * @static - * @param {google.cloud.dialogflow.cx.v3.IMatch=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.Match} Match instance + * @param {google.cloud.dialogflow.cx.v3.IQueryParameters=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.QueryParameters} QueryParameters instance */ - Match.create = function create(properties) { - return new Match(properties); + QueryParameters.create = function create(properties) { + return new QueryParameters(properties); }; /** - * Encodes the specified Match message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Match.verify|verify} messages. + * Encodes the specified QueryParameters message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.QueryParameters.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.Match + * @memberof google.cloud.dialogflow.cx.v3.QueryParameters * @static - * @param {google.cloud.dialogflow.cx.v3.IMatch} message Match message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IQueryParameters} message QueryParameters message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Match.encode = function encode(message, writer) { + QueryParameters.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.intent != null && Object.hasOwnProperty.call(message, "intent")) - $root.google.cloud.dialogflow.cx.v3.Intent.encode(message.intent, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.timeZone != null && Object.hasOwnProperty.call(message, "timeZone")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.timeZone); + if (message.geoLocation != null && Object.hasOwnProperty.call(message, "geoLocation")) + $root.google.type.LatLng.encode(message.geoLocation, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.sessionEntityTypes != null && message.sessionEntityTypes.length) + for (var i = 0; i < message.sessionEntityTypes.length; ++i) + $root.google.cloud.dialogflow.cx.v3.SessionEntityType.encode(message.sessionEntityTypes[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.payload != null && Object.hasOwnProperty.call(message, "payload")) + $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 2, wireType 2 =*/18).fork()).ldelim(); - if (message.resolvedInput != null && Object.hasOwnProperty.call(message, "resolvedInput")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.resolvedInput); - if (message.matchType != null && Object.hasOwnProperty.call(message, "matchType")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.matchType); - if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) - writer.uint32(/* id 5, wireType 5 =*/45).float(message.confidence); - if (message.event != null && Object.hasOwnProperty.call(message, "event")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.event); + $root.google.protobuf.Struct.encode(message.parameters, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.currentPage != null && Object.hasOwnProperty.call(message, "currentPage")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.currentPage); + 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")) + for (var keys = Object.keys(message.webhookHeaders), i = 0; i < keys.length; ++i) + writer.uint32(/* id 10, wireType 2 =*/82).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.webhookHeaders[keys[i]]).ldelim(); + if (message.parameterScope != null && Object.hasOwnProperty.call(message, "parameterScope")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.parameterScope); + if (message.flowVersions != null && message.flowVersions.length) + for (var i = 0; i < message.flowVersions.length; ++i) + writer.uint32(/* id 14, wireType 2 =*/114).string(message.flowVersions[i]); + if (message.channel != null && Object.hasOwnProperty.call(message, "channel")) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.channel); + if (message.sessionTtl != null && Object.hasOwnProperty.call(message, "sessionTtl")) + $root.google.protobuf.Duration.encode(message.sessionTtl, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + if (message.endUserMetadata != null && Object.hasOwnProperty.call(message, "endUserMetadata")) + $root.google.protobuf.Struct.encode(message.endUserMetadata, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + if (message.currentPlaybook != null && Object.hasOwnProperty.call(message, "currentPlaybook")) + writer.uint32(/* id 19, wireType 2 =*/154).string(message.currentPlaybook); + if (message.searchConfig != null && Object.hasOwnProperty.call(message, "searchConfig")) + $root.google.cloud.dialogflow.cx.v3.SearchConfig.encode(message.searchConfig, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + if (message.llmModelSettings != null && Object.hasOwnProperty.call(message, "llmModelSettings")) + $root.google.cloud.dialogflow.cx.v3.LlmModelSettings.encode(message.llmModelSettings, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.populateDataStoreConnectionSignals != null && Object.hasOwnProperty.call(message, "populateDataStoreConnectionSignals")) + writer.uint32(/* id 25, wireType 0 =*/200).bool(message.populateDataStoreConnectionSignals); return writer; }; /** - * Encodes the specified Match message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Match.verify|verify} messages. + * Encodes the specified QueryParameters message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.QueryParameters.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Match + * @memberof google.cloud.dialogflow.cx.v3.QueryParameters * @static - * @param {google.cloud.dialogflow.cx.v3.IMatch} message Match message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IQueryParameters} message QueryParameters message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Match.encodeDelimited = function encodeDelimited(message, writer) { + QueryParameters.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Match message from the specified reader or buffer. + * Decodes a QueryParameters message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.Match + * @memberof google.cloud.dialogflow.cx.v3.QueryParameters * @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.Match} Match + * @returns {google.cloud.dialogflow.cx.v3.QueryParameters} QueryParameters * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Match.decode = function decode(reader, length, error) { + QueryParameters.decode = function decode(reader, length, error) { 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.Match(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.QueryParameters(), key, value; while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.intent = $root.google.cloud.dialogflow.cx.v3.Intent.decode(reader, reader.uint32()); - break; - } - case 6: { - message.event = reader.string(); + message.timeZone = reader.string(); break; } case 2: { - message.parameters = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + message.geoLocation = $root.google.type.LatLng.decode(reader, reader.uint32()); break; } case 3: { - message.resolvedInput = reader.string(); + if (!(message.sessionEntityTypes && message.sessionEntityTypes.length)) + message.sessionEntityTypes = []; + message.sessionEntityTypes.push($root.google.cloud.dialogflow.cx.v3.SessionEntityType.decode(reader, reader.uint32())); break; } case 4: { - message.matchType = reader.int32(); + message.payload = $root.google.protobuf.Struct.decode(reader, reader.uint32()); break; } case 5: { - message.confidence = reader.float(); + message.parameters = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + } + case 12: { + message.parameterScope = reader.string(); + break; + } + case 6: { + message.currentPage = reader.string(); + break; + } + case 7: { + message.disableWebhook = reader.bool(); + break; + } + case 8: { + message.analyzeQueryTextSentiment = reader.bool(); + break; + } + case 10: { + if (message.webhookHeaders === $util.emptyObject) + message.webhookHeaders = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.webhookHeaders[key] = value; + break; + } + case 14: { + if (!(message.flowVersions && message.flowVersions.length)) + message.flowVersions = []; + message.flowVersions.push(reader.string()); + break; + } + case 19: { + message.currentPlaybook = reader.string(); + break; + } + case 21: { + message.llmModelSettings = $root.google.cloud.dialogflow.cx.v3.LlmModelSettings.decode(reader, reader.uint32()); + break; + } + case 15: { + message.channel = reader.string(); + break; + } + case 16: { + message.sessionTtl = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 18: { + message.endUserMetadata = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + } + case 20: { + message.searchConfig = $root.google.cloud.dialogflow.cx.v3.SearchConfig.decode(reader, reader.uint32()); + break; + } + case 25: { + message.populateDataStoreConnectionSignals = reader.bool(); break; } default: @@ -67273,258 +66152,343 @@ }; /** - * Decodes a Match message from the specified reader or buffer, length delimited. + * Decodes a QueryParameters message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Match + * @memberof google.cloud.dialogflow.cx.v3.QueryParameters * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.Match} Match + * @returns {google.cloud.dialogflow.cx.v3.QueryParameters} QueryParameters * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Match.decodeDelimited = function decodeDelimited(reader) { + QueryParameters.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Match message. + * Verifies a QueryParameters message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.Match + * @memberof google.cloud.dialogflow.cx.v3.QueryParameters * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Match.verify = function verify(message) { + QueryParameters.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.intent != null && message.hasOwnProperty("intent")) { - var error = $root.google.cloud.dialogflow.cx.v3.Intent.verify(message.intent); + if (message.timeZone != null && message.hasOwnProperty("timeZone")) + if (!$util.isString(message.timeZone)) + return "timeZone: string expected"; + if (message.geoLocation != null && message.hasOwnProperty("geoLocation")) { + var error = $root.google.type.LatLng.verify(message.geoLocation); if (error) - return "intent." + error; + return "geoLocation." + error; + } + if (message.sessionEntityTypes != null && message.hasOwnProperty("sessionEntityTypes")) { + if (!Array.isArray(message.sessionEntityTypes)) + return "sessionEntityTypes: array expected"; + for (var i = 0; i < message.sessionEntityTypes.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.SessionEntityType.verify(message.sessionEntityTypes[i]); + if (error) + return "sessionEntityTypes." + error; + } + } + if (message.payload != null && message.hasOwnProperty("payload")) { + var error = $root.google.protobuf.Struct.verify(message.payload); + if (error) + return "payload." + error; } - if (message.event != null && message.hasOwnProperty("event")) - if (!$util.isString(message.event)) - return "event: string expected"; if (message.parameters != null && message.hasOwnProperty("parameters")) { var error = $root.google.protobuf.Struct.verify(message.parameters); if (error) return "parameters." + error; } - if (message.resolvedInput != null && message.hasOwnProperty("resolvedInput")) - if (!$util.isString(message.resolvedInput)) - return "resolvedInput: string expected"; - if (message.matchType != null && message.hasOwnProperty("matchType")) - switch (message.matchType) { - default: - return "matchType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 8: - case 9: - break; - } - if (message.confidence != null && message.hasOwnProperty("confidence")) - if (typeof message.confidence !== "number") - return "confidence: number expected"; + if (message.parameterScope != null && message.hasOwnProperty("parameterScope")) + if (!$util.isString(message.parameterScope)) + return "parameterScope: string expected"; + if (message.currentPage != null && message.hasOwnProperty("currentPage")) + if (!$util.isString(message.currentPage)) + return "currentPage: string expected"; + 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"; + if (message.webhookHeaders != null && message.hasOwnProperty("webhookHeaders")) { + if (!$util.isObject(message.webhookHeaders)) + return "webhookHeaders: object expected"; + var key = Object.keys(message.webhookHeaders); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.webhookHeaders[key[i]])) + return "webhookHeaders: string{k:string} expected"; + } + if (message.flowVersions != null && message.hasOwnProperty("flowVersions")) { + if (!Array.isArray(message.flowVersions)) + return "flowVersions: array expected"; + for (var i = 0; i < message.flowVersions.length; ++i) + if (!$util.isString(message.flowVersions[i])) + return "flowVersions: string[] expected"; + } + if (message.currentPlaybook != null && message.hasOwnProperty("currentPlaybook")) + if (!$util.isString(message.currentPlaybook)) + return "currentPlaybook: string expected"; + if (message.llmModelSettings != null && message.hasOwnProperty("llmModelSettings")) { + var error = $root.google.cloud.dialogflow.cx.v3.LlmModelSettings.verify(message.llmModelSettings); + if (error) + return "llmModelSettings." + error; + } + if (message.channel != null && message.hasOwnProperty("channel")) + if (!$util.isString(message.channel)) + return "channel: string expected"; + if (message.sessionTtl != null && message.hasOwnProperty("sessionTtl")) { + var error = $root.google.protobuf.Duration.verify(message.sessionTtl); + if (error) + return "sessionTtl." + error; + } + if (message.endUserMetadata != null && message.hasOwnProperty("endUserMetadata")) { + var error = $root.google.protobuf.Struct.verify(message.endUserMetadata); + if (error) + return "endUserMetadata." + error; + } + if (message.searchConfig != null && message.hasOwnProperty("searchConfig")) { + var error = $root.google.cloud.dialogflow.cx.v3.SearchConfig.verify(message.searchConfig); + if (error) + return "searchConfig." + error; + } + if (message.populateDataStoreConnectionSignals != null && message.hasOwnProperty("populateDataStoreConnectionSignals")) + if (typeof message.populateDataStoreConnectionSignals !== "boolean") + return "populateDataStoreConnectionSignals: boolean expected"; return null; }; /** - * Creates a Match message from a plain object. Also converts values to their respective internal types. + * Creates a QueryParameters message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.Match + * @memberof google.cloud.dialogflow.cx.v3.QueryParameters * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.Match} Match + * @returns {google.cloud.dialogflow.cx.v3.QueryParameters} QueryParameters */ - Match.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.Match) + QueryParameters.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.QueryParameters) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.Match(); - if (object.intent != null) { - if (typeof object.intent !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.Match.intent: object expected"); - message.intent = $root.google.cloud.dialogflow.cx.v3.Intent.fromObject(object.intent); + var message = new $root.google.cloud.dialogflow.cx.v3.QueryParameters(); + if (object.timeZone != null) + message.timeZone = String(object.timeZone); + if (object.geoLocation != null) { + if (typeof object.geoLocation !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.QueryParameters.geoLocation: object expected"); + message.geoLocation = $root.google.type.LatLng.fromObject(object.geoLocation); + } + if (object.sessionEntityTypes) { + if (!Array.isArray(object.sessionEntityTypes)) + throw TypeError(".google.cloud.dialogflow.cx.v3.QueryParameters.sessionEntityTypes: array expected"); + message.sessionEntityTypes = []; + for (var i = 0; i < object.sessionEntityTypes.length; ++i) { + if (typeof object.sessionEntityTypes[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.QueryParameters.sessionEntityTypes: object expected"); + message.sessionEntityTypes[i] = $root.google.cloud.dialogflow.cx.v3.SessionEntityType.fromObject(object.sessionEntityTypes[i]); + } + } + if (object.payload != null) { + if (typeof object.payload !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.QueryParameters.payload: object expected"); + message.payload = $root.google.protobuf.Struct.fromObject(object.payload); } - if (object.event != null) - message.event = String(object.event); if (object.parameters != null) { if (typeof object.parameters !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.Match.parameters: object expected"); + throw TypeError(".google.cloud.dialogflow.cx.v3.QueryParameters.parameters: object expected"); message.parameters = $root.google.protobuf.Struct.fromObject(object.parameters); } - if (object.resolvedInput != null) - message.resolvedInput = String(object.resolvedInput); - switch (object.matchType) { - default: - if (typeof object.matchType === "number") { - message.matchType = object.matchType; - break; - } - break; - case "MATCH_TYPE_UNSPECIFIED": - case 0: - message.matchType = 0; - break; - case "INTENT": - case 1: - message.matchType = 1; - break; - case "DIRECT_INTENT": - case 2: - message.matchType = 2; - break; - case "PARAMETER_FILLING": - case 3: - message.matchType = 3; - break; - case "NO_MATCH": - case 4: - message.matchType = 4; - break; - case "NO_INPUT": - case 5: - message.matchType = 5; - break; - case "EVENT": - case 6: - message.matchType = 6; - break; - case "KNOWLEDGE_CONNECTOR": - case 8: - message.matchType = 8; - break; - case "PLAYBOOK": - case 9: - message.matchType = 9; - break; + if (object.parameterScope != null) + message.parameterScope = String(object.parameterScope); + if (object.currentPage != null) + message.currentPage = String(object.currentPage); + if (object.disableWebhook != null) + message.disableWebhook = Boolean(object.disableWebhook); + if (object.analyzeQueryTextSentiment != null) + message.analyzeQueryTextSentiment = Boolean(object.analyzeQueryTextSentiment); + if (object.webhookHeaders) { + if (typeof object.webhookHeaders !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.QueryParameters.webhookHeaders: object expected"); + message.webhookHeaders = {}; + for (var keys = Object.keys(object.webhookHeaders), i = 0; i < keys.length; ++i) + message.webhookHeaders[keys[i]] = String(object.webhookHeaders[keys[i]]); } - if (object.confidence != null) - message.confidence = Number(object.confidence); + if (object.flowVersions) { + if (!Array.isArray(object.flowVersions)) + throw TypeError(".google.cloud.dialogflow.cx.v3.QueryParameters.flowVersions: array expected"); + message.flowVersions = []; + for (var i = 0; i < object.flowVersions.length; ++i) + message.flowVersions[i] = String(object.flowVersions[i]); + } + if (object.currentPlaybook != null) + message.currentPlaybook = String(object.currentPlaybook); + if (object.llmModelSettings != null) { + if (typeof object.llmModelSettings !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.QueryParameters.llmModelSettings: object expected"); + message.llmModelSettings = $root.google.cloud.dialogflow.cx.v3.LlmModelSettings.fromObject(object.llmModelSettings); + } + if (object.channel != null) + message.channel = String(object.channel); + if (object.sessionTtl != null) { + if (typeof object.sessionTtl !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.QueryParameters.sessionTtl: object expected"); + message.sessionTtl = $root.google.protobuf.Duration.fromObject(object.sessionTtl); + } + if (object.endUserMetadata != null) { + if (typeof object.endUserMetadata !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.QueryParameters.endUserMetadata: object expected"); + message.endUserMetadata = $root.google.protobuf.Struct.fromObject(object.endUserMetadata); + } + if (object.searchConfig != null) { + if (typeof object.searchConfig !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.QueryParameters.searchConfig: object expected"); + message.searchConfig = $root.google.cloud.dialogflow.cx.v3.SearchConfig.fromObject(object.searchConfig); + } + if (object.populateDataStoreConnectionSignals != null) + message.populateDataStoreConnectionSignals = Boolean(object.populateDataStoreConnectionSignals); return message; }; /** - * Creates a plain object from a Match message. Also converts values to other types if specified. + * Creates a plain object from a QueryParameters message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.Match + * @memberof google.cloud.dialogflow.cx.v3.QueryParameters * @static - * @param {google.cloud.dialogflow.cx.v3.Match} message Match + * @param {google.cloud.dialogflow.cx.v3.QueryParameters} message QueryParameters * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Match.toObject = function toObject(message, options) { + QueryParameters.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) { + object.sessionEntityTypes = []; + object.flowVersions = []; + } + if (options.objects || options.defaults) + object.webhookHeaders = {}; if (options.defaults) { - object.intent = null; + object.timeZone = ""; + object.geoLocation = null; + object.payload = null; object.parameters = null; - object.resolvedInput = ""; - object.matchType = options.enums === String ? "MATCH_TYPE_UNSPECIFIED" : 0; - object.confidence = 0; - object.event = ""; + object.currentPage = ""; + object.disableWebhook = false; + object.analyzeQueryTextSentiment = false; + object.parameterScope = ""; + object.channel = ""; + object.sessionTtl = null; + object.endUserMetadata = null; + object.currentPlaybook = ""; + object.searchConfig = null; + object.llmModelSettings = null; + object.populateDataStoreConnectionSignals = false; } - if (message.intent != null && message.hasOwnProperty("intent")) - object.intent = $root.google.cloud.dialogflow.cx.v3.Intent.toObject(message.intent, options); + if (message.timeZone != null && message.hasOwnProperty("timeZone")) + object.timeZone = message.timeZone; + if (message.geoLocation != null && message.hasOwnProperty("geoLocation")) + object.geoLocation = $root.google.type.LatLng.toObject(message.geoLocation, options); + if (message.sessionEntityTypes && message.sessionEntityTypes.length) { + object.sessionEntityTypes = []; + for (var j = 0; j < message.sessionEntityTypes.length; ++j) + object.sessionEntityTypes[j] = $root.google.cloud.dialogflow.cx.v3.SessionEntityType.toObject(message.sessionEntityTypes[j], options); + } + if (message.payload != null && message.hasOwnProperty("payload")) + 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.resolvedInput != null && message.hasOwnProperty("resolvedInput")) - object.resolvedInput = message.resolvedInput; - if (message.matchType != null && message.hasOwnProperty("matchType")) - object.matchType = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.Match.MatchType[message.matchType] === undefined ? message.matchType : $root.google.cloud.dialogflow.cx.v3.Match.MatchType[message.matchType] : message.matchType; - if (message.confidence != null && message.hasOwnProperty("confidence")) - object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence; - if (message.event != null && message.hasOwnProperty("event")) - object.event = message.event; + if (message.currentPage != null && message.hasOwnProperty("currentPage")) + object.currentPage = message.currentPage; + if (message.disableWebhook != null && message.hasOwnProperty("disableWebhook")) + object.disableWebhook = message.disableWebhook; + if (message.analyzeQueryTextSentiment != null && message.hasOwnProperty("analyzeQueryTextSentiment")) + object.analyzeQueryTextSentiment = message.analyzeQueryTextSentiment; + var keys2; + if (message.webhookHeaders && (keys2 = Object.keys(message.webhookHeaders)).length) { + object.webhookHeaders = {}; + for (var j = 0; j < keys2.length; ++j) + object.webhookHeaders[keys2[j]] = message.webhookHeaders[keys2[j]]; + } + if (message.parameterScope != null && message.hasOwnProperty("parameterScope")) + object.parameterScope = message.parameterScope; + if (message.flowVersions && message.flowVersions.length) { + object.flowVersions = []; + for (var j = 0; j < message.flowVersions.length; ++j) + object.flowVersions[j] = message.flowVersions[j]; + } + if (message.channel != null && message.hasOwnProperty("channel")) + object.channel = message.channel; + if (message.sessionTtl != null && message.hasOwnProperty("sessionTtl")) + object.sessionTtl = $root.google.protobuf.Duration.toObject(message.sessionTtl, options); + if (message.endUserMetadata != null && message.hasOwnProperty("endUserMetadata")) + object.endUserMetadata = $root.google.protobuf.Struct.toObject(message.endUserMetadata, options); + if (message.currentPlaybook != null && message.hasOwnProperty("currentPlaybook")) + object.currentPlaybook = message.currentPlaybook; + if (message.searchConfig != null && message.hasOwnProperty("searchConfig")) + object.searchConfig = $root.google.cloud.dialogflow.cx.v3.SearchConfig.toObject(message.searchConfig, options); + if (message.llmModelSettings != null && message.hasOwnProperty("llmModelSettings")) + object.llmModelSettings = $root.google.cloud.dialogflow.cx.v3.LlmModelSettings.toObject(message.llmModelSettings, options); + if (message.populateDataStoreConnectionSignals != null && message.hasOwnProperty("populateDataStoreConnectionSignals")) + object.populateDataStoreConnectionSignals = message.populateDataStoreConnectionSignals; return object; }; /** - * Converts this Match to JSON. + * Converts this QueryParameters to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.Match + * @memberof google.cloud.dialogflow.cx.v3.QueryParameters * @instance * @returns {Object.} JSON object */ - Match.prototype.toJSON = function toJSON() { + QueryParameters.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Match + * Gets the default type url for QueryParameters * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.Match + * @memberof google.cloud.dialogflow.cx.v3.QueryParameters * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Match.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + QueryParameters.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Match"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.QueryParameters"; }; - /** - * MatchType enum. - * @name google.cloud.dialogflow.cx.v3.Match.MatchType - * @enum {number} - * @property {number} MATCH_TYPE_UNSPECIFIED=0 MATCH_TYPE_UNSPECIFIED value - * @property {number} INTENT=1 INTENT value - * @property {number} DIRECT_INTENT=2 DIRECT_INTENT value - * @property {number} PARAMETER_FILLING=3 PARAMETER_FILLING value - * @property {number} NO_MATCH=4 NO_MATCH value - * @property {number} NO_INPUT=5 NO_INPUT value - * @property {number} EVENT=6 EVENT value - * @property {number} KNOWLEDGE_CONNECTOR=8 KNOWLEDGE_CONNECTOR value - * @property {number} PLAYBOOK=9 PLAYBOOK value - */ - Match.MatchType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MATCH_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "INTENT"] = 1; - values[valuesById[2] = "DIRECT_INTENT"] = 2; - values[valuesById[3] = "PARAMETER_FILLING"] = 3; - values[valuesById[4] = "NO_MATCH"] = 4; - values[valuesById[5] = "NO_INPUT"] = 5; - values[valuesById[6] = "EVENT"] = 6; - values[valuesById[8] = "KNOWLEDGE_CONNECTOR"] = 8; - values[valuesById[9] = "PLAYBOOK"] = 9; - return values; - })(); - - return Match; + return QueryParameters; })(); - v3.MatchIntentRequest = (function() { + v3.SearchConfig = (function() { /** - * Properties of a MatchIntentRequest. + * Properties of a SearchConfig. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IMatchIntentRequest - * @property {string|null} [session] MatchIntentRequest session - * @property {google.cloud.dialogflow.cx.v3.IQueryParameters|null} [queryParams] MatchIntentRequest queryParams - * @property {google.cloud.dialogflow.cx.v3.IQueryInput|null} [queryInput] MatchIntentRequest queryInput - * @property {boolean|null} [persistParameterChanges] MatchIntentRequest persistParameterChanges + * @interface ISearchConfig + * @property {Array.|null} [boostSpecs] SearchConfig boostSpecs + * @property {Array.|null} [filterSpecs] SearchConfig filterSpecs */ /** - * Constructs a new MatchIntentRequest. + * Constructs a new SearchConfig. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a MatchIntentRequest. - * @implements IMatchIntentRequest + * @classdesc Represents a SearchConfig. + * @implements ISearchConfig * @constructor - * @param {google.cloud.dialogflow.cx.v3.IMatchIntentRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.ISearchConfig=} [properties] Properties to set */ - function MatchIntentRequest(properties) { + function SearchConfig(properties) { + this.boostSpecs = []; + this.filterSpecs = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -67532,119 +66496,97 @@ } /** - * MatchIntentRequest session. - * @member {string} session - * @memberof google.cloud.dialogflow.cx.v3.MatchIntentRequest - * @instance - */ - MatchIntentRequest.prototype.session = ""; - - /** - * MatchIntentRequest queryParams. - * @member {google.cloud.dialogflow.cx.v3.IQueryParameters|null|undefined} queryParams - * @memberof google.cloud.dialogflow.cx.v3.MatchIntentRequest - * @instance - */ - MatchIntentRequest.prototype.queryParams = null; - - /** - * MatchIntentRequest queryInput. - * @member {google.cloud.dialogflow.cx.v3.IQueryInput|null|undefined} queryInput - * @memberof google.cloud.dialogflow.cx.v3.MatchIntentRequest + * SearchConfig boostSpecs. + * @member {Array.} boostSpecs + * @memberof google.cloud.dialogflow.cx.v3.SearchConfig * @instance */ - MatchIntentRequest.prototype.queryInput = null; + SearchConfig.prototype.boostSpecs = $util.emptyArray; /** - * MatchIntentRequest persistParameterChanges. - * @member {boolean} persistParameterChanges - * @memberof google.cloud.dialogflow.cx.v3.MatchIntentRequest + * SearchConfig filterSpecs. + * @member {Array.} filterSpecs + * @memberof google.cloud.dialogflow.cx.v3.SearchConfig * @instance */ - MatchIntentRequest.prototype.persistParameterChanges = false; + SearchConfig.prototype.filterSpecs = $util.emptyArray; /** - * Creates a new MatchIntentRequest instance using the specified properties. + * Creates a new SearchConfig instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.MatchIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.SearchConfig * @static - * @param {google.cloud.dialogflow.cx.v3.IMatchIntentRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.MatchIntentRequest} MatchIntentRequest instance + * @param {google.cloud.dialogflow.cx.v3.ISearchConfig=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.SearchConfig} SearchConfig instance */ - MatchIntentRequest.create = function create(properties) { - return new MatchIntentRequest(properties); + SearchConfig.create = function create(properties) { + return new SearchConfig(properties); }; /** - * Encodes the specified MatchIntentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.MatchIntentRequest.verify|verify} messages. + * Encodes the specified SearchConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SearchConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.MatchIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.SearchConfig * @static - * @param {google.cloud.dialogflow.cx.v3.IMatchIntentRequest} message MatchIntentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ISearchConfig} message SearchConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MatchIntentRequest.encode = function encode(message, writer) { + SearchConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.session != null && Object.hasOwnProperty.call(message, "session")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.session); - if (message.queryParams != null && Object.hasOwnProperty.call(message, "queryParams")) - $root.google.cloud.dialogflow.cx.v3.QueryParameters.encode(message.queryParams, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.queryInput != null && Object.hasOwnProperty.call(message, "queryInput")) - $root.google.cloud.dialogflow.cx.v3.QueryInput.encode(message.queryInput, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.persistParameterChanges != null && Object.hasOwnProperty.call(message, "persistParameterChanges")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.persistParameterChanges); + if (message.boostSpecs != null && message.boostSpecs.length) + for (var i = 0; i < message.boostSpecs.length; ++i) + $root.google.cloud.dialogflow.cx.v3.BoostSpecs.encode(message.boostSpecs[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.filterSpecs != null && message.filterSpecs.length) + for (var i = 0; i < message.filterSpecs.length; ++i) + $root.google.cloud.dialogflow.cx.v3.FilterSpecs.encode(message.filterSpecs[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified MatchIntentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.MatchIntentRequest.verify|verify} messages. + * Encodes the specified SearchConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SearchConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.MatchIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.SearchConfig * @static - * @param {google.cloud.dialogflow.cx.v3.IMatchIntentRequest} message MatchIntentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ISearchConfig} message SearchConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MatchIntentRequest.encodeDelimited = function encodeDelimited(message, writer) { + SearchConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MatchIntentRequest message from the specified reader or buffer. + * Decodes a SearchConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.MatchIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.SearchConfig * @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.MatchIntentRequest} MatchIntentRequest + * @returns {google.cloud.dialogflow.cx.v3.SearchConfig} SearchConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MatchIntentRequest.decode = function decode(reader, length, error) { + SearchConfig.decode = function decode(reader, length, error) { 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.MatchIntentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.SearchConfig(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.session = reader.string(); + if (!(message.boostSpecs && message.boostSpecs.length)) + message.boostSpecs = []; + message.boostSpecs.push($root.google.cloud.dialogflow.cx.v3.BoostSpecs.decode(reader, reader.uint32())); break; } case 2: { - message.queryParams = $root.google.cloud.dialogflow.cx.v3.QueryParameters.decode(reader, reader.uint32()); - break; - } - case 3: { - message.queryInput = $root.google.cloud.dialogflow.cx.v3.QueryInput.decode(reader, reader.uint32()); - break; - } - case 5: { - message.persistParameterChanges = reader.bool(); + if (!(message.filterSpecs && message.filterSpecs.length)) + message.filterSpecs = []; + message.filterSpecs.push($root.google.cloud.dialogflow.cx.v3.FilterSpecs.decode(reader, reader.uint32())); break; } default: @@ -67656,163 +66598,166 @@ }; /** - * Decodes a MatchIntentRequest message from the specified reader or buffer, length delimited. + * Decodes a SearchConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.MatchIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.SearchConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.MatchIntentRequest} MatchIntentRequest + * @returns {google.cloud.dialogflow.cx.v3.SearchConfig} SearchConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MatchIntentRequest.decodeDelimited = function decodeDelimited(reader) { + SearchConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MatchIntentRequest message. + * Verifies a SearchConfig message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.MatchIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.SearchConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MatchIntentRequest.verify = function verify(message) { + SearchConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.session != null && message.hasOwnProperty("session")) - if (!$util.isString(message.session)) - return "session: string expected"; - if (message.queryParams != null && message.hasOwnProperty("queryParams")) { - var error = $root.google.cloud.dialogflow.cx.v3.QueryParameters.verify(message.queryParams); - if (error) - return "queryParams." + error; + if (message.boostSpecs != null && message.hasOwnProperty("boostSpecs")) { + if (!Array.isArray(message.boostSpecs)) + return "boostSpecs: array expected"; + for (var i = 0; i < message.boostSpecs.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.BoostSpecs.verify(message.boostSpecs[i]); + if (error) + return "boostSpecs." + error; + } } - if (message.queryInput != null && message.hasOwnProperty("queryInput")) { - var error = $root.google.cloud.dialogflow.cx.v3.QueryInput.verify(message.queryInput); - if (error) - return "queryInput." + error; + if (message.filterSpecs != null && message.hasOwnProperty("filterSpecs")) { + if (!Array.isArray(message.filterSpecs)) + return "filterSpecs: array expected"; + for (var i = 0; i < message.filterSpecs.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.FilterSpecs.verify(message.filterSpecs[i]); + if (error) + return "filterSpecs." + error; + } } - if (message.persistParameterChanges != null && message.hasOwnProperty("persistParameterChanges")) - if (typeof message.persistParameterChanges !== "boolean") - return "persistParameterChanges: boolean expected"; return null; }; /** - * Creates a MatchIntentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a SearchConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.MatchIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.SearchConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.MatchIntentRequest} MatchIntentRequest + * @returns {google.cloud.dialogflow.cx.v3.SearchConfig} SearchConfig */ - MatchIntentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.MatchIntentRequest) + SearchConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.SearchConfig) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.MatchIntentRequest(); - if (object.session != null) - message.session = String(object.session); - if (object.queryParams != null) { - if (typeof object.queryParams !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.MatchIntentRequest.queryParams: object expected"); - message.queryParams = $root.google.cloud.dialogflow.cx.v3.QueryParameters.fromObject(object.queryParams); + var message = new $root.google.cloud.dialogflow.cx.v3.SearchConfig(); + if (object.boostSpecs) { + if (!Array.isArray(object.boostSpecs)) + throw TypeError(".google.cloud.dialogflow.cx.v3.SearchConfig.boostSpecs: array expected"); + message.boostSpecs = []; + for (var i = 0; i < object.boostSpecs.length; ++i) { + if (typeof object.boostSpecs[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.SearchConfig.boostSpecs: object expected"); + message.boostSpecs[i] = $root.google.cloud.dialogflow.cx.v3.BoostSpecs.fromObject(object.boostSpecs[i]); + } } - if (object.queryInput != null) { - if (typeof object.queryInput !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.MatchIntentRequest.queryInput: object expected"); - message.queryInput = $root.google.cloud.dialogflow.cx.v3.QueryInput.fromObject(object.queryInput); + if (object.filterSpecs) { + if (!Array.isArray(object.filterSpecs)) + throw TypeError(".google.cloud.dialogflow.cx.v3.SearchConfig.filterSpecs: array expected"); + message.filterSpecs = []; + for (var i = 0; i < object.filterSpecs.length; ++i) { + if (typeof object.filterSpecs[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.SearchConfig.filterSpecs: object expected"); + message.filterSpecs[i] = $root.google.cloud.dialogflow.cx.v3.FilterSpecs.fromObject(object.filterSpecs[i]); + } } - if (object.persistParameterChanges != null) - message.persistParameterChanges = Boolean(object.persistParameterChanges); return message; }; /** - * Creates a plain object from a MatchIntentRequest message. Also converts values to other types if specified. + * Creates a plain object from a SearchConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.MatchIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.SearchConfig * @static - * @param {google.cloud.dialogflow.cx.v3.MatchIntentRequest} message MatchIntentRequest + * @param {google.cloud.dialogflow.cx.v3.SearchConfig} message SearchConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MatchIntentRequest.toObject = function toObject(message, options) { + SearchConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.session = ""; - object.queryParams = null; - object.queryInput = null; - object.persistParameterChanges = false; + if (options.arrays || options.defaults) { + object.boostSpecs = []; + object.filterSpecs = []; + } + if (message.boostSpecs && message.boostSpecs.length) { + object.boostSpecs = []; + for (var j = 0; j < message.boostSpecs.length; ++j) + object.boostSpecs[j] = $root.google.cloud.dialogflow.cx.v3.BoostSpecs.toObject(message.boostSpecs[j], options); + } + if (message.filterSpecs && message.filterSpecs.length) { + object.filterSpecs = []; + for (var j = 0; j < message.filterSpecs.length; ++j) + object.filterSpecs[j] = $root.google.cloud.dialogflow.cx.v3.FilterSpecs.toObject(message.filterSpecs[j], options); } - if (message.session != null && message.hasOwnProperty("session")) - object.session = message.session; - if (message.queryParams != null && message.hasOwnProperty("queryParams")) - object.queryParams = $root.google.cloud.dialogflow.cx.v3.QueryParameters.toObject(message.queryParams, options); - if (message.queryInput != null && message.hasOwnProperty("queryInput")) - object.queryInput = $root.google.cloud.dialogflow.cx.v3.QueryInput.toObject(message.queryInput, options); - if (message.persistParameterChanges != null && message.hasOwnProperty("persistParameterChanges")) - object.persistParameterChanges = message.persistParameterChanges; return object; }; /** - * Converts this MatchIntentRequest to JSON. + * Converts this SearchConfig to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.MatchIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.SearchConfig * @instance * @returns {Object.} JSON object */ - MatchIntentRequest.prototype.toJSON = function toJSON() { + SearchConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for MatchIntentRequest + * Gets the default type url for SearchConfig * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.MatchIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.SearchConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - MatchIntentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SearchConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.MatchIntentRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.SearchConfig"; }; - return MatchIntentRequest; + return SearchConfig; })(); - v3.MatchIntentResponse = (function() { + v3.BoostSpec = (function() { /** - * Properties of a MatchIntentResponse. + * Properties of a BoostSpec. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IMatchIntentResponse - * @property {string|null} [text] MatchIntentResponse text - * @property {string|null} [triggerIntent] MatchIntentResponse triggerIntent - * @property {string|null} [transcript] MatchIntentResponse transcript - * @property {string|null} [triggerEvent] MatchIntentResponse triggerEvent - * @property {Array.|null} [matches] MatchIntentResponse matches - * @property {google.cloud.dialogflow.cx.v3.IPage|null} [currentPage] MatchIntentResponse currentPage + * @interface IBoostSpec + * @property {Array.|null} [conditionBoostSpecs] BoostSpec conditionBoostSpecs */ /** - * Constructs a new MatchIntentResponse. + * Constructs a new BoostSpec. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a MatchIntentResponse. - * @implements IMatchIntentResponse + * @classdesc Represents a BoostSpec. + * @implements IBoostSpec * @constructor - * @param {google.cloud.dialogflow.cx.v3.IMatchIntentResponse=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IBoostSpec=} [properties] Properties to set */ - function MatchIntentResponse(properties) { - this.matches = []; + function BoostSpec(properties) { + this.conditionBoostSpecs = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -67820,164 +66765,80 @@ } /** - * MatchIntentResponse text. - * @member {string|null|undefined} text - * @memberof google.cloud.dialogflow.cx.v3.MatchIntentResponse + * BoostSpec conditionBoostSpecs. + * @member {Array.} conditionBoostSpecs + * @memberof google.cloud.dialogflow.cx.v3.BoostSpec * @instance */ - MatchIntentResponse.prototype.text = null; + BoostSpec.prototype.conditionBoostSpecs = $util.emptyArray; /** - * MatchIntentResponse triggerIntent. - * @member {string|null|undefined} triggerIntent - * @memberof google.cloud.dialogflow.cx.v3.MatchIntentResponse - * @instance + * Creates a new BoostSpec instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.BoostSpec + * @static + * @param {google.cloud.dialogflow.cx.v3.IBoostSpec=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.BoostSpec} BoostSpec instance */ - MatchIntentResponse.prototype.triggerIntent = null; + BoostSpec.create = function create(properties) { + return new BoostSpec(properties); + }; /** - * MatchIntentResponse transcript. - * @member {string|null|undefined} transcript - * @memberof google.cloud.dialogflow.cx.v3.MatchIntentResponse - * @instance + * Encodes the specified BoostSpec message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.BoostSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.BoostSpec + * @static + * @param {google.cloud.dialogflow.cx.v3.IBoostSpec} message BoostSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - MatchIntentResponse.prototype.transcript = null; + BoostSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.conditionBoostSpecs != null && message.conditionBoostSpecs.length) + for (var i = 0; i < message.conditionBoostSpecs.length; ++i) + $root.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.encode(message.conditionBoostSpecs[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; /** - * MatchIntentResponse triggerEvent. - * @member {string|null|undefined} triggerEvent - * @memberof google.cloud.dialogflow.cx.v3.MatchIntentResponse - * @instance - */ - MatchIntentResponse.prototype.triggerEvent = null; - - /** - * MatchIntentResponse matches. - * @member {Array.} matches - * @memberof google.cloud.dialogflow.cx.v3.MatchIntentResponse - * @instance - */ - MatchIntentResponse.prototype.matches = $util.emptyArray; - - /** - * MatchIntentResponse currentPage. - * @member {google.cloud.dialogflow.cx.v3.IPage|null|undefined} currentPage - * @memberof google.cloud.dialogflow.cx.v3.MatchIntentResponse - * @instance - */ - MatchIntentResponse.prototype.currentPage = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * MatchIntentResponse query. - * @member {"text"|"triggerIntent"|"transcript"|"triggerEvent"|undefined} query - * @memberof google.cloud.dialogflow.cx.v3.MatchIntentResponse - * @instance - */ - Object.defineProperty(MatchIntentResponse.prototype, "query", { - get: $util.oneOfGetter($oneOfFields = ["text", "triggerIntent", "transcript", "triggerEvent"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new MatchIntentResponse instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.MatchIntentResponse - * @static - * @param {google.cloud.dialogflow.cx.v3.IMatchIntentResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.MatchIntentResponse} MatchIntentResponse instance - */ - MatchIntentResponse.create = function create(properties) { - return new MatchIntentResponse(properties); - }; - - /** - * Encodes the specified MatchIntentResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.MatchIntentResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.MatchIntentResponse - * @static - * @param {google.cloud.dialogflow.cx.v3.IMatchIntentResponse} message MatchIntentResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MatchIntentResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.text != null && Object.hasOwnProperty.call(message, "text")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.text); - if (message.triggerIntent != null && Object.hasOwnProperty.call(message, "triggerIntent")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.triggerIntent); - if (message.transcript != null && Object.hasOwnProperty.call(message, "transcript")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.transcript); - if (message.matches != null && message.matches.length) - for (var i = 0; i < message.matches.length; ++i) - $root.google.cloud.dialogflow.cx.v3.Match.encode(message.matches[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.currentPage != null && Object.hasOwnProperty.call(message, "currentPage")) - $root.google.cloud.dialogflow.cx.v3.Page.encode(message.currentPage, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.triggerEvent != null && Object.hasOwnProperty.call(message, "triggerEvent")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.triggerEvent); - return writer; - }; - - /** - * Encodes the specified MatchIntentResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.MatchIntentResponse.verify|verify} messages. + * Encodes the specified BoostSpec message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.BoostSpec.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.MatchIntentResponse + * @memberof google.cloud.dialogflow.cx.v3.BoostSpec * @static - * @param {google.cloud.dialogflow.cx.v3.IMatchIntentResponse} message MatchIntentResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IBoostSpec} message BoostSpec message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MatchIntentResponse.encodeDelimited = function encodeDelimited(message, writer) { + BoostSpec.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MatchIntentResponse message from the specified reader or buffer. + * Decodes a BoostSpec message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.MatchIntentResponse + * @memberof google.cloud.dialogflow.cx.v3.BoostSpec * @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.MatchIntentResponse} MatchIntentResponse + * @returns {google.cloud.dialogflow.cx.v3.BoostSpec} BoostSpec * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MatchIntentResponse.decode = function decode(reader, length, error) { + BoostSpec.decode = function decode(reader, length, error) { 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.MatchIntentResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.BoostSpec(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.text = reader.string(); - break; - } - case 2: { - message.triggerIntent = reader.string(); - break; - } - case 3: { - message.transcript = reader.string(); - break; - } - case 6: { - message.triggerEvent = reader.string(); - break; - } - case 4: { - if (!(message.matches && message.matches.length)) - message.matches = []; - message.matches.push($root.google.cloud.dialogflow.cx.v3.Match.decode(reader, reader.uint32())); - break; - } - case 5: { - message.currentPage = $root.google.cloud.dialogflow.cx.v3.Page.decode(reader, reader.uint32()); + if (!(message.conditionBoostSpecs && message.conditionBoostSpecs.length)) + message.conditionBoostSpecs = []; + message.conditionBoostSpecs.push($root.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.decode(reader, reader.uint32())); break; } default: @@ -67989,862 +66850,1096 @@ }; /** - * Decodes a MatchIntentResponse message from the specified reader or buffer, length delimited. + * Decodes a BoostSpec message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.MatchIntentResponse + * @memberof google.cloud.dialogflow.cx.v3.BoostSpec * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.MatchIntentResponse} MatchIntentResponse + * @returns {google.cloud.dialogflow.cx.v3.BoostSpec} BoostSpec * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MatchIntentResponse.decodeDelimited = function decodeDelimited(reader) { + BoostSpec.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MatchIntentResponse message. + * Verifies a BoostSpec message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.MatchIntentResponse + * @memberof google.cloud.dialogflow.cx.v3.BoostSpec * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MatchIntentResponse.verify = function verify(message) { + BoostSpec.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.text != null && message.hasOwnProperty("text")) { - properties.query = 1; - if (!$util.isString(message.text)) - return "text: string expected"; - } - if (message.triggerIntent != null && message.hasOwnProperty("triggerIntent")) { - if (properties.query === 1) - return "query: multiple values"; - properties.query = 1; - if (!$util.isString(message.triggerIntent)) - return "triggerIntent: string expected"; - } - if (message.transcript != null && message.hasOwnProperty("transcript")) { - if (properties.query === 1) - return "query: multiple values"; - properties.query = 1; - if (!$util.isString(message.transcript)) - return "transcript: string expected"; - } - if (message.triggerEvent != null && message.hasOwnProperty("triggerEvent")) { - if (properties.query === 1) - return "query: multiple values"; - properties.query = 1; - if (!$util.isString(message.triggerEvent)) - return "triggerEvent: string expected"; - } - if (message.matches != null && message.hasOwnProperty("matches")) { - if (!Array.isArray(message.matches)) - return "matches: array expected"; - for (var i = 0; i < message.matches.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.Match.verify(message.matches[i]); + if (message.conditionBoostSpecs != null && message.hasOwnProperty("conditionBoostSpecs")) { + if (!Array.isArray(message.conditionBoostSpecs)) + return "conditionBoostSpecs: array expected"; + for (var i = 0; i < message.conditionBoostSpecs.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.verify(message.conditionBoostSpecs[i]); if (error) - return "matches." + error; + return "conditionBoostSpecs." + error; } } - if (message.currentPage != null && message.hasOwnProperty("currentPage")) { - var error = $root.google.cloud.dialogflow.cx.v3.Page.verify(message.currentPage); - if (error) - return "currentPage." + error; - } return null; }; /** - * Creates a MatchIntentResponse message from a plain object. Also converts values to their respective internal types. + * Creates a BoostSpec message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.MatchIntentResponse + * @memberof google.cloud.dialogflow.cx.v3.BoostSpec * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.MatchIntentResponse} MatchIntentResponse + * @returns {google.cloud.dialogflow.cx.v3.BoostSpec} BoostSpec */ - MatchIntentResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.MatchIntentResponse) + BoostSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.BoostSpec) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.MatchIntentResponse(); - if (object.text != null) - message.text = String(object.text); - if (object.triggerIntent != null) - message.triggerIntent = String(object.triggerIntent); - if (object.transcript != null) - message.transcript = String(object.transcript); - if (object.triggerEvent != null) - message.triggerEvent = String(object.triggerEvent); - if (object.matches) { - if (!Array.isArray(object.matches)) - throw TypeError(".google.cloud.dialogflow.cx.v3.MatchIntentResponse.matches: array expected"); - message.matches = []; - for (var i = 0; i < object.matches.length; ++i) { - if (typeof object.matches[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.MatchIntentResponse.matches: object expected"); - message.matches[i] = $root.google.cloud.dialogflow.cx.v3.Match.fromObject(object.matches[i]); + var message = new $root.google.cloud.dialogflow.cx.v3.BoostSpec(); + if (object.conditionBoostSpecs) { + if (!Array.isArray(object.conditionBoostSpecs)) + throw TypeError(".google.cloud.dialogflow.cx.v3.BoostSpec.conditionBoostSpecs: array expected"); + message.conditionBoostSpecs = []; + for (var i = 0; i < object.conditionBoostSpecs.length; ++i) { + if (typeof object.conditionBoostSpecs[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.BoostSpec.conditionBoostSpecs: object expected"); + message.conditionBoostSpecs[i] = $root.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.fromObject(object.conditionBoostSpecs[i]); } } - if (object.currentPage != null) { - if (typeof object.currentPage !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.MatchIntentResponse.currentPage: object expected"); - message.currentPage = $root.google.cloud.dialogflow.cx.v3.Page.fromObject(object.currentPage); - } return message; }; /** - * Creates a plain object from a MatchIntentResponse message. Also converts values to other types if specified. + * Creates a plain object from a BoostSpec message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.MatchIntentResponse + * @memberof google.cloud.dialogflow.cx.v3.BoostSpec * @static - * @param {google.cloud.dialogflow.cx.v3.MatchIntentResponse} message MatchIntentResponse + * @param {google.cloud.dialogflow.cx.v3.BoostSpec} message BoostSpec * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MatchIntentResponse.toObject = function toObject(message, options) { + BoostSpec.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.matches = []; - if (options.defaults) - object.currentPage = null; - if (message.text != null && message.hasOwnProperty("text")) { - object.text = message.text; - if (options.oneofs) - object.query = "text"; - } - if (message.triggerIntent != null && message.hasOwnProperty("triggerIntent")) { - object.triggerIntent = message.triggerIntent; - if (options.oneofs) - object.query = "triggerIntent"; - } - if (message.transcript != null && message.hasOwnProperty("transcript")) { - object.transcript = message.transcript; - if (options.oneofs) - object.query = "transcript"; - } - if (message.matches && message.matches.length) { - object.matches = []; - for (var j = 0; j < message.matches.length; ++j) - object.matches[j] = $root.google.cloud.dialogflow.cx.v3.Match.toObject(message.matches[j], options); - } - if (message.currentPage != null && message.hasOwnProperty("currentPage")) - object.currentPage = $root.google.cloud.dialogflow.cx.v3.Page.toObject(message.currentPage, options); - if (message.triggerEvent != null && message.hasOwnProperty("triggerEvent")) { - object.triggerEvent = message.triggerEvent; - if (options.oneofs) - object.query = "triggerEvent"; + object.conditionBoostSpecs = []; + if (message.conditionBoostSpecs && message.conditionBoostSpecs.length) { + object.conditionBoostSpecs = []; + for (var j = 0; j < message.conditionBoostSpecs.length; ++j) + object.conditionBoostSpecs[j] = $root.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.toObject(message.conditionBoostSpecs[j], options); } return object; }; /** - * Converts this MatchIntentResponse to JSON. + * Converts this BoostSpec to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.MatchIntentResponse + * @memberof google.cloud.dialogflow.cx.v3.BoostSpec * @instance * @returns {Object.} JSON object */ - MatchIntentResponse.prototype.toJSON = function toJSON() { + BoostSpec.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for MatchIntentResponse + * Gets the default type url for BoostSpec * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.MatchIntentResponse + * @memberof google.cloud.dialogflow.cx.v3.BoostSpec * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - MatchIntentResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + BoostSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.MatchIntentResponse"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.BoostSpec"; }; - return MatchIntentResponse; - })(); - - v3.FulfillIntentRequest = (function() { + BoostSpec.ConditionBoostSpec = (function() { - /** - * Properties of a FulfillIntentRequest. - * @memberof google.cloud.dialogflow.cx.v3 - * @interface IFulfillIntentRequest - * @property {google.cloud.dialogflow.cx.v3.IMatchIntentRequest|null} [matchIntentRequest] FulfillIntentRequest matchIntentRequest - * @property {google.cloud.dialogflow.cx.v3.IMatch|null} [match] FulfillIntentRequest match - * @property {google.cloud.dialogflow.cx.v3.IOutputAudioConfig|null} [outputAudioConfig] FulfillIntentRequest outputAudioConfig - */ + /** + * Properties of a ConditionBoostSpec. + * @memberof google.cloud.dialogflow.cx.v3.BoostSpec + * @interface IConditionBoostSpec + * @property {string|null} [condition] ConditionBoostSpec condition + * @property {number|null} [boost] ConditionBoostSpec boost + * @property {google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.IBoostControlSpec|null} [boostControlSpec] ConditionBoostSpec boostControlSpec + */ - /** - * Constructs a new FulfillIntentRequest. - * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a FulfillIntentRequest. - * @implements IFulfillIntentRequest - * @constructor - * @param {google.cloud.dialogflow.cx.v3.IFulfillIntentRequest=} [properties] Properties to set - */ - function FulfillIntentRequest(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]]; - } + /** + * Constructs a new ConditionBoostSpec. + * @memberof google.cloud.dialogflow.cx.v3.BoostSpec + * @classdesc Represents a ConditionBoostSpec. + * @implements IConditionBoostSpec + * @constructor + * @param {google.cloud.dialogflow.cx.v3.BoostSpec.IConditionBoostSpec=} [properties] Properties to set + */ + function ConditionBoostSpec(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]]; + } - /** - * FulfillIntentRequest matchIntentRequest. - * @member {google.cloud.dialogflow.cx.v3.IMatchIntentRequest|null|undefined} matchIntentRequest - * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentRequest - * @instance - */ - FulfillIntentRequest.prototype.matchIntentRequest = null; + /** + * ConditionBoostSpec condition. + * @member {string} condition + * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec + * @instance + */ + ConditionBoostSpec.prototype.condition = ""; - /** - * FulfillIntentRequest match. - * @member {google.cloud.dialogflow.cx.v3.IMatch|null|undefined} match - * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentRequest - * @instance - */ - FulfillIntentRequest.prototype.match = null; + /** + * ConditionBoostSpec boost. + * @member {number} boost + * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec + * @instance + */ + ConditionBoostSpec.prototype.boost = 0; - /** - * FulfillIntentRequest outputAudioConfig. - * @member {google.cloud.dialogflow.cx.v3.IOutputAudioConfig|null|undefined} outputAudioConfig - * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentRequest - * @instance - */ - FulfillIntentRequest.prototype.outputAudioConfig = null; + /** + * ConditionBoostSpec boostControlSpec. + * @member {google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.IBoostControlSpec|null|undefined} boostControlSpec + * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec + * @instance + */ + ConditionBoostSpec.prototype.boostControlSpec = null; - /** - * Creates a new FulfillIntentRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.IFulfillIntentRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.FulfillIntentRequest} FulfillIntentRequest instance - */ - FulfillIntentRequest.create = function create(properties) { - return new FulfillIntentRequest(properties); - }; + /** + * Creates a new ConditionBoostSpec instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec + * @static + * @param {google.cloud.dialogflow.cx.v3.BoostSpec.IConditionBoostSpec=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec} ConditionBoostSpec instance + */ + ConditionBoostSpec.create = function create(properties) { + return new ConditionBoostSpec(properties); + }; - /** - * Encodes the specified FulfillIntentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.FulfillIntentRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.IFulfillIntentRequest} message FulfillIntentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FulfillIntentRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.matchIntentRequest != null && Object.hasOwnProperty.call(message, "matchIntentRequest")) - $root.google.cloud.dialogflow.cx.v3.MatchIntentRequest.encode(message.matchIntentRequest, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.match != null && Object.hasOwnProperty.call(message, "match")) - $root.google.cloud.dialogflow.cx.v3.Match.encode(message.match, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.outputAudioConfig != null && Object.hasOwnProperty.call(message, "outputAudioConfig")) - $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.encode(message.outputAudioConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; + /** + * Encodes the specified ConditionBoostSpec message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec + * @static + * @param {google.cloud.dialogflow.cx.v3.BoostSpec.IConditionBoostSpec} message ConditionBoostSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConditionBoostSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.condition); + if (message.boost != null && Object.hasOwnProperty.call(message, "boost")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.boost); + if (message.boostControlSpec != null && Object.hasOwnProperty.call(message, "boostControlSpec")) + $root.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.encode(message.boostControlSpec, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; - /** - * Encodes the specified FulfillIntentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.FulfillIntentRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.IFulfillIntentRequest} message FulfillIntentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FulfillIntentRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified ConditionBoostSpec message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec + * @static + * @param {google.cloud.dialogflow.cx.v3.BoostSpec.IConditionBoostSpec} message ConditionBoostSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConditionBoostSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a FulfillIntentRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentRequest - * @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.FulfillIntentRequest} FulfillIntentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FulfillIntentRequest.decode = function decode(reader, length, error) { - 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.FulfillIntentRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.matchIntentRequest = $root.google.cloud.dialogflow.cx.v3.MatchIntentRequest.decode(reader, reader.uint32()); - break; - } - case 2: { - message.match = $root.google.cloud.dialogflow.cx.v3.Match.decode(reader, reader.uint32()); + /** + * Decodes a ConditionBoostSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec + * @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.BoostSpec.ConditionBoostSpec} ConditionBoostSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConditionBoostSpec.decode = function decode(reader, length, error) { + 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.BoostSpec.ConditionBoostSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - } - case 3: { - message.outputAudioConfig = $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.decode(reader, reader.uint32()); + switch (tag >>> 3) { + case 1: { + message.condition = reader.string(); + break; + } + case 2: { + message.boost = reader.float(); + break; + } + case 4: { + message.boostControlSpec = $root.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); break; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; + return message; + }; - /** - * Decodes a FulfillIntentRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.FulfillIntentRequest} FulfillIntentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FulfillIntentRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a ConditionBoostSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec} ConditionBoostSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConditionBoostSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a FulfillIntentRequest message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FulfillIntentRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.matchIntentRequest != null && message.hasOwnProperty("matchIntentRequest")) { - var error = $root.google.cloud.dialogflow.cx.v3.MatchIntentRequest.verify(message.matchIntentRequest); - if (error) - return "matchIntentRequest." + error; - } - if (message.match != null && message.hasOwnProperty("match")) { - var error = $root.google.cloud.dialogflow.cx.v3.Match.verify(message.match); - if (error) - return "match." + error; - } - if (message.outputAudioConfig != null && message.hasOwnProperty("outputAudioConfig")) { - var error = $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.verify(message.outputAudioConfig); - if (error) - return "outputAudioConfig." + error; - } - return null; - }; + /** + * Verifies a ConditionBoostSpec message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConditionBoostSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.condition != null && message.hasOwnProperty("condition")) + if (!$util.isString(message.condition)) + return "condition: string expected"; + if (message.boost != null && message.hasOwnProperty("boost")) + if (typeof message.boost !== "number") + return "boost: number expected"; + if (message.boostControlSpec != null && message.hasOwnProperty("boostControlSpec")) { + var error = $root.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.verify(message.boostControlSpec); + if (error) + return "boostControlSpec." + error; + } + return null; + }; - /** - * Creates a FulfillIntentRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.FulfillIntentRequest} FulfillIntentRequest - */ - FulfillIntentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.FulfillIntentRequest) + /** + * Creates a ConditionBoostSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec} ConditionBoostSpec + */ + ConditionBoostSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec(); + if (object.condition != null) + message.condition = String(object.condition); + if (object.boost != null) + message.boost = Number(object.boost); + if (object.boostControlSpec != null) { + if (typeof object.boostControlSpec !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.boostControlSpec: object expected"); + message.boostControlSpec = $root.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.fromObject(object.boostControlSpec); + } + return message; + }; + + /** + * Creates a plain object from a ConditionBoostSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec + * @static + * @param {google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec} message ConditionBoostSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConditionBoostSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.condition = ""; + object.boost = 0; + object.boostControlSpec = null; + } + if (message.condition != null && message.hasOwnProperty("condition")) + object.condition = message.condition; + if (message.boost != null && message.hasOwnProperty("boost")) + object.boost = options.json && !isFinite(message.boost) ? String(message.boost) : message.boost; + if (message.boostControlSpec != null && message.hasOwnProperty("boostControlSpec")) + object.boostControlSpec = $root.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.toObject(message.boostControlSpec, options); return object; - var message = new $root.google.cloud.dialogflow.cx.v3.FulfillIntentRequest(); - if (object.matchIntentRequest != null) { - if (typeof object.matchIntentRequest !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.FulfillIntentRequest.matchIntentRequest: object expected"); - message.matchIntentRequest = $root.google.cloud.dialogflow.cx.v3.MatchIntentRequest.fromObject(object.matchIntentRequest); - } - if (object.match != null) { - if (typeof object.match !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.FulfillIntentRequest.match: object expected"); - message.match = $root.google.cloud.dialogflow.cx.v3.Match.fromObject(object.match); - } - if (object.outputAudioConfig != null) { - if (typeof object.outputAudioConfig !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.FulfillIntentRequest.outputAudioConfig: object expected"); - message.outputAudioConfig = $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.fromObject(object.outputAudioConfig); - } - return message; - }; + }; - /** - * Creates a plain object from a FulfillIntentRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.FulfillIntentRequest} message FulfillIntentRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FulfillIntentRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.matchIntentRequest = null; - object.match = null; - object.outputAudioConfig = null; - } - if (message.matchIntentRequest != null && message.hasOwnProperty("matchIntentRequest")) - object.matchIntentRequest = $root.google.cloud.dialogflow.cx.v3.MatchIntentRequest.toObject(message.matchIntentRequest, options); - if (message.match != null && message.hasOwnProperty("match")) - object.match = $root.google.cloud.dialogflow.cx.v3.Match.toObject(message.match, options); - if (message.outputAudioConfig != null && message.hasOwnProperty("outputAudioConfig")) - object.outputAudioConfig = $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.toObject(message.outputAudioConfig, options); - return object; - }; + /** + * Converts this ConditionBoostSpec to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec + * @instance + * @returns {Object.} JSON object + */ + ConditionBoostSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this FulfillIntentRequest to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentRequest - * @instance - * @returns {Object.} JSON object - */ - FulfillIntentRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Gets the default type url for ConditionBoostSpec + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ConditionBoostSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec"; + }; - /** - * Gets the default type url for FulfillIntentRequest - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FulfillIntentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.FulfillIntentRequest"; - }; + ConditionBoostSpec.BoostControlSpec = (function() { - return FulfillIntentRequest; - })(); + /** + * Properties of a BoostControlSpec. + * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec + * @interface IBoostControlSpec + * @property {string|null} [fieldName] BoostControlSpec fieldName + * @property {google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.AttributeType|null} [attributeType] BoostControlSpec attributeType + * @property {google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.InterpolationType|null} [interpolationType] BoostControlSpec interpolationType + * @property {Array.|null} [controlPoints] BoostControlSpec controlPoints + */ - v3.FulfillIntentResponse = (function() { + /** + * Constructs a new BoostControlSpec. + * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec + * @classdesc Represents a BoostControlSpec. + * @implements IBoostControlSpec + * @constructor + * @param {google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.IBoostControlSpec=} [properties] Properties to set + */ + function BoostControlSpec(properties) { + this.controlPoints = []; + 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]]; + } - /** - * Properties of a FulfillIntentResponse. - * @memberof google.cloud.dialogflow.cx.v3 - * @interface IFulfillIntentResponse - * @property {string|null} [responseId] FulfillIntentResponse responseId - * @property {google.cloud.dialogflow.cx.v3.IQueryResult|null} [queryResult] FulfillIntentResponse queryResult - * @property {Uint8Array|null} [outputAudio] FulfillIntentResponse outputAudio - * @property {google.cloud.dialogflow.cx.v3.IOutputAudioConfig|null} [outputAudioConfig] FulfillIntentResponse outputAudioConfig - */ + /** + * BoostControlSpec fieldName. + * @member {string} fieldName + * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec + * @instance + */ + BoostControlSpec.prototype.fieldName = ""; - /** - * Constructs a new FulfillIntentResponse. - * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a FulfillIntentResponse. - * @implements IFulfillIntentResponse - * @constructor - * @param {google.cloud.dialogflow.cx.v3.IFulfillIntentResponse=} [properties] Properties to set - */ - function FulfillIntentResponse(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]]; - } + /** + * BoostControlSpec attributeType. + * @member {google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.AttributeType} attributeType + * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec + * @instance + */ + BoostControlSpec.prototype.attributeType = 0; - /** - * FulfillIntentResponse responseId. - * @member {string} responseId - * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentResponse - * @instance - */ - FulfillIntentResponse.prototype.responseId = ""; + /** + * BoostControlSpec interpolationType. + * @member {google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.InterpolationType} interpolationType + * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec + * @instance + */ + BoostControlSpec.prototype.interpolationType = 0; - /** - * FulfillIntentResponse queryResult. - * @member {google.cloud.dialogflow.cx.v3.IQueryResult|null|undefined} queryResult - * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentResponse - * @instance - */ - FulfillIntentResponse.prototype.queryResult = null; + /** + * BoostControlSpec controlPoints. + * @member {Array.} controlPoints + * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec + * @instance + */ + BoostControlSpec.prototype.controlPoints = $util.emptyArray; - /** - * FulfillIntentResponse outputAudio. - * @member {Uint8Array} outputAudio - * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentResponse - * @instance - */ - FulfillIntentResponse.prototype.outputAudio = $util.newBuffer([]); + /** + * Creates a new BoostControlSpec instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec + * @static + * @param {google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.IBoostControlSpec=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec} BoostControlSpec instance + */ + BoostControlSpec.create = function create(properties) { + return new BoostControlSpec(properties); + }; - /** - * FulfillIntentResponse outputAudioConfig. - * @member {google.cloud.dialogflow.cx.v3.IOutputAudioConfig|null|undefined} outputAudioConfig - * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentResponse - * @instance - */ - FulfillIntentResponse.prototype.outputAudioConfig = null; + /** + * Encodes the specified BoostControlSpec message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec + * @static + * @param {google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.IBoostControlSpec} message BoostControlSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BoostControlSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fieldName != null && Object.hasOwnProperty.call(message, "fieldName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.fieldName); + if (message.attributeType != null && Object.hasOwnProperty.call(message, "attributeType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.attributeType); + if (message.interpolationType != null && Object.hasOwnProperty.call(message, "interpolationType")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.interpolationType); + if (message.controlPoints != null && message.controlPoints.length) + for (var i = 0; i < message.controlPoints.length; ++i) + $root.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint.encode(message.controlPoints[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; - /** - * Creates a new FulfillIntentResponse instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentResponse - * @static - * @param {google.cloud.dialogflow.cx.v3.IFulfillIntentResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.FulfillIntentResponse} FulfillIntentResponse instance - */ - FulfillIntentResponse.create = function create(properties) { - return new FulfillIntentResponse(properties); - }; + /** + * Encodes the specified BoostControlSpec message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec + * @static + * @param {google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.IBoostControlSpec} message BoostControlSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BoostControlSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Encodes the specified FulfillIntentResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.FulfillIntentResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentResponse - * @static - * @param {google.cloud.dialogflow.cx.v3.IFulfillIntentResponse} message FulfillIntentResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FulfillIntentResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.responseId != null && Object.hasOwnProperty.call(message, "responseId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.responseId); - if (message.queryResult != null && Object.hasOwnProperty.call(message, "queryResult")) - $root.google.cloud.dialogflow.cx.v3.QueryResult.encode(message.queryResult, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.outputAudio != null && Object.hasOwnProperty.call(message, "outputAudio")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.outputAudio); - if (message.outputAudioConfig != null && Object.hasOwnProperty.call(message, "outputAudioConfig")) - $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.encode(message.outputAudioConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; + /** + * Decodes a BoostControlSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec + * @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.BoostSpec.ConditionBoostSpec.BoostControlSpec} BoostControlSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BoostControlSpec.decode = function decode(reader, length, error) { + 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.BoostSpec.ConditionBoostSpec.BoostControlSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.fieldName = reader.string(); + break; + } + case 2: { + message.attributeType = reader.int32(); + break; + } + case 3: { + message.interpolationType = reader.int32(); + break; + } + case 4: { + if (!(message.controlPoints && message.controlPoints.length)) + message.controlPoints = []; + message.controlPoints.push($root.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Encodes the specified FulfillIntentResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.FulfillIntentResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentResponse - * @static - * @param {google.cloud.dialogflow.cx.v3.IFulfillIntentResponse} message FulfillIntentResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FulfillIntentResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Decodes a BoostControlSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec} BoostControlSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BoostControlSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Decodes a FulfillIntentResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentResponse - * @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.FulfillIntentResponse} FulfillIntentResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FulfillIntentResponse.decode = function decode(reader, length, error) { - 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.FulfillIntentResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.responseId = reader.string(); - break; + /** + * Verifies a BoostControlSpec message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BoostControlSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fieldName != null && message.hasOwnProperty("fieldName")) + if (!$util.isString(message.fieldName)) + return "fieldName: string expected"; + if (message.attributeType != null && message.hasOwnProperty("attributeType")) + switch (message.attributeType) { + default: + return "attributeType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.interpolationType != null && message.hasOwnProperty("interpolationType")) + switch (message.interpolationType) { + default: + return "interpolationType: enum value expected"; + case 0: + case 1: + break; + } + if (message.controlPoints != null && message.hasOwnProperty("controlPoints")) { + if (!Array.isArray(message.controlPoints)) + return "controlPoints: array expected"; + for (var i = 0; i < message.controlPoints.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint.verify(message.controlPoints[i]); + if (error) + return "controlPoints." + error; + } } - case 2: { - message.queryResult = $root.google.cloud.dialogflow.cx.v3.QueryResult.decode(reader, reader.uint32()); + return null; + }; + + /** + * Creates a BoostControlSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec} BoostControlSpec + */ + BoostControlSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec(); + if (object.fieldName != null) + message.fieldName = String(object.fieldName); + switch (object.attributeType) { + default: + if (typeof object.attributeType === "number") { + message.attributeType = object.attributeType; + break; + } break; - } - case 3: { - message.outputAudio = reader.bytes(); + case "ATTRIBUTE_TYPE_UNSPECIFIED": + case 0: + message.attributeType = 0; + break; + case "NUMERICAL": + case 1: + message.attributeType = 1; + break; + case "FRESHNESS": + case 2: + message.attributeType = 2; break; } - case 4: { - message.outputAudioConfig = $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.decode(reader, reader.uint32()); + switch (object.interpolationType) { + default: + if (typeof object.interpolationType === "number") { + message.interpolationType = object.interpolationType; + break; + } + break; + case "INTERPOLATION_TYPE_UNSPECIFIED": + case 0: + message.interpolationType = 0; + break; + case "LINEAR": + case 1: + message.interpolationType = 1; break; } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FulfillIntentResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.FulfillIntentResponse} FulfillIntentResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FulfillIntentResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FulfillIntentResponse message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FulfillIntentResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.responseId != null && message.hasOwnProperty("responseId")) - if (!$util.isString(message.responseId)) - return "responseId: string expected"; - if (message.queryResult != null && message.hasOwnProperty("queryResult")) { - var error = $root.google.cloud.dialogflow.cx.v3.QueryResult.verify(message.queryResult); - if (error) - return "queryResult." + error; - } - if (message.outputAudio != null && message.hasOwnProperty("outputAudio")) - if (!(message.outputAudio && typeof message.outputAudio.length === "number" || $util.isString(message.outputAudio))) - return "outputAudio: buffer expected"; - if (message.outputAudioConfig != null && message.hasOwnProperty("outputAudioConfig")) { - var error = $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.verify(message.outputAudioConfig); - if (error) - return "outputAudioConfig." + error; - } - return null; - }; + if (object.controlPoints) { + if (!Array.isArray(object.controlPoints)) + throw TypeError(".google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.controlPoints: array expected"); + message.controlPoints = []; + for (var i = 0; i < object.controlPoints.length; ++i) { + if (typeof object.controlPoints[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.controlPoints: object expected"); + message.controlPoints[i] = $root.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint.fromObject(object.controlPoints[i]); + } + } + return message; + }; - /** - * Creates a FulfillIntentResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.FulfillIntentResponse} FulfillIntentResponse - */ - FulfillIntentResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.FulfillIntentResponse) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.FulfillIntentResponse(); - if (object.responseId != null) - message.responseId = String(object.responseId); - if (object.queryResult != null) { - if (typeof object.queryResult !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.FulfillIntentResponse.queryResult: object expected"); - message.queryResult = $root.google.cloud.dialogflow.cx.v3.QueryResult.fromObject(object.queryResult); - } - if (object.outputAudio != null) - if (typeof object.outputAudio === "string") - $util.base64.decode(object.outputAudio, message.outputAudio = $util.newBuffer($util.base64.length(object.outputAudio)), 0); - else if (object.outputAudio.length >= 0) - message.outputAudio = object.outputAudio; - if (object.outputAudioConfig != null) { - if (typeof object.outputAudioConfig !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.FulfillIntentResponse.outputAudioConfig: object expected"); - message.outputAudioConfig = $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.fromObject(object.outputAudioConfig); - } - return message; - }; + /** + * Creates a plain object from a BoostControlSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec + * @static + * @param {google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec} message BoostControlSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BoostControlSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.controlPoints = []; + if (options.defaults) { + object.fieldName = ""; + object.attributeType = options.enums === String ? "ATTRIBUTE_TYPE_UNSPECIFIED" : 0; + object.interpolationType = options.enums === String ? "INTERPOLATION_TYPE_UNSPECIFIED" : 0; + } + if (message.fieldName != null && message.hasOwnProperty("fieldName")) + object.fieldName = message.fieldName; + if (message.attributeType != null && message.hasOwnProperty("attributeType")) + object.attributeType = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.AttributeType[message.attributeType] === undefined ? message.attributeType : $root.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.AttributeType[message.attributeType] : message.attributeType; + if (message.interpolationType != null && message.hasOwnProperty("interpolationType")) + object.interpolationType = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.InterpolationType[message.interpolationType] === undefined ? message.interpolationType : $root.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.InterpolationType[message.interpolationType] : message.interpolationType; + if (message.controlPoints && message.controlPoints.length) { + object.controlPoints = []; + for (var j = 0; j < message.controlPoints.length; ++j) + object.controlPoints[j] = $root.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint.toObject(message.controlPoints[j], options); + } + return object; + }; - /** - * Creates a plain object from a FulfillIntentResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentResponse - * @static - * @param {google.cloud.dialogflow.cx.v3.FulfillIntentResponse} message FulfillIntentResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FulfillIntentResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.responseId = ""; - object.queryResult = null; - if (options.bytes === String) - object.outputAudio = ""; - else { - object.outputAudio = []; - if (options.bytes !== Array) - object.outputAudio = $util.newBuffer(object.outputAudio); - } - object.outputAudioConfig = null; - } - if (message.responseId != null && message.hasOwnProperty("responseId")) - object.responseId = message.responseId; - if (message.queryResult != null && message.hasOwnProperty("queryResult")) - object.queryResult = $root.google.cloud.dialogflow.cx.v3.QueryResult.toObject(message.queryResult, options); - if (message.outputAudio != null && message.hasOwnProperty("outputAudio")) - object.outputAudio = options.bytes === String ? $util.base64.encode(message.outputAudio, 0, message.outputAudio.length) : options.bytes === Array ? Array.prototype.slice.call(message.outputAudio) : message.outputAudio; - if (message.outputAudioConfig != null && message.hasOwnProperty("outputAudioConfig")) - object.outputAudioConfig = $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.toObject(message.outputAudioConfig, options); - return object; - }; + /** + * Converts this BoostControlSpec to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec + * @instance + * @returns {Object.} JSON object + */ + BoostControlSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this FulfillIntentResponse to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentResponse - * @instance - * @returns {Object.} JSON object - */ - FulfillIntentResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Gets the default type url for BoostControlSpec + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BoostControlSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec"; + }; - /** - * Gets the default type url for FulfillIntentResponse - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FulfillIntentResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.FulfillIntentResponse"; - }; + /** + * AttributeType enum. + * @name google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.AttributeType + * @enum {number} + * @property {number} ATTRIBUTE_TYPE_UNSPECIFIED=0 ATTRIBUTE_TYPE_UNSPECIFIED value + * @property {number} NUMERICAL=1 NUMERICAL value + * @property {number} FRESHNESS=2 FRESHNESS value + */ + BoostControlSpec.AttributeType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ATTRIBUTE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "NUMERICAL"] = 1; + values[valuesById[2] = "FRESHNESS"] = 2; + return values; + })(); - return FulfillIntentResponse; - })(); + /** + * InterpolationType enum. + * @name google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.InterpolationType + * @enum {number} + * @property {number} INTERPOLATION_TYPE_UNSPECIFIED=0 INTERPOLATION_TYPE_UNSPECIFIED value + * @property {number} LINEAR=1 LINEAR value + */ + BoostControlSpec.InterpolationType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "INTERPOLATION_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "LINEAR"] = 1; + return values; + })(); - v3.SentimentAnalysisResult = (function() { + BoostControlSpec.ControlPoint = (function() { - /** - * Properties of a SentimentAnalysisResult. - * @memberof google.cloud.dialogflow.cx.v3 - * @interface ISentimentAnalysisResult - * @property {number|null} [score] SentimentAnalysisResult score - * @property {number|null} [magnitude] SentimentAnalysisResult magnitude - */ + /** + * Properties of a ControlPoint. + * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec + * @interface IControlPoint + * @property {string|null} [attributeValue] ControlPoint attributeValue + * @property {number|null} [boostAmount] ControlPoint boostAmount + */ - /** - * Constructs a new SentimentAnalysisResult. - * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a SentimentAnalysisResult. - * @implements ISentimentAnalysisResult - * @constructor - * @param {google.cloud.dialogflow.cx.v3.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]]; - } + /** + * Constructs a new ControlPoint. + * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec + * @classdesc Represents a ControlPoint. + * @implements IControlPoint + * @constructor + * @param {google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.IControlPoint=} [properties] Properties to set + */ + function ControlPoint(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.SentimentAnalysisResult - * @instance - */ - SentimentAnalysisResult.prototype.score = 0; + /** + * ControlPoint attributeValue. + * @member {string} attributeValue + * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint + * @instance + */ + ControlPoint.prototype.attributeValue = ""; - /** - * SentimentAnalysisResult magnitude. - * @member {number} magnitude - * @memberof google.cloud.dialogflow.cx.v3.SentimentAnalysisResult - * @instance - */ - SentimentAnalysisResult.prototype.magnitude = 0; + /** + * ControlPoint boostAmount. + * @member {number} boostAmount + * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint + * @instance + */ + ControlPoint.prototype.boostAmount = 0; - /** - * Creates a new SentimentAnalysisResult instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.SentimentAnalysisResult - * @static - * @param {google.cloud.dialogflow.cx.v3.ISentimentAnalysisResult=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.SentimentAnalysisResult} SentimentAnalysisResult instance - */ - SentimentAnalysisResult.create = function create(properties) { - return new SentimentAnalysisResult(properties); - }; + /** + * Creates a new ControlPoint instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint + * @static + * @param {google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.IControlPoint=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint} ControlPoint instance + */ + ControlPoint.create = function create(properties) { + return new ControlPoint(properties); + }; - /** - * Encodes the specified SentimentAnalysisResult message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SentimentAnalysisResult.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.SentimentAnalysisResult - * @static - * @param {google.cloud.dialogflow.cx.v3.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 ControlPoint message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint + * @static + * @param {google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.IControlPoint} message ControlPoint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ControlPoint.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.attributeValue != null && Object.hasOwnProperty.call(message, "attributeValue")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.attributeValue); + if (message.boostAmount != null && Object.hasOwnProperty.call(message, "boostAmount")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.boostAmount); + return writer; + }; - /** - * Encodes the specified SentimentAnalysisResult message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SentimentAnalysisResult.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.SentimentAnalysisResult - * @static - * @param {google.cloud.dialogflow.cx.v3.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(); - }; + /** + * Encodes the specified ControlPoint message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint + * @static + * @param {google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.IControlPoint} message ControlPoint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ControlPoint.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.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.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, error) { - 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.SentimentAnalysisResult(); + /** + * Decodes a ControlPoint message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint + * @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.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint} ControlPoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ControlPoint.decode = function decode(reader, length, error) { + 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.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.attributeValue = reader.string(); + break; + } + case 2: { + message.boostAmount = reader.float(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ControlPoint message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint} ControlPoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ControlPoint.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ControlPoint message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ControlPoint.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.attributeValue != null && message.hasOwnProperty("attributeValue")) + if (!$util.isString(message.attributeValue)) + return "attributeValue: string expected"; + if (message.boostAmount != null && message.hasOwnProperty("boostAmount")) + if (typeof message.boostAmount !== "number") + return "boostAmount: number expected"; + return null; + }; + + /** + * Creates a ControlPoint message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint} ControlPoint + */ + ControlPoint.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint(); + if (object.attributeValue != null) + message.attributeValue = String(object.attributeValue); + if (object.boostAmount != null) + message.boostAmount = Number(object.boostAmount); + return message; + }; + + /** + * Creates a plain object from a ControlPoint message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint + * @static + * @param {google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint} message ControlPoint + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ControlPoint.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.attributeValue = ""; + object.boostAmount = 0; + } + if (message.attributeValue != null && message.hasOwnProperty("attributeValue")) + object.attributeValue = message.attributeValue; + if (message.boostAmount != null && message.hasOwnProperty("boostAmount")) + object.boostAmount = options.json && !isFinite(message.boostAmount) ? String(message.boostAmount) : message.boostAmount; + return object; + }; + + /** + * Converts this ControlPoint to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint + * @instance + * @returns {Object.} JSON object + */ + ControlPoint.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ControlPoint + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ControlPoint.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint"; + }; + + return ControlPoint; + })(); + + return BoostControlSpec; + })(); + + return ConditionBoostSpec; + })(); + + return BoostSpec; + })(); + + v3.BoostSpecs = (function() { + + /** + * Properties of a BoostSpecs. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IBoostSpecs + * @property {Array.|null} [dataStores] BoostSpecs dataStores + * @property {Array.|null} [spec] BoostSpecs spec + */ + + /** + * Constructs a new BoostSpecs. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a BoostSpecs. + * @implements IBoostSpecs + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IBoostSpecs=} [properties] Properties to set + */ + function BoostSpecs(properties) { + this.dataStores = []; + this.spec = []; + 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]]; + } + + /** + * BoostSpecs dataStores. + * @member {Array.} dataStores + * @memberof google.cloud.dialogflow.cx.v3.BoostSpecs + * @instance + */ + BoostSpecs.prototype.dataStores = $util.emptyArray; + + /** + * BoostSpecs spec. + * @member {Array.} spec + * @memberof google.cloud.dialogflow.cx.v3.BoostSpecs + * @instance + */ + BoostSpecs.prototype.spec = $util.emptyArray; + + /** + * Creates a new BoostSpecs instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.BoostSpecs + * @static + * @param {google.cloud.dialogflow.cx.v3.IBoostSpecs=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.BoostSpecs} BoostSpecs instance + */ + BoostSpecs.create = function create(properties) { + return new BoostSpecs(properties); + }; + + /** + * Encodes the specified BoostSpecs message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.BoostSpecs.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.BoostSpecs + * @static + * @param {google.cloud.dialogflow.cx.v3.IBoostSpecs} message BoostSpecs message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BoostSpecs.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataStores != null && message.dataStores.length) + for (var i = 0; i < message.dataStores.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.dataStores[i]); + if (message.spec != null && message.spec.length) + for (var i = 0; i < message.spec.length; ++i) + $root.google.cloud.dialogflow.cx.v3.BoostSpec.encode(message.spec[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BoostSpecs message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.BoostSpecs.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.BoostSpecs + * @static + * @param {google.cloud.dialogflow.cx.v3.IBoostSpecs} message BoostSpecs message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BoostSpecs.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BoostSpecs message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.BoostSpecs + * @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.BoostSpecs} BoostSpecs + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BoostSpecs.decode = function decode(reader, length, error) { + 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.BoostSpecs(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.score = reader.float(); + if (!(message.dataStores && message.dataStores.length)) + message.dataStores = []; + message.dataStores.push(reader.string()); break; } case 2: { - message.magnitude = reader.float(); + if (!(message.spec && message.spec.length)) + message.spec = []; + message.spec.push($root.google.cloud.dialogflow.cx.v3.BoostSpec.decode(reader, reader.uint32())); break; } default: @@ -68856,443 +67951,587 @@ }; /** - * Decodes a SentimentAnalysisResult message from the specified reader or buffer, length delimited. + * Decodes a BoostSpecs message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.SentimentAnalysisResult + * @memberof google.cloud.dialogflow.cx.v3.BoostSpecs * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.SentimentAnalysisResult} SentimentAnalysisResult + * @returns {google.cloud.dialogflow.cx.v3.BoostSpecs} BoostSpecs * @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) { + BoostSpecs.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SentimentAnalysisResult message. + * Verifies a BoostSpecs message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.SentimentAnalysisResult + * @memberof google.cloud.dialogflow.cx.v3.BoostSpecs * @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) { + BoostSpecs.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"; + if (message.dataStores != null && message.hasOwnProperty("dataStores")) { + if (!Array.isArray(message.dataStores)) + return "dataStores: array expected"; + for (var i = 0; i < message.dataStores.length; ++i) + if (!$util.isString(message.dataStores[i])) + return "dataStores: string[] expected"; + } + if (message.spec != null && message.hasOwnProperty("spec")) { + if (!Array.isArray(message.spec)) + return "spec: array expected"; + for (var i = 0; i < message.spec.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.BoostSpec.verify(message.spec[i]); + if (error) + return "spec." + error; + } + } return null; }; /** - * Creates a SentimentAnalysisResult message from a plain object. Also converts values to their respective internal types. + * Creates a BoostSpecs message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.SentimentAnalysisResult + * @memberof google.cloud.dialogflow.cx.v3.BoostSpecs * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.SentimentAnalysisResult} SentimentAnalysisResult + * @returns {google.cloud.dialogflow.cx.v3.BoostSpecs} BoostSpecs */ - SentimentAnalysisResult.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.SentimentAnalysisResult) + BoostSpecs.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.BoostSpecs) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.SentimentAnalysisResult(); - if (object.score != null) - message.score = Number(object.score); - if (object.magnitude != null) - message.magnitude = Number(object.magnitude); + var message = new $root.google.cloud.dialogflow.cx.v3.BoostSpecs(); + if (object.dataStores) { + if (!Array.isArray(object.dataStores)) + throw TypeError(".google.cloud.dialogflow.cx.v3.BoostSpecs.dataStores: array expected"); + message.dataStores = []; + for (var i = 0; i < object.dataStores.length; ++i) + message.dataStores[i] = String(object.dataStores[i]); + } + if (object.spec) { + if (!Array.isArray(object.spec)) + throw TypeError(".google.cloud.dialogflow.cx.v3.BoostSpecs.spec: array expected"); + message.spec = []; + for (var i = 0; i < object.spec.length; ++i) { + if (typeof object.spec[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.BoostSpecs.spec: object expected"); + message.spec[i] = $root.google.cloud.dialogflow.cx.v3.BoostSpec.fromObject(object.spec[i]); + } + } return message; }; /** - * Creates a plain object from a SentimentAnalysisResult message. Also converts values to other types if specified. + * Creates a plain object from a BoostSpecs message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.SentimentAnalysisResult + * @memberof google.cloud.dialogflow.cx.v3.BoostSpecs * @static - * @param {google.cloud.dialogflow.cx.v3.SentimentAnalysisResult} message SentimentAnalysisResult + * @param {google.cloud.dialogflow.cx.v3.BoostSpecs} message BoostSpecs * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SentimentAnalysisResult.toObject = function toObject(message, options) { + BoostSpecs.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.score = 0; - object.magnitude = 0; + if (options.arrays || options.defaults) { + object.dataStores = []; + object.spec = []; + } + if (message.dataStores && message.dataStores.length) { + object.dataStores = []; + for (var j = 0; j < message.dataStores.length; ++j) + object.dataStores[j] = message.dataStores[j]; + } + if (message.spec && message.spec.length) { + object.spec = []; + for (var j = 0; j < message.spec.length; ++j) + object.spec[j] = $root.google.cloud.dialogflow.cx.v3.BoostSpec.toObject(message.spec[j], options); } - 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. + * Converts this BoostSpecs to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.SentimentAnalysisResult + * @memberof google.cloud.dialogflow.cx.v3.BoostSpecs * @instance * @returns {Object.} JSON object */ - SentimentAnalysisResult.prototype.toJSON = function toJSON() { + BoostSpecs.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SentimentAnalysisResult + * Gets the default type url for BoostSpecs * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.SentimentAnalysisResult + * @memberof google.cloud.dialogflow.cx.v3.BoostSpecs * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SentimentAnalysisResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + BoostSpecs.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.SentimentAnalysisResult"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.BoostSpecs"; }; - return SentimentAnalysisResult; + return BoostSpecs; })(); - v3.SessionEntityTypes = (function() { + v3.FilterSpecs = (function() { /** - * Constructs a new SessionEntityTypes service. + * Properties of a FilterSpecs. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a SessionEntityTypes - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @interface IFilterSpecs + * @property {Array.|null} [dataStores] FilterSpecs dataStores + * @property {string|null} [filter] FilterSpecs filter */ - function SessionEntityTypes(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (SessionEntityTypes.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = SessionEntityTypes; /** - * Creates new SessionEntityTypes service using the specified rpc implementation. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.SessionEntityTypes - * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {SessionEntityTypes} RPC service. Useful where requests and/or responses are streamed. + * Constructs a new FilterSpecs. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a FilterSpecs. + * @implements IFilterSpecs + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IFilterSpecs=} [properties] Properties to set */ - SessionEntityTypes.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; + function FilterSpecs(properties) { + this.dataStores = []; + 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]]; + } /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.SessionEntityTypes|listSessionEntityTypes}. - * @memberof google.cloud.dialogflow.cx.v3.SessionEntityTypes - * @typedef ListSessionEntityTypesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse} [response] ListSessionEntityTypesResponse + * FilterSpecs dataStores. + * @member {Array.} dataStores + * @memberof google.cloud.dialogflow.cx.v3.FilterSpecs + * @instance */ + FilterSpecs.prototype.dataStores = $util.emptyArray; /** - * Calls ListSessionEntityTypes. - * @function listSessionEntityTypes - * @memberof google.cloud.dialogflow.cx.v3.SessionEntityTypes + * FilterSpecs filter. + * @member {string} filter + * @memberof google.cloud.dialogflow.cx.v3.FilterSpecs * @instance - * @param {google.cloud.dialogflow.cx.v3.IListSessionEntityTypesRequest} request ListSessionEntityTypesRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.SessionEntityTypes.ListSessionEntityTypesCallback} callback Node-style callback called with the error, if any, and ListSessionEntityTypesResponse - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(SessionEntityTypes.prototype.listSessionEntityTypes = function listSessionEntityTypes(request, callback) { - return this.rpcCall(listSessionEntityTypes, $root.google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest, $root.google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse, request, callback); - }, "name", { value: "ListSessionEntityTypes" }); + FilterSpecs.prototype.filter = ""; /** - * Calls ListSessionEntityTypes. - * @function listSessionEntityTypes - * @memberof google.cloud.dialogflow.cx.v3.SessionEntityTypes - * @instance - * @param {google.cloud.dialogflow.cx.v3.IListSessionEntityTypesRequest} request ListSessionEntityTypesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a new FilterSpecs instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.FilterSpecs + * @static + * @param {google.cloud.dialogflow.cx.v3.IFilterSpecs=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.FilterSpecs} FilterSpecs instance */ + FilterSpecs.create = function create(properties) { + return new FilterSpecs(properties); + }; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.SessionEntityTypes|getSessionEntityType}. - * @memberof google.cloud.dialogflow.cx.v3.SessionEntityTypes - * @typedef GetSessionEntityTypeCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.SessionEntityType} [response] SessionEntityType + * Encodes the specified FilterSpecs message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.FilterSpecs.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.FilterSpecs + * @static + * @param {google.cloud.dialogflow.cx.v3.IFilterSpecs} message FilterSpecs message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + FilterSpecs.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataStores != null && message.dataStores.length) + for (var i = 0; i < message.dataStores.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.dataStores[i]); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); + return writer; + }; /** - * Calls GetSessionEntityType. - * @function getSessionEntityType - * @memberof google.cloud.dialogflow.cx.v3.SessionEntityTypes - * @instance - * @param {google.cloud.dialogflow.cx.v3.IGetSessionEntityTypeRequest} request GetSessionEntityTypeRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.SessionEntityTypes.GetSessionEntityTypeCallback} callback Node-style callback called with the error, if any, and SessionEntityType - * @returns {undefined} - * @variation 1 + * Encodes the specified FilterSpecs message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.FilterSpecs.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.FilterSpecs + * @static + * @param {google.cloud.dialogflow.cx.v3.IFilterSpecs} message FilterSpecs message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(SessionEntityTypes.prototype.getSessionEntityType = function getSessionEntityType(request, callback) { - return this.rpcCall(getSessionEntityType, $root.google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest, $root.google.cloud.dialogflow.cx.v3.SessionEntityType, request, callback); - }, "name", { value: "GetSessionEntityType" }); + FilterSpecs.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Calls GetSessionEntityType. - * @function getSessionEntityType - * @memberof google.cloud.dialogflow.cx.v3.SessionEntityTypes - * @instance - * @param {google.cloud.dialogflow.cx.v3.IGetSessionEntityTypeRequest} request GetSessionEntityTypeRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Decodes a FilterSpecs message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.FilterSpecs + * @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.FilterSpecs} FilterSpecs + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + FilterSpecs.decode = function decode(reader, length, error) { + 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.FilterSpecs(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.dataStores && message.dataStores.length)) + message.dataStores = []; + message.dataStores.push(reader.string()); + break; + } + case 2: { + message.filter = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.SessionEntityTypes|createSessionEntityType}. - * @memberof google.cloud.dialogflow.cx.v3.SessionEntityTypes - * @typedef CreateSessionEntityTypeCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.SessionEntityType} [response] SessionEntityType + * Decodes a FilterSpecs message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.FilterSpecs + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.FilterSpecs} FilterSpecs + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + FilterSpecs.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls CreateSessionEntityType. - * @function createSessionEntityType - * @memberof google.cloud.dialogflow.cx.v3.SessionEntityTypes - * @instance - * @param {google.cloud.dialogflow.cx.v3.ICreateSessionEntityTypeRequest} request CreateSessionEntityTypeRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.SessionEntityTypes.CreateSessionEntityTypeCallback} callback Node-style callback called with the error, if any, and SessionEntityType - * @returns {undefined} - * @variation 1 + * Verifies a FilterSpecs message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.FilterSpecs + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Object.defineProperty(SessionEntityTypes.prototype.createSessionEntityType = function createSessionEntityType(request, callback) { - return this.rpcCall(createSessionEntityType, $root.google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest, $root.google.cloud.dialogflow.cx.v3.SessionEntityType, request, callback); - }, "name", { value: "CreateSessionEntityType" }); + FilterSpecs.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataStores != null && message.hasOwnProperty("dataStores")) { + if (!Array.isArray(message.dataStores)) + return "dataStores: array expected"; + for (var i = 0; i < message.dataStores.length; ++i) + if (!$util.isString(message.dataStores[i])) + return "dataStores: string[] expected"; + } + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + return null; + }; /** - * Calls CreateSessionEntityType. - * @function createSessionEntityType - * @memberof google.cloud.dialogflow.cx.v3.SessionEntityTypes - * @instance - * @param {google.cloud.dialogflow.cx.v3.ICreateSessionEntityTypeRequest} request CreateSessionEntityTypeRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a FilterSpecs message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.FilterSpecs + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.FilterSpecs} FilterSpecs */ + FilterSpecs.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.FilterSpecs) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.FilterSpecs(); + if (object.dataStores) { + if (!Array.isArray(object.dataStores)) + throw TypeError(".google.cloud.dialogflow.cx.v3.FilterSpecs.dataStores: array expected"); + message.dataStores = []; + for (var i = 0; i < object.dataStores.length; ++i) + message.dataStores[i] = String(object.dataStores[i]); + } + if (object.filter != null) + message.filter = String(object.filter); + return message; + }; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.SessionEntityTypes|updateSessionEntityType}. - * @memberof google.cloud.dialogflow.cx.v3.SessionEntityTypes - * @typedef UpdateSessionEntityTypeCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.SessionEntityType} [response] SessionEntityType + * Creates a plain object from a FilterSpecs message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.FilterSpecs + * @static + * @param {google.cloud.dialogflow.cx.v3.FilterSpecs} message FilterSpecs + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ + FilterSpecs.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.dataStores = []; + if (options.defaults) + object.filter = ""; + if (message.dataStores && message.dataStores.length) { + object.dataStores = []; + for (var j = 0; j < message.dataStores.length; ++j) + object.dataStores[j] = message.dataStores[j]; + } + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; /** - * Calls UpdateSessionEntityType. - * @function updateSessionEntityType - * @memberof google.cloud.dialogflow.cx.v3.SessionEntityTypes + * Converts this FilterSpecs to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.FilterSpecs * @instance - * @param {google.cloud.dialogflow.cx.v3.IUpdateSessionEntityTypeRequest} request UpdateSessionEntityTypeRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.SessionEntityTypes.UpdateSessionEntityTypeCallback} callback Node-style callback called with the error, if any, and SessionEntityType - * @returns {undefined} - * @variation 1 + * @returns {Object.} JSON object */ - Object.defineProperty(SessionEntityTypes.prototype.updateSessionEntityType = function updateSessionEntityType(request, callback) { - return this.rpcCall(updateSessionEntityType, $root.google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest, $root.google.cloud.dialogflow.cx.v3.SessionEntityType, request, callback); - }, "name", { value: "UpdateSessionEntityType" }); + FilterSpecs.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Calls UpdateSessionEntityType. - * @function updateSessionEntityType - * @memberof google.cloud.dialogflow.cx.v3.SessionEntityTypes - * @instance - * @param {google.cloud.dialogflow.cx.v3.IUpdateSessionEntityTypeRequest} request UpdateSessionEntityTypeRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Gets the default type url for FilterSpecs + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.FilterSpecs + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ + FilterSpecs.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.FilterSpecs"; + }; + + return FilterSpecs; + })(); + + v3.QueryInput = (function() { /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.SessionEntityTypes|deleteSessionEntityType}. - * @memberof google.cloud.dialogflow.cx.v3.SessionEntityTypes - * @typedef DeleteSessionEntityTypeCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty + * Properties of a QueryInput. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IQueryInput + * @property {google.cloud.dialogflow.cx.v3.ITextInput|null} [text] QueryInput text + * @property {google.cloud.dialogflow.cx.v3.IIntentInput|null} [intent] QueryInput intent + * @property {google.cloud.dialogflow.cx.v3.IAudioInput|null} [audio] QueryInput audio + * @property {google.cloud.dialogflow.cx.v3.IEventInput|null} [event] QueryInput event + * @property {google.cloud.dialogflow.cx.v3.IDtmfInput|null} [dtmf] QueryInput dtmf + * @property {google.cloud.dialogflow.cx.v3.IToolCallResult|null} [toolCallResult] QueryInput toolCallResult + * @property {string|null} [languageCode] QueryInput languageCode */ /** - * Calls DeleteSessionEntityType. - * @function deleteSessionEntityType - * @memberof google.cloud.dialogflow.cx.v3.SessionEntityTypes - * @instance - * @param {google.cloud.dialogflow.cx.v3.IDeleteSessionEntityTypeRequest} request DeleteSessionEntityTypeRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.SessionEntityTypes.DeleteSessionEntityTypeCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 + * Constructs a new QueryInput. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a QueryInput. + * @implements IQueryInput + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IQueryInput=} [properties] Properties to set */ - Object.defineProperty(SessionEntityTypes.prototype.deleteSessionEntityType = function deleteSessionEntityType(request, callback) { - return this.rpcCall(deleteSessionEntityType, $root.google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteSessionEntityType" }); + function QueryInput(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]]; + } /** - * Calls DeleteSessionEntityType. - * @function deleteSessionEntityType - * @memberof google.cloud.dialogflow.cx.v3.SessionEntityTypes + * QueryInput text. + * @member {google.cloud.dialogflow.cx.v3.ITextInput|null|undefined} text + * @memberof google.cloud.dialogflow.cx.v3.QueryInput * @instance - * @param {google.cloud.dialogflow.cx.v3.IDeleteSessionEntityTypeRequest} request DeleteSessionEntityTypeRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + QueryInput.prototype.text = null; - return SessionEntityTypes; - })(); + /** + * QueryInput intent. + * @member {google.cloud.dialogflow.cx.v3.IIntentInput|null|undefined} intent + * @memberof google.cloud.dialogflow.cx.v3.QueryInput + * @instance + */ + QueryInput.prototype.intent = null; - v3.SessionEntityType = (function() { + /** + * QueryInput audio. + * @member {google.cloud.dialogflow.cx.v3.IAudioInput|null|undefined} audio + * @memberof google.cloud.dialogflow.cx.v3.QueryInput + * @instance + */ + QueryInput.prototype.audio = null; /** - * Properties of a SessionEntityType. - * @memberof google.cloud.dialogflow.cx.v3 - * @interface ISessionEntityType - * @property {string|null} [name] SessionEntityType name - * @property {google.cloud.dialogflow.cx.v3.SessionEntityType.EntityOverrideMode|null} [entityOverrideMode] SessionEntityType entityOverrideMode - * @property {Array.|null} [entities] SessionEntityType entities + * QueryInput event. + * @member {google.cloud.dialogflow.cx.v3.IEventInput|null|undefined} event + * @memberof google.cloud.dialogflow.cx.v3.QueryInput + * @instance */ + QueryInput.prototype.event = null; /** - * Constructs a new SessionEntityType. - * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a SessionEntityType. - * @implements ISessionEntityType - * @constructor - * @param {google.cloud.dialogflow.cx.v3.ISessionEntityType=} [properties] Properties to set + * QueryInput dtmf. + * @member {google.cloud.dialogflow.cx.v3.IDtmfInput|null|undefined} dtmf + * @memberof google.cloud.dialogflow.cx.v3.QueryInput + * @instance */ - function SessionEntityType(properties) { - this.entities = []; - 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]]; - } + QueryInput.prototype.dtmf = null; /** - * SessionEntityType name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.SessionEntityType + * QueryInput toolCallResult. + * @member {google.cloud.dialogflow.cx.v3.IToolCallResult|null|undefined} toolCallResult + * @memberof google.cloud.dialogflow.cx.v3.QueryInput * @instance */ - SessionEntityType.prototype.name = ""; + QueryInput.prototype.toolCallResult = null; /** - * SessionEntityType entityOverrideMode. - * @member {google.cloud.dialogflow.cx.v3.SessionEntityType.EntityOverrideMode} entityOverrideMode - * @memberof google.cloud.dialogflow.cx.v3.SessionEntityType + * QueryInput languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3.QueryInput * @instance */ - SessionEntityType.prototype.entityOverrideMode = 0; + QueryInput.prototype.languageCode = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * SessionEntityType entities. - * @member {Array.} entities - * @memberof google.cloud.dialogflow.cx.v3.SessionEntityType + * QueryInput input. + * @member {"text"|"intent"|"audio"|"event"|"dtmf"|"toolCallResult"|undefined} input + * @memberof google.cloud.dialogflow.cx.v3.QueryInput * @instance */ - SessionEntityType.prototype.entities = $util.emptyArray; + Object.defineProperty(QueryInput.prototype, "input", { + get: $util.oneOfGetter($oneOfFields = ["text", "intent", "audio", "event", "dtmf", "toolCallResult"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new SessionEntityType instance using the specified properties. + * Creates a new QueryInput instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.SessionEntityType + * @memberof google.cloud.dialogflow.cx.v3.QueryInput * @static - * @param {google.cloud.dialogflow.cx.v3.ISessionEntityType=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.SessionEntityType} SessionEntityType instance + * @param {google.cloud.dialogflow.cx.v3.IQueryInput=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.QueryInput} QueryInput instance */ - SessionEntityType.create = function create(properties) { - return new SessionEntityType(properties); + QueryInput.create = function create(properties) { + return new QueryInput(properties); }; /** - * Encodes the specified SessionEntityType message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SessionEntityType.verify|verify} messages. + * Encodes the specified QueryInput message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.QueryInput.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.SessionEntityType + * @memberof google.cloud.dialogflow.cx.v3.QueryInput * @static - * @param {google.cloud.dialogflow.cx.v3.ISessionEntityType} message SessionEntityType message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IQueryInput} message QueryInput message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SessionEntityType.encode = function encode(message, writer) { + QueryInput.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.entityOverrideMode != null && Object.hasOwnProperty.call(message, "entityOverrideMode")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.entityOverrideMode); - if (message.entities != null && message.entities.length) - for (var i = 0; i < message.entities.length; ++i) - $root.google.cloud.dialogflow.cx.v3.EntityType.Entity.encode(message.entities[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.text != null && Object.hasOwnProperty.call(message, "text")) + $root.google.cloud.dialogflow.cx.v3.TextInput.encode(message.text, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.intent != null && Object.hasOwnProperty.call(message, "intent")) + $root.google.cloud.dialogflow.cx.v3.IntentInput.encode(message.intent, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.languageCode); + if (message.audio != null && Object.hasOwnProperty.call(message, "audio")) + $root.google.cloud.dialogflow.cx.v3.AudioInput.encode(message.audio, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.event != null && Object.hasOwnProperty.call(message, "event")) + $root.google.cloud.dialogflow.cx.v3.EventInput.encode(message.event, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.dtmf != null && Object.hasOwnProperty.call(message, "dtmf")) + $root.google.cloud.dialogflow.cx.v3.DtmfInput.encode(message.dtmf, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.toolCallResult != null && Object.hasOwnProperty.call(message, "toolCallResult")) + $root.google.cloud.dialogflow.cx.v3.ToolCallResult.encode(message.toolCallResult, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); return writer; }; /** - * Encodes the specified SessionEntityType message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SessionEntityType.verify|verify} messages. + * Encodes the specified QueryInput message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.QueryInput.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.SessionEntityType + * @memberof google.cloud.dialogflow.cx.v3.QueryInput * @static - * @param {google.cloud.dialogflow.cx.v3.ISessionEntityType} message SessionEntityType message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IQueryInput} message QueryInput message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SessionEntityType.encodeDelimited = function encodeDelimited(message, writer) { + QueryInput.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SessionEntityType message from the specified reader or buffer. + * Decodes a QueryInput message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.SessionEntityType + * @memberof google.cloud.dialogflow.cx.v3.QueryInput * @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.SessionEntityType} SessionEntityType + * @returns {google.cloud.dialogflow.cx.v3.QueryInput} QueryInput * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SessionEntityType.decode = function decode(reader, length, error) { + QueryInput.decode = function decode(reader, length, error) { 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.SessionEntityType(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.QueryInput(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { - case 1: { - message.name = reader.string(); + case 2: { + message.text = $root.google.cloud.dialogflow.cx.v3.TextInput.decode(reader, reader.uint32()); break; } case 3: { - message.entityOverrideMode = reader.int32(); + message.intent = $root.google.cloud.dialogflow.cx.v3.IntentInput.decode(reader, reader.uint32()); + break; + } + case 5: { + message.audio = $root.google.cloud.dialogflow.cx.v3.AudioInput.decode(reader, reader.uint32()); + break; + } + case 6: { + message.event = $root.google.cloud.dialogflow.cx.v3.EventInput.decode(reader, reader.uint32()); + break; + } + case 7: { + message.dtmf = $root.google.cloud.dialogflow.cx.v3.DtmfInput.decode(reader, reader.uint32()); + break; + } + case 11: { + message.toolCallResult = $root.google.cloud.dialogflow.cx.v3.ToolCallResult.decode(reader, reader.uint32()); break; } case 4: { - if (!(message.entities && message.entities.length)) - message.entities = []; - message.entities.push($root.google.cloud.dialogflow.cx.v3.EntityType.Entity.decode(reader, reader.uint32())); + message.languageCode = reader.string(); break; } default: @@ -69304,199 +68543,263 @@ }; /** - * Decodes a SessionEntityType message from the specified reader or buffer, length delimited. + * Decodes a QueryInput message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.SessionEntityType + * @memberof google.cloud.dialogflow.cx.v3.QueryInput * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.SessionEntityType} SessionEntityType + * @returns {google.cloud.dialogflow.cx.v3.QueryInput} QueryInput * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SessionEntityType.decodeDelimited = function decodeDelimited(reader) { + QueryInput.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SessionEntityType message. + * Verifies a QueryInput message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.SessionEntityType + * @memberof google.cloud.dialogflow.cx.v3.QueryInput * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SessionEntityType.verify = function verify(message) { + QueryInput.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.entityOverrideMode != null && message.hasOwnProperty("entityOverrideMode")) - switch (message.entityOverrideMode) { - default: - return "entityOverrideMode: enum value expected"; - case 0: - case 1: - case 2: - break; + var properties = {}; + if (message.text != null && message.hasOwnProperty("text")) { + properties.input = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3.TextInput.verify(message.text); + if (error) + return "text." + error; } - if (message.entities != null && message.hasOwnProperty("entities")) { - if (!Array.isArray(message.entities)) - return "entities: array expected"; - for (var i = 0; i < message.entities.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.EntityType.Entity.verify(message.entities[i]); + } + if (message.intent != null && message.hasOwnProperty("intent")) { + if (properties.input === 1) + return "input: multiple values"; + properties.input = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3.IntentInput.verify(message.intent); if (error) - return "entities." + error; + return "intent." + error; + } + } + if (message.audio != null && message.hasOwnProperty("audio")) { + if (properties.input === 1) + return "input: multiple values"; + properties.input = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3.AudioInput.verify(message.audio); + if (error) + return "audio." + error; } } + if (message.event != null && message.hasOwnProperty("event")) { + if (properties.input === 1) + return "input: multiple values"; + properties.input = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3.EventInput.verify(message.event); + if (error) + return "event." + error; + } + } + if (message.dtmf != null && message.hasOwnProperty("dtmf")) { + if (properties.input === 1) + return "input: multiple values"; + properties.input = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3.DtmfInput.verify(message.dtmf); + if (error) + return "dtmf." + error; + } + } + if (message.toolCallResult != null && message.hasOwnProperty("toolCallResult")) { + if (properties.input === 1) + return "input: multiple values"; + properties.input = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3.ToolCallResult.verify(message.toolCallResult); + if (error) + return "toolCallResult." + error; + } + } + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; return null; }; /** - * Creates a SessionEntityType message from a plain object. Also converts values to their respective internal types. + * Creates a QueryInput message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.SessionEntityType + * @memberof google.cloud.dialogflow.cx.v3.QueryInput * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.SessionEntityType} SessionEntityType + * @returns {google.cloud.dialogflow.cx.v3.QueryInput} QueryInput */ - SessionEntityType.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.SessionEntityType) + QueryInput.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.QueryInput) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.SessionEntityType(); - if (object.name != null) - message.name = String(object.name); - switch (object.entityOverrideMode) { - default: - if (typeof object.entityOverrideMode === "number") { - message.entityOverrideMode = object.entityOverrideMode; - break; - } - break; - case "ENTITY_OVERRIDE_MODE_UNSPECIFIED": - case 0: - message.entityOverrideMode = 0; - break; - case "ENTITY_OVERRIDE_MODE_OVERRIDE": - case 1: - message.entityOverrideMode = 1; - break; - case "ENTITY_OVERRIDE_MODE_SUPPLEMENT": - case 2: - message.entityOverrideMode = 2; - break; + var message = new $root.google.cloud.dialogflow.cx.v3.QueryInput(); + if (object.text != null) { + if (typeof object.text !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.QueryInput.text: object expected"); + message.text = $root.google.cloud.dialogflow.cx.v3.TextInput.fromObject(object.text); } - if (object.entities) { - if (!Array.isArray(object.entities)) - throw TypeError(".google.cloud.dialogflow.cx.v3.SessionEntityType.entities: array expected"); - message.entities = []; - for (var i = 0; i < object.entities.length; ++i) { - if (typeof object.entities[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.SessionEntityType.entities: object expected"); - message.entities[i] = $root.google.cloud.dialogflow.cx.v3.EntityType.Entity.fromObject(object.entities[i]); - } + if (object.intent != null) { + if (typeof object.intent !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.QueryInput.intent: object expected"); + message.intent = $root.google.cloud.dialogflow.cx.v3.IntentInput.fromObject(object.intent); + } + if (object.audio != null) { + if (typeof object.audio !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.QueryInput.audio: object expected"); + message.audio = $root.google.cloud.dialogflow.cx.v3.AudioInput.fromObject(object.audio); + } + if (object.event != null) { + if (typeof object.event !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.QueryInput.event: object expected"); + message.event = $root.google.cloud.dialogflow.cx.v3.EventInput.fromObject(object.event); + } + if (object.dtmf != null) { + if (typeof object.dtmf !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.QueryInput.dtmf: object expected"); + message.dtmf = $root.google.cloud.dialogflow.cx.v3.DtmfInput.fromObject(object.dtmf); + } + if (object.toolCallResult != null) { + if (typeof object.toolCallResult !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.QueryInput.toolCallResult: object expected"); + message.toolCallResult = $root.google.cloud.dialogflow.cx.v3.ToolCallResult.fromObject(object.toolCallResult); } + if (object.languageCode != null) + message.languageCode = String(object.languageCode); return message; }; /** - * Creates a plain object from a SessionEntityType message. Also converts values to other types if specified. + * Creates a plain object from a QueryInput message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.SessionEntityType + * @memberof google.cloud.dialogflow.cx.v3.QueryInput * @static - * @param {google.cloud.dialogflow.cx.v3.SessionEntityType} message SessionEntityType + * @param {google.cloud.dialogflow.cx.v3.QueryInput} message QueryInput * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SessionEntityType.toObject = function toObject(message, options) { + QueryInput.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.entities = []; - if (options.defaults) { - object.name = ""; - object.entityOverrideMode = options.enums === String ? "ENTITY_OVERRIDE_MODE_UNSPECIFIED" : 0; + if (options.defaults) + object.languageCode = ""; + if (message.text != null && message.hasOwnProperty("text")) { + object.text = $root.google.cloud.dialogflow.cx.v3.TextInput.toObject(message.text, options); + if (options.oneofs) + object.input = "text"; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.entityOverrideMode != null && message.hasOwnProperty("entityOverrideMode")) - object.entityOverrideMode = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.SessionEntityType.EntityOverrideMode[message.entityOverrideMode] === undefined ? message.entityOverrideMode : $root.google.cloud.dialogflow.cx.v3.SessionEntityType.EntityOverrideMode[message.entityOverrideMode] : message.entityOverrideMode; - if (message.entities && message.entities.length) { - object.entities = []; - for (var j = 0; j < message.entities.length; ++j) - object.entities[j] = $root.google.cloud.dialogflow.cx.v3.EntityType.Entity.toObject(message.entities[j], options); + if (message.intent != null && message.hasOwnProperty("intent")) { + object.intent = $root.google.cloud.dialogflow.cx.v3.IntentInput.toObject(message.intent, options); + if (options.oneofs) + object.input = "intent"; + } + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; + if (message.audio != null && message.hasOwnProperty("audio")) { + object.audio = $root.google.cloud.dialogflow.cx.v3.AudioInput.toObject(message.audio, options); + if (options.oneofs) + object.input = "audio"; + } + if (message.event != null && message.hasOwnProperty("event")) { + object.event = $root.google.cloud.dialogflow.cx.v3.EventInput.toObject(message.event, options); + if (options.oneofs) + object.input = "event"; + } + if (message.dtmf != null && message.hasOwnProperty("dtmf")) { + object.dtmf = $root.google.cloud.dialogflow.cx.v3.DtmfInput.toObject(message.dtmf, options); + if (options.oneofs) + object.input = "dtmf"; + } + if (message.toolCallResult != null && message.hasOwnProperty("toolCallResult")) { + object.toolCallResult = $root.google.cloud.dialogflow.cx.v3.ToolCallResult.toObject(message.toolCallResult, options); + if (options.oneofs) + object.input = "toolCallResult"; } return object; }; /** - * Converts this SessionEntityType to JSON. + * Converts this QueryInput to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.SessionEntityType + * @memberof google.cloud.dialogflow.cx.v3.QueryInput * @instance * @returns {Object.} JSON object */ - SessionEntityType.prototype.toJSON = function toJSON() { + QueryInput.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SessionEntityType + * Gets the default type url for QueryInput * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.SessionEntityType + * @memberof google.cloud.dialogflow.cx.v3.QueryInput * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SessionEntityType.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + QueryInput.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.SessionEntityType"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.QueryInput"; }; - /** - * EntityOverrideMode enum. - * @name google.cloud.dialogflow.cx.v3.SessionEntityType.EntityOverrideMode - * @enum {number} - * @property {number} ENTITY_OVERRIDE_MODE_UNSPECIFIED=0 ENTITY_OVERRIDE_MODE_UNSPECIFIED value - * @property {number} ENTITY_OVERRIDE_MODE_OVERRIDE=1 ENTITY_OVERRIDE_MODE_OVERRIDE value - * @property {number} ENTITY_OVERRIDE_MODE_SUPPLEMENT=2 ENTITY_OVERRIDE_MODE_SUPPLEMENT value - */ - SessionEntityType.EntityOverrideMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ENTITY_OVERRIDE_MODE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ENTITY_OVERRIDE_MODE_OVERRIDE"] = 1; - values[valuesById[2] = "ENTITY_OVERRIDE_MODE_SUPPLEMENT"] = 2; - return values; - })(); - - return SessionEntityType; + return QueryInput; })(); - v3.ListSessionEntityTypesRequest = (function() { + v3.QueryResult = (function() { /** - * Properties of a ListSessionEntityTypesRequest. + * Properties of a QueryResult. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IListSessionEntityTypesRequest - * @property {string|null} [parent] ListSessionEntityTypesRequest parent - * @property {number|null} [pageSize] ListSessionEntityTypesRequest pageSize - * @property {string|null} [pageToken] ListSessionEntityTypesRequest pageToken + * @interface IQueryResult + * @property {string|null} [text] QueryResult text + * @property {string|null} [triggerIntent] QueryResult triggerIntent + * @property {string|null} [transcript] QueryResult transcript + * @property {string|null} [triggerEvent] QueryResult triggerEvent + * @property {google.cloud.dialogflow.cx.v3.IDtmfInput|null} [dtmf] QueryResult dtmf + * @property {string|null} [languageCode] QueryResult languageCode + * @property {google.protobuf.IStruct|null} [parameters] QueryResult parameters + * @property {Array.|null} [responseMessages] QueryResult responseMessages + * @property {Array.|null} [webhookStatuses] QueryResult webhookStatuses + * @property {Array.|null} [webhookPayloads] QueryResult webhookPayloads + * @property {google.cloud.dialogflow.cx.v3.IPage|null} [currentPage] QueryResult currentPage + * @property {google.cloud.dialogflow.cx.v3.IFlow|null} [currentFlow] QueryResult currentFlow + * @property {google.cloud.dialogflow.cx.v3.IIntent|null} [intent] QueryResult intent + * @property {number|null} [intentDetectionConfidence] QueryResult intentDetectionConfidence + * @property {google.cloud.dialogflow.cx.v3.IMatch|null} [match] QueryResult match + * @property {google.protobuf.IStruct|null} [diagnosticInfo] QueryResult diagnosticInfo + * @property {google.cloud.dialogflow.cx.v3.ISentimentAnalysisResult|null} [sentimentAnalysisResult] QueryResult sentimentAnalysisResult + * @property {google.cloud.dialogflow.cx.v3.IAdvancedSettings|null} [advancedSettings] QueryResult advancedSettings + * @property {boolean|null} [allowAnswerFeedback] QueryResult allowAnswerFeedback + * @property {google.cloud.dialogflow.cx.v3.IDataStoreConnectionSignals|null} [dataStoreConnectionSignals] QueryResult dataStoreConnectionSignals */ /** - * Constructs a new ListSessionEntityTypesRequest. + * Constructs a new QueryResult. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a ListSessionEntityTypesRequest. - * @implements IListSessionEntityTypesRequest + * @classdesc Represents a QueryResult. + * @implements IQueryResult * @constructor - * @param {google.cloud.dialogflow.cx.v3.IListSessionEntityTypesRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IQueryResult=} [properties] Properties to set */ - function ListSessionEntityTypesRequest(properties) { + function QueryResult(properties) { + this.responseMessages = []; + this.webhookStatuses = []; + this.webhookPayloads = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -69504,105 +68807,366 @@ } /** - * ListSessionEntityTypesRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest + * QueryResult text. + * @member {string|null|undefined} text + * @memberof google.cloud.dialogflow.cx.v3.QueryResult * @instance */ - ListSessionEntityTypesRequest.prototype.parent = ""; + QueryResult.prototype.text = null; /** - * ListSessionEntityTypesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest + * QueryResult triggerIntent. + * @member {string|null|undefined} triggerIntent + * @memberof google.cloud.dialogflow.cx.v3.QueryResult * @instance */ - ListSessionEntityTypesRequest.prototype.pageSize = 0; + QueryResult.prototype.triggerIntent = null; /** - * ListSessionEntityTypesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest + * QueryResult transcript. + * @member {string|null|undefined} transcript + * @memberof google.cloud.dialogflow.cx.v3.QueryResult * @instance */ - ListSessionEntityTypesRequest.prototype.pageToken = ""; + QueryResult.prototype.transcript = null; /** - * Creates a new ListSessionEntityTypesRequest instance using the specified properties. + * QueryResult triggerEvent. + * @member {string|null|undefined} triggerEvent + * @memberof google.cloud.dialogflow.cx.v3.QueryResult + * @instance + */ + QueryResult.prototype.triggerEvent = null; + + /** + * QueryResult dtmf. + * @member {google.cloud.dialogflow.cx.v3.IDtmfInput|null|undefined} dtmf + * @memberof google.cloud.dialogflow.cx.v3.QueryResult + * @instance + */ + QueryResult.prototype.dtmf = null; + + /** + * QueryResult languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3.QueryResult + * @instance + */ + QueryResult.prototype.languageCode = ""; + + /** + * QueryResult parameters. + * @member {google.protobuf.IStruct|null|undefined} parameters + * @memberof google.cloud.dialogflow.cx.v3.QueryResult + * @instance + */ + QueryResult.prototype.parameters = null; + + /** + * QueryResult responseMessages. + * @member {Array.} responseMessages + * @memberof google.cloud.dialogflow.cx.v3.QueryResult + * @instance + */ + QueryResult.prototype.responseMessages = $util.emptyArray; + + /** + * QueryResult webhookStatuses. + * @member {Array.} webhookStatuses + * @memberof google.cloud.dialogflow.cx.v3.QueryResult + * @instance + */ + QueryResult.prototype.webhookStatuses = $util.emptyArray; + + /** + * QueryResult webhookPayloads. + * @member {Array.} webhookPayloads + * @memberof google.cloud.dialogflow.cx.v3.QueryResult + * @instance + */ + QueryResult.prototype.webhookPayloads = $util.emptyArray; + + /** + * QueryResult currentPage. + * @member {google.cloud.dialogflow.cx.v3.IPage|null|undefined} currentPage + * @memberof google.cloud.dialogflow.cx.v3.QueryResult + * @instance + */ + QueryResult.prototype.currentPage = null; + + /** + * QueryResult currentFlow. + * @member {google.cloud.dialogflow.cx.v3.IFlow|null|undefined} currentFlow + * @memberof google.cloud.dialogflow.cx.v3.QueryResult + * @instance + */ + QueryResult.prototype.currentFlow = null; + + /** + * QueryResult intent. + * @member {google.cloud.dialogflow.cx.v3.IIntent|null|undefined} intent + * @memberof google.cloud.dialogflow.cx.v3.QueryResult + * @instance + */ + QueryResult.prototype.intent = null; + + /** + * QueryResult intentDetectionConfidence. + * @member {number} intentDetectionConfidence + * @memberof google.cloud.dialogflow.cx.v3.QueryResult + * @instance + */ + QueryResult.prototype.intentDetectionConfidence = 0; + + /** + * QueryResult match. + * @member {google.cloud.dialogflow.cx.v3.IMatch|null|undefined} match + * @memberof google.cloud.dialogflow.cx.v3.QueryResult + * @instance + */ + QueryResult.prototype.match = null; + + /** + * QueryResult diagnosticInfo. + * @member {google.protobuf.IStruct|null|undefined} diagnosticInfo + * @memberof google.cloud.dialogflow.cx.v3.QueryResult + * @instance + */ + QueryResult.prototype.diagnosticInfo = null; + + /** + * QueryResult sentimentAnalysisResult. + * @member {google.cloud.dialogflow.cx.v3.ISentimentAnalysisResult|null|undefined} sentimentAnalysisResult + * @memberof google.cloud.dialogflow.cx.v3.QueryResult + * @instance + */ + QueryResult.prototype.sentimentAnalysisResult = null; + + /** + * QueryResult advancedSettings. + * @member {google.cloud.dialogflow.cx.v3.IAdvancedSettings|null|undefined} advancedSettings + * @memberof google.cloud.dialogflow.cx.v3.QueryResult + * @instance + */ + QueryResult.prototype.advancedSettings = null; + + /** + * QueryResult allowAnswerFeedback. + * @member {boolean} allowAnswerFeedback + * @memberof google.cloud.dialogflow.cx.v3.QueryResult + * @instance + */ + QueryResult.prototype.allowAnswerFeedback = false; + + /** + * QueryResult dataStoreConnectionSignals. + * @member {google.cloud.dialogflow.cx.v3.IDataStoreConnectionSignals|null|undefined} dataStoreConnectionSignals + * @memberof google.cloud.dialogflow.cx.v3.QueryResult + * @instance + */ + QueryResult.prototype.dataStoreConnectionSignals = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * QueryResult query. + * @member {"text"|"triggerIntent"|"transcript"|"triggerEvent"|"dtmf"|undefined} query + * @memberof google.cloud.dialogflow.cx.v3.QueryResult + * @instance + */ + Object.defineProperty(QueryResult.prototype, "query", { + get: $util.oneOfGetter($oneOfFields = ["text", "triggerIntent", "transcript", "triggerEvent", "dtmf"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new QueryResult instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest + * @memberof google.cloud.dialogflow.cx.v3.QueryResult * @static - * @param {google.cloud.dialogflow.cx.v3.IListSessionEntityTypesRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest} ListSessionEntityTypesRequest instance + * @param {google.cloud.dialogflow.cx.v3.IQueryResult=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.QueryResult} QueryResult instance */ - ListSessionEntityTypesRequest.create = function create(properties) { - return new ListSessionEntityTypesRequest(properties); + QueryResult.create = function create(properties) { + return new QueryResult(properties); }; /** - * Encodes the specified ListSessionEntityTypesRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest.verify|verify} messages. + * Encodes the specified QueryResult message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.QueryResult.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest + * @memberof google.cloud.dialogflow.cx.v3.QueryResult * @static - * @param {google.cloud.dialogflow.cx.v3.IListSessionEntityTypesRequest} message ListSessionEntityTypesRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IQueryResult} message QueryResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListSessionEntityTypesRequest.encode = function encode(message, writer) { + QueryResult.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.text != null && Object.hasOwnProperty.call(message, "text")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.text); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); + if (message.parameters != null && Object.hasOwnProperty.call(message, "parameters")) + $root.google.protobuf.Struct.encode(message.parameters, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.responseMessages != null && message.responseMessages.length) + for (var i = 0; i < message.responseMessages.length; ++i) + $root.google.cloud.dialogflow.cx.v3.ResponseMessage.encode(message.responseMessages[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.webhookPayloads != null && message.webhookPayloads.length) + for (var i = 0; i < message.webhookPayloads.length; ++i) + $root.google.protobuf.Struct.encode(message.webhookPayloads[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.currentPage != null && Object.hasOwnProperty.call(message, "currentPage")) + $root.google.cloud.dialogflow.cx.v3.Page.encode(message.currentPage, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.intent != null && Object.hasOwnProperty.call(message, "intent")) + $root.google.cloud.dialogflow.cx.v3.Intent.encode(message.intent, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.intentDetectionConfidence != null && Object.hasOwnProperty.call(message, "intentDetectionConfidence")) + writer.uint32(/* id 9, wireType 5 =*/77).float(message.intentDetectionConfidence); + if (message.diagnosticInfo != null && Object.hasOwnProperty.call(message, "diagnosticInfo")) + $root.google.protobuf.Struct.encode(message.diagnosticInfo, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.triggerIntent != null && Object.hasOwnProperty.call(message, "triggerIntent")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.triggerIntent); + if (message.transcript != null && Object.hasOwnProperty.call(message, "transcript")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.transcript); + if (message.webhookStatuses != null && message.webhookStatuses.length) + for (var i = 0; i < message.webhookStatuses.length; ++i) + $root.google.rpc.Status.encode(message.webhookStatuses[i], writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.triggerEvent != null && Object.hasOwnProperty.call(message, "triggerEvent")) + writer.uint32(/* id 14, wireType 2 =*/114).string(message.triggerEvent); + if (message.match != null && Object.hasOwnProperty.call(message, "match")) + $root.google.cloud.dialogflow.cx.v3.Match.encode(message.match, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.sentimentAnalysisResult != null && Object.hasOwnProperty.call(message, "sentimentAnalysisResult")) + $root.google.cloud.dialogflow.cx.v3.SentimentAnalysisResult.encode(message.sentimentAnalysisResult, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + if (message.advancedSettings != null && Object.hasOwnProperty.call(message, "advancedSettings")) + $root.google.cloud.dialogflow.cx.v3.AdvancedSettings.encode(message.advancedSettings, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.dtmf != null && Object.hasOwnProperty.call(message, "dtmf")) + $root.google.cloud.dialogflow.cx.v3.DtmfInput.encode(message.dtmf, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + if (message.currentFlow != null && Object.hasOwnProperty.call(message, "currentFlow")) + $root.google.cloud.dialogflow.cx.v3.Flow.encode(message.currentFlow, writer.uint32(/* id 31, wireType 2 =*/250).fork()).ldelim(); + if (message.allowAnswerFeedback != null && Object.hasOwnProperty.call(message, "allowAnswerFeedback")) + writer.uint32(/* id 32, wireType 0 =*/256).bool(message.allowAnswerFeedback); + if (message.dataStoreConnectionSignals != null && Object.hasOwnProperty.call(message, "dataStoreConnectionSignals")) + $root.google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.encode(message.dataStoreConnectionSignals, writer.uint32(/* id 35, wireType 2 =*/282).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListSessionEntityTypesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest.verify|verify} messages. + * Encodes the specified QueryResult message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.QueryResult.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest + * @memberof google.cloud.dialogflow.cx.v3.QueryResult * @static - * @param {google.cloud.dialogflow.cx.v3.IListSessionEntityTypesRequest} message ListSessionEntityTypesRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IQueryResult} message QueryResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListSessionEntityTypesRequest.encodeDelimited = function encodeDelimited(message, writer) { + QueryResult.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListSessionEntityTypesRequest message from the specified reader or buffer. + * Decodes a QueryResult message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest + * @memberof google.cloud.dialogflow.cx.v3.QueryResult * @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.ListSessionEntityTypesRequest} ListSessionEntityTypesRequest + * @returns {google.cloud.dialogflow.cx.v3.QueryResult} QueryResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListSessionEntityTypesRequest.decode = function decode(reader, length, error) { + QueryResult.decode = function decode(reader, length, error) { 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.ListSessionEntityTypesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.QueryResult(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + message.text = reader.string(); + break; + } + case 11: { + message.triggerIntent = reader.string(); + break; + } + case 12: { + message.transcript = reader.string(); + break; + } + case 14: { + message.triggerEvent = reader.string(); + break; + } + case 23: { + message.dtmf = $root.google.cloud.dialogflow.cx.v3.DtmfInput.decode(reader, reader.uint32()); break; } case 2: { - message.pageSize = reader.int32(); + message.languageCode = reader.string(); break; } case 3: { - message.pageToken = reader.string(); + message.parameters = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + } + case 4: { + if (!(message.responseMessages && message.responseMessages.length)) + message.responseMessages = []; + message.responseMessages.push($root.google.cloud.dialogflow.cx.v3.ResponseMessage.decode(reader, reader.uint32())); + break; + } + case 13: { + if (!(message.webhookStatuses && message.webhookStatuses.length)) + message.webhookStatuses = []; + message.webhookStatuses.push($root.google.rpc.Status.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.webhookPayloads && message.webhookPayloads.length)) + message.webhookPayloads = []; + message.webhookPayloads.push($root.google.protobuf.Struct.decode(reader, reader.uint32())); + break; + } + case 7: { + message.currentPage = $root.google.cloud.dialogflow.cx.v3.Page.decode(reader, reader.uint32()); + break; + } + case 31: { + message.currentFlow = $root.google.cloud.dialogflow.cx.v3.Flow.decode(reader, reader.uint32()); + break; + } + case 8: { + message.intent = $root.google.cloud.dialogflow.cx.v3.Intent.decode(reader, reader.uint32()); + break; + } + case 9: { + message.intentDetectionConfidence = reader.float(); + break; + } + case 15: { + message.match = $root.google.cloud.dialogflow.cx.v3.Match.decode(reader, reader.uint32()); + break; + } + case 10: { + message.diagnosticInfo = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + } + case 17: { + message.sentimentAnalysisResult = $root.google.cloud.dialogflow.cx.v3.SentimentAnalysisResult.decode(reader, reader.uint32()); + break; + } + case 21: { + message.advancedSettings = $root.google.cloud.dialogflow.cx.v3.AdvancedSettings.decode(reader, reader.uint32()); + break; + } + case 32: { + message.allowAnswerFeedback = reader.bool(); + break; + } + case 35: { + message.dataStoreConnectionSignals = $root.google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.decode(reader, reader.uint32()); break; } default: @@ -69614,141 +69178,408 @@ }; /** - * Decodes a ListSessionEntityTypesRequest message from the specified reader or buffer, length delimited. + * Decodes a QueryResult message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest + * @memberof google.cloud.dialogflow.cx.v3.QueryResult * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest} ListSessionEntityTypesRequest + * @returns {google.cloud.dialogflow.cx.v3.QueryResult} QueryResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListSessionEntityTypesRequest.decodeDelimited = function decodeDelimited(reader) { + QueryResult.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListSessionEntityTypesRequest message. + * Verifies a QueryResult message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest + * @memberof google.cloud.dialogflow.cx.v3.QueryResult * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListSessionEntityTypesRequest.verify = function verify(message) { + QueryResult.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; + var properties = {}; + if (message.text != null && message.hasOwnProperty("text")) { + properties.query = 1; + if (!$util.isString(message.text)) + return "text: string expected"; + } + if (message.triggerIntent != null && message.hasOwnProperty("triggerIntent")) { + if (properties.query === 1) + return "query: multiple values"; + properties.query = 1; + if (!$util.isString(message.triggerIntent)) + return "triggerIntent: string expected"; + } + if (message.transcript != null && message.hasOwnProperty("transcript")) { + if (properties.query === 1) + return "query: multiple values"; + properties.query = 1; + if (!$util.isString(message.transcript)) + return "transcript: string expected"; + } + if (message.triggerEvent != null && message.hasOwnProperty("triggerEvent")) { + if (properties.query === 1) + return "query: multiple values"; + properties.query = 1; + if (!$util.isString(message.triggerEvent)) + return "triggerEvent: string expected"; + } + if (message.dtmf != null && message.hasOwnProperty("dtmf")) { + if (properties.query === 1) + return "query: multiple values"; + properties.query = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3.DtmfInput.verify(message.dtmf); + if (error) + return "dtmf." + error; + } + } + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; + if (message.parameters != null && message.hasOwnProperty("parameters")) { + var error = $root.google.protobuf.Struct.verify(message.parameters); + if (error) + return "parameters." + error; + } + if (message.responseMessages != null && message.hasOwnProperty("responseMessages")) { + if (!Array.isArray(message.responseMessages)) + return "responseMessages: array expected"; + for (var i = 0; i < message.responseMessages.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.verify(message.responseMessages[i]); + if (error) + return "responseMessages." + error; + } + } + if (message.webhookStatuses != null && message.hasOwnProperty("webhookStatuses")) { + if (!Array.isArray(message.webhookStatuses)) + return "webhookStatuses: array expected"; + for (var i = 0; i < message.webhookStatuses.length; ++i) { + var error = $root.google.rpc.Status.verify(message.webhookStatuses[i]); + if (error) + return "webhookStatuses." + error; + } + } + if (message.webhookPayloads != null && message.hasOwnProperty("webhookPayloads")) { + if (!Array.isArray(message.webhookPayloads)) + return "webhookPayloads: array expected"; + for (var i = 0; i < message.webhookPayloads.length; ++i) { + var error = $root.google.protobuf.Struct.verify(message.webhookPayloads[i]); + if (error) + return "webhookPayloads." + error; + } + } + if (message.currentPage != null && message.hasOwnProperty("currentPage")) { + var error = $root.google.cloud.dialogflow.cx.v3.Page.verify(message.currentPage); + if (error) + return "currentPage." + error; + } + if (message.currentFlow != null && message.hasOwnProperty("currentFlow")) { + var error = $root.google.cloud.dialogflow.cx.v3.Flow.verify(message.currentFlow); + if (error) + return "currentFlow." + error; + } + if (message.intent != null && message.hasOwnProperty("intent")) { + var error = $root.google.cloud.dialogflow.cx.v3.Intent.verify(message.intent); + if (error) + return "intent." + error; + } + if (message.intentDetectionConfidence != null && message.hasOwnProperty("intentDetectionConfidence")) + if (typeof message.intentDetectionConfidence !== "number") + return "intentDetectionConfidence: number expected"; + if (message.match != null && message.hasOwnProperty("match")) { + var error = $root.google.cloud.dialogflow.cx.v3.Match.verify(message.match); + if (error) + return "match." + error; + } + if (message.diagnosticInfo != null && message.hasOwnProperty("diagnosticInfo")) { + var error = $root.google.protobuf.Struct.verify(message.diagnosticInfo); + if (error) + return "diagnosticInfo." + error; + } + if (message.sentimentAnalysisResult != null && message.hasOwnProperty("sentimentAnalysisResult")) { + var error = $root.google.cloud.dialogflow.cx.v3.SentimentAnalysisResult.verify(message.sentimentAnalysisResult); + if (error) + return "sentimentAnalysisResult." + error; + } + if (message.advancedSettings != null && message.hasOwnProperty("advancedSettings")) { + var error = $root.google.cloud.dialogflow.cx.v3.AdvancedSettings.verify(message.advancedSettings); + if (error) + return "advancedSettings." + error; + } + if (message.allowAnswerFeedback != null && message.hasOwnProperty("allowAnswerFeedback")) + if (typeof message.allowAnswerFeedback !== "boolean") + return "allowAnswerFeedback: boolean expected"; + if (message.dataStoreConnectionSignals != null && message.hasOwnProperty("dataStoreConnectionSignals")) { + var error = $root.google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.verify(message.dataStoreConnectionSignals); + if (error) + return "dataStoreConnectionSignals." + error; + } return null; }; /** - * Creates a ListSessionEntityTypesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a QueryResult message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest + * @memberof google.cloud.dialogflow.cx.v3.QueryResult * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest} ListSessionEntityTypesRequest + * @returns {google.cloud.dialogflow.cx.v3.QueryResult} QueryResult */ - ListSessionEntityTypesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest) + QueryResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.QueryResult) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); + var message = new $root.google.cloud.dialogflow.cx.v3.QueryResult(); + if (object.text != null) + message.text = String(object.text); + if (object.triggerIntent != null) + message.triggerIntent = String(object.triggerIntent); + if (object.transcript != null) + message.transcript = String(object.transcript); + if (object.triggerEvent != null) + message.triggerEvent = String(object.triggerEvent); + if (object.dtmf != null) { + if (typeof object.dtmf !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.QueryResult.dtmf: object expected"); + message.dtmf = $root.google.cloud.dialogflow.cx.v3.DtmfInput.fromObject(object.dtmf); + } + if (object.languageCode != null) + message.languageCode = String(object.languageCode); + if (object.parameters != null) { + if (typeof object.parameters !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.QueryResult.parameters: object expected"); + message.parameters = $root.google.protobuf.Struct.fromObject(object.parameters); + } + if (object.responseMessages) { + if (!Array.isArray(object.responseMessages)) + throw TypeError(".google.cloud.dialogflow.cx.v3.QueryResult.responseMessages: array expected"); + message.responseMessages = []; + for (var i = 0; i < object.responseMessages.length; ++i) { + if (typeof object.responseMessages[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.QueryResult.responseMessages: object expected"); + message.responseMessages[i] = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.fromObject(object.responseMessages[i]); + } + } + if (object.webhookStatuses) { + if (!Array.isArray(object.webhookStatuses)) + throw TypeError(".google.cloud.dialogflow.cx.v3.QueryResult.webhookStatuses: array expected"); + message.webhookStatuses = []; + for (var i = 0; i < object.webhookStatuses.length; ++i) { + if (typeof object.webhookStatuses[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.QueryResult.webhookStatuses: object expected"); + message.webhookStatuses[i] = $root.google.rpc.Status.fromObject(object.webhookStatuses[i]); + } + } + if (object.webhookPayloads) { + if (!Array.isArray(object.webhookPayloads)) + throw TypeError(".google.cloud.dialogflow.cx.v3.QueryResult.webhookPayloads: array expected"); + message.webhookPayloads = []; + for (var i = 0; i < object.webhookPayloads.length; ++i) { + if (typeof object.webhookPayloads[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.QueryResult.webhookPayloads: object expected"); + message.webhookPayloads[i] = $root.google.protobuf.Struct.fromObject(object.webhookPayloads[i]); + } + } + if (object.currentPage != null) { + if (typeof object.currentPage !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.QueryResult.currentPage: object expected"); + message.currentPage = $root.google.cloud.dialogflow.cx.v3.Page.fromObject(object.currentPage); + } + if (object.currentFlow != null) { + if (typeof object.currentFlow !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.QueryResult.currentFlow: object expected"); + message.currentFlow = $root.google.cloud.dialogflow.cx.v3.Flow.fromObject(object.currentFlow); + } + if (object.intent != null) { + if (typeof object.intent !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.QueryResult.intent: object expected"); + message.intent = $root.google.cloud.dialogflow.cx.v3.Intent.fromObject(object.intent); + } + if (object.intentDetectionConfidence != null) + message.intentDetectionConfidence = Number(object.intentDetectionConfidence); + if (object.match != null) { + if (typeof object.match !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.QueryResult.match: object expected"); + message.match = $root.google.cloud.dialogflow.cx.v3.Match.fromObject(object.match); + } + if (object.diagnosticInfo != null) { + if (typeof object.diagnosticInfo !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.QueryResult.diagnosticInfo: object expected"); + message.diagnosticInfo = $root.google.protobuf.Struct.fromObject(object.diagnosticInfo); + } + if (object.sentimentAnalysisResult != null) { + if (typeof object.sentimentAnalysisResult !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.QueryResult.sentimentAnalysisResult: object expected"); + message.sentimentAnalysisResult = $root.google.cloud.dialogflow.cx.v3.SentimentAnalysisResult.fromObject(object.sentimentAnalysisResult); + } + if (object.advancedSettings != null) { + if (typeof object.advancedSettings !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.QueryResult.advancedSettings: object expected"); + message.advancedSettings = $root.google.cloud.dialogflow.cx.v3.AdvancedSettings.fromObject(object.advancedSettings); + } + if (object.allowAnswerFeedback != null) + message.allowAnswerFeedback = Boolean(object.allowAnswerFeedback); + if (object.dataStoreConnectionSignals != null) { + if (typeof object.dataStoreConnectionSignals !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.QueryResult.dataStoreConnectionSignals: object expected"); + message.dataStoreConnectionSignals = $root.google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.fromObject(object.dataStoreConnectionSignals); + } return message; }; /** - * Creates a plain object from a ListSessionEntityTypesRequest message. Also converts values to other types if specified. + * Creates a plain object from a QueryResult message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest + * @memberof google.cloud.dialogflow.cx.v3.QueryResult * @static - * @param {google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest} message ListSessionEntityTypesRequest + * @param {google.cloud.dialogflow.cx.v3.QueryResult} message QueryResult * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListSessionEntityTypesRequest.toObject = function toObject(message, options) { + QueryResult.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) { + object.responseMessages = []; + object.webhookPayloads = []; + object.webhookStatuses = []; + } if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; + object.languageCode = ""; + object.parameters = null; + object.currentPage = null; + object.intent = null; + object.intentDetectionConfidence = 0; + object.diagnosticInfo = null; + object.match = null; + object.sentimentAnalysisResult = null; + object.advancedSettings = null; + object.currentFlow = null; + object.allowAnswerFeedback = false; + object.dataStoreConnectionSignals = null; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; + if (message.text != null && message.hasOwnProperty("text")) { + object.text = message.text; + if (options.oneofs) + object.query = "text"; + } + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; + if (message.parameters != null && message.hasOwnProperty("parameters")) + object.parameters = $root.google.protobuf.Struct.toObject(message.parameters, options); + if (message.responseMessages && message.responseMessages.length) { + object.responseMessages = []; + for (var j = 0; j < message.responseMessages.length; ++j) + object.responseMessages[j] = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.toObject(message.responseMessages[j], options); + } + if (message.webhookPayloads && message.webhookPayloads.length) { + object.webhookPayloads = []; + for (var j = 0; j < message.webhookPayloads.length; ++j) + object.webhookPayloads[j] = $root.google.protobuf.Struct.toObject(message.webhookPayloads[j], options); + } + if (message.currentPage != null && message.hasOwnProperty("currentPage")) + object.currentPage = $root.google.cloud.dialogflow.cx.v3.Page.toObject(message.currentPage, options); + if (message.intent != null && message.hasOwnProperty("intent")) + object.intent = $root.google.cloud.dialogflow.cx.v3.Intent.toObject(message.intent, options); + if (message.intentDetectionConfidence != null && message.hasOwnProperty("intentDetectionConfidence")) + object.intentDetectionConfidence = options.json && !isFinite(message.intentDetectionConfidence) ? String(message.intentDetectionConfidence) : message.intentDetectionConfidence; + if (message.diagnosticInfo != null && message.hasOwnProperty("diagnosticInfo")) + object.diagnosticInfo = $root.google.protobuf.Struct.toObject(message.diagnosticInfo, options); + if (message.triggerIntent != null && message.hasOwnProperty("triggerIntent")) { + object.triggerIntent = message.triggerIntent; + if (options.oneofs) + object.query = "triggerIntent"; + } + if (message.transcript != null && message.hasOwnProperty("transcript")) { + object.transcript = message.transcript; + if (options.oneofs) + object.query = "transcript"; + } + if (message.webhookStatuses && message.webhookStatuses.length) { + object.webhookStatuses = []; + for (var j = 0; j < message.webhookStatuses.length; ++j) + object.webhookStatuses[j] = $root.google.rpc.Status.toObject(message.webhookStatuses[j], options); + } + if (message.triggerEvent != null && message.hasOwnProperty("triggerEvent")) { + object.triggerEvent = message.triggerEvent; + if (options.oneofs) + object.query = "triggerEvent"; + } + if (message.match != null && message.hasOwnProperty("match")) + object.match = $root.google.cloud.dialogflow.cx.v3.Match.toObject(message.match, options); + if (message.sentimentAnalysisResult != null && message.hasOwnProperty("sentimentAnalysisResult")) + object.sentimentAnalysisResult = $root.google.cloud.dialogflow.cx.v3.SentimentAnalysisResult.toObject(message.sentimentAnalysisResult, options); + if (message.advancedSettings != null && message.hasOwnProperty("advancedSettings")) + object.advancedSettings = $root.google.cloud.dialogflow.cx.v3.AdvancedSettings.toObject(message.advancedSettings, options); + if (message.dtmf != null && message.hasOwnProperty("dtmf")) { + object.dtmf = $root.google.cloud.dialogflow.cx.v3.DtmfInput.toObject(message.dtmf, options); + if (options.oneofs) + object.query = "dtmf"; + } + if (message.currentFlow != null && message.hasOwnProperty("currentFlow")) + object.currentFlow = $root.google.cloud.dialogflow.cx.v3.Flow.toObject(message.currentFlow, options); + if (message.allowAnswerFeedback != null && message.hasOwnProperty("allowAnswerFeedback")) + object.allowAnswerFeedback = message.allowAnswerFeedback; + if (message.dataStoreConnectionSignals != null && message.hasOwnProperty("dataStoreConnectionSignals")) + object.dataStoreConnectionSignals = $root.google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.toObject(message.dataStoreConnectionSignals, options); return object; }; /** - * Converts this ListSessionEntityTypesRequest to JSON. + * Converts this QueryResult to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest + * @memberof google.cloud.dialogflow.cx.v3.QueryResult * @instance * @returns {Object.} JSON object */ - ListSessionEntityTypesRequest.prototype.toJSON = function toJSON() { + QueryResult.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListSessionEntityTypesRequest + * Gets the default type url for QueryResult * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest + * @memberof google.cloud.dialogflow.cx.v3.QueryResult * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListSessionEntityTypesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + QueryResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.QueryResult"; }; - return ListSessionEntityTypesRequest; + return QueryResult; })(); - v3.ListSessionEntityTypesResponse = (function() { + v3.TextInput = (function() { /** - * Properties of a ListSessionEntityTypesResponse. + * Properties of a TextInput. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IListSessionEntityTypesResponse - * @property {Array.|null} [sessionEntityTypes] ListSessionEntityTypesResponse sessionEntityTypes - * @property {string|null} [nextPageToken] ListSessionEntityTypesResponse nextPageToken + * @interface ITextInput + * @property {string|null} [text] TextInput text */ /** - * Constructs a new ListSessionEntityTypesResponse. + * Constructs a new TextInput. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a ListSessionEntityTypesResponse. - * @implements IListSessionEntityTypesResponse + * @classdesc Represents a TextInput. + * @implements ITextInput * @constructor - * @param {google.cloud.dialogflow.cx.v3.IListSessionEntityTypesResponse=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.ITextInput=} [properties] Properties to set */ - function ListSessionEntityTypesResponse(properties) { - this.sessionEntityTypes = []; + function TextInput(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -69756,94 +69587,77 @@ } /** - * ListSessionEntityTypesResponse sessionEntityTypes. - * @member {Array.} sessionEntityTypes - * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse - * @instance - */ - ListSessionEntityTypesResponse.prototype.sessionEntityTypes = $util.emptyArray; - - /** - * ListSessionEntityTypesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse + * TextInput text. + * @member {string} text + * @memberof google.cloud.dialogflow.cx.v3.TextInput * @instance */ - ListSessionEntityTypesResponse.prototype.nextPageToken = ""; + TextInput.prototype.text = ""; /** - * Creates a new ListSessionEntityTypesResponse instance using the specified properties. + * Creates a new TextInput instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse + * @memberof google.cloud.dialogflow.cx.v3.TextInput * @static - * @param {google.cloud.dialogflow.cx.v3.IListSessionEntityTypesResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse} ListSessionEntityTypesResponse instance + * @param {google.cloud.dialogflow.cx.v3.ITextInput=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.TextInput} TextInput instance */ - ListSessionEntityTypesResponse.create = function create(properties) { - return new ListSessionEntityTypesResponse(properties); + TextInput.create = function create(properties) { + return new TextInput(properties); }; /** - * Encodes the specified ListSessionEntityTypesResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse.verify|verify} messages. + * Encodes the specified TextInput message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TextInput.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse + * @memberof google.cloud.dialogflow.cx.v3.TextInput * @static - * @param {google.cloud.dialogflow.cx.v3.IListSessionEntityTypesResponse} message ListSessionEntityTypesResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ITextInput} message TextInput message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListSessionEntityTypesResponse.encode = function encode(message, writer) { + TextInput.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.sessionEntityTypes != null && message.sessionEntityTypes.length) - for (var i = 0; i < message.sessionEntityTypes.length; ++i) - $root.google.cloud.dialogflow.cx.v3.SessionEntityType.encode(message.sessionEntityTypes[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.text != null && Object.hasOwnProperty.call(message, "text")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.text); return writer; }; /** - * Encodes the specified ListSessionEntityTypesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse.verify|verify} messages. + * Encodes the specified TextInput message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TextInput.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse + * @memberof google.cloud.dialogflow.cx.v3.TextInput * @static - * @param {google.cloud.dialogflow.cx.v3.IListSessionEntityTypesResponse} message ListSessionEntityTypesResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ITextInput} message TextInput message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListSessionEntityTypesResponse.encodeDelimited = function encodeDelimited(message, writer) { + TextInput.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListSessionEntityTypesResponse message from the specified reader or buffer. + * Decodes a TextInput message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse + * @memberof google.cloud.dialogflow.cx.v3.TextInput * @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.ListSessionEntityTypesResponse} ListSessionEntityTypesResponse + * @returns {google.cloud.dialogflow.cx.v3.TextInput} TextInput * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListSessionEntityTypesResponse.decode = function decode(reader, length, error) { + TextInput.decode = function decode(reader, length, error) { 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.ListSessionEntityTypesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.TextInput(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - if (!(message.sessionEntityTypes && message.sessionEntityTypes.length)) - message.sessionEntityTypes = []; - message.sessionEntityTypes.push($root.google.cloud.dialogflow.cx.v3.SessionEntityType.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); + message.text = reader.string(); break; } default: @@ -69855,148 +69669,122 @@ }; /** - * Decodes a ListSessionEntityTypesResponse message from the specified reader or buffer, length delimited. + * Decodes a TextInput message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse + * @memberof google.cloud.dialogflow.cx.v3.TextInput * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse} ListSessionEntityTypesResponse + * @returns {google.cloud.dialogflow.cx.v3.TextInput} TextInput * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListSessionEntityTypesResponse.decodeDelimited = function decodeDelimited(reader) { + TextInput.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListSessionEntityTypesResponse message. + * Verifies a TextInput message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse + * @memberof google.cloud.dialogflow.cx.v3.TextInput * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListSessionEntityTypesResponse.verify = function verify(message) { + TextInput.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.sessionEntityTypes != null && message.hasOwnProperty("sessionEntityTypes")) { - if (!Array.isArray(message.sessionEntityTypes)) - return "sessionEntityTypes: array expected"; - for (var i = 0; i < message.sessionEntityTypes.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.SessionEntityType.verify(message.sessionEntityTypes[i]); - if (error) - return "sessionEntityTypes." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; + if (message.text != null && message.hasOwnProperty("text")) + if (!$util.isString(message.text)) + return "text: string expected"; return null; }; /** - * Creates a ListSessionEntityTypesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a TextInput message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse + * @memberof google.cloud.dialogflow.cx.v3.TextInput * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse} ListSessionEntityTypesResponse + * @returns {google.cloud.dialogflow.cx.v3.TextInput} TextInput */ - ListSessionEntityTypesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse) + TextInput.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.TextInput) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse(); - if (object.sessionEntityTypes) { - if (!Array.isArray(object.sessionEntityTypes)) - throw TypeError(".google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse.sessionEntityTypes: array expected"); - message.sessionEntityTypes = []; - for (var i = 0; i < object.sessionEntityTypes.length; ++i) { - if (typeof object.sessionEntityTypes[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse.sessionEntityTypes: object expected"); - message.sessionEntityTypes[i] = $root.google.cloud.dialogflow.cx.v3.SessionEntityType.fromObject(object.sessionEntityTypes[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); + var message = new $root.google.cloud.dialogflow.cx.v3.TextInput(); + if (object.text != null) + message.text = String(object.text); return message; }; /** - * Creates a plain object from a ListSessionEntityTypesResponse message. Also converts values to other types if specified. + * Creates a plain object from a TextInput message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse + * @memberof google.cloud.dialogflow.cx.v3.TextInput * @static - * @param {google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse} message ListSessionEntityTypesResponse + * @param {google.cloud.dialogflow.cx.v3.TextInput} message TextInput * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListSessionEntityTypesResponse.toObject = function toObject(message, options) { + TextInput.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.sessionEntityTypes = []; if (options.defaults) - object.nextPageToken = ""; - if (message.sessionEntityTypes && message.sessionEntityTypes.length) { - object.sessionEntityTypes = []; - for (var j = 0; j < message.sessionEntityTypes.length; ++j) - object.sessionEntityTypes[j] = $root.google.cloud.dialogflow.cx.v3.SessionEntityType.toObject(message.sessionEntityTypes[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + object.text = ""; + if (message.text != null && message.hasOwnProperty("text")) + object.text = message.text; return object; }; /** - * Converts this ListSessionEntityTypesResponse to JSON. + * Converts this TextInput to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse + * @memberof google.cloud.dialogflow.cx.v3.TextInput * @instance * @returns {Object.} JSON object */ - ListSessionEntityTypesResponse.prototype.toJSON = function toJSON() { + TextInput.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListSessionEntityTypesResponse + * Gets the default type url for TextInput * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse + * @memberof google.cloud.dialogflow.cx.v3.TextInput * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListSessionEntityTypesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + TextInput.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.TextInput"; }; - return ListSessionEntityTypesResponse; + return TextInput; })(); - v3.GetSessionEntityTypeRequest = (function() { + v3.IntentInput = (function() { /** - * Properties of a GetSessionEntityTypeRequest. + * Properties of an IntentInput. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IGetSessionEntityTypeRequest - * @property {string|null} [name] GetSessionEntityTypeRequest name + * @interface IIntentInput + * @property {string|null} [intent] IntentInput intent */ /** - * Constructs a new GetSessionEntityTypeRequest. + * Constructs a new IntentInput. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a GetSessionEntityTypeRequest. - * @implements IGetSessionEntityTypeRequest + * @classdesc Represents an IntentInput. + * @implements IIntentInput * @constructor - * @param {google.cloud.dialogflow.cx.v3.IGetSessionEntityTypeRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IIntentInput=} [properties] Properties to set */ - function GetSessionEntityTypeRequest(properties) { + function IntentInput(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -70004,77 +69792,77 @@ } /** - * GetSessionEntityTypeRequest name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest + * IntentInput intent. + * @member {string} intent + * @memberof google.cloud.dialogflow.cx.v3.IntentInput * @instance */ - GetSessionEntityTypeRequest.prototype.name = ""; + IntentInput.prototype.intent = ""; /** - * Creates a new GetSessionEntityTypeRequest instance using the specified properties. + * Creates a new IntentInput instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.IntentInput * @static - * @param {google.cloud.dialogflow.cx.v3.IGetSessionEntityTypeRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest} GetSessionEntityTypeRequest instance + * @param {google.cloud.dialogflow.cx.v3.IIntentInput=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.IntentInput} IntentInput instance */ - GetSessionEntityTypeRequest.create = function create(properties) { - return new GetSessionEntityTypeRequest(properties); + IntentInput.create = function create(properties) { + return new IntentInput(properties); }; /** - * Encodes the specified GetSessionEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest.verify|verify} messages. + * Encodes the specified IntentInput message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.IntentInput.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.IntentInput * @static - * @param {google.cloud.dialogflow.cx.v3.IGetSessionEntityTypeRequest} message GetSessionEntityTypeRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IIntentInput} message IntentInput message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetSessionEntityTypeRequest.encode = function encode(message, writer) { + IntentInput.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.intent != null && Object.hasOwnProperty.call(message, "intent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.intent); return writer; }; /** - * Encodes the specified GetSessionEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest.verify|verify} messages. + * Encodes the specified IntentInput message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.IntentInput.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.IntentInput * @static - * @param {google.cloud.dialogflow.cx.v3.IGetSessionEntityTypeRequest} message GetSessionEntityTypeRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IIntentInput} message IntentInput message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetSessionEntityTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { + IntentInput.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetSessionEntityTypeRequest message from the specified reader or buffer. + * Decodes an IntentInput message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.IntentInput * @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.GetSessionEntityTypeRequest} GetSessionEntityTypeRequest + * @returns {google.cloud.dialogflow.cx.v3.IntentInput} IntentInput * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetSessionEntityTypeRequest.decode = function decode(reader, length, error) { + IntentInput.decode = function decode(reader, length, error) { 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.GetSessionEntityTypeRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.IntentInput(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.intent = reader.string(); break; } default: @@ -70086,123 +69874,123 @@ }; /** - * Decodes a GetSessionEntityTypeRequest message from the specified reader or buffer, length delimited. + * Decodes an IntentInput message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.IntentInput * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest} GetSessionEntityTypeRequest + * @returns {google.cloud.dialogflow.cx.v3.IntentInput} IntentInput * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetSessionEntityTypeRequest.decodeDelimited = function decodeDelimited(reader) { + IntentInput.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetSessionEntityTypeRequest message. + * Verifies an IntentInput message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.IntentInput * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetSessionEntityTypeRequest.verify = function verify(message) { + IntentInput.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.intent != null && message.hasOwnProperty("intent")) + if (!$util.isString(message.intent)) + return "intent: string expected"; return null; }; /** - * Creates a GetSessionEntityTypeRequest message from a plain object. Also converts values to their respective internal types. + * Creates an IntentInput message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.IntentInput * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest} GetSessionEntityTypeRequest + * @returns {google.cloud.dialogflow.cx.v3.IntentInput} IntentInput */ - GetSessionEntityTypeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest) + IntentInput.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.IntentInput) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.dialogflow.cx.v3.IntentInput(); + if (object.intent != null) + message.intent = String(object.intent); return message; }; /** - * Creates a plain object from a GetSessionEntityTypeRequest message. Also converts values to other types if specified. + * Creates a plain object from an IntentInput message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.IntentInput * @static - * @param {google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest} message GetSessionEntityTypeRequest + * @param {google.cloud.dialogflow.cx.v3.IntentInput} message IntentInput * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetSessionEntityTypeRequest.toObject = function toObject(message, options) { + IntentInput.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + object.intent = ""; + if (message.intent != null && message.hasOwnProperty("intent")) + object.intent = message.intent; return object; }; /** - * Converts this GetSessionEntityTypeRequest to JSON. + * Converts this IntentInput to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.IntentInput * @instance * @returns {Object.} JSON object */ - GetSessionEntityTypeRequest.prototype.toJSON = function toJSON() { + IntentInput.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetSessionEntityTypeRequest + * Gets the default type url for IntentInput * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.IntentInput * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetSessionEntityTypeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + IntentInput.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.IntentInput"; }; - return GetSessionEntityTypeRequest; + return IntentInput; })(); - v3.CreateSessionEntityTypeRequest = (function() { + v3.AudioInput = (function() { /** - * Properties of a CreateSessionEntityTypeRequest. + * Properties of an AudioInput. * @memberof google.cloud.dialogflow.cx.v3 - * @interface ICreateSessionEntityTypeRequest - * @property {string|null} [parent] CreateSessionEntityTypeRequest parent - * @property {google.cloud.dialogflow.cx.v3.ISessionEntityType|null} [sessionEntityType] CreateSessionEntityTypeRequest sessionEntityType + * @interface IAudioInput + * @property {google.cloud.dialogflow.cx.v3.IInputAudioConfig|null} [config] AudioInput config + * @property {Uint8Array|null} [audio] AudioInput audio */ /** - * Constructs a new CreateSessionEntityTypeRequest. + * Constructs a new AudioInput. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a CreateSessionEntityTypeRequest. - * @implements ICreateSessionEntityTypeRequest + * @classdesc Represents an AudioInput. + * @implements IAudioInput * @constructor - * @param {google.cloud.dialogflow.cx.v3.ICreateSessionEntityTypeRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IAudioInput=} [properties] Properties to set */ - function CreateSessionEntityTypeRequest(properties) { + function AudioInput(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -70210,91 +69998,91 @@ } /** - * CreateSessionEntityTypeRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest + * AudioInput config. + * @member {google.cloud.dialogflow.cx.v3.IInputAudioConfig|null|undefined} config + * @memberof google.cloud.dialogflow.cx.v3.AudioInput * @instance */ - CreateSessionEntityTypeRequest.prototype.parent = ""; + AudioInput.prototype.config = null; /** - * CreateSessionEntityTypeRequest sessionEntityType. - * @member {google.cloud.dialogflow.cx.v3.ISessionEntityType|null|undefined} sessionEntityType - * @memberof google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest + * AudioInput audio. + * @member {Uint8Array} audio + * @memberof google.cloud.dialogflow.cx.v3.AudioInput * @instance */ - CreateSessionEntityTypeRequest.prototype.sessionEntityType = null; + AudioInput.prototype.audio = $util.newBuffer([]); /** - * Creates a new CreateSessionEntityTypeRequest instance using the specified properties. + * Creates a new AudioInput instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.AudioInput * @static - * @param {google.cloud.dialogflow.cx.v3.ICreateSessionEntityTypeRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest} CreateSessionEntityTypeRequest instance + * @param {google.cloud.dialogflow.cx.v3.IAudioInput=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.AudioInput} AudioInput instance */ - CreateSessionEntityTypeRequest.create = function create(properties) { - return new CreateSessionEntityTypeRequest(properties); + AudioInput.create = function create(properties) { + return new AudioInput(properties); }; /** - * Encodes the specified CreateSessionEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest.verify|verify} messages. + * Encodes the specified AudioInput message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.AudioInput.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.AudioInput * @static - * @param {google.cloud.dialogflow.cx.v3.ICreateSessionEntityTypeRequest} message CreateSessionEntityTypeRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IAudioInput} message AudioInput message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateSessionEntityTypeRequest.encode = function encode(message, writer) { + AudioInput.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.sessionEntityType != null && Object.hasOwnProperty.call(message, "sessionEntityType")) - $root.google.cloud.dialogflow.cx.v3.SessionEntityType.encode(message.sessionEntityType, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.config != null && Object.hasOwnProperty.call(message, "config")) + $root.google.cloud.dialogflow.cx.v3.InputAudioConfig.encode(message.config, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.audio != null && Object.hasOwnProperty.call(message, "audio")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.audio); return writer; }; /** - * Encodes the specified CreateSessionEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest.verify|verify} messages. + * Encodes the specified AudioInput message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.AudioInput.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.AudioInput * @static - * @param {google.cloud.dialogflow.cx.v3.ICreateSessionEntityTypeRequest} message CreateSessionEntityTypeRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IAudioInput} message AudioInput message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateSessionEntityTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { + AudioInput.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateSessionEntityTypeRequest message from the specified reader or buffer. + * Decodes an AudioInput message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.AudioInput * @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.CreateSessionEntityTypeRequest} CreateSessionEntityTypeRequest + * @returns {google.cloud.dialogflow.cx.v3.AudioInput} AudioInput * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateSessionEntityTypeRequest.decode = function decode(reader, length, error) { + AudioInput.decode = function decode(reader, length, error) { 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.CreateSessionEntityTypeRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.AudioInput(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + message.config = $root.google.cloud.dialogflow.cx.v3.InputAudioConfig.decode(reader, reader.uint32()); break; } case 2: { - message.sessionEntityType = $root.google.cloud.dialogflow.cx.v3.SessionEntityType.decode(reader, reader.uint32()); + message.audio = reader.bytes(); break; } default: @@ -70306,137 +70094,145 @@ }; /** - * Decodes a CreateSessionEntityTypeRequest message from the specified reader or buffer, length delimited. + * Decodes an AudioInput message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.AudioInput * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest} CreateSessionEntityTypeRequest + * @returns {google.cloud.dialogflow.cx.v3.AudioInput} AudioInput * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateSessionEntityTypeRequest.decodeDelimited = function decodeDelimited(reader) { + AudioInput.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateSessionEntityTypeRequest message. + * Verifies an AudioInput message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.AudioInput * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateSessionEntityTypeRequest.verify = function verify(message) { + AudioInput.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.sessionEntityType != null && message.hasOwnProperty("sessionEntityType")) { - var error = $root.google.cloud.dialogflow.cx.v3.SessionEntityType.verify(message.sessionEntityType); + if (message.config != null && message.hasOwnProperty("config")) { + var error = $root.google.cloud.dialogflow.cx.v3.InputAudioConfig.verify(message.config); if (error) - return "sessionEntityType." + error; + return "config." + error; } + if (message.audio != null && message.hasOwnProperty("audio")) + if (!(message.audio && typeof message.audio.length === "number" || $util.isString(message.audio))) + return "audio: buffer expected"; return null; }; /** - * Creates a CreateSessionEntityTypeRequest message from a plain object. Also converts values to their respective internal types. + * Creates an AudioInput message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.AudioInput * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest} CreateSessionEntityTypeRequest + * @returns {google.cloud.dialogflow.cx.v3.AudioInput} AudioInput */ - CreateSessionEntityTypeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest) + AudioInput.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.AudioInput) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.sessionEntityType != null) { - if (typeof object.sessionEntityType !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest.sessionEntityType: object expected"); - message.sessionEntityType = $root.google.cloud.dialogflow.cx.v3.SessionEntityType.fromObject(object.sessionEntityType); + var message = new $root.google.cloud.dialogflow.cx.v3.AudioInput(); + if (object.config != null) { + if (typeof object.config !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.AudioInput.config: object expected"); + message.config = $root.google.cloud.dialogflow.cx.v3.InputAudioConfig.fromObject(object.config); } + if (object.audio != null) + if (typeof object.audio === "string") + $util.base64.decode(object.audio, message.audio = $util.newBuffer($util.base64.length(object.audio)), 0); + else if (object.audio.length >= 0) + message.audio = object.audio; return message; }; /** - * Creates a plain object from a CreateSessionEntityTypeRequest message. Also converts values to other types if specified. + * Creates a plain object from an AudioInput message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.AudioInput * @static - * @param {google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest} message CreateSessionEntityTypeRequest + * @param {google.cloud.dialogflow.cx.v3.AudioInput} message AudioInput * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateSessionEntityTypeRequest.toObject = function toObject(message, options) { + AudioInput.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.sessionEntityType = null; + object.config = null; + if (options.bytes === String) + object.audio = ""; + else { + object.audio = []; + if (options.bytes !== Array) + object.audio = $util.newBuffer(object.audio); + } } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.sessionEntityType != null && message.hasOwnProperty("sessionEntityType")) - object.sessionEntityType = $root.google.cloud.dialogflow.cx.v3.SessionEntityType.toObject(message.sessionEntityType, options); + if (message.config != null && message.hasOwnProperty("config")) + object.config = $root.google.cloud.dialogflow.cx.v3.InputAudioConfig.toObject(message.config, options); + if (message.audio != null && message.hasOwnProperty("audio")) + object.audio = options.bytes === String ? $util.base64.encode(message.audio, 0, message.audio.length) : options.bytes === Array ? Array.prototype.slice.call(message.audio) : message.audio; return object; }; /** - * Converts this CreateSessionEntityTypeRequest to JSON. + * Converts this AudioInput to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.AudioInput * @instance * @returns {Object.} JSON object */ - CreateSessionEntityTypeRequest.prototype.toJSON = function toJSON() { + AudioInput.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateSessionEntityTypeRequest + * Gets the default type url for AudioInput * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.AudioInput * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateSessionEntityTypeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AudioInput.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.AudioInput"; }; - return CreateSessionEntityTypeRequest; + return AudioInput; })(); - v3.UpdateSessionEntityTypeRequest = (function() { + v3.EventInput = (function() { /** - * Properties of an UpdateSessionEntityTypeRequest. + * Properties of an EventInput. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IUpdateSessionEntityTypeRequest - * @property {google.cloud.dialogflow.cx.v3.ISessionEntityType|null} [sessionEntityType] UpdateSessionEntityTypeRequest sessionEntityType - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateSessionEntityTypeRequest updateMask + * @interface IEventInput + * @property {string|null} [event] EventInput event */ /** - * Constructs a new UpdateSessionEntityTypeRequest. + * Constructs a new EventInput. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents an UpdateSessionEntityTypeRequest. - * @implements IUpdateSessionEntityTypeRequest + * @classdesc Represents an EventInput. + * @implements IEventInput * @constructor - * @param {google.cloud.dialogflow.cx.v3.IUpdateSessionEntityTypeRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IEventInput=} [properties] Properties to set */ - function UpdateSessionEntityTypeRequest(properties) { + function EventInput(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -70444,91 +70240,77 @@ } /** - * UpdateSessionEntityTypeRequest sessionEntityType. - * @member {google.cloud.dialogflow.cx.v3.ISessionEntityType|null|undefined} sessionEntityType - * @memberof google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest - * @instance - */ - UpdateSessionEntityTypeRequest.prototype.sessionEntityType = null; - - /** - * UpdateSessionEntityTypeRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest + * EventInput event. + * @member {string} event + * @memberof google.cloud.dialogflow.cx.v3.EventInput * @instance */ - UpdateSessionEntityTypeRequest.prototype.updateMask = null; + EventInput.prototype.event = ""; /** - * Creates a new UpdateSessionEntityTypeRequest instance using the specified properties. + * Creates a new EventInput instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.EventInput * @static - * @param {google.cloud.dialogflow.cx.v3.IUpdateSessionEntityTypeRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest} UpdateSessionEntityTypeRequest instance + * @param {google.cloud.dialogflow.cx.v3.IEventInput=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.EventInput} EventInput instance */ - UpdateSessionEntityTypeRequest.create = function create(properties) { - return new UpdateSessionEntityTypeRequest(properties); + EventInput.create = function create(properties) { + return new EventInput(properties); }; /** - * Encodes the specified UpdateSessionEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest.verify|verify} messages. + * Encodes the specified EventInput message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.EventInput.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.EventInput * @static - * @param {google.cloud.dialogflow.cx.v3.IUpdateSessionEntityTypeRequest} message UpdateSessionEntityTypeRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IEventInput} message EventInput message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateSessionEntityTypeRequest.encode = function encode(message, writer) { + EventInput.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.sessionEntityType != null && Object.hasOwnProperty.call(message, "sessionEntityType")) - $root.google.cloud.dialogflow.cx.v3.SessionEntityType.encode(message.sessionEntityType, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.event != null && Object.hasOwnProperty.call(message, "event")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.event); return writer; }; /** - * Encodes the specified UpdateSessionEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest.verify|verify} messages. + * Encodes the specified EventInput message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.EventInput.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.EventInput * @static - * @param {google.cloud.dialogflow.cx.v3.IUpdateSessionEntityTypeRequest} message UpdateSessionEntityTypeRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IEventInput} message EventInput message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateSessionEntityTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { + EventInput.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateSessionEntityTypeRequest message from the specified reader or buffer. + * Decodes an EventInput message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.EventInput * @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.UpdateSessionEntityTypeRequest} UpdateSessionEntityTypeRequest + * @returns {google.cloud.dialogflow.cx.v3.EventInput} EventInput * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateSessionEntityTypeRequest.decode = function decode(reader, length, error) { + EventInput.decode = function decode(reader, length, error) { 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.UpdateSessionEntityTypeRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.EventInput(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.sessionEntityType = $root.google.cloud.dialogflow.cx.v3.SessionEntityType.decode(reader, reader.uint32()); - break; - } - case 2: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.event = reader.string(); break; } default: @@ -70540,141 +70322,123 @@ }; /** - * Decodes an UpdateSessionEntityTypeRequest message from the specified reader or buffer, length delimited. + * Decodes an EventInput message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.EventInput * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest} UpdateSessionEntityTypeRequest + * @returns {google.cloud.dialogflow.cx.v3.EventInput} EventInput * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateSessionEntityTypeRequest.decodeDelimited = function decodeDelimited(reader) { + EventInput.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateSessionEntityTypeRequest message. + * Verifies an EventInput message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.EventInput * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateSessionEntityTypeRequest.verify = function verify(message) { + EventInput.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.sessionEntityType != null && message.hasOwnProperty("sessionEntityType")) { - var error = $root.google.cloud.dialogflow.cx.v3.SessionEntityType.verify(message.sessionEntityType); - if (error) - return "sessionEntityType." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } + if (message.event != null && message.hasOwnProperty("event")) + if (!$util.isString(message.event)) + return "event: string expected"; return null; }; /** - * Creates an UpdateSessionEntityTypeRequest message from a plain object. Also converts values to their respective internal types. + * Creates an EventInput message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.EventInput * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest} UpdateSessionEntityTypeRequest + * @returns {google.cloud.dialogflow.cx.v3.EventInput} EventInput */ - UpdateSessionEntityTypeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest) + EventInput.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.EventInput) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest(); - if (object.sessionEntityType != null) { - if (typeof object.sessionEntityType !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest.sessionEntityType: object expected"); - message.sessionEntityType = $root.google.cloud.dialogflow.cx.v3.SessionEntityType.fromObject(object.sessionEntityType); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } + var message = new $root.google.cloud.dialogflow.cx.v3.EventInput(); + if (object.event != null) + message.event = String(object.event); return message; }; /** - * Creates a plain object from an UpdateSessionEntityTypeRequest message. Also converts values to other types if specified. + * Creates a plain object from an EventInput message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.EventInput * @static - * @param {google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest} message UpdateSessionEntityTypeRequest + * @param {google.cloud.dialogflow.cx.v3.EventInput} message EventInput * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateSessionEntityTypeRequest.toObject = function toObject(message, options) { + EventInput.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.sessionEntityType = null; - object.updateMask = null; - } - if (message.sessionEntityType != null && message.hasOwnProperty("sessionEntityType")) - object.sessionEntityType = $root.google.cloud.dialogflow.cx.v3.SessionEntityType.toObject(message.sessionEntityType, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (options.defaults) + object.event = ""; + if (message.event != null && message.hasOwnProperty("event")) + object.event = message.event; return object; }; /** - * Converts this UpdateSessionEntityTypeRequest to JSON. + * Converts this EventInput to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.EventInput * @instance * @returns {Object.} JSON object */ - UpdateSessionEntityTypeRequest.prototype.toJSON = function toJSON() { + EventInput.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UpdateSessionEntityTypeRequest + * Gets the default type url for EventInput * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.EventInput * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UpdateSessionEntityTypeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + EventInput.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.EventInput"; }; - return UpdateSessionEntityTypeRequest; + return EventInput; })(); - v3.DeleteSessionEntityTypeRequest = (function() { + v3.DtmfInput = (function() { /** - * Properties of a DeleteSessionEntityTypeRequest. + * Properties of a DtmfInput. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IDeleteSessionEntityTypeRequest - * @property {string|null} [name] DeleteSessionEntityTypeRequest name + * @interface IDtmfInput + * @property {string|null} [digits] DtmfInput digits + * @property {string|null} [finishDigit] DtmfInput finishDigit */ /** - * Constructs a new DeleteSessionEntityTypeRequest. + * Constructs a new DtmfInput. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a DeleteSessionEntityTypeRequest. - * @implements IDeleteSessionEntityTypeRequest + * @classdesc Represents a DtmfInput. + * @implements IDtmfInput * @constructor - * @param {google.cloud.dialogflow.cx.v3.IDeleteSessionEntityTypeRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IDtmfInput=} [properties] Properties to set */ - function DeleteSessionEntityTypeRequest(properties) { + function DtmfInput(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -70682,77 +70446,91 @@ } /** - * DeleteSessionEntityTypeRequest name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest + * DtmfInput digits. + * @member {string} digits + * @memberof google.cloud.dialogflow.cx.v3.DtmfInput * @instance */ - DeleteSessionEntityTypeRequest.prototype.name = ""; + DtmfInput.prototype.digits = ""; /** - * Creates a new DeleteSessionEntityTypeRequest instance using the specified properties. + * DtmfInput finishDigit. + * @member {string} finishDigit + * @memberof google.cloud.dialogflow.cx.v3.DtmfInput + * @instance + */ + DtmfInput.prototype.finishDigit = ""; + + /** + * Creates a new DtmfInput instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.DtmfInput * @static - * @param {google.cloud.dialogflow.cx.v3.IDeleteSessionEntityTypeRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest} DeleteSessionEntityTypeRequest instance + * @param {google.cloud.dialogflow.cx.v3.IDtmfInput=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.DtmfInput} DtmfInput instance */ - DeleteSessionEntityTypeRequest.create = function create(properties) { - return new DeleteSessionEntityTypeRequest(properties); + DtmfInput.create = function create(properties) { + return new DtmfInput(properties); }; /** - * Encodes the specified DeleteSessionEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest.verify|verify} messages. + * Encodes the specified DtmfInput message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DtmfInput.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.DtmfInput * @static - * @param {google.cloud.dialogflow.cx.v3.IDeleteSessionEntityTypeRequest} message DeleteSessionEntityTypeRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IDtmfInput} message DtmfInput message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteSessionEntityTypeRequest.encode = function encode(message, writer) { + DtmfInput.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.digits != null && Object.hasOwnProperty.call(message, "digits")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.digits); + if (message.finishDigit != null && Object.hasOwnProperty.call(message, "finishDigit")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.finishDigit); return writer; }; /** - * Encodes the specified DeleteSessionEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest.verify|verify} messages. + * Encodes the specified DtmfInput message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DtmfInput.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.DtmfInput * @static - * @param {google.cloud.dialogflow.cx.v3.IDeleteSessionEntityTypeRequest} message DeleteSessionEntityTypeRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IDtmfInput} message DtmfInput message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteSessionEntityTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { + DtmfInput.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteSessionEntityTypeRequest message from the specified reader or buffer. + * Decodes a DtmfInput message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.DtmfInput * @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.DeleteSessionEntityTypeRequest} DeleteSessionEntityTypeRequest + * @returns {google.cloud.dialogflow.cx.v3.DtmfInput} DtmfInput * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteSessionEntityTypeRequest.decode = function decode(reader, length, error) { + DtmfInput.decode = function decode(reader, length, error) { 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.DeleteSessionEntityTypeRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.DtmfInput(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.digits = reader.string(); + break; + } + case 2: { + message.finishDigit = reader.string(); break; } default: @@ -70764,434 +70542,284 @@ }; /** - * Decodes a DeleteSessionEntityTypeRequest message from the specified reader or buffer, length delimited. + * Decodes a DtmfInput message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.DtmfInput * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest} DeleteSessionEntityTypeRequest + * @returns {google.cloud.dialogflow.cx.v3.DtmfInput} DtmfInput * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteSessionEntityTypeRequest.decodeDelimited = function decodeDelimited(reader) { + DtmfInput.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteSessionEntityTypeRequest message. + * Verifies a DtmfInput message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.DtmfInput * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteSessionEntityTypeRequest.verify = function verify(message) { + DtmfInput.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.digits != null && message.hasOwnProperty("digits")) + if (!$util.isString(message.digits)) + return "digits: string expected"; + if (message.finishDigit != null && message.hasOwnProperty("finishDigit")) + if (!$util.isString(message.finishDigit)) + return "finishDigit: string expected"; return null; }; /** - * Creates a DeleteSessionEntityTypeRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DtmfInput message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.DtmfInput * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest} DeleteSessionEntityTypeRequest + * @returns {google.cloud.dialogflow.cx.v3.DtmfInput} DtmfInput */ - DeleteSessionEntityTypeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest) + DtmfInput.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.DtmfInput) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.dialogflow.cx.v3.DtmfInput(); + if (object.digits != null) + message.digits = String(object.digits); + if (object.finishDigit != null) + message.finishDigit = String(object.finishDigit); return message; }; /** - * Creates a plain object from a DeleteSessionEntityTypeRequest message. Also converts values to other types if specified. + * Creates a plain object from a DtmfInput message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.DtmfInput * @static - * @param {google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest} message DeleteSessionEntityTypeRequest + * @param {google.cloud.dialogflow.cx.v3.DtmfInput} message DtmfInput * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteSessionEntityTypeRequest.toObject = function toObject(message, options) { + DtmfInput.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (options.defaults) { + object.digits = ""; + object.finishDigit = ""; + } + if (message.digits != null && message.hasOwnProperty("digits")) + object.digits = message.digits; + if (message.finishDigit != null && message.hasOwnProperty("finishDigit")) + object.finishDigit = message.finishDigit; return object; }; /** - * Converts this DeleteSessionEntityTypeRequest to JSON. + * Converts this DtmfInput to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.DtmfInput * @instance * @returns {Object.} JSON object */ - DeleteSessionEntityTypeRequest.prototype.toJSON = function toJSON() { + DtmfInput.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeleteSessionEntityTypeRequest + * Gets the default type url for DtmfInput * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3.DtmfInput * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeleteSessionEntityTypeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DtmfInput.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.DtmfInput"; }; - return DeleteSessionEntityTypeRequest; + return DtmfInput; })(); - v3.TransitionRouteGroups = (function() { + v3.Match = (function() { /** - * Constructs a new TransitionRouteGroups service. + * Properties of a Match. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a TransitionRouteGroups - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function TransitionRouteGroups(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (TransitionRouteGroups.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = TransitionRouteGroups; - - /** - * Creates new TransitionRouteGroups service using the specified rpc implementation. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroups - * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {TransitionRouteGroups} RPC service. Useful where requests and/or responses are streamed. - */ - TransitionRouteGroups.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.TransitionRouteGroups|listTransitionRouteGroups}. - * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroups - * @typedef ListTransitionRouteGroupsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse} [response] ListTransitionRouteGroupsResponse - */ - - /** - * Calls ListTransitionRouteGroups. - * @function listTransitionRouteGroups - * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroups - * @instance - * @param {google.cloud.dialogflow.cx.v3.IListTransitionRouteGroupsRequest} request ListTransitionRouteGroupsRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.TransitionRouteGroups.ListTransitionRouteGroupsCallback} callback Node-style callback called with the error, if any, and ListTransitionRouteGroupsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(TransitionRouteGroups.prototype.listTransitionRouteGroups = function listTransitionRouteGroups(request, callback) { - return this.rpcCall(listTransitionRouteGroups, $root.google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest, $root.google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse, request, callback); - }, "name", { value: "ListTransitionRouteGroups" }); - - /** - * Calls ListTransitionRouteGroups. - * @function listTransitionRouteGroups - * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroups - * @instance - * @param {google.cloud.dialogflow.cx.v3.IListTransitionRouteGroupsRequest} request ListTransitionRouteGroupsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.TransitionRouteGroups|getTransitionRouteGroup}. - * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroups - * @typedef GetTransitionRouteGroupCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.TransitionRouteGroup} [response] TransitionRouteGroup - */ - - /** - * Calls GetTransitionRouteGroup. - * @function getTransitionRouteGroup - * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroups - * @instance - * @param {google.cloud.dialogflow.cx.v3.IGetTransitionRouteGroupRequest} request GetTransitionRouteGroupRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.TransitionRouteGroups.GetTransitionRouteGroupCallback} callback Node-style callback called with the error, if any, and TransitionRouteGroup - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(TransitionRouteGroups.prototype.getTransitionRouteGroup = function getTransitionRouteGroup(request, callback) { - return this.rpcCall(getTransitionRouteGroup, $root.google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest, $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup, request, callback); - }, "name", { value: "GetTransitionRouteGroup" }); - - /** - * Calls GetTransitionRouteGroup. - * @function getTransitionRouteGroup - * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroups - * @instance - * @param {google.cloud.dialogflow.cx.v3.IGetTransitionRouteGroupRequest} request GetTransitionRouteGroupRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.TransitionRouteGroups|createTransitionRouteGroup}. - * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroups - * @typedef CreateTransitionRouteGroupCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.TransitionRouteGroup} [response] TransitionRouteGroup - */ - - /** - * Calls CreateTransitionRouteGroup. - * @function createTransitionRouteGroup - * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroups - * @instance - * @param {google.cloud.dialogflow.cx.v3.ICreateTransitionRouteGroupRequest} request CreateTransitionRouteGroupRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.TransitionRouteGroups.CreateTransitionRouteGroupCallback} callback Node-style callback called with the error, if any, and TransitionRouteGroup - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(TransitionRouteGroups.prototype.createTransitionRouteGroup = function createTransitionRouteGroup(request, callback) { - return this.rpcCall(createTransitionRouteGroup, $root.google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest, $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup, request, callback); - }, "name", { value: "CreateTransitionRouteGroup" }); - - /** - * Calls CreateTransitionRouteGroup. - * @function createTransitionRouteGroup - * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroups - * @instance - * @param {google.cloud.dialogflow.cx.v3.ICreateTransitionRouteGroupRequest} request CreateTransitionRouteGroupRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.TransitionRouteGroups|updateTransitionRouteGroup}. - * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroups - * @typedef UpdateTransitionRouteGroupCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.TransitionRouteGroup} [response] TransitionRouteGroup + * @interface IMatch + * @property {google.cloud.dialogflow.cx.v3.IIntent|null} [intent] Match intent + * @property {string|null} [event] Match event + * @property {google.protobuf.IStruct|null} [parameters] Match parameters + * @property {string|null} [resolvedInput] Match resolvedInput + * @property {google.cloud.dialogflow.cx.v3.Match.MatchType|null} [matchType] Match matchType + * @property {number|null} [confidence] Match confidence */ /** - * Calls UpdateTransitionRouteGroup. - * @function updateTransitionRouteGroup - * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroups - * @instance - * @param {google.cloud.dialogflow.cx.v3.IUpdateTransitionRouteGroupRequest} request UpdateTransitionRouteGroupRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.TransitionRouteGroups.UpdateTransitionRouteGroupCallback} callback Node-style callback called with the error, if any, and TransitionRouteGroup - * @returns {undefined} - * @variation 1 + * Constructs a new Match. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a Match. + * @implements IMatch + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IMatch=} [properties] Properties to set */ - Object.defineProperty(TransitionRouteGroups.prototype.updateTransitionRouteGroup = function updateTransitionRouteGroup(request, callback) { - return this.rpcCall(updateTransitionRouteGroup, $root.google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest, $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup, request, callback); - }, "name", { value: "UpdateTransitionRouteGroup" }); + function Match(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]]; + } /** - * Calls UpdateTransitionRouteGroup. - * @function updateTransitionRouteGroup - * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroups + * Match intent. + * @member {google.cloud.dialogflow.cx.v3.IIntent|null|undefined} intent + * @memberof google.cloud.dialogflow.cx.v3.Match * @instance - * @param {google.cloud.dialogflow.cx.v3.IUpdateTransitionRouteGroupRequest} request UpdateTransitionRouteGroupRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.TransitionRouteGroups|deleteTransitionRouteGroup}. - * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroups - * @typedef DeleteTransitionRouteGroupCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty */ + Match.prototype.intent = null; /** - * Calls DeleteTransitionRouteGroup. - * @function deleteTransitionRouteGroup - * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroups + * Match event. + * @member {string} event + * @memberof google.cloud.dialogflow.cx.v3.Match * @instance - * @param {google.cloud.dialogflow.cx.v3.IDeleteTransitionRouteGroupRequest} request DeleteTransitionRouteGroupRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.TransitionRouteGroups.DeleteTransitionRouteGroupCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(TransitionRouteGroups.prototype.deleteTransitionRouteGroup = function deleteTransitionRouteGroup(request, callback) { - return this.rpcCall(deleteTransitionRouteGroup, $root.google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteTransitionRouteGroup" }); + Match.prototype.event = ""; /** - * Calls DeleteTransitionRouteGroup. - * @function deleteTransitionRouteGroup - * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroups + * Match parameters. + * @member {google.protobuf.IStruct|null|undefined} parameters + * @memberof google.cloud.dialogflow.cx.v3.Match * @instance - * @param {google.cloud.dialogflow.cx.v3.IDeleteTransitionRouteGroupRequest} request DeleteTransitionRouteGroupRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return TransitionRouteGroups; - })(); - - v3.TransitionRouteGroup = (function() { - - /** - * Properties of a TransitionRouteGroup. - * @memberof google.cloud.dialogflow.cx.v3 - * @interface ITransitionRouteGroup - * @property {string|null} [name] TransitionRouteGroup name - * @property {string|null} [displayName] TransitionRouteGroup displayName - * @property {Array.|null} [transitionRoutes] TransitionRouteGroup transitionRoutes - */ - - /** - * Constructs a new TransitionRouteGroup. - * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a TransitionRouteGroup. - * @implements ITransitionRouteGroup - * @constructor - * @param {google.cloud.dialogflow.cx.v3.ITransitionRouteGroup=} [properties] Properties to set */ - function TransitionRouteGroup(properties) { - this.transitionRoutes = []; - 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]]; - } + Match.prototype.parameters = null; /** - * TransitionRouteGroup name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroup + * Match resolvedInput. + * @member {string} resolvedInput + * @memberof google.cloud.dialogflow.cx.v3.Match * @instance */ - TransitionRouteGroup.prototype.name = ""; + Match.prototype.resolvedInput = ""; /** - * TransitionRouteGroup displayName. - * @member {string} displayName - * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroup + * Match matchType. + * @member {google.cloud.dialogflow.cx.v3.Match.MatchType} matchType + * @memberof google.cloud.dialogflow.cx.v3.Match * @instance */ - TransitionRouteGroup.prototype.displayName = ""; + Match.prototype.matchType = 0; /** - * TransitionRouteGroup transitionRoutes. - * @member {Array.} transitionRoutes - * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroup + * Match confidence. + * @member {number} confidence + * @memberof google.cloud.dialogflow.cx.v3.Match * @instance */ - TransitionRouteGroup.prototype.transitionRoutes = $util.emptyArray; + Match.prototype.confidence = 0; /** - * Creates a new TransitionRouteGroup instance using the specified properties. + * Creates a new Match instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroup + * @memberof google.cloud.dialogflow.cx.v3.Match * @static - * @param {google.cloud.dialogflow.cx.v3.ITransitionRouteGroup=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.TransitionRouteGroup} TransitionRouteGroup instance + * @param {google.cloud.dialogflow.cx.v3.IMatch=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.Match} Match instance */ - TransitionRouteGroup.create = function create(properties) { - return new TransitionRouteGroup(properties); + Match.create = function create(properties) { + return new Match(properties); }; /** - * Encodes the specified TransitionRouteGroup message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TransitionRouteGroup.verify|verify} messages. + * Encodes the specified Match message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Match.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroup + * @memberof google.cloud.dialogflow.cx.v3.Match * @static - * @param {google.cloud.dialogflow.cx.v3.ITransitionRouteGroup} message TransitionRouteGroup message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IMatch} message Match message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TransitionRouteGroup.encode = function encode(message, writer) { + Match.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.transitionRoutes != null && message.transitionRoutes.length) - for (var i = 0; i < message.transitionRoutes.length; ++i) - $root.google.cloud.dialogflow.cx.v3.TransitionRoute.encode(message.transitionRoutes[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.intent != null && Object.hasOwnProperty.call(message, "intent")) + $root.google.cloud.dialogflow.cx.v3.Intent.encode(message.intent, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.parameters != null && Object.hasOwnProperty.call(message, "parameters")) + $root.google.protobuf.Struct.encode(message.parameters, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.resolvedInput != null && Object.hasOwnProperty.call(message, "resolvedInput")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.resolvedInput); + if (message.matchType != null && Object.hasOwnProperty.call(message, "matchType")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.matchType); + if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) + writer.uint32(/* id 5, wireType 5 =*/45).float(message.confidence); + if (message.event != null && Object.hasOwnProperty.call(message, "event")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.event); return writer; }; /** - * Encodes the specified TransitionRouteGroup message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TransitionRouteGroup.verify|verify} messages. + * Encodes the specified Match message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Match.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroup + * @memberof google.cloud.dialogflow.cx.v3.Match * @static - * @param {google.cloud.dialogflow.cx.v3.ITransitionRouteGroup} message TransitionRouteGroup message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IMatch} message Match message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TransitionRouteGroup.encodeDelimited = function encodeDelimited(message, writer) { + Match.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TransitionRouteGroup message from the specified reader or buffer. + * Decodes a Match message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroup + * @memberof google.cloud.dialogflow.cx.v3.Match * @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.TransitionRouteGroup} TransitionRouteGroup + * @returns {google.cloud.dialogflow.cx.v3.Match} Match * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TransitionRouteGroup.decode = function decode(reader, length, error) { + Match.decode = function decode(reader, length, error) { 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.TransitionRouteGroup(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.Match(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.intent = $root.google.cloud.dialogflow.cx.v3.Intent.decode(reader, reader.uint32()); + break; + } + case 6: { + message.event = reader.string(); break; } case 2: { - message.displayName = reader.string(); + message.parameters = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + } + case 3: { + message.resolvedInput = reader.string(); + break; + } + case 4: { + message.matchType = reader.int32(); break; } case 5: { - if (!(message.transitionRoutes && message.transitionRoutes.length)) - message.transitionRoutes = []; - message.transitionRoutes.push($root.google.cloud.dialogflow.cx.v3.TransitionRoute.decode(reader, reader.uint32())); + message.confidence = reader.float(); break; } default: @@ -71203,160 +70831,258 @@ }; /** - * Decodes a TransitionRouteGroup message from the specified reader or buffer, length delimited. + * Decodes a Match message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroup + * @memberof google.cloud.dialogflow.cx.v3.Match * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.TransitionRouteGroup} TransitionRouteGroup + * @returns {google.cloud.dialogflow.cx.v3.Match} Match * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TransitionRouteGroup.decodeDelimited = function decodeDelimited(reader) { + Match.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TransitionRouteGroup message. + * Verifies a Match message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroup + * @memberof google.cloud.dialogflow.cx.v3.Match * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TransitionRouteGroup.verify = function verify(message) { + Match.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.transitionRoutes != null && message.hasOwnProperty("transitionRoutes")) { - if (!Array.isArray(message.transitionRoutes)) - return "transitionRoutes: array expected"; - for (var i = 0; i < message.transitionRoutes.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.TransitionRoute.verify(message.transitionRoutes[i]); - if (error) - return "transitionRoutes." + error; - } + if (message.intent != null && message.hasOwnProperty("intent")) { + var error = $root.google.cloud.dialogflow.cx.v3.Intent.verify(message.intent); + if (error) + return "intent." + error; + } + if (message.event != null && message.hasOwnProperty("event")) + if (!$util.isString(message.event)) + return "event: string expected"; + if (message.parameters != null && message.hasOwnProperty("parameters")) { + var error = $root.google.protobuf.Struct.verify(message.parameters); + if (error) + return "parameters." + error; } + if (message.resolvedInput != null && message.hasOwnProperty("resolvedInput")) + if (!$util.isString(message.resolvedInput)) + return "resolvedInput: string expected"; + if (message.matchType != null && message.hasOwnProperty("matchType")) + switch (message.matchType) { + default: + return "matchType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 8: + case 9: + break; + } + if (message.confidence != null && message.hasOwnProperty("confidence")) + if (typeof message.confidence !== "number") + return "confidence: number expected"; return null; }; /** - * Creates a TransitionRouteGroup message from a plain object. Also converts values to their respective internal types. + * Creates a Match message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroup + * @memberof google.cloud.dialogflow.cx.v3.Match * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.TransitionRouteGroup} TransitionRouteGroup + * @returns {google.cloud.dialogflow.cx.v3.Match} Match */ - TransitionRouteGroup.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup) + Match.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.Match) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup(); - if (object.name != null) - message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.transitionRoutes) { - if (!Array.isArray(object.transitionRoutes)) - throw TypeError(".google.cloud.dialogflow.cx.v3.TransitionRouteGroup.transitionRoutes: array expected"); - message.transitionRoutes = []; - for (var i = 0; i < object.transitionRoutes.length; ++i) { - if (typeof object.transitionRoutes[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.TransitionRouteGroup.transitionRoutes: object expected"); - message.transitionRoutes[i] = $root.google.cloud.dialogflow.cx.v3.TransitionRoute.fromObject(object.transitionRoutes[i]); + var message = new $root.google.cloud.dialogflow.cx.v3.Match(); + if (object.intent != null) { + if (typeof object.intent !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Match.intent: object expected"); + message.intent = $root.google.cloud.dialogflow.cx.v3.Intent.fromObject(object.intent); + } + if (object.event != null) + message.event = String(object.event); + if (object.parameters != null) { + if (typeof object.parameters !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Match.parameters: object expected"); + message.parameters = $root.google.protobuf.Struct.fromObject(object.parameters); + } + if (object.resolvedInput != null) + message.resolvedInput = String(object.resolvedInput); + switch (object.matchType) { + default: + if (typeof object.matchType === "number") { + message.matchType = object.matchType; + break; } + break; + case "MATCH_TYPE_UNSPECIFIED": + case 0: + message.matchType = 0; + break; + case "INTENT": + case 1: + message.matchType = 1; + break; + case "DIRECT_INTENT": + case 2: + message.matchType = 2; + break; + case "PARAMETER_FILLING": + case 3: + message.matchType = 3; + break; + case "NO_MATCH": + case 4: + message.matchType = 4; + break; + case "NO_INPUT": + case 5: + message.matchType = 5; + break; + case "EVENT": + case 6: + message.matchType = 6; + break; + case "KNOWLEDGE_CONNECTOR": + case 8: + message.matchType = 8; + break; + case "PLAYBOOK": + case 9: + message.matchType = 9; + break; } + if (object.confidence != null) + message.confidence = Number(object.confidence); return message; }; /** - * Creates a plain object from a TransitionRouteGroup message. Also converts values to other types if specified. + * Creates a plain object from a Match message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroup + * @memberof google.cloud.dialogflow.cx.v3.Match * @static - * @param {google.cloud.dialogflow.cx.v3.TransitionRouteGroup} message TransitionRouteGroup + * @param {google.cloud.dialogflow.cx.v3.Match} message Match * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TransitionRouteGroup.toObject = function toObject(message, options) { + Match.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.transitionRoutes = []; if (options.defaults) { - object.name = ""; - object.displayName = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.transitionRoutes && message.transitionRoutes.length) { - object.transitionRoutes = []; - for (var j = 0; j < message.transitionRoutes.length; ++j) - object.transitionRoutes[j] = $root.google.cloud.dialogflow.cx.v3.TransitionRoute.toObject(message.transitionRoutes[j], options); + object.intent = null; + object.parameters = null; + object.resolvedInput = ""; + object.matchType = options.enums === String ? "MATCH_TYPE_UNSPECIFIED" : 0; + object.confidence = 0; + object.event = ""; } + if (message.intent != null && message.hasOwnProperty("intent")) + object.intent = $root.google.cloud.dialogflow.cx.v3.Intent.toObject(message.intent, options); + if (message.parameters != null && message.hasOwnProperty("parameters")) + object.parameters = $root.google.protobuf.Struct.toObject(message.parameters, options); + if (message.resolvedInput != null && message.hasOwnProperty("resolvedInput")) + object.resolvedInput = message.resolvedInput; + if (message.matchType != null && message.hasOwnProperty("matchType")) + object.matchType = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.Match.MatchType[message.matchType] === undefined ? message.matchType : $root.google.cloud.dialogflow.cx.v3.Match.MatchType[message.matchType] : message.matchType; + if (message.confidence != null && message.hasOwnProperty("confidence")) + object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence; + if (message.event != null && message.hasOwnProperty("event")) + object.event = message.event; return object; }; /** - * Converts this TransitionRouteGroup to JSON. + * Converts this Match to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroup + * @memberof google.cloud.dialogflow.cx.v3.Match * @instance * @returns {Object.} JSON object */ - TransitionRouteGroup.prototype.toJSON = function toJSON() { + Match.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for TransitionRouteGroup + * Gets the default type url for Match * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroup + * @memberof google.cloud.dialogflow.cx.v3.Match * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - TransitionRouteGroup.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Match.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.TransitionRouteGroup"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Match"; }; - return TransitionRouteGroup; + /** + * MatchType enum. + * @name google.cloud.dialogflow.cx.v3.Match.MatchType + * @enum {number} + * @property {number} MATCH_TYPE_UNSPECIFIED=0 MATCH_TYPE_UNSPECIFIED value + * @property {number} INTENT=1 INTENT value + * @property {number} DIRECT_INTENT=2 DIRECT_INTENT value + * @property {number} PARAMETER_FILLING=3 PARAMETER_FILLING value + * @property {number} NO_MATCH=4 NO_MATCH value + * @property {number} NO_INPUT=5 NO_INPUT value + * @property {number} EVENT=6 EVENT value + * @property {number} KNOWLEDGE_CONNECTOR=8 KNOWLEDGE_CONNECTOR value + * @property {number} PLAYBOOK=9 PLAYBOOK value + */ + Match.MatchType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MATCH_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "INTENT"] = 1; + values[valuesById[2] = "DIRECT_INTENT"] = 2; + values[valuesById[3] = "PARAMETER_FILLING"] = 3; + values[valuesById[4] = "NO_MATCH"] = 4; + values[valuesById[5] = "NO_INPUT"] = 5; + values[valuesById[6] = "EVENT"] = 6; + values[valuesById[8] = "KNOWLEDGE_CONNECTOR"] = 8; + values[valuesById[9] = "PLAYBOOK"] = 9; + return values; + })(); + + return Match; })(); - v3.ListTransitionRouteGroupsRequest = (function() { + v3.MatchIntentRequest = (function() { /** - * Properties of a ListTransitionRouteGroupsRequest. + * Properties of a MatchIntentRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IListTransitionRouteGroupsRequest - * @property {string|null} [parent] ListTransitionRouteGroupsRequest parent - * @property {number|null} [pageSize] ListTransitionRouteGroupsRequest pageSize - * @property {string|null} [pageToken] ListTransitionRouteGroupsRequest pageToken - * @property {string|null} [languageCode] ListTransitionRouteGroupsRequest languageCode + * @interface IMatchIntentRequest + * @property {string|null} [session] MatchIntentRequest session + * @property {google.cloud.dialogflow.cx.v3.IQueryParameters|null} [queryParams] MatchIntentRequest queryParams + * @property {google.cloud.dialogflow.cx.v3.IQueryInput|null} [queryInput] MatchIntentRequest queryInput + * @property {boolean|null} [persistParameterChanges] MatchIntentRequest persistParameterChanges */ /** - * Constructs a new ListTransitionRouteGroupsRequest. + * Constructs a new MatchIntentRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a ListTransitionRouteGroupsRequest. - * @implements IListTransitionRouteGroupsRequest + * @classdesc Represents a MatchIntentRequest. + * @implements IMatchIntentRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IListTransitionRouteGroupsRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IMatchIntentRequest=} [properties] Properties to set */ - function ListTransitionRouteGroupsRequest(properties) { + function MatchIntentRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -71364,119 +71090,119 @@ } /** - * ListTransitionRouteGroupsRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest + * MatchIntentRequest session. + * @member {string} session + * @memberof google.cloud.dialogflow.cx.v3.MatchIntentRequest * @instance */ - ListTransitionRouteGroupsRequest.prototype.parent = ""; + MatchIntentRequest.prototype.session = ""; /** - * ListTransitionRouteGroupsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest + * MatchIntentRequest queryParams. + * @member {google.cloud.dialogflow.cx.v3.IQueryParameters|null|undefined} queryParams + * @memberof google.cloud.dialogflow.cx.v3.MatchIntentRequest * @instance */ - ListTransitionRouteGroupsRequest.prototype.pageSize = 0; + MatchIntentRequest.prototype.queryParams = null; /** - * ListTransitionRouteGroupsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest + * MatchIntentRequest queryInput. + * @member {google.cloud.dialogflow.cx.v3.IQueryInput|null|undefined} queryInput + * @memberof google.cloud.dialogflow.cx.v3.MatchIntentRequest * @instance */ - ListTransitionRouteGroupsRequest.prototype.pageToken = ""; + MatchIntentRequest.prototype.queryInput = null; /** - * ListTransitionRouteGroupsRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest + * MatchIntentRequest persistParameterChanges. + * @member {boolean} persistParameterChanges + * @memberof google.cloud.dialogflow.cx.v3.MatchIntentRequest * @instance */ - ListTransitionRouteGroupsRequest.prototype.languageCode = ""; + MatchIntentRequest.prototype.persistParameterChanges = false; /** - * Creates a new ListTransitionRouteGroupsRequest instance using the specified properties. + * Creates a new MatchIntentRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest + * @memberof google.cloud.dialogflow.cx.v3.MatchIntentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IListTransitionRouteGroupsRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest} ListTransitionRouteGroupsRequest instance + * @param {google.cloud.dialogflow.cx.v3.IMatchIntentRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.MatchIntentRequest} MatchIntentRequest instance */ - ListTransitionRouteGroupsRequest.create = function create(properties) { - return new ListTransitionRouteGroupsRequest(properties); + MatchIntentRequest.create = function create(properties) { + return new MatchIntentRequest(properties); }; /** - * Encodes the specified ListTransitionRouteGroupsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest.verify|verify} messages. + * Encodes the specified MatchIntentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.MatchIntentRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest + * @memberof google.cloud.dialogflow.cx.v3.MatchIntentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IListTransitionRouteGroupsRequest} message ListTransitionRouteGroupsRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IMatchIntentRequest} message MatchIntentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListTransitionRouteGroupsRequest.encode = function encode(message, writer) { + MatchIntentRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.languageCode); + if (message.session != null && Object.hasOwnProperty.call(message, "session")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.session); + if (message.queryParams != null && Object.hasOwnProperty.call(message, "queryParams")) + $root.google.cloud.dialogflow.cx.v3.QueryParameters.encode(message.queryParams, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.queryInput != null && Object.hasOwnProperty.call(message, "queryInput")) + $root.google.cloud.dialogflow.cx.v3.QueryInput.encode(message.queryInput, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.persistParameterChanges != null && Object.hasOwnProperty.call(message, "persistParameterChanges")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.persistParameterChanges); return writer; }; /** - * Encodes the specified ListTransitionRouteGroupsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest.verify|verify} messages. + * Encodes the specified MatchIntentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.MatchIntentRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest + * @memberof google.cloud.dialogflow.cx.v3.MatchIntentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IListTransitionRouteGroupsRequest} message ListTransitionRouteGroupsRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IMatchIntentRequest} message MatchIntentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListTransitionRouteGroupsRequest.encodeDelimited = function encodeDelimited(message, writer) { + MatchIntentRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListTransitionRouteGroupsRequest message from the specified reader or buffer. + * Decodes a MatchIntentRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest + * @memberof google.cloud.dialogflow.cx.v3.MatchIntentRequest * @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.ListTransitionRouteGroupsRequest} ListTransitionRouteGroupsRequest + * @returns {google.cloud.dialogflow.cx.v3.MatchIntentRequest} MatchIntentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListTransitionRouteGroupsRequest.decode = function decode(reader, length, error) { + MatchIntentRequest.decode = function decode(reader, length, error) { 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.ListTransitionRouteGroupsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.MatchIntentRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + message.session = reader.string(); break; } case 2: { - message.pageSize = reader.int32(); + message.queryParams = $root.google.cloud.dialogflow.cx.v3.QueryParameters.decode(reader, reader.uint32()); break; } case 3: { - message.pageToken = reader.string(); + message.queryInput = $root.google.cloud.dialogflow.cx.v3.QueryInput.decode(reader, reader.uint32()); break; } - case 4: { - message.languageCode = reader.string(); + case 5: { + message.persistParameterChanges = reader.bool(); break; } default: @@ -71488,149 +71214,163 @@ }; /** - * Decodes a ListTransitionRouteGroupsRequest message from the specified reader or buffer, length delimited. + * Decodes a MatchIntentRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest + * @memberof google.cloud.dialogflow.cx.v3.MatchIntentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest} ListTransitionRouteGroupsRequest + * @returns {google.cloud.dialogflow.cx.v3.MatchIntentRequest} MatchIntentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListTransitionRouteGroupsRequest.decodeDelimited = function decodeDelimited(reader) { + MatchIntentRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListTransitionRouteGroupsRequest message. + * Verifies a MatchIntentRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest + * @memberof google.cloud.dialogflow.cx.v3.MatchIntentRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListTransitionRouteGroupsRequest.verify = function verify(message) { + MatchIntentRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; + if (message.session != null && message.hasOwnProperty("session")) + if (!$util.isString(message.session)) + return "session: string expected"; + if (message.queryParams != null && message.hasOwnProperty("queryParams")) { + var error = $root.google.cloud.dialogflow.cx.v3.QueryParameters.verify(message.queryParams); + if (error) + return "queryParams." + error; + } + if (message.queryInput != null && message.hasOwnProperty("queryInput")) { + var error = $root.google.cloud.dialogflow.cx.v3.QueryInput.verify(message.queryInput); + if (error) + return "queryInput." + error; + } + if (message.persistParameterChanges != null && message.hasOwnProperty("persistParameterChanges")) + if (typeof message.persistParameterChanges !== "boolean") + return "persistParameterChanges: boolean expected"; return null; }; /** - * Creates a ListTransitionRouteGroupsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a MatchIntentRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest + * @memberof google.cloud.dialogflow.cx.v3.MatchIntentRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest} ListTransitionRouteGroupsRequest + * @returns {google.cloud.dialogflow.cx.v3.MatchIntentRequest} MatchIntentRequest */ - ListTransitionRouteGroupsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest) + MatchIntentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.MatchIntentRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.languageCode != null) - message.languageCode = String(object.languageCode); + var message = new $root.google.cloud.dialogflow.cx.v3.MatchIntentRequest(); + if (object.session != null) + message.session = String(object.session); + if (object.queryParams != null) { + if (typeof object.queryParams !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.MatchIntentRequest.queryParams: object expected"); + message.queryParams = $root.google.cloud.dialogflow.cx.v3.QueryParameters.fromObject(object.queryParams); + } + if (object.queryInput != null) { + if (typeof object.queryInput !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.MatchIntentRequest.queryInput: object expected"); + message.queryInput = $root.google.cloud.dialogflow.cx.v3.QueryInput.fromObject(object.queryInput); + } + if (object.persistParameterChanges != null) + message.persistParameterChanges = Boolean(object.persistParameterChanges); return message; }; /** - * Creates a plain object from a ListTransitionRouteGroupsRequest message. Also converts values to other types if specified. + * Creates a plain object from a MatchIntentRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest + * @memberof google.cloud.dialogflow.cx.v3.MatchIntentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest} message ListTransitionRouteGroupsRequest + * @param {google.cloud.dialogflow.cx.v3.MatchIntentRequest} message MatchIntentRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListTransitionRouteGroupsRequest.toObject = function toObject(message, options) { + MatchIntentRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.languageCode = ""; + object.session = ""; + object.queryParams = null; + object.queryInput = null; + object.persistParameterChanges = false; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; + if (message.session != null && message.hasOwnProperty("session")) + object.session = message.session; + if (message.queryParams != null && message.hasOwnProperty("queryParams")) + object.queryParams = $root.google.cloud.dialogflow.cx.v3.QueryParameters.toObject(message.queryParams, options); + if (message.queryInput != null && message.hasOwnProperty("queryInput")) + object.queryInput = $root.google.cloud.dialogflow.cx.v3.QueryInput.toObject(message.queryInput, options); + if (message.persistParameterChanges != null && message.hasOwnProperty("persistParameterChanges")) + object.persistParameterChanges = message.persistParameterChanges; return object; }; /** - * Converts this ListTransitionRouteGroupsRequest to JSON. + * Converts this MatchIntentRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest + * @memberof google.cloud.dialogflow.cx.v3.MatchIntentRequest * @instance * @returns {Object.} JSON object */ - ListTransitionRouteGroupsRequest.prototype.toJSON = function toJSON() { + MatchIntentRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListTransitionRouteGroupsRequest + * Gets the default type url for MatchIntentRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest + * @memberof google.cloud.dialogflow.cx.v3.MatchIntentRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListTransitionRouteGroupsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + MatchIntentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.MatchIntentRequest"; }; - return ListTransitionRouteGroupsRequest; + return MatchIntentRequest; })(); - v3.ListTransitionRouteGroupsResponse = (function() { + v3.MatchIntentResponse = (function() { /** - * Properties of a ListTransitionRouteGroupsResponse. + * Properties of a MatchIntentResponse. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IListTransitionRouteGroupsResponse - * @property {Array.|null} [transitionRouteGroups] ListTransitionRouteGroupsResponse transitionRouteGroups - * @property {string|null} [nextPageToken] ListTransitionRouteGroupsResponse nextPageToken + * @interface IMatchIntentResponse + * @property {string|null} [text] MatchIntentResponse text + * @property {string|null} [triggerIntent] MatchIntentResponse triggerIntent + * @property {string|null} [transcript] MatchIntentResponse transcript + * @property {string|null} [triggerEvent] MatchIntentResponse triggerEvent + * @property {Array.|null} [matches] MatchIntentResponse matches + * @property {google.cloud.dialogflow.cx.v3.IPage|null} [currentPage] MatchIntentResponse currentPage */ /** - * Constructs a new ListTransitionRouteGroupsResponse. + * Constructs a new MatchIntentResponse. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a ListTransitionRouteGroupsResponse. - * @implements IListTransitionRouteGroupsResponse + * @classdesc Represents a MatchIntentResponse. + * @implements IMatchIntentResponse * @constructor - * @param {google.cloud.dialogflow.cx.v3.IListTransitionRouteGroupsResponse=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IMatchIntentResponse=} [properties] Properties to set */ - function ListTransitionRouteGroupsResponse(properties) { - this.transitionRouteGroups = []; + function MatchIntentResponse(properties) { + this.matches = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -71638,94 +71378,164 @@ } /** - * ListTransitionRouteGroupsResponse transitionRouteGroups. - * @member {Array.} transitionRouteGroups - * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse + * MatchIntentResponse text. + * @member {string|null|undefined} text + * @memberof google.cloud.dialogflow.cx.v3.MatchIntentResponse * @instance */ - ListTransitionRouteGroupsResponse.prototype.transitionRouteGroups = $util.emptyArray; + MatchIntentResponse.prototype.text = null; /** - * ListTransitionRouteGroupsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse + * MatchIntentResponse triggerIntent. + * @member {string|null|undefined} triggerIntent + * @memberof google.cloud.dialogflow.cx.v3.MatchIntentResponse * @instance */ - ListTransitionRouteGroupsResponse.prototype.nextPageToken = ""; + MatchIntentResponse.prototype.triggerIntent = null; /** - * Creates a new ListTransitionRouteGroupsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse + * MatchIntentResponse transcript. + * @member {string|null|undefined} transcript + * @memberof google.cloud.dialogflow.cx.v3.MatchIntentResponse + * @instance + */ + MatchIntentResponse.prototype.transcript = null; + + /** + * MatchIntentResponse triggerEvent. + * @member {string|null|undefined} triggerEvent + * @memberof google.cloud.dialogflow.cx.v3.MatchIntentResponse + * @instance + */ + MatchIntentResponse.prototype.triggerEvent = null; + + /** + * MatchIntentResponse matches. + * @member {Array.} matches + * @memberof google.cloud.dialogflow.cx.v3.MatchIntentResponse + * @instance + */ + MatchIntentResponse.prototype.matches = $util.emptyArray; + + /** + * MatchIntentResponse currentPage. + * @member {google.cloud.dialogflow.cx.v3.IPage|null|undefined} currentPage + * @memberof google.cloud.dialogflow.cx.v3.MatchIntentResponse + * @instance + */ + MatchIntentResponse.prototype.currentPage = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * MatchIntentResponse query. + * @member {"text"|"triggerIntent"|"transcript"|"triggerEvent"|undefined} query + * @memberof google.cloud.dialogflow.cx.v3.MatchIntentResponse + * @instance + */ + Object.defineProperty(MatchIntentResponse.prototype, "query", { + get: $util.oneOfGetter($oneOfFields = ["text", "triggerIntent", "transcript", "triggerEvent"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new MatchIntentResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.MatchIntentResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IListTransitionRouteGroupsResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse} ListTransitionRouteGroupsResponse instance + * @param {google.cloud.dialogflow.cx.v3.IMatchIntentResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.MatchIntentResponse} MatchIntentResponse instance */ - ListTransitionRouteGroupsResponse.create = function create(properties) { - return new ListTransitionRouteGroupsResponse(properties); + MatchIntentResponse.create = function create(properties) { + return new MatchIntentResponse(properties); }; /** - * Encodes the specified ListTransitionRouteGroupsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse.verify|verify} messages. + * Encodes the specified MatchIntentResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.MatchIntentResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse + * @memberof google.cloud.dialogflow.cx.v3.MatchIntentResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IListTransitionRouteGroupsResponse} message ListTransitionRouteGroupsResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IMatchIntentResponse} message MatchIntentResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListTransitionRouteGroupsResponse.encode = function encode(message, writer) { + MatchIntentResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.transitionRouteGroups != null && message.transitionRouteGroups.length) - for (var i = 0; i < message.transitionRouteGroups.length; ++i) - $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup.encode(message.transitionRouteGroups[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.text != null && Object.hasOwnProperty.call(message, "text")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.text); + if (message.triggerIntent != null && Object.hasOwnProperty.call(message, "triggerIntent")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.triggerIntent); + if (message.transcript != null && Object.hasOwnProperty.call(message, "transcript")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.transcript); + if (message.matches != null && message.matches.length) + for (var i = 0; i < message.matches.length; ++i) + $root.google.cloud.dialogflow.cx.v3.Match.encode(message.matches[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.currentPage != null && Object.hasOwnProperty.call(message, "currentPage")) + $root.google.cloud.dialogflow.cx.v3.Page.encode(message.currentPage, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.triggerEvent != null && Object.hasOwnProperty.call(message, "triggerEvent")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.triggerEvent); return writer; }; /** - * Encodes the specified ListTransitionRouteGroupsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse.verify|verify} messages. + * Encodes the specified MatchIntentResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.MatchIntentResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse + * @memberof google.cloud.dialogflow.cx.v3.MatchIntentResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IListTransitionRouteGroupsResponse} message ListTransitionRouteGroupsResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IMatchIntentResponse} message MatchIntentResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListTransitionRouteGroupsResponse.encodeDelimited = function encodeDelimited(message, writer) { + MatchIntentResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListTransitionRouteGroupsResponse message from the specified reader or buffer. + * Decodes a MatchIntentResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse + * @memberof google.cloud.dialogflow.cx.v3.MatchIntentResponse * @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.ListTransitionRouteGroupsResponse} ListTransitionRouteGroupsResponse + * @returns {google.cloud.dialogflow.cx.v3.MatchIntentResponse} MatchIntentResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListTransitionRouteGroupsResponse.decode = function decode(reader, length, error) { + MatchIntentResponse.decode = function decode(reader, length, error) { 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.ListTransitionRouteGroupsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.MatchIntentResponse(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - if (!(message.transitionRouteGroups && message.transitionRouteGroups.length)) - message.transitionRouteGroups = []; - message.transitionRouteGroups.push($root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup.decode(reader, reader.uint32())); + message.text = reader.string(); break; } case 2: { - message.nextPageToken = reader.string(); + message.triggerIntent = reader.string(); + break; + } + case 3: { + message.transcript = reader.string(); + break; + } + case 6: { + message.triggerEvent = reader.string(); + break; + } + case 4: { + if (!(message.matches && message.matches.length)) + message.matches = []; + message.matches.push($root.google.cloud.dialogflow.cx.v3.Match.decode(reader, reader.uint32())); + break; + } + case 5: { + message.currentPage = $root.google.cloud.dialogflow.cx.v3.Page.decode(reader, reader.uint32()); break; } default: @@ -71737,149 +71547,210 @@ }; /** - * Decodes a ListTransitionRouteGroupsResponse message from the specified reader or buffer, length delimited. + * Decodes a MatchIntentResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse + * @memberof google.cloud.dialogflow.cx.v3.MatchIntentResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse} ListTransitionRouteGroupsResponse + * @returns {google.cloud.dialogflow.cx.v3.MatchIntentResponse} MatchIntentResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListTransitionRouteGroupsResponse.decodeDelimited = function decodeDelimited(reader) { + MatchIntentResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListTransitionRouteGroupsResponse message. + * Verifies a MatchIntentResponse message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse + * @memberof google.cloud.dialogflow.cx.v3.MatchIntentResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListTransitionRouteGroupsResponse.verify = function verify(message) { + MatchIntentResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.transitionRouteGroups != null && message.hasOwnProperty("transitionRouteGroups")) { - if (!Array.isArray(message.transitionRouteGroups)) - return "transitionRouteGroups: array expected"; - for (var i = 0; i < message.transitionRouteGroups.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup.verify(message.transitionRouteGroups[i]); + var properties = {}; + if (message.text != null && message.hasOwnProperty("text")) { + properties.query = 1; + if (!$util.isString(message.text)) + return "text: string expected"; + } + if (message.triggerIntent != null && message.hasOwnProperty("triggerIntent")) { + if (properties.query === 1) + return "query: multiple values"; + properties.query = 1; + if (!$util.isString(message.triggerIntent)) + return "triggerIntent: string expected"; + } + if (message.transcript != null && message.hasOwnProperty("transcript")) { + if (properties.query === 1) + return "query: multiple values"; + properties.query = 1; + if (!$util.isString(message.transcript)) + return "transcript: string expected"; + } + if (message.triggerEvent != null && message.hasOwnProperty("triggerEvent")) { + if (properties.query === 1) + return "query: multiple values"; + properties.query = 1; + if (!$util.isString(message.triggerEvent)) + return "triggerEvent: string expected"; + } + if (message.matches != null && message.hasOwnProperty("matches")) { + if (!Array.isArray(message.matches)) + return "matches: array expected"; + for (var i = 0; i < message.matches.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.Match.verify(message.matches[i]); if (error) - return "transitionRouteGroups." + error; + return "matches." + error; } } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; + if (message.currentPage != null && message.hasOwnProperty("currentPage")) { + var error = $root.google.cloud.dialogflow.cx.v3.Page.verify(message.currentPage); + if (error) + return "currentPage." + error; + } return null; }; /** - * Creates a ListTransitionRouteGroupsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a MatchIntentResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse + * @memberof google.cloud.dialogflow.cx.v3.MatchIntentResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse} ListTransitionRouteGroupsResponse + * @returns {google.cloud.dialogflow.cx.v3.MatchIntentResponse} MatchIntentResponse */ - ListTransitionRouteGroupsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse) + MatchIntentResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.MatchIntentResponse) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse(); - if (object.transitionRouteGroups) { - if (!Array.isArray(object.transitionRouteGroups)) - throw TypeError(".google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse.transitionRouteGroups: array expected"); - message.transitionRouteGroups = []; - for (var i = 0; i < object.transitionRouteGroups.length; ++i) { - if (typeof object.transitionRouteGroups[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse.transitionRouteGroups: object expected"); - message.transitionRouteGroups[i] = $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup.fromObject(object.transitionRouteGroups[i]); + var message = new $root.google.cloud.dialogflow.cx.v3.MatchIntentResponse(); + if (object.text != null) + message.text = String(object.text); + if (object.triggerIntent != null) + message.triggerIntent = String(object.triggerIntent); + if (object.transcript != null) + message.transcript = String(object.transcript); + if (object.triggerEvent != null) + message.triggerEvent = String(object.triggerEvent); + if (object.matches) { + if (!Array.isArray(object.matches)) + throw TypeError(".google.cloud.dialogflow.cx.v3.MatchIntentResponse.matches: array expected"); + message.matches = []; + for (var i = 0; i < object.matches.length; ++i) { + if (typeof object.matches[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.MatchIntentResponse.matches: object expected"); + message.matches[i] = $root.google.cloud.dialogflow.cx.v3.Match.fromObject(object.matches[i]); } } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); + if (object.currentPage != null) { + if (typeof object.currentPage !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.MatchIntentResponse.currentPage: object expected"); + message.currentPage = $root.google.cloud.dialogflow.cx.v3.Page.fromObject(object.currentPage); + } return message; }; /** - * Creates a plain object from a ListTransitionRouteGroupsResponse message. Also converts values to other types if specified. + * Creates a plain object from a MatchIntentResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse + * @memberof google.cloud.dialogflow.cx.v3.MatchIntentResponse * @static - * @param {google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse} message ListTransitionRouteGroupsResponse + * @param {google.cloud.dialogflow.cx.v3.MatchIntentResponse} message MatchIntentResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListTransitionRouteGroupsResponse.toObject = function toObject(message, options) { + MatchIntentResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.transitionRouteGroups = []; + object.matches = []; if (options.defaults) - object.nextPageToken = ""; - if (message.transitionRouteGroups && message.transitionRouteGroups.length) { - object.transitionRouteGroups = []; - for (var j = 0; j < message.transitionRouteGroups.length; ++j) - object.transitionRouteGroups[j] = $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup.toObject(message.transitionRouteGroups[j], options); + object.currentPage = null; + if (message.text != null && message.hasOwnProperty("text")) { + object.text = message.text; + if (options.oneofs) + object.query = "text"; + } + if (message.triggerIntent != null && message.hasOwnProperty("triggerIntent")) { + object.triggerIntent = message.triggerIntent; + if (options.oneofs) + object.query = "triggerIntent"; + } + if (message.transcript != null && message.hasOwnProperty("transcript")) { + object.transcript = message.transcript; + if (options.oneofs) + object.query = "transcript"; + } + if (message.matches && message.matches.length) { + object.matches = []; + for (var j = 0; j < message.matches.length; ++j) + object.matches[j] = $root.google.cloud.dialogflow.cx.v3.Match.toObject(message.matches[j], options); + } + if (message.currentPage != null && message.hasOwnProperty("currentPage")) + object.currentPage = $root.google.cloud.dialogflow.cx.v3.Page.toObject(message.currentPage, options); + if (message.triggerEvent != null && message.hasOwnProperty("triggerEvent")) { + object.triggerEvent = message.triggerEvent; + if (options.oneofs) + object.query = "triggerEvent"; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this ListTransitionRouteGroupsResponse to JSON. + * Converts this MatchIntentResponse to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse + * @memberof google.cloud.dialogflow.cx.v3.MatchIntentResponse * @instance * @returns {Object.} JSON object */ - ListTransitionRouteGroupsResponse.prototype.toJSON = function toJSON() { + MatchIntentResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListTransitionRouteGroupsResponse + * Gets the default type url for MatchIntentResponse * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse + * @memberof google.cloud.dialogflow.cx.v3.MatchIntentResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListTransitionRouteGroupsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + MatchIntentResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.MatchIntentResponse"; }; - return ListTransitionRouteGroupsResponse; + return MatchIntentResponse; })(); - v3.GetTransitionRouteGroupRequest = (function() { + v3.FulfillIntentRequest = (function() { /** - * Properties of a GetTransitionRouteGroupRequest. + * Properties of a FulfillIntentRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IGetTransitionRouteGroupRequest - * @property {string|null} [name] GetTransitionRouteGroupRequest name - * @property {string|null} [languageCode] GetTransitionRouteGroupRequest languageCode + * @interface IFulfillIntentRequest + * @property {google.cloud.dialogflow.cx.v3.IMatchIntentRequest|null} [matchIntentRequest] FulfillIntentRequest matchIntentRequest + * @property {google.cloud.dialogflow.cx.v3.IMatch|null} [match] FulfillIntentRequest match + * @property {google.cloud.dialogflow.cx.v3.IOutputAudioConfig|null} [outputAudioConfig] FulfillIntentRequest outputAudioConfig */ /** - * Constructs a new GetTransitionRouteGroupRequest. + * Constructs a new FulfillIntentRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a GetTransitionRouteGroupRequest. - * @implements IGetTransitionRouteGroupRequest + * @classdesc Represents a FulfillIntentRequest. + * @implements IFulfillIntentRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IGetTransitionRouteGroupRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IFulfillIntentRequest=} [properties] Properties to set */ - function GetTransitionRouteGroupRequest(properties) { + function FulfillIntentRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -71887,91 +71758,105 @@ } /** - * GetTransitionRouteGroupRequest name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest + * FulfillIntentRequest matchIntentRequest. + * @member {google.cloud.dialogflow.cx.v3.IMatchIntentRequest|null|undefined} matchIntentRequest + * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentRequest * @instance */ - GetTransitionRouteGroupRequest.prototype.name = ""; + FulfillIntentRequest.prototype.matchIntentRequest = null; /** - * GetTransitionRouteGroupRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest + * FulfillIntentRequest match. + * @member {google.cloud.dialogflow.cx.v3.IMatch|null|undefined} match + * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentRequest * @instance */ - GetTransitionRouteGroupRequest.prototype.languageCode = ""; + FulfillIntentRequest.prototype.match = null; /** - * Creates a new GetTransitionRouteGroupRequest instance using the specified properties. + * FulfillIntentRequest outputAudioConfig. + * @member {google.cloud.dialogflow.cx.v3.IOutputAudioConfig|null|undefined} outputAudioConfig + * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentRequest + * @instance + */ + FulfillIntentRequest.prototype.outputAudioConfig = null; + + /** + * Creates a new FulfillIntentRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest + * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IGetTransitionRouteGroupRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest} GetTransitionRouteGroupRequest instance + * @param {google.cloud.dialogflow.cx.v3.IFulfillIntentRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.FulfillIntentRequest} FulfillIntentRequest instance */ - GetTransitionRouteGroupRequest.create = function create(properties) { - return new GetTransitionRouteGroupRequest(properties); + FulfillIntentRequest.create = function create(properties) { + return new FulfillIntentRequest(properties); }; /** - * Encodes the specified GetTransitionRouteGroupRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest.verify|verify} messages. + * Encodes the specified FulfillIntentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.FulfillIntentRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest + * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IGetTransitionRouteGroupRequest} message GetTransitionRouteGroupRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IFulfillIntentRequest} message FulfillIntentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetTransitionRouteGroupRequest.encode = function encode(message, writer) { + FulfillIntentRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); + if (message.matchIntentRequest != null && Object.hasOwnProperty.call(message, "matchIntentRequest")) + $root.google.cloud.dialogflow.cx.v3.MatchIntentRequest.encode(message.matchIntentRequest, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.match != null && Object.hasOwnProperty.call(message, "match")) + $root.google.cloud.dialogflow.cx.v3.Match.encode(message.match, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.outputAudioConfig != null && Object.hasOwnProperty.call(message, "outputAudioConfig")) + $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.encode(message.outputAudioConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetTransitionRouteGroupRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest.verify|verify} messages. + * Encodes the specified FulfillIntentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.FulfillIntentRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest + * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IGetTransitionRouteGroupRequest} message GetTransitionRouteGroupRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IFulfillIntentRequest} message FulfillIntentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetTransitionRouteGroupRequest.encodeDelimited = function encodeDelimited(message, writer) { + FulfillIntentRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetTransitionRouteGroupRequest message from the specified reader or buffer. + * Decodes a FulfillIntentRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest + * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentRequest * @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.GetTransitionRouteGroupRequest} GetTransitionRouteGroupRequest + * @returns {google.cloud.dialogflow.cx.v3.FulfillIntentRequest} FulfillIntentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetTransitionRouteGroupRequest.decode = function decode(reader, length, error) { + FulfillIntentRequest.decode = function decode(reader, length, error) { 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.GetTransitionRouteGroupRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.FulfillIntentRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.matchIntentRequest = $root.google.cloud.dialogflow.cx.v3.MatchIntentRequest.decode(reader, reader.uint32()); break; } case 2: { - message.languageCode = reader.string(); + message.match = $root.google.cloud.dialogflow.cx.v3.Match.decode(reader, reader.uint32()); + break; + } + case 3: { + message.outputAudioConfig = $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.decode(reader, reader.uint32()); break; } default: @@ -71983,133 +71868,157 @@ }; /** - * Decodes a GetTransitionRouteGroupRequest message from the specified reader or buffer, length delimited. + * Decodes a FulfillIntentRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest + * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest} GetTransitionRouteGroupRequest + * @returns {google.cloud.dialogflow.cx.v3.FulfillIntentRequest} FulfillIntentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetTransitionRouteGroupRequest.decodeDelimited = function decodeDelimited(reader) { + FulfillIntentRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetTransitionRouteGroupRequest message. + * Verifies a FulfillIntentRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest + * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetTransitionRouteGroupRequest.verify = function verify(message) { + FulfillIntentRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; + if (message.matchIntentRequest != null && message.hasOwnProperty("matchIntentRequest")) { + var error = $root.google.cloud.dialogflow.cx.v3.MatchIntentRequest.verify(message.matchIntentRequest); + if (error) + return "matchIntentRequest." + error; + } + if (message.match != null && message.hasOwnProperty("match")) { + var error = $root.google.cloud.dialogflow.cx.v3.Match.verify(message.match); + if (error) + return "match." + error; + } + if (message.outputAudioConfig != null && message.hasOwnProperty("outputAudioConfig")) { + var error = $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.verify(message.outputAudioConfig); + if (error) + return "outputAudioConfig." + error; + } return null; }; /** - * Creates a GetTransitionRouteGroupRequest message from a plain object. Also converts values to their respective internal types. + * Creates a FulfillIntentRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest + * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest} GetTransitionRouteGroupRequest + * @returns {google.cloud.dialogflow.cx.v3.FulfillIntentRequest} FulfillIntentRequest */ - GetTransitionRouteGroupRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest) + FulfillIntentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.FulfillIntentRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.languageCode != null) - message.languageCode = String(object.languageCode); + var message = new $root.google.cloud.dialogflow.cx.v3.FulfillIntentRequest(); + if (object.matchIntentRequest != null) { + if (typeof object.matchIntentRequest !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.FulfillIntentRequest.matchIntentRequest: object expected"); + message.matchIntentRequest = $root.google.cloud.dialogflow.cx.v3.MatchIntentRequest.fromObject(object.matchIntentRequest); + } + if (object.match != null) { + if (typeof object.match !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.FulfillIntentRequest.match: object expected"); + message.match = $root.google.cloud.dialogflow.cx.v3.Match.fromObject(object.match); + } + if (object.outputAudioConfig != null) { + if (typeof object.outputAudioConfig !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.FulfillIntentRequest.outputAudioConfig: object expected"); + message.outputAudioConfig = $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.fromObject(object.outputAudioConfig); + } return message; }; /** - * Creates a plain object from a GetTransitionRouteGroupRequest message. Also converts values to other types if specified. + * Creates a plain object from a FulfillIntentRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest + * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentRequest * @static - * @param {google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest} message GetTransitionRouteGroupRequest + * @param {google.cloud.dialogflow.cx.v3.FulfillIntentRequest} message FulfillIntentRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetTransitionRouteGroupRequest.toObject = function toObject(message, options) { + FulfillIntentRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; - object.languageCode = ""; + object.matchIntentRequest = null; + object.match = null; + object.outputAudioConfig = null; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; + if (message.matchIntentRequest != null && message.hasOwnProperty("matchIntentRequest")) + object.matchIntentRequest = $root.google.cloud.dialogflow.cx.v3.MatchIntentRequest.toObject(message.matchIntentRequest, options); + if (message.match != null && message.hasOwnProperty("match")) + object.match = $root.google.cloud.dialogflow.cx.v3.Match.toObject(message.match, options); + if (message.outputAudioConfig != null && message.hasOwnProperty("outputAudioConfig")) + object.outputAudioConfig = $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.toObject(message.outputAudioConfig, options); return object; }; /** - * Converts this GetTransitionRouteGroupRequest to JSON. + * Converts this FulfillIntentRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest + * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentRequest * @instance * @returns {Object.} JSON object */ - GetTransitionRouteGroupRequest.prototype.toJSON = function toJSON() { + FulfillIntentRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetTransitionRouteGroupRequest + * Gets the default type url for FulfillIntentRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest + * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetTransitionRouteGroupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + FulfillIntentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.FulfillIntentRequest"; }; - return GetTransitionRouteGroupRequest; + return FulfillIntentRequest; })(); - v3.CreateTransitionRouteGroupRequest = (function() { + v3.FulfillIntentResponse = (function() { /** - * Properties of a CreateTransitionRouteGroupRequest. + * Properties of a FulfillIntentResponse. * @memberof google.cloud.dialogflow.cx.v3 - * @interface ICreateTransitionRouteGroupRequest - * @property {string|null} [parent] CreateTransitionRouteGroupRequest parent - * @property {google.cloud.dialogflow.cx.v3.ITransitionRouteGroup|null} [transitionRouteGroup] CreateTransitionRouteGroupRequest transitionRouteGroup - * @property {string|null} [languageCode] CreateTransitionRouteGroupRequest languageCode + * @interface IFulfillIntentResponse + * @property {string|null} [responseId] FulfillIntentResponse responseId + * @property {google.cloud.dialogflow.cx.v3.IQueryResult|null} [queryResult] FulfillIntentResponse queryResult + * @property {Uint8Array|null} [outputAudio] FulfillIntentResponse outputAudio + * @property {google.cloud.dialogflow.cx.v3.IOutputAudioConfig|null} [outputAudioConfig] FulfillIntentResponse outputAudioConfig */ /** - * Constructs a new CreateTransitionRouteGroupRequest. + * Constructs a new FulfillIntentResponse. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a CreateTransitionRouteGroupRequest. - * @implements ICreateTransitionRouteGroupRequest + * @classdesc Represents a FulfillIntentResponse. + * @implements IFulfillIntentResponse * @constructor - * @param {google.cloud.dialogflow.cx.v3.ICreateTransitionRouteGroupRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IFulfillIntentResponse=} [properties] Properties to set */ - function CreateTransitionRouteGroupRequest(properties) { + function FulfillIntentResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -72117,105 +72026,119 @@ } /** - * CreateTransitionRouteGroupRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest + * FulfillIntentResponse responseId. + * @member {string} responseId + * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentResponse * @instance */ - CreateTransitionRouteGroupRequest.prototype.parent = ""; + FulfillIntentResponse.prototype.responseId = ""; /** - * CreateTransitionRouteGroupRequest transitionRouteGroup. - * @member {google.cloud.dialogflow.cx.v3.ITransitionRouteGroup|null|undefined} transitionRouteGroup - * @memberof google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest + * FulfillIntentResponse queryResult. + * @member {google.cloud.dialogflow.cx.v3.IQueryResult|null|undefined} queryResult + * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentResponse * @instance */ - CreateTransitionRouteGroupRequest.prototype.transitionRouteGroup = null; + FulfillIntentResponse.prototype.queryResult = null; /** - * CreateTransitionRouteGroupRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest + * FulfillIntentResponse outputAudio. + * @member {Uint8Array} outputAudio + * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentResponse * @instance */ - CreateTransitionRouteGroupRequest.prototype.languageCode = ""; + FulfillIntentResponse.prototype.outputAudio = $util.newBuffer([]); /** - * Creates a new CreateTransitionRouteGroupRequest instance using the specified properties. + * FulfillIntentResponse outputAudioConfig. + * @member {google.cloud.dialogflow.cx.v3.IOutputAudioConfig|null|undefined} outputAudioConfig + * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentResponse + * @instance + */ + FulfillIntentResponse.prototype.outputAudioConfig = null; + + /** + * Creates a new FulfillIntentResponse instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest + * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentResponse * @static - * @param {google.cloud.dialogflow.cx.v3.ICreateTransitionRouteGroupRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest} CreateTransitionRouteGroupRequest instance + * @param {google.cloud.dialogflow.cx.v3.IFulfillIntentResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.FulfillIntentResponse} FulfillIntentResponse instance */ - CreateTransitionRouteGroupRequest.create = function create(properties) { - return new CreateTransitionRouteGroupRequest(properties); + FulfillIntentResponse.create = function create(properties) { + return new FulfillIntentResponse(properties); }; /** - * Encodes the specified CreateTransitionRouteGroupRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest.verify|verify} messages. + * Encodes the specified FulfillIntentResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.FulfillIntentResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest + * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentResponse * @static - * @param {google.cloud.dialogflow.cx.v3.ICreateTransitionRouteGroupRequest} message CreateTransitionRouteGroupRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IFulfillIntentResponse} message FulfillIntentResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateTransitionRouteGroupRequest.encode = function encode(message, writer) { + FulfillIntentResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.transitionRouteGroup != null && Object.hasOwnProperty.call(message, "transitionRouteGroup")) - $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup.encode(message.transitionRouteGroup, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.languageCode); + if (message.responseId != null && Object.hasOwnProperty.call(message, "responseId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.responseId); + if (message.queryResult != null && Object.hasOwnProperty.call(message, "queryResult")) + $root.google.cloud.dialogflow.cx.v3.QueryResult.encode(message.queryResult, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.outputAudio != null && Object.hasOwnProperty.call(message, "outputAudio")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.outputAudio); + if (message.outputAudioConfig != null && Object.hasOwnProperty.call(message, "outputAudioConfig")) + $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.encode(message.outputAudioConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified CreateTransitionRouteGroupRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest.verify|verify} messages. + * Encodes the specified FulfillIntentResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.FulfillIntentResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest + * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentResponse * @static - * @param {google.cloud.dialogflow.cx.v3.ICreateTransitionRouteGroupRequest} message CreateTransitionRouteGroupRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IFulfillIntentResponse} message FulfillIntentResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateTransitionRouteGroupRequest.encodeDelimited = function encodeDelimited(message, writer) { + FulfillIntentResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateTransitionRouteGroupRequest message from the specified reader or buffer. + * Decodes a FulfillIntentResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest + * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentResponse * @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.CreateTransitionRouteGroupRequest} CreateTransitionRouteGroupRequest + * @returns {google.cloud.dialogflow.cx.v3.FulfillIntentResponse} FulfillIntentResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateTransitionRouteGroupRequest.decode = function decode(reader, length, error) { + FulfillIntentResponse.decode = function decode(reader, length, error) { 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.CreateTransitionRouteGroupRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.FulfillIntentResponse(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + message.responseId = reader.string(); break; } case 2: { - message.transitionRouteGroup = $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup.decode(reader, reader.uint32()); + message.queryResult = $root.google.cloud.dialogflow.cx.v3.QueryResult.decode(reader, reader.uint32()); break; } case 3: { - message.languageCode = reader.string(); + message.outputAudio = reader.bytes(); + break; + } + case 4: { + message.outputAudioConfig = $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.decode(reader, reader.uint32()); break; } default: @@ -72227,146 +72150,167 @@ }; /** - * Decodes a CreateTransitionRouteGroupRequest message from the specified reader or buffer, length delimited. + * Decodes a FulfillIntentResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest + * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest} CreateTransitionRouteGroupRequest + * @returns {google.cloud.dialogflow.cx.v3.FulfillIntentResponse} FulfillIntentResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateTransitionRouteGroupRequest.decodeDelimited = function decodeDelimited(reader) { + FulfillIntentResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateTransitionRouteGroupRequest message. + * Verifies a FulfillIntentResponse message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest + * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateTransitionRouteGroupRequest.verify = function verify(message) { + FulfillIntentResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.transitionRouteGroup != null && message.hasOwnProperty("transitionRouteGroup")) { - var error = $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup.verify(message.transitionRouteGroup); + if (message.responseId != null && message.hasOwnProperty("responseId")) + if (!$util.isString(message.responseId)) + return "responseId: string expected"; + if (message.queryResult != null && message.hasOwnProperty("queryResult")) { + var error = $root.google.cloud.dialogflow.cx.v3.QueryResult.verify(message.queryResult); if (error) - return "transitionRouteGroup." + error; + return "queryResult." + error; + } + if (message.outputAudio != null && message.hasOwnProperty("outputAudio")) + if (!(message.outputAudio && typeof message.outputAudio.length === "number" || $util.isString(message.outputAudio))) + return "outputAudio: buffer expected"; + if (message.outputAudioConfig != null && message.hasOwnProperty("outputAudioConfig")) { + var error = $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.verify(message.outputAudioConfig); + if (error) + return "outputAudioConfig." + error; } - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; return null; }; /** - * Creates a CreateTransitionRouteGroupRequest message from a plain object. Also converts values to their respective internal types. + * Creates a FulfillIntentResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest + * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest} CreateTransitionRouteGroupRequest + * @returns {google.cloud.dialogflow.cx.v3.FulfillIntentResponse} FulfillIntentResponse */ - CreateTransitionRouteGroupRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest) + FulfillIntentResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.FulfillIntentResponse) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.transitionRouteGroup != null) { - if (typeof object.transitionRouteGroup !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest.transitionRouteGroup: object expected"); - message.transitionRouteGroup = $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup.fromObject(object.transitionRouteGroup); + var message = new $root.google.cloud.dialogflow.cx.v3.FulfillIntentResponse(); + if (object.responseId != null) + message.responseId = String(object.responseId); + if (object.queryResult != null) { + if (typeof object.queryResult !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.FulfillIntentResponse.queryResult: object expected"); + message.queryResult = $root.google.cloud.dialogflow.cx.v3.QueryResult.fromObject(object.queryResult); + } + if (object.outputAudio != null) + if (typeof object.outputAudio === "string") + $util.base64.decode(object.outputAudio, message.outputAudio = $util.newBuffer($util.base64.length(object.outputAudio)), 0); + else if (object.outputAudio.length >= 0) + message.outputAudio = object.outputAudio; + if (object.outputAudioConfig != null) { + if (typeof object.outputAudioConfig !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.FulfillIntentResponse.outputAudioConfig: object expected"); + message.outputAudioConfig = $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.fromObject(object.outputAudioConfig); } - if (object.languageCode != null) - message.languageCode = String(object.languageCode); return message; }; /** - * Creates a plain object from a CreateTransitionRouteGroupRequest message. Also converts values to other types if specified. + * Creates a plain object from a FulfillIntentResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest + * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentResponse * @static - * @param {google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest} message CreateTransitionRouteGroupRequest + * @param {google.cloud.dialogflow.cx.v3.FulfillIntentResponse} message FulfillIntentResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateTransitionRouteGroupRequest.toObject = function toObject(message, options) { + FulfillIntentResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.transitionRouteGroup = null; - object.languageCode = ""; + object.responseId = ""; + object.queryResult = null; + if (options.bytes === String) + object.outputAudio = ""; + else { + object.outputAudio = []; + if (options.bytes !== Array) + object.outputAudio = $util.newBuffer(object.outputAudio); + } + object.outputAudioConfig = null; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.transitionRouteGroup != null && message.hasOwnProperty("transitionRouteGroup")) - object.transitionRouteGroup = $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup.toObject(message.transitionRouteGroup, options); - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; + if (message.responseId != null && message.hasOwnProperty("responseId")) + object.responseId = message.responseId; + if (message.queryResult != null && message.hasOwnProperty("queryResult")) + object.queryResult = $root.google.cloud.dialogflow.cx.v3.QueryResult.toObject(message.queryResult, options); + if (message.outputAudio != null && message.hasOwnProperty("outputAudio")) + object.outputAudio = options.bytes === String ? $util.base64.encode(message.outputAudio, 0, message.outputAudio.length) : options.bytes === Array ? Array.prototype.slice.call(message.outputAudio) : message.outputAudio; + if (message.outputAudioConfig != null && message.hasOwnProperty("outputAudioConfig")) + object.outputAudioConfig = $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.toObject(message.outputAudioConfig, options); return object; }; /** - * Converts this CreateTransitionRouteGroupRequest to JSON. + * Converts this FulfillIntentResponse to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest + * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentResponse * @instance * @returns {Object.} JSON object */ - CreateTransitionRouteGroupRequest.prototype.toJSON = function toJSON() { + FulfillIntentResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateTransitionRouteGroupRequest + * Gets the default type url for FulfillIntentResponse * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest + * @memberof google.cloud.dialogflow.cx.v3.FulfillIntentResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateTransitionRouteGroupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + FulfillIntentResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.FulfillIntentResponse"; }; - return CreateTransitionRouteGroupRequest; + return FulfillIntentResponse; })(); - v3.UpdateTransitionRouteGroupRequest = (function() { + v3.SentimentAnalysisResult = (function() { /** - * Properties of an UpdateTransitionRouteGroupRequest. + * Properties of a SentimentAnalysisResult. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IUpdateTransitionRouteGroupRequest - * @property {google.cloud.dialogflow.cx.v3.ITransitionRouteGroup|null} [transitionRouteGroup] UpdateTransitionRouteGroupRequest transitionRouteGroup - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateTransitionRouteGroupRequest updateMask - * @property {string|null} [languageCode] UpdateTransitionRouteGroupRequest languageCode + * @interface ISentimentAnalysisResult + * @property {number|null} [score] SentimentAnalysisResult score + * @property {number|null} [magnitude] SentimentAnalysisResult magnitude */ /** - * Constructs a new UpdateTransitionRouteGroupRequest. + * Constructs a new SentimentAnalysisResult. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents an UpdateTransitionRouteGroupRequest. - * @implements IUpdateTransitionRouteGroupRequest + * @classdesc Represents a SentimentAnalysisResult. + * @implements ISentimentAnalysisResult * @constructor - * @param {google.cloud.dialogflow.cx.v3.IUpdateTransitionRouteGroupRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.ISentimentAnalysisResult=} [properties] Properties to set */ - function UpdateTransitionRouteGroupRequest(properties) { + function SentimentAnalysisResult(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -72374,105 +72318,91 @@ } /** - * UpdateTransitionRouteGroupRequest transitionRouteGroup. - * @member {google.cloud.dialogflow.cx.v3.ITransitionRouteGroup|null|undefined} transitionRouteGroup - * @memberof google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest - * @instance - */ - UpdateTransitionRouteGroupRequest.prototype.transitionRouteGroup = null; - - /** - * UpdateTransitionRouteGroupRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest + * SentimentAnalysisResult score. + * @member {number} score + * @memberof google.cloud.dialogflow.cx.v3.SentimentAnalysisResult * @instance */ - UpdateTransitionRouteGroupRequest.prototype.updateMask = null; + SentimentAnalysisResult.prototype.score = 0; /** - * UpdateTransitionRouteGroupRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest + * SentimentAnalysisResult magnitude. + * @member {number} magnitude + * @memberof google.cloud.dialogflow.cx.v3.SentimentAnalysisResult * @instance */ - UpdateTransitionRouteGroupRequest.prototype.languageCode = ""; + SentimentAnalysisResult.prototype.magnitude = 0; /** - * Creates a new UpdateTransitionRouteGroupRequest instance using the specified properties. + * Creates a new SentimentAnalysisResult instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest + * @memberof google.cloud.dialogflow.cx.v3.SentimentAnalysisResult * @static - * @param {google.cloud.dialogflow.cx.v3.IUpdateTransitionRouteGroupRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest} UpdateTransitionRouteGroupRequest instance + * @param {google.cloud.dialogflow.cx.v3.ISentimentAnalysisResult=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.SentimentAnalysisResult} SentimentAnalysisResult instance */ - UpdateTransitionRouteGroupRequest.create = function create(properties) { - return new UpdateTransitionRouteGroupRequest(properties); + SentimentAnalysisResult.create = function create(properties) { + return new SentimentAnalysisResult(properties); }; /** - * Encodes the specified UpdateTransitionRouteGroupRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest.verify|verify} messages. + * Encodes the specified SentimentAnalysisResult message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SentimentAnalysisResult.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest + * @memberof google.cloud.dialogflow.cx.v3.SentimentAnalysisResult * @static - * @param {google.cloud.dialogflow.cx.v3.IUpdateTransitionRouteGroupRequest} message UpdateTransitionRouteGroupRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ISentimentAnalysisResult} message SentimentAnalysisResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateTransitionRouteGroupRequest.encode = function encode(message, writer) { + SentimentAnalysisResult.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.transitionRouteGroup != null && Object.hasOwnProperty.call(message, "transitionRouteGroup")) - $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup.encode(message.transitionRouteGroup, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.languageCode); + 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 UpdateTransitionRouteGroupRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest.verify|verify} messages. + * Encodes the specified SentimentAnalysisResult message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SentimentAnalysisResult.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest + * @memberof google.cloud.dialogflow.cx.v3.SentimentAnalysisResult * @static - * @param {google.cloud.dialogflow.cx.v3.IUpdateTransitionRouteGroupRequest} message UpdateTransitionRouteGroupRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ISentimentAnalysisResult} message SentimentAnalysisResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateTransitionRouteGroupRequest.encodeDelimited = function encodeDelimited(message, writer) { + SentimentAnalysisResult.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateTransitionRouteGroupRequest message from the specified reader or buffer. + * Decodes a SentimentAnalysisResult message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest + * @memberof google.cloud.dialogflow.cx.v3.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.UpdateTransitionRouteGroupRequest} UpdateTransitionRouteGroupRequest + * @returns {google.cloud.dialogflow.cx.v3.SentimentAnalysisResult} SentimentAnalysisResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateTransitionRouteGroupRequest.decode = function decode(reader, length, error) { + SentimentAnalysisResult.decode = function decode(reader, length, error) { 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.UpdateTransitionRouteGroupRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.SentimentAnalysisResult(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.transitionRouteGroup = $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup.decode(reader, reader.uint32()); + message.score = reader.float(); break; } case 2: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - case 3: { - message.languageCode = reader.string(); + message.magnitude = reader.float(); break; } default: @@ -72484,583 +72414,352 @@ }; /** - * Decodes an UpdateTransitionRouteGroupRequest message from the specified reader or buffer, length delimited. + * Decodes a SentimentAnalysisResult message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest + * @memberof google.cloud.dialogflow.cx.v3.SentimentAnalysisResult * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest} UpdateTransitionRouteGroupRequest + * @returns {google.cloud.dialogflow.cx.v3.SentimentAnalysisResult} SentimentAnalysisResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateTransitionRouteGroupRequest.decodeDelimited = function decodeDelimited(reader) { + SentimentAnalysisResult.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateTransitionRouteGroupRequest message. + * Verifies a SentimentAnalysisResult message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest + * @memberof google.cloud.dialogflow.cx.v3.SentimentAnalysisResult * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateTransitionRouteGroupRequest.verify = function verify(message) { + SentimentAnalysisResult.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.transitionRouteGroup != null && message.hasOwnProperty("transitionRouteGroup")) { - var error = $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup.verify(message.transitionRouteGroup); - if (error) - return "transitionRouteGroup." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string 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 an UpdateTransitionRouteGroupRequest message from a plain object. Also converts values to their respective internal types. + * Creates a SentimentAnalysisResult message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest + * @memberof google.cloud.dialogflow.cx.v3.SentimentAnalysisResult * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest} UpdateTransitionRouteGroupRequest + * @returns {google.cloud.dialogflow.cx.v3.SentimentAnalysisResult} SentimentAnalysisResult */ - UpdateTransitionRouteGroupRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest) + SentimentAnalysisResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.SentimentAnalysisResult) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest(); - if (object.transitionRouteGroup != null) { - if (typeof object.transitionRouteGroup !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest.transitionRouteGroup: object expected"); - message.transitionRouteGroup = $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup.fromObject(object.transitionRouteGroup); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.languageCode != null) - message.languageCode = String(object.languageCode); + var message = new $root.google.cloud.dialogflow.cx.v3.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 an UpdateTransitionRouteGroupRequest message. Also converts values to other types if specified. + * Creates a plain object from a SentimentAnalysisResult message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest + * @memberof google.cloud.dialogflow.cx.v3.SentimentAnalysisResult * @static - * @param {google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest} message UpdateTransitionRouteGroupRequest + * @param {google.cloud.dialogflow.cx.v3.SentimentAnalysisResult} message SentimentAnalysisResult * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateTransitionRouteGroupRequest.toObject = function toObject(message, options) { + SentimentAnalysisResult.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.transitionRouteGroup = null; - object.updateMask = null; - object.languageCode = ""; + object.score = 0; + object.magnitude = 0; } - if (message.transitionRouteGroup != null && message.hasOwnProperty("transitionRouteGroup")) - object.transitionRouteGroup = $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup.toObject(message.transitionRouteGroup, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; + 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 UpdateTransitionRouteGroupRequest to JSON. + * Converts this SentimentAnalysisResult to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest + * @memberof google.cloud.dialogflow.cx.v3.SentimentAnalysisResult * @instance * @returns {Object.} JSON object */ - UpdateTransitionRouteGroupRequest.prototype.toJSON = function toJSON() { + SentimentAnalysisResult.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UpdateTransitionRouteGroupRequest + * Gets the default type url for SentimentAnalysisResult * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest + * @memberof google.cloud.dialogflow.cx.v3.SentimentAnalysisResult * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UpdateTransitionRouteGroupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SentimentAnalysisResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.SentimentAnalysisResult"; }; - return UpdateTransitionRouteGroupRequest; + return SentimentAnalysisResult; })(); - v3.DeleteTransitionRouteGroupRequest = (function() { + /** + * DetectIntentResponseView enum. + * @name google.cloud.dialogflow.cx.v3.DetectIntentResponseView + * @enum {number} + * @property {number} DETECT_INTENT_RESPONSE_VIEW_UNSPECIFIED=0 DETECT_INTENT_RESPONSE_VIEW_UNSPECIFIED value + * @property {number} DETECT_INTENT_RESPONSE_VIEW_FULL=1 DETECT_INTENT_RESPONSE_VIEW_FULL value + * @property {number} DETECT_INTENT_RESPONSE_VIEW_BASIC=2 DETECT_INTENT_RESPONSE_VIEW_BASIC value + * @property {number} DETECT_INTENT_RESPONSE_VIEW_DEFAULT=3 DETECT_INTENT_RESPONSE_VIEW_DEFAULT value + */ + v3.DetectIntentResponseView = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DETECT_INTENT_RESPONSE_VIEW_UNSPECIFIED"] = 0; + values[valuesById[1] = "DETECT_INTENT_RESPONSE_VIEW_FULL"] = 1; + values[valuesById[2] = "DETECT_INTENT_RESPONSE_VIEW_BASIC"] = 2; + values[valuesById[3] = "DETECT_INTENT_RESPONSE_VIEW_DEFAULT"] = 3; + return values; + })(); - /** - * Properties of a DeleteTransitionRouteGroupRequest. - * @memberof google.cloud.dialogflow.cx.v3 - * @interface IDeleteTransitionRouteGroupRequest - * @property {string|null} [name] DeleteTransitionRouteGroupRequest name - * @property {boolean|null} [force] DeleteTransitionRouteGroupRequest force - */ + v3.SessionEntityTypes = (function() { /** - * Constructs a new DeleteTransitionRouteGroupRequest. + * Constructs a new SessionEntityTypes service. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a DeleteTransitionRouteGroupRequest. - * @implements IDeleteTransitionRouteGroupRequest + * @classdesc Represents a SessionEntityTypes + * @extends $protobuf.rpc.Service * @constructor - * @param {google.cloud.dialogflow.cx.v3.IDeleteTransitionRouteGroupRequest=} [properties] Properties to set + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited */ - function DeleteTransitionRouteGroupRequest(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]]; + function SessionEntityTypes(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); } - /** - * DeleteTransitionRouteGroupRequest name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest - * @instance - */ - DeleteTransitionRouteGroupRequest.prototype.name = ""; - - /** - * DeleteTransitionRouteGroupRequest force. - * @member {boolean} force - * @memberof google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest - * @instance - */ - DeleteTransitionRouteGroupRequest.prototype.force = false; + (SessionEntityTypes.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = SessionEntityTypes; /** - * Creates a new DeleteTransitionRouteGroupRequest instance using the specified properties. + * Creates new SessionEntityTypes service using the specified rpc implementation. * @function create - * @memberof google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest + * @memberof google.cloud.dialogflow.cx.v3.SessionEntityTypes * @static - * @param {google.cloud.dialogflow.cx.v3.IDeleteTransitionRouteGroupRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest} DeleteTransitionRouteGroupRequest instance + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {SessionEntityTypes} RPC service. Useful where requests and/or responses are streamed. */ - DeleteTransitionRouteGroupRequest.create = function create(properties) { - return new DeleteTransitionRouteGroupRequest(properties); + SessionEntityTypes.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); }; /** - * Encodes the specified DeleteTransitionRouteGroupRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.IDeleteTransitionRouteGroupRequest} message DeleteTransitionRouteGroupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteTransitionRouteGroupRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.force != null && Object.hasOwnProperty.call(message, "force")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.force); - return writer; - }; - - /** - * Encodes the specified DeleteTransitionRouteGroupRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.IDeleteTransitionRouteGroupRequest} message DeleteTransitionRouteGroupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteTransitionRouteGroupRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteTransitionRouteGroupRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest - * @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.DeleteTransitionRouteGroupRequest} DeleteTransitionRouteGroupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteTransitionRouteGroupRequest.decode = function decode(reader, length, error) { - 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.DeleteTransitionRouteGroupRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.force = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteTransitionRouteGroupRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest} DeleteTransitionRouteGroupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteTransitionRouteGroupRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteTransitionRouteGroupRequest message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteTransitionRouteGroupRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.force != null && message.hasOwnProperty("force")) - if (typeof message.force !== "boolean") - return "force: boolean expected"; - return null; - }; - - /** - * Creates a DeleteTransitionRouteGroupRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest} DeleteTransitionRouteGroupRequest - */ - DeleteTransitionRouteGroupRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.force != null) - message.force = Boolean(object.force); - return message; - }; - - /** - * Creates a plain object from a DeleteTransitionRouteGroupRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest} message DeleteTransitionRouteGroupRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteTransitionRouteGroupRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.force = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.force != null && message.hasOwnProperty("force")) - object.force = message.force; - return object; - }; - - /** - * Converts this DeleteTransitionRouteGroupRequest to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteTransitionRouteGroupRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteTransitionRouteGroupRequest - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteTransitionRouteGroupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest"; - }; - - return DeleteTransitionRouteGroupRequest; - })(); - - v3.Webhooks = (function() { - - /** - * Constructs a new Webhooks service. - * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a Webhooks - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function Webhooks(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (Webhooks.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Webhooks; - - /** - * Creates new Webhooks service using the specified rpc implementation. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.Webhooks - * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {Webhooks} RPC service. Useful where requests and/or responses are streamed. - */ - Webhooks.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Webhooks|listWebhooks}. - * @memberof google.cloud.dialogflow.cx.v3.Webhooks - * @typedef ListWebhooksCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.ListWebhooksResponse} [response] ListWebhooksResponse + * Callback as used by {@link google.cloud.dialogflow.cx.v3.SessionEntityTypes|listSessionEntityTypes}. + * @memberof google.cloud.dialogflow.cx.v3.SessionEntityTypes + * @typedef ListSessionEntityTypesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse} [response] ListSessionEntityTypesResponse */ /** - * Calls ListWebhooks. - * @function listWebhooks - * @memberof google.cloud.dialogflow.cx.v3.Webhooks + * Calls ListSessionEntityTypes. + * @function listSessionEntityTypes + * @memberof google.cloud.dialogflow.cx.v3.SessionEntityTypes * @instance - * @param {google.cloud.dialogflow.cx.v3.IListWebhooksRequest} request ListWebhooksRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Webhooks.ListWebhooksCallback} callback Node-style callback called with the error, if any, and ListWebhooksResponse + * @param {google.cloud.dialogflow.cx.v3.IListSessionEntityTypesRequest} request ListSessionEntityTypesRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.SessionEntityTypes.ListSessionEntityTypesCallback} callback Node-style callback called with the error, if any, and ListSessionEntityTypesResponse * @returns {undefined} * @variation 1 */ - Object.defineProperty(Webhooks.prototype.listWebhooks = function listWebhooks(request, callback) { - return this.rpcCall(listWebhooks, $root.google.cloud.dialogflow.cx.v3.ListWebhooksRequest, $root.google.cloud.dialogflow.cx.v3.ListWebhooksResponse, request, callback); - }, "name", { value: "ListWebhooks" }); + Object.defineProperty(SessionEntityTypes.prototype.listSessionEntityTypes = function listSessionEntityTypes(request, callback) { + return this.rpcCall(listSessionEntityTypes, $root.google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest, $root.google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse, request, callback); + }, "name", { value: "ListSessionEntityTypes" }); /** - * Calls ListWebhooks. - * @function listWebhooks - * @memberof google.cloud.dialogflow.cx.v3.Webhooks + * Calls ListSessionEntityTypes. + * @function listSessionEntityTypes + * @memberof google.cloud.dialogflow.cx.v3.SessionEntityTypes * @instance - * @param {google.cloud.dialogflow.cx.v3.IListWebhooksRequest} request ListWebhooksRequest message or plain object - * @returns {Promise} Promise + * @param {google.cloud.dialogflow.cx.v3.IListSessionEntityTypesRequest} request ListSessionEntityTypesRequest message or plain object + * @returns {Promise} Promise * @variation 2 */ /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Webhooks|getWebhook}. - * @memberof google.cloud.dialogflow.cx.v3.Webhooks - * @typedef GetWebhookCallback + * Callback as used by {@link google.cloud.dialogflow.cx.v3.SessionEntityTypes|getSessionEntityType}. + * @memberof google.cloud.dialogflow.cx.v3.SessionEntityTypes + * @typedef GetSessionEntityTypeCallback * @type {function} * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.Webhook} [response] Webhook + * @param {google.cloud.dialogflow.cx.v3.SessionEntityType} [response] SessionEntityType */ /** - * Calls GetWebhook. - * @function getWebhook - * @memberof google.cloud.dialogflow.cx.v3.Webhooks + * Calls GetSessionEntityType. + * @function getSessionEntityType + * @memberof google.cloud.dialogflow.cx.v3.SessionEntityTypes * @instance - * @param {google.cloud.dialogflow.cx.v3.IGetWebhookRequest} request GetWebhookRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Webhooks.GetWebhookCallback} callback Node-style callback called with the error, if any, and Webhook + * @param {google.cloud.dialogflow.cx.v3.IGetSessionEntityTypeRequest} request GetSessionEntityTypeRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.SessionEntityTypes.GetSessionEntityTypeCallback} callback Node-style callback called with the error, if any, and SessionEntityType * @returns {undefined} * @variation 1 */ - Object.defineProperty(Webhooks.prototype.getWebhook = function getWebhook(request, callback) { - return this.rpcCall(getWebhook, $root.google.cloud.dialogflow.cx.v3.GetWebhookRequest, $root.google.cloud.dialogflow.cx.v3.Webhook, request, callback); - }, "name", { value: "GetWebhook" }); + Object.defineProperty(SessionEntityTypes.prototype.getSessionEntityType = function getSessionEntityType(request, callback) { + return this.rpcCall(getSessionEntityType, $root.google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest, $root.google.cloud.dialogflow.cx.v3.SessionEntityType, request, callback); + }, "name", { value: "GetSessionEntityType" }); /** - * Calls GetWebhook. - * @function getWebhook - * @memberof google.cloud.dialogflow.cx.v3.Webhooks + * Calls GetSessionEntityType. + * @function getSessionEntityType + * @memberof google.cloud.dialogflow.cx.v3.SessionEntityTypes * @instance - * @param {google.cloud.dialogflow.cx.v3.IGetWebhookRequest} request GetWebhookRequest message or plain object - * @returns {Promise} Promise + * @param {google.cloud.dialogflow.cx.v3.IGetSessionEntityTypeRequest} request GetSessionEntityTypeRequest message or plain object + * @returns {Promise} Promise * @variation 2 */ /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Webhooks|createWebhook}. - * @memberof google.cloud.dialogflow.cx.v3.Webhooks - * @typedef CreateWebhookCallback + * Callback as used by {@link google.cloud.dialogflow.cx.v3.SessionEntityTypes|createSessionEntityType}. + * @memberof google.cloud.dialogflow.cx.v3.SessionEntityTypes + * @typedef CreateSessionEntityTypeCallback * @type {function} * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.Webhook} [response] Webhook + * @param {google.cloud.dialogflow.cx.v3.SessionEntityType} [response] SessionEntityType */ /** - * Calls CreateWebhook. - * @function createWebhook - * @memberof google.cloud.dialogflow.cx.v3.Webhooks + * Calls CreateSessionEntityType. + * @function createSessionEntityType + * @memberof google.cloud.dialogflow.cx.v3.SessionEntityTypes * @instance - * @param {google.cloud.dialogflow.cx.v3.ICreateWebhookRequest} request CreateWebhookRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Webhooks.CreateWebhookCallback} callback Node-style callback called with the error, if any, and Webhook + * @param {google.cloud.dialogflow.cx.v3.ICreateSessionEntityTypeRequest} request CreateSessionEntityTypeRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.SessionEntityTypes.CreateSessionEntityTypeCallback} callback Node-style callback called with the error, if any, and SessionEntityType * @returns {undefined} * @variation 1 */ - Object.defineProperty(Webhooks.prototype.createWebhook = function createWebhook(request, callback) { - return this.rpcCall(createWebhook, $root.google.cloud.dialogflow.cx.v3.CreateWebhookRequest, $root.google.cloud.dialogflow.cx.v3.Webhook, request, callback); - }, "name", { value: "CreateWebhook" }); + Object.defineProperty(SessionEntityTypes.prototype.createSessionEntityType = function createSessionEntityType(request, callback) { + return this.rpcCall(createSessionEntityType, $root.google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest, $root.google.cloud.dialogflow.cx.v3.SessionEntityType, request, callback); + }, "name", { value: "CreateSessionEntityType" }); /** - * Calls CreateWebhook. - * @function createWebhook - * @memberof google.cloud.dialogflow.cx.v3.Webhooks + * Calls CreateSessionEntityType. + * @function createSessionEntityType + * @memberof google.cloud.dialogflow.cx.v3.SessionEntityTypes * @instance - * @param {google.cloud.dialogflow.cx.v3.ICreateWebhookRequest} request CreateWebhookRequest message or plain object - * @returns {Promise} Promise + * @param {google.cloud.dialogflow.cx.v3.ICreateSessionEntityTypeRequest} request CreateSessionEntityTypeRequest message or plain object + * @returns {Promise} Promise * @variation 2 */ /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Webhooks|updateWebhook}. - * @memberof google.cloud.dialogflow.cx.v3.Webhooks - * @typedef UpdateWebhookCallback + * Callback as used by {@link google.cloud.dialogflow.cx.v3.SessionEntityTypes|updateSessionEntityType}. + * @memberof google.cloud.dialogflow.cx.v3.SessionEntityTypes + * @typedef UpdateSessionEntityTypeCallback * @type {function} * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.Webhook} [response] Webhook + * @param {google.cloud.dialogflow.cx.v3.SessionEntityType} [response] SessionEntityType */ /** - * Calls UpdateWebhook. - * @function updateWebhook - * @memberof google.cloud.dialogflow.cx.v3.Webhooks + * Calls UpdateSessionEntityType. + * @function updateSessionEntityType + * @memberof google.cloud.dialogflow.cx.v3.SessionEntityTypes * @instance - * @param {google.cloud.dialogflow.cx.v3.IUpdateWebhookRequest} request UpdateWebhookRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Webhooks.UpdateWebhookCallback} callback Node-style callback called with the error, if any, and Webhook + * @param {google.cloud.dialogflow.cx.v3.IUpdateSessionEntityTypeRequest} request UpdateSessionEntityTypeRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.SessionEntityTypes.UpdateSessionEntityTypeCallback} callback Node-style callback called with the error, if any, and SessionEntityType * @returns {undefined} * @variation 1 */ - Object.defineProperty(Webhooks.prototype.updateWebhook = function updateWebhook(request, callback) { - return this.rpcCall(updateWebhook, $root.google.cloud.dialogflow.cx.v3.UpdateWebhookRequest, $root.google.cloud.dialogflow.cx.v3.Webhook, request, callback); - }, "name", { value: "UpdateWebhook" }); + Object.defineProperty(SessionEntityTypes.prototype.updateSessionEntityType = function updateSessionEntityType(request, callback) { + return this.rpcCall(updateSessionEntityType, $root.google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest, $root.google.cloud.dialogflow.cx.v3.SessionEntityType, request, callback); + }, "name", { value: "UpdateSessionEntityType" }); /** - * Calls UpdateWebhook. - * @function updateWebhook - * @memberof google.cloud.dialogflow.cx.v3.Webhooks + * Calls UpdateSessionEntityType. + * @function updateSessionEntityType + * @memberof google.cloud.dialogflow.cx.v3.SessionEntityTypes * @instance - * @param {google.cloud.dialogflow.cx.v3.IUpdateWebhookRequest} request UpdateWebhookRequest message or plain object - * @returns {Promise} Promise + * @param {google.cloud.dialogflow.cx.v3.IUpdateSessionEntityTypeRequest} request UpdateSessionEntityTypeRequest message or plain object + * @returns {Promise} Promise * @variation 2 */ /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Webhooks|deleteWebhook}. - * @memberof google.cloud.dialogflow.cx.v3.Webhooks - * @typedef DeleteWebhookCallback + * Callback as used by {@link google.cloud.dialogflow.cx.v3.SessionEntityTypes|deleteSessionEntityType}. + * @memberof google.cloud.dialogflow.cx.v3.SessionEntityTypes + * @typedef DeleteSessionEntityTypeCallback * @type {function} * @param {Error|null} error Error, if any * @param {google.protobuf.Empty} [response] Empty */ /** - * Calls DeleteWebhook. - * @function deleteWebhook - * @memberof google.cloud.dialogflow.cx.v3.Webhooks + * Calls DeleteSessionEntityType. + * @function deleteSessionEntityType + * @memberof google.cloud.dialogflow.cx.v3.SessionEntityTypes * @instance - * @param {google.cloud.dialogflow.cx.v3.IDeleteWebhookRequest} request DeleteWebhookRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Webhooks.DeleteWebhookCallback} callback Node-style callback called with the error, if any, and Empty + * @param {google.cloud.dialogflow.cx.v3.IDeleteSessionEntityTypeRequest} request DeleteSessionEntityTypeRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.SessionEntityTypes.DeleteSessionEntityTypeCallback} callback Node-style callback called with the error, if any, and Empty * @returns {undefined} * @variation 1 */ - Object.defineProperty(Webhooks.prototype.deleteWebhook = function deleteWebhook(request, callback) { - return this.rpcCall(deleteWebhook, $root.google.cloud.dialogflow.cx.v3.DeleteWebhookRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteWebhook" }); + Object.defineProperty(SessionEntityTypes.prototype.deleteSessionEntityType = function deleteSessionEntityType(request, callback) { + return this.rpcCall(deleteSessionEntityType, $root.google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteSessionEntityType" }); /** - * Calls DeleteWebhook. - * @function deleteWebhook - * @memberof google.cloud.dialogflow.cx.v3.Webhooks + * Calls DeleteSessionEntityType. + * @function deleteSessionEntityType + * @memberof google.cloud.dialogflow.cx.v3.SessionEntityTypes * @instance - * @param {google.cloud.dialogflow.cx.v3.IDeleteWebhookRequest} request DeleteWebhookRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.IDeleteSessionEntityTypeRequest} request DeleteSessionEntityTypeRequest message or plain object * @returns {Promise} Promise * @variation 2 */ - return Webhooks; + return SessionEntityTypes; })(); - v3.Webhook = (function() { + v3.SessionEntityType = (function() { /** - * Properties of a Webhook. + * Properties of a SessionEntityType. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IWebhook - * @property {string|null} [name] Webhook name - * @property {string|null} [displayName] Webhook displayName - * @property {google.cloud.dialogflow.cx.v3.Webhook.IGenericWebService|null} [genericWebService] Webhook genericWebService - * @property {google.cloud.dialogflow.cx.v3.Webhook.IServiceDirectoryConfig|null} [serviceDirectory] Webhook serviceDirectory - * @property {google.protobuf.IDuration|null} [timeout] Webhook timeout - * @property {boolean|null} [disabled] Webhook disabled + * @interface ISessionEntityType + * @property {string|null} [name] SessionEntityType name + * @property {google.cloud.dialogflow.cx.v3.SessionEntityType.EntityOverrideMode|null} [entityOverrideMode] SessionEntityType entityOverrideMode + * @property {Array.|null} [entities] SessionEntityType entities */ /** - * Constructs a new Webhook. + * Constructs a new SessionEntityType. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a Webhook. - * @implements IWebhook + * @classdesc Represents a SessionEntityType. + * @implements ISessionEntityType * @constructor - * @param {google.cloud.dialogflow.cx.v3.IWebhook=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.ISessionEntityType=} [properties] Properties to set */ - function Webhook(properties) { + function SessionEntityType(properties) { + this.entities = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -73068,134 +72767,91 @@ } /** - * Webhook name. + * SessionEntityType name. * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.Webhook - * @instance - */ - Webhook.prototype.name = ""; - - /** - * Webhook displayName. - * @member {string} displayName - * @memberof google.cloud.dialogflow.cx.v3.Webhook - * @instance - */ - Webhook.prototype.displayName = ""; - - /** - * Webhook genericWebService. - * @member {google.cloud.dialogflow.cx.v3.Webhook.IGenericWebService|null|undefined} genericWebService - * @memberof google.cloud.dialogflow.cx.v3.Webhook - * @instance - */ - Webhook.prototype.genericWebService = null; - - /** - * Webhook serviceDirectory. - * @member {google.cloud.dialogflow.cx.v3.Webhook.IServiceDirectoryConfig|null|undefined} serviceDirectory - * @memberof google.cloud.dialogflow.cx.v3.Webhook - * @instance - */ - Webhook.prototype.serviceDirectory = null; - - /** - * Webhook timeout. - * @member {google.protobuf.IDuration|null|undefined} timeout - * @memberof google.cloud.dialogflow.cx.v3.Webhook + * @memberof google.cloud.dialogflow.cx.v3.SessionEntityType * @instance */ - Webhook.prototype.timeout = null; + SessionEntityType.prototype.name = ""; /** - * Webhook disabled. - * @member {boolean} disabled - * @memberof google.cloud.dialogflow.cx.v3.Webhook + * SessionEntityType entityOverrideMode. + * @member {google.cloud.dialogflow.cx.v3.SessionEntityType.EntityOverrideMode} entityOverrideMode + * @memberof google.cloud.dialogflow.cx.v3.SessionEntityType * @instance */ - Webhook.prototype.disabled = false; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + SessionEntityType.prototype.entityOverrideMode = 0; /** - * Webhook webhook. - * @member {"genericWebService"|"serviceDirectory"|undefined} webhook - * @memberof google.cloud.dialogflow.cx.v3.Webhook + * SessionEntityType entities. + * @member {Array.} entities + * @memberof google.cloud.dialogflow.cx.v3.SessionEntityType * @instance */ - Object.defineProperty(Webhook.prototype, "webhook", { - get: $util.oneOfGetter($oneOfFields = ["genericWebService", "serviceDirectory"]), - set: $util.oneOfSetter($oneOfFields) - }); + SessionEntityType.prototype.entities = $util.emptyArray; /** - * Creates a new Webhook instance using the specified properties. + * Creates a new SessionEntityType instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.Webhook + * @memberof google.cloud.dialogflow.cx.v3.SessionEntityType * @static - * @param {google.cloud.dialogflow.cx.v3.IWebhook=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.Webhook} Webhook instance + * @param {google.cloud.dialogflow.cx.v3.ISessionEntityType=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.SessionEntityType} SessionEntityType instance */ - Webhook.create = function create(properties) { - return new Webhook(properties); + SessionEntityType.create = function create(properties) { + return new SessionEntityType(properties); }; /** - * Encodes the specified Webhook message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Webhook.verify|verify} messages. + * Encodes the specified SessionEntityType message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SessionEntityType.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.Webhook + * @memberof google.cloud.dialogflow.cx.v3.SessionEntityType * @static - * @param {google.cloud.dialogflow.cx.v3.IWebhook} message Webhook message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ISessionEntityType} message SessionEntityType message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Webhook.encode = function encode(message, writer) { + SessionEntityType.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.genericWebService != null && Object.hasOwnProperty.call(message, "genericWebService")) - $root.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.encode(message.genericWebService, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.disabled); - if (message.timeout != null && Object.hasOwnProperty.call(message, "timeout")) - $root.google.protobuf.Duration.encode(message.timeout, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.serviceDirectory != null && Object.hasOwnProperty.call(message, "serviceDirectory")) - $root.google.cloud.dialogflow.cx.v3.Webhook.ServiceDirectoryConfig.encode(message.serviceDirectory, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.entityOverrideMode != null && Object.hasOwnProperty.call(message, "entityOverrideMode")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.entityOverrideMode); + if (message.entities != null && message.entities.length) + for (var i = 0; i < message.entities.length; ++i) + $root.google.cloud.dialogflow.cx.v3.EntityType.Entity.encode(message.entities[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified Webhook message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Webhook.verify|verify} messages. + * Encodes the specified SessionEntityType message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SessionEntityType.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Webhook + * @memberof google.cloud.dialogflow.cx.v3.SessionEntityType * @static - * @param {google.cloud.dialogflow.cx.v3.IWebhook} message Webhook message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ISessionEntityType} message SessionEntityType message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Webhook.encodeDelimited = function encodeDelimited(message, writer) { + SessionEntityType.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Webhook message from the specified reader or buffer. + * Decodes a SessionEntityType message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.Webhook + * @memberof google.cloud.dialogflow.cx.v3.SessionEntityType * @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.Webhook} Webhook + * @returns {google.cloud.dialogflow.cx.v3.SessionEntityType} SessionEntityType * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Webhook.decode = function decode(reader, length, error) { + SessionEntityType.decode = function decode(reader, length, error) { 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.Webhook(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.SessionEntityType(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -73205,24 +72861,14 @@ message.name = reader.string(); break; } - case 2: { - message.displayName = reader.string(); + case 3: { + message.entityOverrideMode = reader.int32(); break; } case 4: { - message.genericWebService = $root.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.decode(reader, reader.uint32()); - break; - } - case 7: { - message.serviceDirectory = $root.google.cloud.dialogflow.cx.v3.Webhook.ServiceDirectoryConfig.decode(reader, reader.uint32()); - break; - } - case 6: { - message.timeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 5: { - message.disabled = reader.bool(); + if (!(message.entities && message.entities.length)) + message.entities = []; + message.entities.push($root.google.cloud.dialogflow.cx.v3.EntityType.Entity.decode(reader, reader.uint32())); break; } default: @@ -73234,1413 +72880,25158 @@ }; /** - * Decodes a Webhook message from the specified reader or buffer, length delimited. + * Decodes a SessionEntityType message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Webhook + * @memberof google.cloud.dialogflow.cx.v3.SessionEntityType * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.Webhook} Webhook + * @returns {google.cloud.dialogflow.cx.v3.SessionEntityType} SessionEntityType * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Webhook.decodeDelimited = function decodeDelimited(reader) { + SessionEntityType.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Webhook message. + * Verifies a SessionEntityType message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.Webhook + * @memberof google.cloud.dialogflow.cx.v3.SessionEntityType * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Webhook.verify = function verify(message) { + SessionEntityType.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.genericWebService != null && message.hasOwnProperty("genericWebService")) { - properties.webhook = 1; - { - var error = $root.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.verify(message.genericWebService); - if (error) - return "genericWebService." + error; + if (message.entityOverrideMode != null && message.hasOwnProperty("entityOverrideMode")) + switch (message.entityOverrideMode) { + default: + return "entityOverrideMode: enum value expected"; + case 0: + case 1: + case 2: + break; } - } - if (message.serviceDirectory != null && message.hasOwnProperty("serviceDirectory")) { - if (properties.webhook === 1) - return "webhook: multiple values"; - properties.webhook = 1; - { - var error = $root.google.cloud.dialogflow.cx.v3.Webhook.ServiceDirectoryConfig.verify(message.serviceDirectory); + if (message.entities != null && message.hasOwnProperty("entities")) { + if (!Array.isArray(message.entities)) + return "entities: array expected"; + for (var i = 0; i < message.entities.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.EntityType.Entity.verify(message.entities[i]); if (error) - return "serviceDirectory." + error; + return "entities." + error; } } - if (message.timeout != null && message.hasOwnProperty("timeout")) { - var error = $root.google.protobuf.Duration.verify(message.timeout); - if (error) - return "timeout." + error; - } - if (message.disabled != null && message.hasOwnProperty("disabled")) - if (typeof message.disabled !== "boolean") - return "disabled: boolean expected"; return null; }; /** - * Creates a Webhook message from a plain object. Also converts values to their respective internal types. + * Creates a SessionEntityType message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.Webhook + * @memberof google.cloud.dialogflow.cx.v3.SessionEntityType * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.Webhook} Webhook + * @returns {google.cloud.dialogflow.cx.v3.SessionEntityType} SessionEntityType */ - Webhook.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.Webhook) + SessionEntityType.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.SessionEntityType) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.Webhook(); + var message = new $root.google.cloud.dialogflow.cx.v3.SessionEntityType(); if (object.name != null) message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.genericWebService != null) { - if (typeof object.genericWebService !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.Webhook.genericWebService: object expected"); - message.genericWebService = $root.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.fromObject(object.genericWebService); - } - if (object.serviceDirectory != null) { - if (typeof object.serviceDirectory !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.Webhook.serviceDirectory: object expected"); - message.serviceDirectory = $root.google.cloud.dialogflow.cx.v3.Webhook.ServiceDirectoryConfig.fromObject(object.serviceDirectory); + switch (object.entityOverrideMode) { + default: + if (typeof object.entityOverrideMode === "number") { + message.entityOverrideMode = object.entityOverrideMode; + break; + } + break; + case "ENTITY_OVERRIDE_MODE_UNSPECIFIED": + case 0: + message.entityOverrideMode = 0; + break; + case "ENTITY_OVERRIDE_MODE_OVERRIDE": + case 1: + message.entityOverrideMode = 1; + break; + case "ENTITY_OVERRIDE_MODE_SUPPLEMENT": + case 2: + message.entityOverrideMode = 2; + break; } - if (object.timeout != null) { - if (typeof object.timeout !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.Webhook.timeout: object expected"); - message.timeout = $root.google.protobuf.Duration.fromObject(object.timeout); + if (object.entities) { + if (!Array.isArray(object.entities)) + throw TypeError(".google.cloud.dialogflow.cx.v3.SessionEntityType.entities: array expected"); + message.entities = []; + for (var i = 0; i < object.entities.length; ++i) { + if (typeof object.entities[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.SessionEntityType.entities: object expected"); + message.entities[i] = $root.google.cloud.dialogflow.cx.v3.EntityType.Entity.fromObject(object.entities[i]); + } } - if (object.disabled != null) - message.disabled = Boolean(object.disabled); return message; }; /** - * Creates a plain object from a Webhook message. Also converts values to other types if specified. + * Creates a plain object from a SessionEntityType message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.Webhook + * @memberof google.cloud.dialogflow.cx.v3.SessionEntityType * @static - * @param {google.cloud.dialogflow.cx.v3.Webhook} message Webhook + * @param {google.cloud.dialogflow.cx.v3.SessionEntityType} message SessionEntityType * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Webhook.toObject = function toObject(message, options) { + SessionEntityType.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.entities = []; if (options.defaults) { object.name = ""; - object.displayName = ""; - object.disabled = false; - object.timeout = null; + object.entityOverrideMode = options.enums === String ? "ENTITY_OVERRIDE_MODE_UNSPECIFIED" : 0; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.genericWebService != null && message.hasOwnProperty("genericWebService")) { - object.genericWebService = $root.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.toObject(message.genericWebService, options); - if (options.oneofs) - object.webhook = "genericWebService"; - } - if (message.disabled != null && message.hasOwnProperty("disabled")) - object.disabled = message.disabled; - if (message.timeout != null && message.hasOwnProperty("timeout")) - object.timeout = $root.google.protobuf.Duration.toObject(message.timeout, options); - if (message.serviceDirectory != null && message.hasOwnProperty("serviceDirectory")) { - object.serviceDirectory = $root.google.cloud.dialogflow.cx.v3.Webhook.ServiceDirectoryConfig.toObject(message.serviceDirectory, options); - if (options.oneofs) - object.webhook = "serviceDirectory"; + if (message.entityOverrideMode != null && message.hasOwnProperty("entityOverrideMode")) + object.entityOverrideMode = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.SessionEntityType.EntityOverrideMode[message.entityOverrideMode] === undefined ? message.entityOverrideMode : $root.google.cloud.dialogflow.cx.v3.SessionEntityType.EntityOverrideMode[message.entityOverrideMode] : message.entityOverrideMode; + if (message.entities && message.entities.length) { + object.entities = []; + for (var j = 0; j < message.entities.length; ++j) + object.entities[j] = $root.google.cloud.dialogflow.cx.v3.EntityType.Entity.toObject(message.entities[j], options); } return object; }; /** - * Converts this Webhook to JSON. + * Converts this SessionEntityType to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.Webhook + * @memberof google.cloud.dialogflow.cx.v3.SessionEntityType * @instance * @returns {Object.} JSON object */ - Webhook.prototype.toJSON = function toJSON() { + SessionEntityType.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Webhook + * Gets the default type url for SessionEntityType * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.Webhook + * @memberof google.cloud.dialogflow.cx.v3.SessionEntityType * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Webhook.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SessionEntityType.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Webhook"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.SessionEntityType"; }; - Webhook.GenericWebService = (function() { + /** + * EntityOverrideMode enum. + * @name google.cloud.dialogflow.cx.v3.SessionEntityType.EntityOverrideMode + * @enum {number} + * @property {number} ENTITY_OVERRIDE_MODE_UNSPECIFIED=0 ENTITY_OVERRIDE_MODE_UNSPECIFIED value + * @property {number} ENTITY_OVERRIDE_MODE_OVERRIDE=1 ENTITY_OVERRIDE_MODE_OVERRIDE value + * @property {number} ENTITY_OVERRIDE_MODE_SUPPLEMENT=2 ENTITY_OVERRIDE_MODE_SUPPLEMENT value + */ + SessionEntityType.EntityOverrideMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENTITY_OVERRIDE_MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ENTITY_OVERRIDE_MODE_OVERRIDE"] = 1; + values[valuesById[2] = "ENTITY_OVERRIDE_MODE_SUPPLEMENT"] = 2; + return values; + })(); - /** - * Properties of a GenericWebService. - * @memberof google.cloud.dialogflow.cx.v3.Webhook - * @interface IGenericWebService - * @property {string|null} [uri] GenericWebService uri - * @property {string|null} [username] GenericWebService username - * @property {string|null} [password] GenericWebService password - * @property {Object.|null} [requestHeaders] GenericWebService requestHeaders - * @property {Array.|null} [allowedCaCerts] GenericWebService allowedCaCerts - * @property {google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.IOAuthConfig|null} [oauthConfig] GenericWebService oauthConfig - * @property {google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAgentAuth|null} [serviceAgentAuth] GenericWebService serviceAgentAuth - * @property {google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.WebhookType|null} [webhookType] GenericWebService webhookType - * @property {google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.HttpMethod|null} [httpMethod] GenericWebService httpMethod - * @property {string|null} [requestBody] GenericWebService requestBody - * @property {Object.|null} [parameterMapping] GenericWebService parameterMapping - */ + return SessionEntityType; + })(); - /** - * Constructs a new GenericWebService. - * @memberof google.cloud.dialogflow.cx.v3.Webhook - * @classdesc Represents a GenericWebService. - * @implements IGenericWebService - * @constructor - * @param {google.cloud.dialogflow.cx.v3.Webhook.IGenericWebService=} [properties] Properties to set - */ - function GenericWebService(properties) { - this.requestHeaders = {}; - this.allowedCaCerts = []; - this.parameterMapping = {}; - 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]]; - } + v3.ListSessionEntityTypesRequest = (function() { - /** - * GenericWebService uri. - * @member {string} uri - * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService - * @instance - */ - GenericWebService.prototype.uri = ""; + /** + * Properties of a ListSessionEntityTypesRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IListSessionEntityTypesRequest + * @property {string|null} [parent] ListSessionEntityTypesRequest parent + * @property {number|null} [pageSize] ListSessionEntityTypesRequest pageSize + * @property {string|null} [pageToken] ListSessionEntityTypesRequest pageToken + */ - /** - * GenericWebService username. - * @member {string} username - * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService - * @instance - */ - GenericWebService.prototype.username = ""; + /** + * Constructs a new ListSessionEntityTypesRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a ListSessionEntityTypesRequest. + * @implements IListSessionEntityTypesRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IListSessionEntityTypesRequest=} [properties] Properties to set + */ + function ListSessionEntityTypesRequest(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]]; + } - /** - * GenericWebService password. - * @member {string} password - * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService - * @instance - */ - GenericWebService.prototype.password = ""; + /** + * ListSessionEntityTypesRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest + * @instance + */ + ListSessionEntityTypesRequest.prototype.parent = ""; - /** - * GenericWebService requestHeaders. - * @member {Object.} requestHeaders - * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService - * @instance - */ - GenericWebService.prototype.requestHeaders = $util.emptyObject; + /** + * ListSessionEntityTypesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest + * @instance + */ + ListSessionEntityTypesRequest.prototype.pageSize = 0; - /** - * GenericWebService allowedCaCerts. - * @member {Array.} allowedCaCerts - * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService - * @instance - */ - GenericWebService.prototype.allowedCaCerts = $util.emptyArray; + /** + * ListSessionEntityTypesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest + * @instance + */ + ListSessionEntityTypesRequest.prototype.pageToken = ""; - /** - * GenericWebService oauthConfig. - * @member {google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.IOAuthConfig|null|undefined} oauthConfig - * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService - * @instance - */ - GenericWebService.prototype.oauthConfig = null; + /** + * Creates a new ListSessionEntityTypesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IListSessionEntityTypesRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest} ListSessionEntityTypesRequest instance + */ + ListSessionEntityTypesRequest.create = function create(properties) { + return new ListSessionEntityTypesRequest(properties); + }; - /** - * GenericWebService serviceAgentAuth. - * @member {google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAgentAuth} serviceAgentAuth - * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService - * @instance - */ - GenericWebService.prototype.serviceAgentAuth = 0; + /** + * Encodes the specified ListSessionEntityTypesRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IListSessionEntityTypesRequest} message ListSessionEntityTypesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListSessionEntityTypesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; - /** - * GenericWebService webhookType. - * @member {google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.WebhookType} webhookType - * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService - * @instance - */ - GenericWebService.prototype.webhookType = 0; + /** + * Encodes the specified ListSessionEntityTypesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IListSessionEntityTypesRequest} message ListSessionEntityTypesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListSessionEntityTypesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * GenericWebService httpMethod. - * @member {google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.HttpMethod} httpMethod - * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService - * @instance - */ - GenericWebService.prototype.httpMethod = 0; + /** + * Decodes a ListSessionEntityTypesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest + * @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.ListSessionEntityTypesRequest} ListSessionEntityTypesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListSessionEntityTypesRequest.decode = function decode(reader, length, error) { + 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.ListSessionEntityTypesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * GenericWebService requestBody. - * @member {string} requestBody - * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService - * @instance - */ - GenericWebService.prototype.requestBody = ""; + /** + * Decodes a ListSessionEntityTypesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest} ListSessionEntityTypesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListSessionEntityTypesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * GenericWebService parameterMapping. - * @member {Object.} parameterMapping - * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService - * @instance - */ - GenericWebService.prototype.parameterMapping = $util.emptyObject; + /** + * Verifies a ListSessionEntityTypesRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListSessionEntityTypesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; - /** - * Creates a new GenericWebService instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService - * @static - * @param {google.cloud.dialogflow.cx.v3.Webhook.IGenericWebService=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.Webhook.GenericWebService} GenericWebService instance - */ - GenericWebService.create = function create(properties) { - return new GenericWebService(properties); - }; + /** + * Creates a ListSessionEntityTypesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest} ListSessionEntityTypesRequest + */ + ListSessionEntityTypesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; - /** - * Encodes the specified GenericWebService message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService - * @static - * @param {google.cloud.dialogflow.cx.v3.Webhook.IGenericWebService} message GenericWebService message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GenericWebService.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); - if (message.username != null && Object.hasOwnProperty.call(message, "username")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.username); - if (message.password != null && Object.hasOwnProperty.call(message, "password")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.password); - if (message.requestHeaders != null && Object.hasOwnProperty.call(message, "requestHeaders")) - for (var keys = Object.keys(message.requestHeaders), i = 0; i < keys.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.requestHeaders[keys[i]]).ldelim(); - if (message.allowedCaCerts != null && message.allowedCaCerts.length) - for (var i = 0; i < message.allowedCaCerts.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.allowedCaCerts[i]); - if (message.webhookType != null && Object.hasOwnProperty.call(message, "webhookType")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.webhookType); - if (message.httpMethod != null && Object.hasOwnProperty.call(message, "httpMethod")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.httpMethod); - if (message.requestBody != null && Object.hasOwnProperty.call(message, "requestBody")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.requestBody); - if (message.parameterMapping != null && Object.hasOwnProperty.call(message, "parameterMapping")) - for (var keys = Object.keys(message.parameterMapping), i = 0; i < keys.length; ++i) - writer.uint32(/* id 9, wireType 2 =*/74).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.parameterMapping[keys[i]]).ldelim(); - if (message.oauthConfig != null && Object.hasOwnProperty.call(message, "oauthConfig")) - $root.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig.encode(message.oauthConfig, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.serviceAgentAuth != null && Object.hasOwnProperty.call(message, "serviceAgentAuth")) - writer.uint32(/* id 12, wireType 0 =*/96).int32(message.serviceAgentAuth); - return writer; - }; + /** + * Creates a plain object from a ListSessionEntityTypesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest} message ListSessionEntityTypesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListSessionEntityTypesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; - /** - * Encodes the specified GenericWebService message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService - * @static - * @param {google.cloud.dialogflow.cx.v3.Webhook.IGenericWebService} message GenericWebService message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GenericWebService.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Converts this ListSessionEntityTypesRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest + * @instance + * @returns {Object.} JSON object + */ + ListSessionEntityTypesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Decodes a GenericWebService message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService - * @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.Webhook.GenericWebService} GenericWebService - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GenericWebService.decode = function decode(reader, length, error) { - 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.Webhook.GenericWebService(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.uri = reader.string(); - break; - } - case 2: { - message.username = reader.string(); - break; - } - case 3: { - message.password = reader.string(); - break; - } - case 4: { - if (message.requestHeaders === $util.emptyObject) - message.requestHeaders = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.requestHeaders[key] = value; - break; - } - case 5: { - if (!(message.allowedCaCerts && message.allowedCaCerts.length)) - message.allowedCaCerts = []; - message.allowedCaCerts.push(reader.bytes()); - break; - } - case 11: { - message.oauthConfig = $root.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig.decode(reader, reader.uint32()); - break; - } - case 12: { - message.serviceAgentAuth = reader.int32(); - break; - } - case 6: { - message.webhookType = reader.int32(); - break; - } - case 7: { - message.httpMethod = reader.int32(); - break; - } - case 8: { - message.requestBody = reader.string(); - break; - } - case 9: { - if (message.parameterMapping === $util.emptyObject) - message.parameterMapping = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.parameterMapping[key] = value; - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Gets the default type url for ListSessionEntityTypesRequest + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListSessionEntityTypesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest"; + }; - /** - * Decodes a GenericWebService message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.Webhook.GenericWebService} GenericWebService - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GenericWebService.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + return ListSessionEntityTypesRequest; + })(); - /** - * Verifies a GenericWebService message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GenericWebService.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - if (message.username != null && message.hasOwnProperty("username")) - if (!$util.isString(message.username)) - return "username: string expected"; - if (message.password != null && message.hasOwnProperty("password")) - if (!$util.isString(message.password)) - return "password: string expected"; - if (message.requestHeaders != null && message.hasOwnProperty("requestHeaders")) { - if (!$util.isObject(message.requestHeaders)) - return "requestHeaders: object expected"; - var key = Object.keys(message.requestHeaders); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.requestHeaders[key[i]])) - return "requestHeaders: string{k:string} expected"; - } - if (message.allowedCaCerts != null && message.hasOwnProperty("allowedCaCerts")) { - if (!Array.isArray(message.allowedCaCerts)) - return "allowedCaCerts: array expected"; - for (var i = 0; i < message.allowedCaCerts.length; ++i) - if (!(message.allowedCaCerts[i] && typeof message.allowedCaCerts[i].length === "number" || $util.isString(message.allowedCaCerts[i]))) - return "allowedCaCerts: buffer[] expected"; - } - if (message.oauthConfig != null && message.hasOwnProperty("oauthConfig")) { - var error = $root.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig.verify(message.oauthConfig); - if (error) - return "oauthConfig." + error; - } - if (message.serviceAgentAuth != null && message.hasOwnProperty("serviceAgentAuth")) - switch (message.serviceAgentAuth) { - default: - return "serviceAgentAuth: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.webhookType != null && message.hasOwnProperty("webhookType")) - switch (message.webhookType) { - default: - return "webhookType: enum value expected"; - case 0: - case 1: - case 2: + v3.ListSessionEntityTypesResponse = (function() { + + /** + * Properties of a ListSessionEntityTypesResponse. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IListSessionEntityTypesResponse + * @property {Array.|null} [sessionEntityTypes] ListSessionEntityTypesResponse sessionEntityTypes + * @property {string|null} [nextPageToken] ListSessionEntityTypesResponse nextPageToken + */ + + /** + * Constructs a new ListSessionEntityTypesResponse. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a ListSessionEntityTypesResponse. + * @implements IListSessionEntityTypesResponse + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IListSessionEntityTypesResponse=} [properties] Properties to set + */ + function ListSessionEntityTypesResponse(properties) { + this.sessionEntityTypes = []; + 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]]; + } + + /** + * ListSessionEntityTypesResponse sessionEntityTypes. + * @member {Array.} sessionEntityTypes + * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse + * @instance + */ + ListSessionEntityTypesResponse.prototype.sessionEntityTypes = $util.emptyArray; + + /** + * ListSessionEntityTypesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse + * @instance + */ + ListSessionEntityTypesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListSessionEntityTypesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse + * @static + * @param {google.cloud.dialogflow.cx.v3.IListSessionEntityTypesResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse} ListSessionEntityTypesResponse instance + */ + ListSessionEntityTypesResponse.create = function create(properties) { + return new ListSessionEntityTypesResponse(properties); + }; + + /** + * Encodes the specified ListSessionEntityTypesResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse + * @static + * @param {google.cloud.dialogflow.cx.v3.IListSessionEntityTypesResponse} message ListSessionEntityTypesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListSessionEntityTypesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sessionEntityTypes != null && message.sessionEntityTypes.length) + for (var i = 0; i < message.sessionEntityTypes.length; ++i) + $root.google.cloud.dialogflow.cx.v3.SessionEntityType.encode(message.sessionEntityTypes[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListSessionEntityTypesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse + * @static + * @param {google.cloud.dialogflow.cx.v3.IListSessionEntityTypesResponse} message ListSessionEntityTypesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListSessionEntityTypesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListSessionEntityTypesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse + * @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.ListSessionEntityTypesResponse} ListSessionEntityTypesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListSessionEntityTypesResponse.decode = function decode(reader, length, error) { + 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.ListSessionEntityTypesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.sessionEntityTypes && message.sessionEntityTypes.length)) + message.sessionEntityTypes = []; + message.sessionEntityTypes.push($root.google.cloud.dialogflow.cx.v3.SessionEntityType.decode(reader, reader.uint32())); break; } - if (message.httpMethod != null && message.hasOwnProperty("httpMethod")) - switch (message.httpMethod) { - default: - return "httpMethod: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: + case 2: { + message.nextPageToken = reader.string(); break; } - if (message.requestBody != null && message.hasOwnProperty("requestBody")) - if (!$util.isString(message.requestBody)) - return "requestBody: string expected"; - if (message.parameterMapping != null && message.hasOwnProperty("parameterMapping")) { - if (!$util.isObject(message.parameterMapping)) - return "parameterMapping: object expected"; - var key = Object.keys(message.parameterMapping); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.parameterMapping[key[i]])) - return "parameterMapping: string{k:string} expected"; + default: + reader.skipType(tag & 7); + break; } - return null; - }; + } + return message; + }; - /** - * Creates a GenericWebService message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.Webhook.GenericWebService} GenericWebService - */ - GenericWebService.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService(); - if (object.uri != null) - message.uri = String(object.uri); - if (object.username != null) - message.username = String(object.username); - if (object.password != null) - message.password = String(object.password); - if (object.requestHeaders) { - if (typeof object.requestHeaders !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.requestHeaders: object expected"); - message.requestHeaders = {}; - for (var keys = Object.keys(object.requestHeaders), i = 0; i < keys.length; ++i) - message.requestHeaders[keys[i]] = String(object.requestHeaders[keys[i]]); - } - if (object.allowedCaCerts) { - if (!Array.isArray(object.allowedCaCerts)) - throw TypeError(".google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.allowedCaCerts: array expected"); - message.allowedCaCerts = []; - for (var i = 0; i < object.allowedCaCerts.length; ++i) - if (typeof object.allowedCaCerts[i] === "string") - $util.base64.decode(object.allowedCaCerts[i], message.allowedCaCerts[i] = $util.newBuffer($util.base64.length(object.allowedCaCerts[i])), 0); - else if (object.allowedCaCerts[i].length >= 0) - message.allowedCaCerts[i] = object.allowedCaCerts[i]; + /** + * Decodes a ListSessionEntityTypesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse} ListSessionEntityTypesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListSessionEntityTypesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListSessionEntityTypesResponse message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListSessionEntityTypesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sessionEntityTypes != null && message.hasOwnProperty("sessionEntityTypes")) { + if (!Array.isArray(message.sessionEntityTypes)) + return "sessionEntityTypes: array expected"; + for (var i = 0; i < message.sessionEntityTypes.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.SessionEntityType.verify(message.sessionEntityTypes[i]); + if (error) + return "sessionEntityTypes." + error; } - if (object.oauthConfig != null) { - if (typeof object.oauthConfig !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.oauthConfig: object expected"); - message.oauthConfig = $root.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig.fromObject(object.oauthConfig); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListSessionEntityTypesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse} ListSessionEntityTypesResponse + */ + ListSessionEntityTypesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse(); + if (object.sessionEntityTypes) { + if (!Array.isArray(object.sessionEntityTypes)) + throw TypeError(".google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse.sessionEntityTypes: array expected"); + message.sessionEntityTypes = []; + for (var i = 0; i < object.sessionEntityTypes.length; ++i) { + if (typeof object.sessionEntityTypes[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse.sessionEntityTypes: object expected"); + message.sessionEntityTypes[i] = $root.google.cloud.dialogflow.cx.v3.SessionEntityType.fromObject(object.sessionEntityTypes[i]); } - switch (object.serviceAgentAuth) { - default: - if (typeof object.serviceAgentAuth === "number") { - message.serviceAgentAuth = object.serviceAgentAuth; - break; - } - break; - case "SERVICE_AGENT_AUTH_UNSPECIFIED": - case 0: - message.serviceAgentAuth = 0; - break; - case "NONE": - case 1: - message.serviceAgentAuth = 1; - break; - case "ID_TOKEN": - case 2: - message.serviceAgentAuth = 2; - break; - case "ACCESS_TOKEN": - case 3: - message.serviceAgentAuth = 3; + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListSessionEntityTypesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse + * @static + * @param {google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse} message ListSessionEntityTypesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListSessionEntityTypesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.sessionEntityTypes = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.sessionEntityTypes && message.sessionEntityTypes.length) { + object.sessionEntityTypes = []; + for (var j = 0; j < message.sessionEntityTypes.length; ++j) + object.sessionEntityTypes[j] = $root.google.cloud.dialogflow.cx.v3.SessionEntityType.toObject(message.sessionEntityTypes[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListSessionEntityTypesResponse to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse + * @instance + * @returns {Object.} JSON object + */ + ListSessionEntityTypesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListSessionEntityTypesResponse + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListSessionEntityTypesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse"; + }; + + return ListSessionEntityTypesResponse; + })(); + + v3.GetSessionEntityTypeRequest = (function() { + + /** + * Properties of a GetSessionEntityTypeRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IGetSessionEntityTypeRequest + * @property {string|null} [name] GetSessionEntityTypeRequest name + */ + + /** + * Constructs a new GetSessionEntityTypeRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a GetSessionEntityTypeRequest. + * @implements IGetSessionEntityTypeRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IGetSessionEntityTypeRequest=} [properties] Properties to set + */ + function GetSessionEntityTypeRequest(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]]; + } + + /** + * GetSessionEntityTypeRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest + * @instance + */ + GetSessionEntityTypeRequest.prototype.name = ""; + + /** + * Creates a new GetSessionEntityTypeRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IGetSessionEntityTypeRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest} GetSessionEntityTypeRequest instance + */ + GetSessionEntityTypeRequest.create = function create(properties) { + return new GetSessionEntityTypeRequest(properties); + }; + + /** + * Encodes the specified GetSessionEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IGetSessionEntityTypeRequest} message GetSessionEntityTypeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetSessionEntityTypeRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetSessionEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IGetSessionEntityTypeRequest} message GetSessionEntityTypeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetSessionEntityTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetSessionEntityTypeRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest + * @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.GetSessionEntityTypeRequest} GetSessionEntityTypeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetSessionEntityTypeRequest.decode = function decode(reader, length, error) { + 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.GetSessionEntityTypeRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - } - switch (object.webhookType) { - default: - if (typeof object.webhookType === "number") { - message.webhookType = object.webhookType; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); break; } - break; - case "WEBHOOK_TYPE_UNSPECIFIED": - case 0: - message.webhookType = 0; - break; - case "STANDARD": - case 1: - message.webhookType = 1; - break; - case "FLEXIBLE": - case 2: - message.webhookType = 2; + default: + reader.skipType(tag & 7); break; } - switch (object.httpMethod) { - default: - if (typeof object.httpMethod === "number") { - message.httpMethod = object.httpMethod; + } + return message; + }; + + /** + * Decodes a GetSessionEntityTypeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest} GetSessionEntityTypeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetSessionEntityTypeRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetSessionEntityTypeRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetSessionEntityTypeRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetSessionEntityTypeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest} GetSessionEntityTypeRequest + */ + GetSessionEntityTypeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetSessionEntityTypeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest} message GetSessionEntityTypeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetSessionEntityTypeRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetSessionEntityTypeRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest + * @instance + * @returns {Object.} JSON object + */ + GetSessionEntityTypeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetSessionEntityTypeRequest + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetSessionEntityTypeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest"; + }; + + return GetSessionEntityTypeRequest; + })(); + + v3.CreateSessionEntityTypeRequest = (function() { + + /** + * Properties of a CreateSessionEntityTypeRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface ICreateSessionEntityTypeRequest + * @property {string|null} [parent] CreateSessionEntityTypeRequest parent + * @property {google.cloud.dialogflow.cx.v3.ISessionEntityType|null} [sessionEntityType] CreateSessionEntityTypeRequest sessionEntityType + */ + + /** + * Constructs a new CreateSessionEntityTypeRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a CreateSessionEntityTypeRequest. + * @implements ICreateSessionEntityTypeRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3.ICreateSessionEntityTypeRequest=} [properties] Properties to set + */ + function CreateSessionEntityTypeRequest(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]]; + } + + /** + * CreateSessionEntityTypeRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest + * @instance + */ + CreateSessionEntityTypeRequest.prototype.parent = ""; + + /** + * CreateSessionEntityTypeRequest sessionEntityType. + * @member {google.cloud.dialogflow.cx.v3.ISessionEntityType|null|undefined} sessionEntityType + * @memberof google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest + * @instance + */ + CreateSessionEntityTypeRequest.prototype.sessionEntityType = null; + + /** + * Creates a new CreateSessionEntityTypeRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.ICreateSessionEntityTypeRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest} CreateSessionEntityTypeRequest instance + */ + CreateSessionEntityTypeRequest.create = function create(properties) { + return new CreateSessionEntityTypeRequest(properties); + }; + + /** + * Encodes the specified CreateSessionEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.ICreateSessionEntityTypeRequest} message CreateSessionEntityTypeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateSessionEntityTypeRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.sessionEntityType != null && Object.hasOwnProperty.call(message, "sessionEntityType")) + $root.google.cloud.dialogflow.cx.v3.SessionEntityType.encode(message.sessionEntityType, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateSessionEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.ICreateSessionEntityTypeRequest} message CreateSessionEntityTypeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateSessionEntityTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateSessionEntityTypeRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest + * @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.CreateSessionEntityTypeRequest} CreateSessionEntityTypeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateSessionEntityTypeRequest.decode = function decode(reader, length, error) { + 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.CreateSessionEntityTypeRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); break; } + case 2: { + message.sessionEntityType = $root.google.cloud.dialogflow.cx.v3.SessionEntityType.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); break; - case "HTTP_METHOD_UNSPECIFIED": - case 0: - message.httpMethod = 0; - break; - case "POST": - case 1: - message.httpMethod = 1; - break; - case "GET": - case 2: - message.httpMethod = 2; - break; - case "HEAD": - case 3: - message.httpMethod = 3; - break; - case "PUT": - case 4: - message.httpMethod = 4; - break; - case "DELETE": - case 5: - message.httpMethod = 5; - break; - case "PATCH": - case 6: - message.httpMethod = 6; - break; - case "OPTIONS": - case 7: - message.httpMethod = 7; - break; - } - if (object.requestBody != null) - message.requestBody = String(object.requestBody); - if (object.parameterMapping) { - if (typeof object.parameterMapping !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.parameterMapping: object expected"); - message.parameterMapping = {}; - for (var keys = Object.keys(object.parameterMapping), i = 0; i < keys.length; ++i) - message.parameterMapping[keys[i]] = String(object.parameterMapping[keys[i]]); } - return message; - }; + } + return message; + }; + + /** + * Decodes a CreateSessionEntityTypeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest} CreateSessionEntityTypeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateSessionEntityTypeRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateSessionEntityTypeRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateSessionEntityTypeRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.sessionEntityType != null && message.hasOwnProperty("sessionEntityType")) { + var error = $root.google.cloud.dialogflow.cx.v3.SessionEntityType.verify(message.sessionEntityType); + if (error) + return "sessionEntityType." + error; + } + return null; + }; + + /** + * Creates a CreateSessionEntityTypeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest} CreateSessionEntityTypeRequest + */ + CreateSessionEntityTypeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.sessionEntityType != null) { + if (typeof object.sessionEntityType !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest.sessionEntityType: object expected"); + message.sessionEntityType = $root.google.cloud.dialogflow.cx.v3.SessionEntityType.fromObject(object.sessionEntityType); + } + return message; + }; + + /** + * Creates a plain object from a CreateSessionEntityTypeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest} message CreateSessionEntityTypeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateSessionEntityTypeRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.sessionEntityType = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.sessionEntityType != null && message.hasOwnProperty("sessionEntityType")) + object.sessionEntityType = $root.google.cloud.dialogflow.cx.v3.SessionEntityType.toObject(message.sessionEntityType, options); + return object; + }; + + /** + * Converts this CreateSessionEntityTypeRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest + * @instance + * @returns {Object.} JSON object + */ + CreateSessionEntityTypeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateSessionEntityTypeRequest + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateSessionEntityTypeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest"; + }; + + return CreateSessionEntityTypeRequest; + })(); + + v3.UpdateSessionEntityTypeRequest = (function() { + + /** + * Properties of an UpdateSessionEntityTypeRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IUpdateSessionEntityTypeRequest + * @property {google.cloud.dialogflow.cx.v3.ISessionEntityType|null} [sessionEntityType] UpdateSessionEntityTypeRequest sessionEntityType + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateSessionEntityTypeRequest updateMask + */ + + /** + * Constructs a new UpdateSessionEntityTypeRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents an UpdateSessionEntityTypeRequest. + * @implements IUpdateSessionEntityTypeRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IUpdateSessionEntityTypeRequest=} [properties] Properties to set + */ + function UpdateSessionEntityTypeRequest(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]]; + } + + /** + * UpdateSessionEntityTypeRequest sessionEntityType. + * @member {google.cloud.dialogflow.cx.v3.ISessionEntityType|null|undefined} sessionEntityType + * @memberof google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest + * @instance + */ + UpdateSessionEntityTypeRequest.prototype.sessionEntityType = null; + + /** + * UpdateSessionEntityTypeRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest + * @instance + */ + UpdateSessionEntityTypeRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateSessionEntityTypeRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IUpdateSessionEntityTypeRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest} UpdateSessionEntityTypeRequest instance + */ + UpdateSessionEntityTypeRequest.create = function create(properties) { + return new UpdateSessionEntityTypeRequest(properties); + }; + + /** + * Encodes the specified UpdateSessionEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IUpdateSessionEntityTypeRequest} message UpdateSessionEntityTypeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateSessionEntityTypeRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sessionEntityType != null && Object.hasOwnProperty.call(message, "sessionEntityType")) + $root.google.cloud.dialogflow.cx.v3.SessionEntityType.encode(message.sessionEntityType, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateSessionEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IUpdateSessionEntityTypeRequest} message UpdateSessionEntityTypeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateSessionEntityTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateSessionEntityTypeRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest + * @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.UpdateSessionEntityTypeRequest} UpdateSessionEntityTypeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateSessionEntityTypeRequest.decode = function decode(reader, length, error) { + 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.UpdateSessionEntityTypeRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.sessionEntityType = $root.google.cloud.dialogflow.cx.v3.SessionEntityType.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateSessionEntityTypeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest} UpdateSessionEntityTypeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateSessionEntityTypeRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateSessionEntityTypeRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateSessionEntityTypeRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sessionEntityType != null && message.hasOwnProperty("sessionEntityType")) { + var error = $root.google.cloud.dialogflow.cx.v3.SessionEntityType.verify(message.sessionEntityType); + if (error) + return "sessionEntityType." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + return null; + }; + + /** + * Creates an UpdateSessionEntityTypeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest} UpdateSessionEntityTypeRequest + */ + UpdateSessionEntityTypeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest(); + if (object.sessionEntityType != null) { + if (typeof object.sessionEntityType !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest.sessionEntityType: object expected"); + message.sessionEntityType = $root.google.cloud.dialogflow.cx.v3.SessionEntityType.fromObject(object.sessionEntityType); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateSessionEntityTypeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest} message UpdateSessionEntityTypeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateSessionEntityTypeRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.sessionEntityType = null; + object.updateMask = null; + } + if (message.sessionEntityType != null && message.hasOwnProperty("sessionEntityType")) + object.sessionEntityType = $root.google.cloud.dialogflow.cx.v3.SessionEntityType.toObject(message.sessionEntityType, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateSessionEntityTypeRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateSessionEntityTypeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateSessionEntityTypeRequest + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateSessionEntityTypeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest"; + }; + + return UpdateSessionEntityTypeRequest; + })(); + + v3.DeleteSessionEntityTypeRequest = (function() { + + /** + * Properties of a DeleteSessionEntityTypeRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IDeleteSessionEntityTypeRequest + * @property {string|null} [name] DeleteSessionEntityTypeRequest name + */ + + /** + * Constructs a new DeleteSessionEntityTypeRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a DeleteSessionEntityTypeRequest. + * @implements IDeleteSessionEntityTypeRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IDeleteSessionEntityTypeRequest=} [properties] Properties to set + */ + function DeleteSessionEntityTypeRequest(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]]; + } + + /** + * DeleteSessionEntityTypeRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest + * @instance + */ + DeleteSessionEntityTypeRequest.prototype.name = ""; + + /** + * Creates a new DeleteSessionEntityTypeRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IDeleteSessionEntityTypeRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest} DeleteSessionEntityTypeRequest instance + */ + DeleteSessionEntityTypeRequest.create = function create(properties) { + return new DeleteSessionEntityTypeRequest(properties); + }; + + /** + * Encodes the specified DeleteSessionEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IDeleteSessionEntityTypeRequest} message DeleteSessionEntityTypeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteSessionEntityTypeRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteSessionEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IDeleteSessionEntityTypeRequest} message DeleteSessionEntityTypeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteSessionEntityTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteSessionEntityTypeRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest + * @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.DeleteSessionEntityTypeRequest} DeleteSessionEntityTypeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteSessionEntityTypeRequest.decode = function decode(reader, length, error) { + 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.DeleteSessionEntityTypeRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteSessionEntityTypeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest} DeleteSessionEntityTypeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteSessionEntityTypeRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteSessionEntityTypeRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteSessionEntityTypeRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteSessionEntityTypeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest} DeleteSessionEntityTypeRequest + */ + DeleteSessionEntityTypeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteSessionEntityTypeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest} message DeleteSessionEntityTypeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteSessionEntityTypeRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteSessionEntityTypeRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteSessionEntityTypeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteSessionEntityTypeRequest + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteSessionEntityTypeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest"; + }; + + return DeleteSessionEntityTypeRequest; + })(); + + v3.TransitionRouteGroups = (function() { + + /** + * Constructs a new TransitionRouteGroups service. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a TransitionRouteGroups + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function TransitionRouteGroups(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (TransitionRouteGroups.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = TransitionRouteGroups; + + /** + * Creates new TransitionRouteGroups service using the specified rpc implementation. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroups + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {TransitionRouteGroups} RPC service. Useful where requests and/or responses are streamed. + */ + TransitionRouteGroups.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.TransitionRouteGroups|listTransitionRouteGroups}. + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroups + * @typedef ListTransitionRouteGroupsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse} [response] ListTransitionRouteGroupsResponse + */ + + /** + * Calls ListTransitionRouteGroups. + * @function listTransitionRouteGroups + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroups + * @instance + * @param {google.cloud.dialogflow.cx.v3.IListTransitionRouteGroupsRequest} request ListTransitionRouteGroupsRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.TransitionRouteGroups.ListTransitionRouteGroupsCallback} callback Node-style callback called with the error, if any, and ListTransitionRouteGroupsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(TransitionRouteGroups.prototype.listTransitionRouteGroups = function listTransitionRouteGroups(request, callback) { + return this.rpcCall(listTransitionRouteGroups, $root.google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest, $root.google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse, request, callback); + }, "name", { value: "ListTransitionRouteGroups" }); + + /** + * Calls ListTransitionRouteGroups. + * @function listTransitionRouteGroups + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroups + * @instance + * @param {google.cloud.dialogflow.cx.v3.IListTransitionRouteGroupsRequest} request ListTransitionRouteGroupsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.TransitionRouteGroups|getTransitionRouteGroup}. + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroups + * @typedef GetTransitionRouteGroupCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.TransitionRouteGroup} [response] TransitionRouteGroup + */ + + /** + * Calls GetTransitionRouteGroup. + * @function getTransitionRouteGroup + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroups + * @instance + * @param {google.cloud.dialogflow.cx.v3.IGetTransitionRouteGroupRequest} request GetTransitionRouteGroupRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.TransitionRouteGroups.GetTransitionRouteGroupCallback} callback Node-style callback called with the error, if any, and TransitionRouteGroup + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(TransitionRouteGroups.prototype.getTransitionRouteGroup = function getTransitionRouteGroup(request, callback) { + return this.rpcCall(getTransitionRouteGroup, $root.google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest, $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup, request, callback); + }, "name", { value: "GetTransitionRouteGroup" }); + + /** + * Calls GetTransitionRouteGroup. + * @function getTransitionRouteGroup + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroups + * @instance + * @param {google.cloud.dialogflow.cx.v3.IGetTransitionRouteGroupRequest} request GetTransitionRouteGroupRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.TransitionRouteGroups|createTransitionRouteGroup}. + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroups + * @typedef CreateTransitionRouteGroupCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.TransitionRouteGroup} [response] TransitionRouteGroup + */ + + /** + * Calls CreateTransitionRouteGroup. + * @function createTransitionRouteGroup + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroups + * @instance + * @param {google.cloud.dialogflow.cx.v3.ICreateTransitionRouteGroupRequest} request CreateTransitionRouteGroupRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.TransitionRouteGroups.CreateTransitionRouteGroupCallback} callback Node-style callback called with the error, if any, and TransitionRouteGroup + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(TransitionRouteGroups.prototype.createTransitionRouteGroup = function createTransitionRouteGroup(request, callback) { + return this.rpcCall(createTransitionRouteGroup, $root.google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest, $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup, request, callback); + }, "name", { value: "CreateTransitionRouteGroup" }); + + /** + * Calls CreateTransitionRouteGroup. + * @function createTransitionRouteGroup + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroups + * @instance + * @param {google.cloud.dialogflow.cx.v3.ICreateTransitionRouteGroupRequest} request CreateTransitionRouteGroupRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.TransitionRouteGroups|updateTransitionRouteGroup}. + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroups + * @typedef UpdateTransitionRouteGroupCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.TransitionRouteGroup} [response] TransitionRouteGroup + */ + + /** + * Calls UpdateTransitionRouteGroup. + * @function updateTransitionRouteGroup + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroups + * @instance + * @param {google.cloud.dialogflow.cx.v3.IUpdateTransitionRouteGroupRequest} request UpdateTransitionRouteGroupRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.TransitionRouteGroups.UpdateTransitionRouteGroupCallback} callback Node-style callback called with the error, if any, and TransitionRouteGroup + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(TransitionRouteGroups.prototype.updateTransitionRouteGroup = function updateTransitionRouteGroup(request, callback) { + return this.rpcCall(updateTransitionRouteGroup, $root.google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest, $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup, request, callback); + }, "name", { value: "UpdateTransitionRouteGroup" }); + + /** + * Calls UpdateTransitionRouteGroup. + * @function updateTransitionRouteGroup + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroups + * @instance + * @param {google.cloud.dialogflow.cx.v3.IUpdateTransitionRouteGroupRequest} request UpdateTransitionRouteGroupRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.TransitionRouteGroups|deleteTransitionRouteGroup}. + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroups + * @typedef DeleteTransitionRouteGroupCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteTransitionRouteGroup. + * @function deleteTransitionRouteGroup + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroups + * @instance + * @param {google.cloud.dialogflow.cx.v3.IDeleteTransitionRouteGroupRequest} request DeleteTransitionRouteGroupRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.TransitionRouteGroups.DeleteTransitionRouteGroupCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(TransitionRouteGroups.prototype.deleteTransitionRouteGroup = function deleteTransitionRouteGroup(request, callback) { + return this.rpcCall(deleteTransitionRouteGroup, $root.google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteTransitionRouteGroup" }); + + /** + * Calls DeleteTransitionRouteGroup. + * @function deleteTransitionRouteGroup + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroups + * @instance + * @param {google.cloud.dialogflow.cx.v3.IDeleteTransitionRouteGroupRequest} request DeleteTransitionRouteGroupRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return TransitionRouteGroups; + })(); + + v3.TransitionRouteGroup = (function() { + + /** + * Properties of a TransitionRouteGroup. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface ITransitionRouteGroup + * @property {string|null} [name] TransitionRouteGroup name + * @property {string|null} [displayName] TransitionRouteGroup displayName + * @property {Array.|null} [transitionRoutes] TransitionRouteGroup transitionRoutes + */ + + /** + * Constructs a new TransitionRouteGroup. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a TransitionRouteGroup. + * @implements ITransitionRouteGroup + * @constructor + * @param {google.cloud.dialogflow.cx.v3.ITransitionRouteGroup=} [properties] Properties to set + */ + function TransitionRouteGroup(properties) { + this.transitionRoutes = []; + 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]]; + } + + /** + * TransitionRouteGroup name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroup + * @instance + */ + TransitionRouteGroup.prototype.name = ""; + + /** + * TransitionRouteGroup displayName. + * @member {string} displayName + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroup + * @instance + */ + TransitionRouteGroup.prototype.displayName = ""; + + /** + * TransitionRouteGroup transitionRoutes. + * @member {Array.} transitionRoutes + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroup + * @instance + */ + TransitionRouteGroup.prototype.transitionRoutes = $util.emptyArray; + + /** + * Creates a new TransitionRouteGroup instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroup + * @static + * @param {google.cloud.dialogflow.cx.v3.ITransitionRouteGroup=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.TransitionRouteGroup} TransitionRouteGroup instance + */ + TransitionRouteGroup.create = function create(properties) { + return new TransitionRouteGroup(properties); + }; + + /** + * Encodes the specified TransitionRouteGroup message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TransitionRouteGroup.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroup + * @static + * @param {google.cloud.dialogflow.cx.v3.ITransitionRouteGroup} message TransitionRouteGroup message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TransitionRouteGroup.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.transitionRoutes != null && message.transitionRoutes.length) + for (var i = 0; i < message.transitionRoutes.length; ++i) + $root.google.cloud.dialogflow.cx.v3.TransitionRoute.encode(message.transitionRoutes[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TransitionRouteGroup message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.TransitionRouteGroup.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroup + * @static + * @param {google.cloud.dialogflow.cx.v3.ITransitionRouteGroup} message TransitionRouteGroup message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TransitionRouteGroup.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TransitionRouteGroup message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroup + * @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.TransitionRouteGroup} TransitionRouteGroup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TransitionRouteGroup.decode = function decode(reader, length, error) { + 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.TransitionRouteGroup(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.displayName = reader.string(); + break; + } + case 5: { + if (!(message.transitionRoutes && message.transitionRoutes.length)) + message.transitionRoutes = []; + message.transitionRoutes.push($root.google.cloud.dialogflow.cx.v3.TransitionRoute.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TransitionRouteGroup message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroup + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.TransitionRouteGroup} TransitionRouteGroup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TransitionRouteGroup.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TransitionRouteGroup message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroup + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TransitionRouteGroup.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.transitionRoutes != null && message.hasOwnProperty("transitionRoutes")) { + if (!Array.isArray(message.transitionRoutes)) + return "transitionRoutes: array expected"; + for (var i = 0; i < message.transitionRoutes.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.TransitionRoute.verify(message.transitionRoutes[i]); + if (error) + return "transitionRoutes." + error; + } + } + return null; + }; + + /** + * Creates a TransitionRouteGroup message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroup + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.TransitionRouteGroup} TransitionRouteGroup + */ + TransitionRouteGroup.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.transitionRoutes) { + if (!Array.isArray(object.transitionRoutes)) + throw TypeError(".google.cloud.dialogflow.cx.v3.TransitionRouteGroup.transitionRoutes: array expected"); + message.transitionRoutes = []; + for (var i = 0; i < object.transitionRoutes.length; ++i) { + if (typeof object.transitionRoutes[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.TransitionRouteGroup.transitionRoutes: object expected"); + message.transitionRoutes[i] = $root.google.cloud.dialogflow.cx.v3.TransitionRoute.fromObject(object.transitionRoutes[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a TransitionRouteGroup message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroup + * @static + * @param {google.cloud.dialogflow.cx.v3.TransitionRouteGroup} message TransitionRouteGroup + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TransitionRouteGroup.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.transitionRoutes = []; + if (options.defaults) { + object.name = ""; + object.displayName = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.transitionRoutes && message.transitionRoutes.length) { + object.transitionRoutes = []; + for (var j = 0; j < message.transitionRoutes.length; ++j) + object.transitionRoutes[j] = $root.google.cloud.dialogflow.cx.v3.TransitionRoute.toObject(message.transitionRoutes[j], options); + } + return object; + }; + + /** + * Converts this TransitionRouteGroup to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroup + * @instance + * @returns {Object.} JSON object + */ + TransitionRouteGroup.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TransitionRouteGroup + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.TransitionRouteGroup + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TransitionRouteGroup.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.TransitionRouteGroup"; + }; + + return TransitionRouteGroup; + })(); + + v3.ListTransitionRouteGroupsRequest = (function() { + + /** + * Properties of a ListTransitionRouteGroupsRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IListTransitionRouteGroupsRequest + * @property {string|null} [parent] ListTransitionRouteGroupsRequest parent + * @property {number|null} [pageSize] ListTransitionRouteGroupsRequest pageSize + * @property {string|null} [pageToken] ListTransitionRouteGroupsRequest pageToken + * @property {string|null} [languageCode] ListTransitionRouteGroupsRequest languageCode + */ + + /** + * Constructs a new ListTransitionRouteGroupsRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a ListTransitionRouteGroupsRequest. + * @implements IListTransitionRouteGroupsRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IListTransitionRouteGroupsRequest=} [properties] Properties to set + */ + function ListTransitionRouteGroupsRequest(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]]; + } + + /** + * ListTransitionRouteGroupsRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest + * @instance + */ + ListTransitionRouteGroupsRequest.prototype.parent = ""; + + /** + * ListTransitionRouteGroupsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest + * @instance + */ + ListTransitionRouteGroupsRequest.prototype.pageSize = 0; + + /** + * ListTransitionRouteGroupsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest + * @instance + */ + ListTransitionRouteGroupsRequest.prototype.pageToken = ""; + + /** + * ListTransitionRouteGroupsRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest + * @instance + */ + ListTransitionRouteGroupsRequest.prototype.languageCode = ""; + + /** + * Creates a new ListTransitionRouteGroupsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IListTransitionRouteGroupsRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest} ListTransitionRouteGroupsRequest instance + */ + ListTransitionRouteGroupsRequest.create = function create(properties) { + return new ListTransitionRouteGroupsRequest(properties); + }; + + /** + * Encodes the specified ListTransitionRouteGroupsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IListTransitionRouteGroupsRequest} message ListTransitionRouteGroupsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListTransitionRouteGroupsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.languageCode); + return writer; + }; + + /** + * Encodes the specified ListTransitionRouteGroupsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IListTransitionRouteGroupsRequest} message ListTransitionRouteGroupsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListTransitionRouteGroupsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListTransitionRouteGroupsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest + * @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.ListTransitionRouteGroupsRequest} ListTransitionRouteGroupsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListTransitionRouteGroupsRequest.decode = function decode(reader, length, error) { + 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.ListTransitionRouteGroupsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.languageCode = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListTransitionRouteGroupsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest} ListTransitionRouteGroupsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListTransitionRouteGroupsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListTransitionRouteGroupsRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListTransitionRouteGroupsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; + return null; + }; + + /** + * Creates a ListTransitionRouteGroupsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest} ListTransitionRouteGroupsRequest + */ + ListTransitionRouteGroupsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.languageCode != null) + message.languageCode = String(object.languageCode); + return message; + }; + + /** + * Creates a plain object from a ListTransitionRouteGroupsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest} message ListTransitionRouteGroupsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListTransitionRouteGroupsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.languageCode = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; + return object; + }; + + /** + * Converts this ListTransitionRouteGroupsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest + * @instance + * @returns {Object.} JSON object + */ + ListTransitionRouteGroupsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListTransitionRouteGroupsRequest + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListTransitionRouteGroupsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest"; + }; + + return ListTransitionRouteGroupsRequest; + })(); + + v3.ListTransitionRouteGroupsResponse = (function() { + + /** + * Properties of a ListTransitionRouteGroupsResponse. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IListTransitionRouteGroupsResponse + * @property {Array.|null} [transitionRouteGroups] ListTransitionRouteGroupsResponse transitionRouteGroups + * @property {string|null} [nextPageToken] ListTransitionRouteGroupsResponse nextPageToken + */ + + /** + * Constructs a new ListTransitionRouteGroupsResponse. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a ListTransitionRouteGroupsResponse. + * @implements IListTransitionRouteGroupsResponse + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IListTransitionRouteGroupsResponse=} [properties] Properties to set + */ + function ListTransitionRouteGroupsResponse(properties) { + this.transitionRouteGroups = []; + 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]]; + } + + /** + * ListTransitionRouteGroupsResponse transitionRouteGroups. + * @member {Array.} transitionRouteGroups + * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse + * @instance + */ + ListTransitionRouteGroupsResponse.prototype.transitionRouteGroups = $util.emptyArray; + + /** + * ListTransitionRouteGroupsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse + * @instance + */ + ListTransitionRouteGroupsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListTransitionRouteGroupsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse + * @static + * @param {google.cloud.dialogflow.cx.v3.IListTransitionRouteGroupsResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse} ListTransitionRouteGroupsResponse instance + */ + ListTransitionRouteGroupsResponse.create = function create(properties) { + return new ListTransitionRouteGroupsResponse(properties); + }; + + /** + * Encodes the specified ListTransitionRouteGroupsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse + * @static + * @param {google.cloud.dialogflow.cx.v3.IListTransitionRouteGroupsResponse} message ListTransitionRouteGroupsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListTransitionRouteGroupsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.transitionRouteGroups != null && message.transitionRouteGroups.length) + for (var i = 0; i < message.transitionRouteGroups.length; ++i) + $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup.encode(message.transitionRouteGroups[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListTransitionRouteGroupsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse + * @static + * @param {google.cloud.dialogflow.cx.v3.IListTransitionRouteGroupsResponse} message ListTransitionRouteGroupsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListTransitionRouteGroupsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListTransitionRouteGroupsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse + * @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.ListTransitionRouteGroupsResponse} ListTransitionRouteGroupsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListTransitionRouteGroupsResponse.decode = function decode(reader, length, error) { + 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.ListTransitionRouteGroupsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.transitionRouteGroups && message.transitionRouteGroups.length)) + message.transitionRouteGroups = []; + message.transitionRouteGroups.push($root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListTransitionRouteGroupsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse} ListTransitionRouteGroupsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListTransitionRouteGroupsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListTransitionRouteGroupsResponse message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListTransitionRouteGroupsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.transitionRouteGroups != null && message.hasOwnProperty("transitionRouteGroups")) { + if (!Array.isArray(message.transitionRouteGroups)) + return "transitionRouteGroups: array expected"; + for (var i = 0; i < message.transitionRouteGroups.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup.verify(message.transitionRouteGroups[i]); + if (error) + return "transitionRouteGroups." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListTransitionRouteGroupsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse} ListTransitionRouteGroupsResponse + */ + ListTransitionRouteGroupsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse(); + if (object.transitionRouteGroups) { + if (!Array.isArray(object.transitionRouteGroups)) + throw TypeError(".google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse.transitionRouteGroups: array expected"); + message.transitionRouteGroups = []; + for (var i = 0; i < object.transitionRouteGroups.length; ++i) { + if (typeof object.transitionRouteGroups[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse.transitionRouteGroups: object expected"); + message.transitionRouteGroups[i] = $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup.fromObject(object.transitionRouteGroups[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListTransitionRouteGroupsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse + * @static + * @param {google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse} message ListTransitionRouteGroupsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListTransitionRouteGroupsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.transitionRouteGroups = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.transitionRouteGroups && message.transitionRouteGroups.length) { + object.transitionRouteGroups = []; + for (var j = 0; j < message.transitionRouteGroups.length; ++j) + object.transitionRouteGroups[j] = $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup.toObject(message.transitionRouteGroups[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListTransitionRouteGroupsResponse to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse + * @instance + * @returns {Object.} JSON object + */ + ListTransitionRouteGroupsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListTransitionRouteGroupsResponse + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListTransitionRouteGroupsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse"; + }; + + return ListTransitionRouteGroupsResponse; + })(); + + v3.GetTransitionRouteGroupRequest = (function() { + + /** + * Properties of a GetTransitionRouteGroupRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IGetTransitionRouteGroupRequest + * @property {string|null} [name] GetTransitionRouteGroupRequest name + * @property {string|null} [languageCode] GetTransitionRouteGroupRequest languageCode + */ + + /** + * Constructs a new GetTransitionRouteGroupRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a GetTransitionRouteGroupRequest. + * @implements IGetTransitionRouteGroupRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IGetTransitionRouteGroupRequest=} [properties] Properties to set + */ + function GetTransitionRouteGroupRequest(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]]; + } + + /** + * GetTransitionRouteGroupRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest + * @instance + */ + GetTransitionRouteGroupRequest.prototype.name = ""; + + /** + * GetTransitionRouteGroupRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest + * @instance + */ + GetTransitionRouteGroupRequest.prototype.languageCode = ""; + + /** + * Creates a new GetTransitionRouteGroupRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IGetTransitionRouteGroupRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest} GetTransitionRouteGroupRequest instance + */ + GetTransitionRouteGroupRequest.create = function create(properties) { + return new GetTransitionRouteGroupRequest(properties); + }; + + /** + * Encodes the specified GetTransitionRouteGroupRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IGetTransitionRouteGroupRequest} message GetTransitionRouteGroupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetTransitionRouteGroupRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); + return writer; + }; + + /** + * Encodes the specified GetTransitionRouteGroupRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IGetTransitionRouteGroupRequest} message GetTransitionRouteGroupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetTransitionRouteGroupRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetTransitionRouteGroupRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest + * @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.GetTransitionRouteGroupRequest} GetTransitionRouteGroupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetTransitionRouteGroupRequest.decode = function decode(reader, length, error) { + 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.GetTransitionRouteGroupRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.languageCode = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetTransitionRouteGroupRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest} GetTransitionRouteGroupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetTransitionRouteGroupRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetTransitionRouteGroupRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetTransitionRouteGroupRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; + return null; + }; + + /** + * Creates a GetTransitionRouteGroupRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest} GetTransitionRouteGroupRequest + */ + GetTransitionRouteGroupRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.languageCode != null) + message.languageCode = String(object.languageCode); + return message; + }; + + /** + * Creates a plain object from a GetTransitionRouteGroupRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest} message GetTransitionRouteGroupRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetTransitionRouteGroupRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.languageCode = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; + return object; + }; + + /** + * Converts this GetTransitionRouteGroupRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest + * @instance + * @returns {Object.} JSON object + */ + GetTransitionRouteGroupRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetTransitionRouteGroupRequest + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetTransitionRouteGroupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest"; + }; + + return GetTransitionRouteGroupRequest; + })(); + + v3.CreateTransitionRouteGroupRequest = (function() { + + /** + * Properties of a CreateTransitionRouteGroupRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface ICreateTransitionRouteGroupRequest + * @property {string|null} [parent] CreateTransitionRouteGroupRequest parent + * @property {google.cloud.dialogflow.cx.v3.ITransitionRouteGroup|null} [transitionRouteGroup] CreateTransitionRouteGroupRequest transitionRouteGroup + * @property {string|null} [languageCode] CreateTransitionRouteGroupRequest languageCode + */ + + /** + * Constructs a new CreateTransitionRouteGroupRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a CreateTransitionRouteGroupRequest. + * @implements ICreateTransitionRouteGroupRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3.ICreateTransitionRouteGroupRequest=} [properties] Properties to set + */ + function CreateTransitionRouteGroupRequest(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]]; + } + + /** + * CreateTransitionRouteGroupRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest + * @instance + */ + CreateTransitionRouteGroupRequest.prototype.parent = ""; + + /** + * CreateTransitionRouteGroupRequest transitionRouteGroup. + * @member {google.cloud.dialogflow.cx.v3.ITransitionRouteGroup|null|undefined} transitionRouteGroup + * @memberof google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest + * @instance + */ + CreateTransitionRouteGroupRequest.prototype.transitionRouteGroup = null; + + /** + * CreateTransitionRouteGroupRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest + * @instance + */ + CreateTransitionRouteGroupRequest.prototype.languageCode = ""; + + /** + * Creates a new CreateTransitionRouteGroupRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.ICreateTransitionRouteGroupRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest} CreateTransitionRouteGroupRequest instance + */ + CreateTransitionRouteGroupRequest.create = function create(properties) { + return new CreateTransitionRouteGroupRequest(properties); + }; + + /** + * Encodes the specified CreateTransitionRouteGroupRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.ICreateTransitionRouteGroupRequest} message CreateTransitionRouteGroupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateTransitionRouteGroupRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.transitionRouteGroup != null && Object.hasOwnProperty.call(message, "transitionRouteGroup")) + $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup.encode(message.transitionRouteGroup, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.languageCode); + return writer; + }; + + /** + * Encodes the specified CreateTransitionRouteGroupRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.ICreateTransitionRouteGroupRequest} message CreateTransitionRouteGroupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateTransitionRouteGroupRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateTransitionRouteGroupRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest + * @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.CreateTransitionRouteGroupRequest} CreateTransitionRouteGroupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateTransitionRouteGroupRequest.decode = function decode(reader, length, error) { + 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.CreateTransitionRouteGroupRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.transitionRouteGroup = $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup.decode(reader, reader.uint32()); + break; + } + case 3: { + message.languageCode = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateTransitionRouteGroupRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest} CreateTransitionRouteGroupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateTransitionRouteGroupRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateTransitionRouteGroupRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateTransitionRouteGroupRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.transitionRouteGroup != null && message.hasOwnProperty("transitionRouteGroup")) { + var error = $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup.verify(message.transitionRouteGroup); + if (error) + return "transitionRouteGroup." + error; + } + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; + return null; + }; + + /** + * Creates a CreateTransitionRouteGroupRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest} CreateTransitionRouteGroupRequest + */ + CreateTransitionRouteGroupRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.transitionRouteGroup != null) { + if (typeof object.transitionRouteGroup !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest.transitionRouteGroup: object expected"); + message.transitionRouteGroup = $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup.fromObject(object.transitionRouteGroup); + } + if (object.languageCode != null) + message.languageCode = String(object.languageCode); + return message; + }; + + /** + * Creates a plain object from a CreateTransitionRouteGroupRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest} message CreateTransitionRouteGroupRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateTransitionRouteGroupRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.transitionRouteGroup = null; + object.languageCode = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.transitionRouteGroup != null && message.hasOwnProperty("transitionRouteGroup")) + object.transitionRouteGroup = $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup.toObject(message.transitionRouteGroup, options); + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; + return object; + }; + + /** + * Converts this CreateTransitionRouteGroupRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest + * @instance + * @returns {Object.} JSON object + */ + CreateTransitionRouteGroupRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateTransitionRouteGroupRequest + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateTransitionRouteGroupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest"; + }; + + return CreateTransitionRouteGroupRequest; + })(); + + v3.UpdateTransitionRouteGroupRequest = (function() { + + /** + * Properties of an UpdateTransitionRouteGroupRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IUpdateTransitionRouteGroupRequest + * @property {google.cloud.dialogflow.cx.v3.ITransitionRouteGroup|null} [transitionRouteGroup] UpdateTransitionRouteGroupRequest transitionRouteGroup + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateTransitionRouteGroupRequest updateMask + * @property {string|null} [languageCode] UpdateTransitionRouteGroupRequest languageCode + */ + + /** + * Constructs a new UpdateTransitionRouteGroupRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents an UpdateTransitionRouteGroupRequest. + * @implements IUpdateTransitionRouteGroupRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IUpdateTransitionRouteGroupRequest=} [properties] Properties to set + */ + function UpdateTransitionRouteGroupRequest(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]]; + } + + /** + * UpdateTransitionRouteGroupRequest transitionRouteGroup. + * @member {google.cloud.dialogflow.cx.v3.ITransitionRouteGroup|null|undefined} transitionRouteGroup + * @memberof google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest + * @instance + */ + UpdateTransitionRouteGroupRequest.prototype.transitionRouteGroup = null; + + /** + * UpdateTransitionRouteGroupRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest + * @instance + */ + UpdateTransitionRouteGroupRequest.prototype.updateMask = null; + + /** + * UpdateTransitionRouteGroupRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest + * @instance + */ + UpdateTransitionRouteGroupRequest.prototype.languageCode = ""; + + /** + * Creates a new UpdateTransitionRouteGroupRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IUpdateTransitionRouteGroupRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest} UpdateTransitionRouteGroupRequest instance + */ + UpdateTransitionRouteGroupRequest.create = function create(properties) { + return new UpdateTransitionRouteGroupRequest(properties); + }; + + /** + * Encodes the specified UpdateTransitionRouteGroupRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IUpdateTransitionRouteGroupRequest} message UpdateTransitionRouteGroupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateTransitionRouteGroupRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.transitionRouteGroup != null && Object.hasOwnProperty.call(message, "transitionRouteGroup")) + $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup.encode(message.transitionRouteGroup, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.languageCode); + return writer; + }; + + /** + * Encodes the specified UpdateTransitionRouteGroupRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IUpdateTransitionRouteGroupRequest} message UpdateTransitionRouteGroupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateTransitionRouteGroupRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateTransitionRouteGroupRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest + * @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.UpdateTransitionRouteGroupRequest} UpdateTransitionRouteGroupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateTransitionRouteGroupRequest.decode = function decode(reader, length, error) { + 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.UpdateTransitionRouteGroupRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.transitionRouteGroup = $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 3: { + message.languageCode = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateTransitionRouteGroupRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest} UpdateTransitionRouteGroupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateTransitionRouteGroupRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateTransitionRouteGroupRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateTransitionRouteGroupRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.transitionRouteGroup != null && message.hasOwnProperty("transitionRouteGroup")) { + var error = $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup.verify(message.transitionRouteGroup); + if (error) + return "transitionRouteGroup." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; + return null; + }; + + /** + * Creates an UpdateTransitionRouteGroupRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest} UpdateTransitionRouteGroupRequest + */ + UpdateTransitionRouteGroupRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest(); + if (object.transitionRouteGroup != null) { + if (typeof object.transitionRouteGroup !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest.transitionRouteGroup: object expected"); + message.transitionRouteGroup = $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup.fromObject(object.transitionRouteGroup); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.languageCode != null) + message.languageCode = String(object.languageCode); + return message; + }; + + /** + * Creates a plain object from an UpdateTransitionRouteGroupRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest} message UpdateTransitionRouteGroupRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateTransitionRouteGroupRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.transitionRouteGroup = null; + object.updateMask = null; + object.languageCode = ""; + } + if (message.transitionRouteGroup != null && message.hasOwnProperty("transitionRouteGroup")) + object.transitionRouteGroup = $root.google.cloud.dialogflow.cx.v3.TransitionRouteGroup.toObject(message.transitionRouteGroup, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; + return object; + }; + + /** + * Converts this UpdateTransitionRouteGroupRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateTransitionRouteGroupRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateTransitionRouteGroupRequest + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateTransitionRouteGroupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest"; + }; + + return UpdateTransitionRouteGroupRequest; + })(); + + v3.DeleteTransitionRouteGroupRequest = (function() { + + /** + * Properties of a DeleteTransitionRouteGroupRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IDeleteTransitionRouteGroupRequest + * @property {string|null} [name] DeleteTransitionRouteGroupRequest name + * @property {boolean|null} [force] DeleteTransitionRouteGroupRequest force + */ + + /** + * Constructs a new DeleteTransitionRouteGroupRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a DeleteTransitionRouteGroupRequest. + * @implements IDeleteTransitionRouteGroupRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IDeleteTransitionRouteGroupRequest=} [properties] Properties to set + */ + function DeleteTransitionRouteGroupRequest(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]]; + } + + /** + * DeleteTransitionRouteGroupRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest + * @instance + */ + DeleteTransitionRouteGroupRequest.prototype.name = ""; + + /** + * DeleteTransitionRouteGroupRequest force. + * @member {boolean} force + * @memberof google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest + * @instance + */ + DeleteTransitionRouteGroupRequest.prototype.force = false; + + /** + * Creates a new DeleteTransitionRouteGroupRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IDeleteTransitionRouteGroupRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest} DeleteTransitionRouteGroupRequest instance + */ + DeleteTransitionRouteGroupRequest.create = function create(properties) { + return new DeleteTransitionRouteGroupRequest(properties); + }; + + /** + * Encodes the specified DeleteTransitionRouteGroupRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IDeleteTransitionRouteGroupRequest} message DeleteTransitionRouteGroupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteTransitionRouteGroupRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.force != null && Object.hasOwnProperty.call(message, "force")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.force); + return writer; + }; + + /** + * Encodes the specified DeleteTransitionRouteGroupRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IDeleteTransitionRouteGroupRequest} message DeleteTransitionRouteGroupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteTransitionRouteGroupRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteTransitionRouteGroupRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest + * @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.DeleteTransitionRouteGroupRequest} DeleteTransitionRouteGroupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteTransitionRouteGroupRequest.decode = function decode(reader, length, error) { + 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.DeleteTransitionRouteGroupRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.force = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteTransitionRouteGroupRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest} DeleteTransitionRouteGroupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteTransitionRouteGroupRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteTransitionRouteGroupRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteTransitionRouteGroupRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.force != null && message.hasOwnProperty("force")) + if (typeof message.force !== "boolean") + return "force: boolean expected"; + return null; + }; + + /** + * Creates a DeleteTransitionRouteGroupRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest} DeleteTransitionRouteGroupRequest + */ + DeleteTransitionRouteGroupRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.force != null) + message.force = Boolean(object.force); + return message; + }; + + /** + * Creates a plain object from a DeleteTransitionRouteGroupRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest} message DeleteTransitionRouteGroupRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteTransitionRouteGroupRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.force = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.force != null && message.hasOwnProperty("force")) + object.force = message.force; + return object; + }; + + /** + * Converts this DeleteTransitionRouteGroupRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteTransitionRouteGroupRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteTransitionRouteGroupRequest + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteTransitionRouteGroupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest"; + }; + + return DeleteTransitionRouteGroupRequest; + })(); + + v3.Webhooks = (function() { + + /** + * Constructs a new Webhooks service. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a Webhooks + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Webhooks(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Webhooks.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Webhooks; + + /** + * Creates new Webhooks service using the specified rpc implementation. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.Webhooks + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Webhooks} RPC service. Useful where requests and/or responses are streamed. + */ + Webhooks.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Webhooks|listWebhooks}. + * @memberof google.cloud.dialogflow.cx.v3.Webhooks + * @typedef ListWebhooksCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.ListWebhooksResponse} [response] ListWebhooksResponse + */ + + /** + * Calls ListWebhooks. + * @function listWebhooks + * @memberof google.cloud.dialogflow.cx.v3.Webhooks + * @instance + * @param {google.cloud.dialogflow.cx.v3.IListWebhooksRequest} request ListWebhooksRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Webhooks.ListWebhooksCallback} callback Node-style callback called with the error, if any, and ListWebhooksResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Webhooks.prototype.listWebhooks = function listWebhooks(request, callback) { + return this.rpcCall(listWebhooks, $root.google.cloud.dialogflow.cx.v3.ListWebhooksRequest, $root.google.cloud.dialogflow.cx.v3.ListWebhooksResponse, request, callback); + }, "name", { value: "ListWebhooks" }); + + /** + * Calls ListWebhooks. + * @function listWebhooks + * @memberof google.cloud.dialogflow.cx.v3.Webhooks + * @instance + * @param {google.cloud.dialogflow.cx.v3.IListWebhooksRequest} request ListWebhooksRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Webhooks|getWebhook}. + * @memberof google.cloud.dialogflow.cx.v3.Webhooks + * @typedef GetWebhookCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.Webhook} [response] Webhook + */ + + /** + * Calls GetWebhook. + * @function getWebhook + * @memberof google.cloud.dialogflow.cx.v3.Webhooks + * @instance + * @param {google.cloud.dialogflow.cx.v3.IGetWebhookRequest} request GetWebhookRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Webhooks.GetWebhookCallback} callback Node-style callback called with the error, if any, and Webhook + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Webhooks.prototype.getWebhook = function getWebhook(request, callback) { + return this.rpcCall(getWebhook, $root.google.cloud.dialogflow.cx.v3.GetWebhookRequest, $root.google.cloud.dialogflow.cx.v3.Webhook, request, callback); + }, "name", { value: "GetWebhook" }); + + /** + * Calls GetWebhook. + * @function getWebhook + * @memberof google.cloud.dialogflow.cx.v3.Webhooks + * @instance + * @param {google.cloud.dialogflow.cx.v3.IGetWebhookRequest} request GetWebhookRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Webhooks|createWebhook}. + * @memberof google.cloud.dialogflow.cx.v3.Webhooks + * @typedef CreateWebhookCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.Webhook} [response] Webhook + */ + + /** + * Calls CreateWebhook. + * @function createWebhook + * @memberof google.cloud.dialogflow.cx.v3.Webhooks + * @instance + * @param {google.cloud.dialogflow.cx.v3.ICreateWebhookRequest} request CreateWebhookRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Webhooks.CreateWebhookCallback} callback Node-style callback called with the error, if any, and Webhook + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Webhooks.prototype.createWebhook = function createWebhook(request, callback) { + return this.rpcCall(createWebhook, $root.google.cloud.dialogflow.cx.v3.CreateWebhookRequest, $root.google.cloud.dialogflow.cx.v3.Webhook, request, callback); + }, "name", { value: "CreateWebhook" }); + + /** + * Calls CreateWebhook. + * @function createWebhook + * @memberof google.cloud.dialogflow.cx.v3.Webhooks + * @instance + * @param {google.cloud.dialogflow.cx.v3.ICreateWebhookRequest} request CreateWebhookRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Webhooks|updateWebhook}. + * @memberof google.cloud.dialogflow.cx.v3.Webhooks + * @typedef UpdateWebhookCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.Webhook} [response] Webhook + */ + + /** + * Calls UpdateWebhook. + * @function updateWebhook + * @memberof google.cloud.dialogflow.cx.v3.Webhooks + * @instance + * @param {google.cloud.dialogflow.cx.v3.IUpdateWebhookRequest} request UpdateWebhookRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Webhooks.UpdateWebhookCallback} callback Node-style callback called with the error, if any, and Webhook + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Webhooks.prototype.updateWebhook = function updateWebhook(request, callback) { + return this.rpcCall(updateWebhook, $root.google.cloud.dialogflow.cx.v3.UpdateWebhookRequest, $root.google.cloud.dialogflow.cx.v3.Webhook, request, callback); + }, "name", { value: "UpdateWebhook" }); + + /** + * Calls UpdateWebhook. + * @function updateWebhook + * @memberof google.cloud.dialogflow.cx.v3.Webhooks + * @instance + * @param {google.cloud.dialogflow.cx.v3.IUpdateWebhookRequest} request UpdateWebhookRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Webhooks|deleteWebhook}. + * @memberof google.cloud.dialogflow.cx.v3.Webhooks + * @typedef DeleteWebhookCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteWebhook. + * @function deleteWebhook + * @memberof google.cloud.dialogflow.cx.v3.Webhooks + * @instance + * @param {google.cloud.dialogflow.cx.v3.IDeleteWebhookRequest} request DeleteWebhookRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Webhooks.DeleteWebhookCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Webhooks.prototype.deleteWebhook = function deleteWebhook(request, callback) { + return this.rpcCall(deleteWebhook, $root.google.cloud.dialogflow.cx.v3.DeleteWebhookRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteWebhook" }); + + /** + * Calls DeleteWebhook. + * @function deleteWebhook + * @memberof google.cloud.dialogflow.cx.v3.Webhooks + * @instance + * @param {google.cloud.dialogflow.cx.v3.IDeleteWebhookRequest} request DeleteWebhookRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Webhooks; + })(); + + v3.Webhook = (function() { + + /** + * Properties of a Webhook. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IWebhook + * @property {string|null} [name] Webhook name + * @property {string|null} [displayName] Webhook displayName + * @property {google.cloud.dialogflow.cx.v3.Webhook.IGenericWebService|null} [genericWebService] Webhook genericWebService + * @property {google.cloud.dialogflow.cx.v3.Webhook.IServiceDirectoryConfig|null} [serviceDirectory] Webhook serviceDirectory + * @property {google.protobuf.IDuration|null} [timeout] Webhook timeout + * @property {boolean|null} [disabled] Webhook disabled + */ + + /** + * Constructs a new Webhook. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a Webhook. + * @implements IWebhook + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IWebhook=} [properties] Properties to set + */ + function Webhook(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]]; + } + + /** + * Webhook name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.Webhook + * @instance + */ + Webhook.prototype.name = ""; + + /** + * Webhook displayName. + * @member {string} displayName + * @memberof google.cloud.dialogflow.cx.v3.Webhook + * @instance + */ + Webhook.prototype.displayName = ""; + + /** + * Webhook genericWebService. + * @member {google.cloud.dialogflow.cx.v3.Webhook.IGenericWebService|null|undefined} genericWebService + * @memberof google.cloud.dialogflow.cx.v3.Webhook + * @instance + */ + Webhook.prototype.genericWebService = null; + + /** + * Webhook serviceDirectory. + * @member {google.cloud.dialogflow.cx.v3.Webhook.IServiceDirectoryConfig|null|undefined} serviceDirectory + * @memberof google.cloud.dialogflow.cx.v3.Webhook + * @instance + */ + Webhook.prototype.serviceDirectory = null; + + /** + * Webhook timeout. + * @member {google.protobuf.IDuration|null|undefined} timeout + * @memberof google.cloud.dialogflow.cx.v3.Webhook + * @instance + */ + Webhook.prototype.timeout = null; + + /** + * Webhook disabled. + * @member {boolean} disabled + * @memberof google.cloud.dialogflow.cx.v3.Webhook + * @instance + */ + Webhook.prototype.disabled = false; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Webhook webhook. + * @member {"genericWebService"|"serviceDirectory"|undefined} webhook + * @memberof google.cloud.dialogflow.cx.v3.Webhook + * @instance + */ + Object.defineProperty(Webhook.prototype, "webhook", { + get: $util.oneOfGetter($oneOfFields = ["genericWebService", "serviceDirectory"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Webhook instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.Webhook + * @static + * @param {google.cloud.dialogflow.cx.v3.IWebhook=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.Webhook} Webhook instance + */ + Webhook.create = function create(properties) { + return new Webhook(properties); + }; + + /** + * Encodes the specified Webhook message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Webhook.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.Webhook + * @static + * @param {google.cloud.dialogflow.cx.v3.IWebhook} message Webhook message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Webhook.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.genericWebService != null && Object.hasOwnProperty.call(message, "genericWebService")) + $root.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.encode(message.genericWebService, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.disabled); + if (message.timeout != null && Object.hasOwnProperty.call(message, "timeout")) + $root.google.protobuf.Duration.encode(message.timeout, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.serviceDirectory != null && Object.hasOwnProperty.call(message, "serviceDirectory")) + $root.google.cloud.dialogflow.cx.v3.Webhook.ServiceDirectoryConfig.encode(message.serviceDirectory, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Webhook message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Webhook.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Webhook + * @static + * @param {google.cloud.dialogflow.cx.v3.IWebhook} message Webhook message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Webhook.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Webhook message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.Webhook + * @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.Webhook} Webhook + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Webhook.decode = function decode(reader, length, error) { + 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.Webhook(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.displayName = reader.string(); + break; + } + case 4: { + message.genericWebService = $root.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.decode(reader, reader.uint32()); + break; + } + case 7: { + message.serviceDirectory = $root.google.cloud.dialogflow.cx.v3.Webhook.ServiceDirectoryConfig.decode(reader, reader.uint32()); + break; + } + case 6: { + message.timeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 5: { + message.disabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Webhook message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Webhook + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.Webhook} Webhook + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Webhook.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Webhook message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.Webhook + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Webhook.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.genericWebService != null && message.hasOwnProperty("genericWebService")) { + properties.webhook = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.verify(message.genericWebService); + if (error) + return "genericWebService." + error; + } + } + if (message.serviceDirectory != null && message.hasOwnProperty("serviceDirectory")) { + if (properties.webhook === 1) + return "webhook: multiple values"; + properties.webhook = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3.Webhook.ServiceDirectoryConfig.verify(message.serviceDirectory); + if (error) + return "serviceDirectory." + error; + } + } + if (message.timeout != null && message.hasOwnProperty("timeout")) { + var error = $root.google.protobuf.Duration.verify(message.timeout); + if (error) + return "timeout." + error; + } + if (message.disabled != null && message.hasOwnProperty("disabled")) + if (typeof message.disabled !== "boolean") + return "disabled: boolean expected"; + return null; + }; + + /** + * Creates a Webhook message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.Webhook + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.Webhook} Webhook + */ + Webhook.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.Webhook) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.Webhook(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.genericWebService != null) { + if (typeof object.genericWebService !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Webhook.genericWebService: object expected"); + message.genericWebService = $root.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.fromObject(object.genericWebService); + } + if (object.serviceDirectory != null) { + if (typeof object.serviceDirectory !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Webhook.serviceDirectory: object expected"); + message.serviceDirectory = $root.google.cloud.dialogflow.cx.v3.Webhook.ServiceDirectoryConfig.fromObject(object.serviceDirectory); + } + if (object.timeout != null) { + if (typeof object.timeout !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Webhook.timeout: object expected"); + message.timeout = $root.google.protobuf.Duration.fromObject(object.timeout); + } + if (object.disabled != null) + message.disabled = Boolean(object.disabled); + return message; + }; + + /** + * Creates a plain object from a Webhook message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.Webhook + * @static + * @param {google.cloud.dialogflow.cx.v3.Webhook} message Webhook + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Webhook.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.displayName = ""; + object.disabled = false; + object.timeout = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.genericWebService != null && message.hasOwnProperty("genericWebService")) { + object.genericWebService = $root.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.toObject(message.genericWebService, options); + if (options.oneofs) + object.webhook = "genericWebService"; + } + if (message.disabled != null && message.hasOwnProperty("disabled")) + object.disabled = message.disabled; + if (message.timeout != null && message.hasOwnProperty("timeout")) + object.timeout = $root.google.protobuf.Duration.toObject(message.timeout, options); + if (message.serviceDirectory != null && message.hasOwnProperty("serviceDirectory")) { + object.serviceDirectory = $root.google.cloud.dialogflow.cx.v3.Webhook.ServiceDirectoryConfig.toObject(message.serviceDirectory, options); + if (options.oneofs) + object.webhook = "serviceDirectory"; + } + return object; + }; + + /** + * Converts this Webhook to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.Webhook + * @instance + * @returns {Object.} JSON object + */ + Webhook.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Webhook + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.Webhook + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Webhook.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Webhook"; + }; + + Webhook.GenericWebService = (function() { + + /** + * Properties of a GenericWebService. + * @memberof google.cloud.dialogflow.cx.v3.Webhook + * @interface IGenericWebService + * @property {string|null} [uri] GenericWebService uri + * @property {string|null} [username] GenericWebService username + * @property {string|null} [password] GenericWebService password + * @property {string|null} [secretVersionForUsernamePassword] GenericWebService secretVersionForUsernamePassword + * @property {Object.|null} [requestHeaders] GenericWebService requestHeaders + * @property {Object.|null} [secretVersionsForRequestHeaders] GenericWebService secretVersionsForRequestHeaders + * @property {Array.|null} [allowedCaCerts] GenericWebService allowedCaCerts + * @property {google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.IOAuthConfig|null} [oauthConfig] GenericWebService oauthConfig + * @property {google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAgentAuth|null} [serviceAgentAuth] GenericWebService serviceAgentAuth + * @property {google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.IServiceAccountAuthConfig|null} [serviceAccountAuthConfig] GenericWebService serviceAccountAuthConfig + * @property {google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.WebhookType|null} [webhookType] GenericWebService webhookType + * @property {google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.HttpMethod|null} [httpMethod] GenericWebService httpMethod + * @property {string|null} [requestBody] GenericWebService requestBody + * @property {Object.|null} [parameterMapping] GenericWebService parameterMapping + */ + + /** + * Constructs a new GenericWebService. + * @memberof google.cloud.dialogflow.cx.v3.Webhook + * @classdesc Represents a GenericWebService. + * @implements IGenericWebService + * @constructor + * @param {google.cloud.dialogflow.cx.v3.Webhook.IGenericWebService=} [properties] Properties to set + */ + function GenericWebService(properties) { + this.requestHeaders = {}; + this.secretVersionsForRequestHeaders = {}; + this.allowedCaCerts = []; + this.parameterMapping = {}; + 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]]; + } + + /** + * GenericWebService uri. + * @member {string} uri + * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + * @instance + */ + GenericWebService.prototype.uri = ""; + + /** + * GenericWebService username. + * @member {string} username + * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + * @instance + */ + GenericWebService.prototype.username = ""; + + /** + * GenericWebService password. + * @member {string} password + * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + * @instance + */ + GenericWebService.prototype.password = ""; + + /** + * GenericWebService secretVersionForUsernamePassword. + * @member {string} secretVersionForUsernamePassword + * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + * @instance + */ + GenericWebService.prototype.secretVersionForUsernamePassword = ""; + + /** + * GenericWebService requestHeaders. + * @member {Object.} requestHeaders + * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + * @instance + */ + GenericWebService.prototype.requestHeaders = $util.emptyObject; + + /** + * GenericWebService secretVersionsForRequestHeaders. + * @member {Object.} secretVersionsForRequestHeaders + * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + * @instance + */ + GenericWebService.prototype.secretVersionsForRequestHeaders = $util.emptyObject; + + /** + * GenericWebService allowedCaCerts. + * @member {Array.} allowedCaCerts + * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + * @instance + */ + GenericWebService.prototype.allowedCaCerts = $util.emptyArray; + + /** + * GenericWebService oauthConfig. + * @member {google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.IOAuthConfig|null|undefined} oauthConfig + * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + * @instance + */ + GenericWebService.prototype.oauthConfig = null; + + /** + * GenericWebService serviceAgentAuth. + * @member {google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAgentAuth} serviceAgentAuth + * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + * @instance + */ + GenericWebService.prototype.serviceAgentAuth = 0; + + /** + * GenericWebService serviceAccountAuthConfig. + * @member {google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.IServiceAccountAuthConfig|null|undefined} serviceAccountAuthConfig + * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + * @instance + */ + GenericWebService.prototype.serviceAccountAuthConfig = null; + + /** + * GenericWebService webhookType. + * @member {google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.WebhookType} webhookType + * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + * @instance + */ + GenericWebService.prototype.webhookType = 0; + + /** + * GenericWebService httpMethod. + * @member {google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.HttpMethod} httpMethod + * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + * @instance + */ + GenericWebService.prototype.httpMethod = 0; + + /** + * GenericWebService requestBody. + * @member {string} requestBody + * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + * @instance + */ + GenericWebService.prototype.requestBody = ""; + + /** + * GenericWebService parameterMapping. + * @member {Object.} parameterMapping + * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + * @instance + */ + GenericWebService.prototype.parameterMapping = $util.emptyObject; + + /** + * Creates a new GenericWebService instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + * @static + * @param {google.cloud.dialogflow.cx.v3.Webhook.IGenericWebService=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.Webhook.GenericWebService} GenericWebService instance + */ + GenericWebService.create = function create(properties) { + return new GenericWebService(properties); + }; + + /** + * Encodes the specified GenericWebService message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + * @static + * @param {google.cloud.dialogflow.cx.v3.Webhook.IGenericWebService} message GenericWebService message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenericWebService.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); + if (message.username != null && Object.hasOwnProperty.call(message, "username")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.username); + if (message.password != null && Object.hasOwnProperty.call(message, "password")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.password); + if (message.requestHeaders != null && Object.hasOwnProperty.call(message, "requestHeaders")) + for (var keys = Object.keys(message.requestHeaders), i = 0; i < keys.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.requestHeaders[keys[i]]).ldelim(); + if (message.allowedCaCerts != null && message.allowedCaCerts.length) + for (var i = 0; i < message.allowedCaCerts.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.allowedCaCerts[i]); + if (message.webhookType != null && Object.hasOwnProperty.call(message, "webhookType")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.webhookType); + if (message.httpMethod != null && Object.hasOwnProperty.call(message, "httpMethod")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.httpMethod); + if (message.requestBody != null && Object.hasOwnProperty.call(message, "requestBody")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.requestBody); + if (message.parameterMapping != null && Object.hasOwnProperty.call(message, "parameterMapping")) + for (var keys = Object.keys(message.parameterMapping), i = 0; i < keys.length; ++i) + writer.uint32(/* id 9, wireType 2 =*/74).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.parameterMapping[keys[i]]).ldelim(); + if (message.oauthConfig != null && Object.hasOwnProperty.call(message, "oauthConfig")) + $root.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig.encode(message.oauthConfig, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.serviceAgentAuth != null && Object.hasOwnProperty.call(message, "serviceAgentAuth")) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.serviceAgentAuth); + if (message.serviceAccountAuthConfig != null && Object.hasOwnProperty.call(message, "serviceAccountAuthConfig")) + $root.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig.encode(message.serviceAccountAuthConfig, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + if (message.secretVersionForUsernamePassword != null && Object.hasOwnProperty.call(message, "secretVersionForUsernamePassword")) + writer.uint32(/* id 19, wireType 2 =*/154).string(message.secretVersionForUsernamePassword); + if (message.secretVersionsForRequestHeaders != null && Object.hasOwnProperty.call(message, "secretVersionsForRequestHeaders")) + for (var keys = Object.keys(message.secretVersionsForRequestHeaders), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 20, wireType 2 =*/162).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue.encode(message.secretVersionsForRequestHeaders[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + return writer; + }; + + /** + * Encodes the specified GenericWebService message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + * @static + * @param {google.cloud.dialogflow.cx.v3.Webhook.IGenericWebService} message GenericWebService message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenericWebService.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GenericWebService message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + * @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.Webhook.GenericWebService} GenericWebService + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenericWebService.decode = function decode(reader, length, error) { + 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.Webhook.GenericWebService(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.uri = reader.string(); + break; + } + case 2: { + message.username = reader.string(); + break; + } + case 3: { + message.password = reader.string(); + break; + } + case 19: { + message.secretVersionForUsernamePassword = reader.string(); + break; + } + case 4: { + if (message.requestHeaders === $util.emptyObject) + message.requestHeaders = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.requestHeaders[key] = value; + break; + } + case 20: { + if (message.secretVersionsForRequestHeaders === $util.emptyObject) + message.secretVersionsForRequestHeaders = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.secretVersionsForRequestHeaders[key] = value; + break; + } + case 5: { + if (!(message.allowedCaCerts && message.allowedCaCerts.length)) + message.allowedCaCerts = []; + message.allowedCaCerts.push(reader.bytes()); + break; + } + case 11: { + message.oauthConfig = $root.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig.decode(reader, reader.uint32()); + break; + } + case 12: { + message.serviceAgentAuth = reader.int32(); + break; + } + case 18: { + message.serviceAccountAuthConfig = $root.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig.decode(reader, reader.uint32()); + break; + } + case 6: { + message.webhookType = reader.int32(); + break; + } + case 7: { + message.httpMethod = reader.int32(); + break; + } + case 8: { + message.requestBody = reader.string(); + break; + } + case 9: { + if (message.parameterMapping === $util.emptyObject) + message.parameterMapping = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.parameterMapping[key] = value; + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GenericWebService message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.Webhook.GenericWebService} GenericWebService + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenericWebService.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GenericWebService message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GenericWebService.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.username != null && message.hasOwnProperty("username")) + if (!$util.isString(message.username)) + return "username: string expected"; + if (message.password != null && message.hasOwnProperty("password")) + if (!$util.isString(message.password)) + return "password: string expected"; + if (message.secretVersionForUsernamePassword != null && message.hasOwnProperty("secretVersionForUsernamePassword")) + if (!$util.isString(message.secretVersionForUsernamePassword)) + return "secretVersionForUsernamePassword: string expected"; + if (message.requestHeaders != null && message.hasOwnProperty("requestHeaders")) { + if (!$util.isObject(message.requestHeaders)) + return "requestHeaders: object expected"; + var key = Object.keys(message.requestHeaders); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.requestHeaders[key[i]])) + return "requestHeaders: string{k:string} expected"; + } + if (message.secretVersionsForRequestHeaders != null && message.hasOwnProperty("secretVersionsForRequestHeaders")) { + if (!$util.isObject(message.secretVersionsForRequestHeaders)) + return "secretVersionsForRequestHeaders: object expected"; + var key = Object.keys(message.secretVersionsForRequestHeaders); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue.verify(message.secretVersionsForRequestHeaders[key[i]]); + if (error) + return "secretVersionsForRequestHeaders." + error; + } + } + if (message.allowedCaCerts != null && message.hasOwnProperty("allowedCaCerts")) { + if (!Array.isArray(message.allowedCaCerts)) + return "allowedCaCerts: array expected"; + for (var i = 0; i < message.allowedCaCerts.length; ++i) + if (!(message.allowedCaCerts[i] && typeof message.allowedCaCerts[i].length === "number" || $util.isString(message.allowedCaCerts[i]))) + return "allowedCaCerts: buffer[] expected"; + } + if (message.oauthConfig != null && message.hasOwnProperty("oauthConfig")) { + var error = $root.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig.verify(message.oauthConfig); + if (error) + return "oauthConfig." + error; + } + if (message.serviceAgentAuth != null && message.hasOwnProperty("serviceAgentAuth")) + switch (message.serviceAgentAuth) { + default: + return "serviceAgentAuth: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.serviceAccountAuthConfig != null && message.hasOwnProperty("serviceAccountAuthConfig")) { + var error = $root.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig.verify(message.serviceAccountAuthConfig); + if (error) + return "serviceAccountAuthConfig." + error; + } + if (message.webhookType != null && message.hasOwnProperty("webhookType")) + switch (message.webhookType) { + default: + return "webhookType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.httpMethod != null && message.hasOwnProperty("httpMethod")) + switch (message.httpMethod) { + default: + return "httpMethod: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + if (message.requestBody != null && message.hasOwnProperty("requestBody")) + if (!$util.isString(message.requestBody)) + return "requestBody: string expected"; + if (message.parameterMapping != null && message.hasOwnProperty("parameterMapping")) { + if (!$util.isObject(message.parameterMapping)) + return "parameterMapping: object expected"; + var key = Object.keys(message.parameterMapping); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.parameterMapping[key[i]])) + return "parameterMapping: string{k:string} expected"; + } + return null; + }; + + /** + * Creates a GenericWebService message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.Webhook.GenericWebService} GenericWebService + */ + GenericWebService.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService(); + if (object.uri != null) + message.uri = String(object.uri); + if (object.username != null) + message.username = String(object.username); + if (object.password != null) + message.password = String(object.password); + if (object.secretVersionForUsernamePassword != null) + message.secretVersionForUsernamePassword = String(object.secretVersionForUsernamePassword); + if (object.requestHeaders) { + if (typeof object.requestHeaders !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.requestHeaders: object expected"); + message.requestHeaders = {}; + for (var keys = Object.keys(object.requestHeaders), i = 0; i < keys.length; ++i) + message.requestHeaders[keys[i]] = String(object.requestHeaders[keys[i]]); + } + if (object.secretVersionsForRequestHeaders) { + if (typeof object.secretVersionsForRequestHeaders !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.secretVersionsForRequestHeaders: object expected"); + message.secretVersionsForRequestHeaders = {}; + for (var keys = Object.keys(object.secretVersionsForRequestHeaders), i = 0; i < keys.length; ++i) { + if (typeof object.secretVersionsForRequestHeaders[keys[i]] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.secretVersionsForRequestHeaders: object expected"); + message.secretVersionsForRequestHeaders[keys[i]] = $root.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue.fromObject(object.secretVersionsForRequestHeaders[keys[i]]); + } + } + if (object.allowedCaCerts) { + if (!Array.isArray(object.allowedCaCerts)) + throw TypeError(".google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.allowedCaCerts: array expected"); + message.allowedCaCerts = []; + for (var i = 0; i < object.allowedCaCerts.length; ++i) + if (typeof object.allowedCaCerts[i] === "string") + $util.base64.decode(object.allowedCaCerts[i], message.allowedCaCerts[i] = $util.newBuffer($util.base64.length(object.allowedCaCerts[i])), 0); + else if (object.allowedCaCerts[i].length >= 0) + message.allowedCaCerts[i] = object.allowedCaCerts[i]; + } + if (object.oauthConfig != null) { + if (typeof object.oauthConfig !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.oauthConfig: object expected"); + message.oauthConfig = $root.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig.fromObject(object.oauthConfig); + } + switch (object.serviceAgentAuth) { + default: + if (typeof object.serviceAgentAuth === "number") { + message.serviceAgentAuth = object.serviceAgentAuth; + break; + } + break; + case "SERVICE_AGENT_AUTH_UNSPECIFIED": + case 0: + message.serviceAgentAuth = 0; + break; + case "NONE": + case 1: + message.serviceAgentAuth = 1; + break; + case "ID_TOKEN": + case 2: + message.serviceAgentAuth = 2; + break; + case "ACCESS_TOKEN": + case 3: + message.serviceAgentAuth = 3; + break; + } + if (object.serviceAccountAuthConfig != null) { + if (typeof object.serviceAccountAuthConfig !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.serviceAccountAuthConfig: object expected"); + message.serviceAccountAuthConfig = $root.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig.fromObject(object.serviceAccountAuthConfig); + } + switch (object.webhookType) { + default: + if (typeof object.webhookType === "number") { + message.webhookType = object.webhookType; + break; + } + break; + case "WEBHOOK_TYPE_UNSPECIFIED": + case 0: + message.webhookType = 0; + break; + case "STANDARD": + case 1: + message.webhookType = 1; + break; + case "FLEXIBLE": + case 2: + message.webhookType = 2; + break; + } + switch (object.httpMethod) { + default: + if (typeof object.httpMethod === "number") { + message.httpMethod = object.httpMethod; + break; + } + break; + case "HTTP_METHOD_UNSPECIFIED": + case 0: + message.httpMethod = 0; + break; + case "POST": + case 1: + message.httpMethod = 1; + break; + case "GET": + case 2: + message.httpMethod = 2; + break; + case "HEAD": + case 3: + message.httpMethod = 3; + break; + case "PUT": + case 4: + message.httpMethod = 4; + break; + case "DELETE": + case 5: + message.httpMethod = 5; + break; + case "PATCH": + case 6: + message.httpMethod = 6; + break; + case "OPTIONS": + case 7: + message.httpMethod = 7; + break; + } + if (object.requestBody != null) + message.requestBody = String(object.requestBody); + if (object.parameterMapping) { + if (typeof object.parameterMapping !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.parameterMapping: object expected"); + message.parameterMapping = {}; + for (var keys = Object.keys(object.parameterMapping), i = 0; i < keys.length; ++i) + message.parameterMapping[keys[i]] = String(object.parameterMapping[keys[i]]); + } + return message; + }; + + /** + * Creates a plain object from a GenericWebService message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + * @static + * @param {google.cloud.dialogflow.cx.v3.Webhook.GenericWebService} message GenericWebService + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GenericWebService.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.allowedCaCerts = []; + if (options.objects || options.defaults) { + object.requestHeaders = {}; + object.parameterMapping = {}; + object.secretVersionsForRequestHeaders = {}; + } + if (options.defaults) { + object.uri = ""; + object.username = ""; + object.password = ""; + object.webhookType = options.enums === String ? "WEBHOOK_TYPE_UNSPECIFIED" : 0; + object.httpMethod = options.enums === String ? "HTTP_METHOD_UNSPECIFIED" : 0; + object.requestBody = ""; + object.oauthConfig = null; + object.serviceAgentAuth = options.enums === String ? "SERVICE_AGENT_AUTH_UNSPECIFIED" : 0; + object.serviceAccountAuthConfig = null; + object.secretVersionForUsernamePassword = ""; + } + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.username != null && message.hasOwnProperty("username")) + object.username = message.username; + if (message.password != null && message.hasOwnProperty("password")) + object.password = message.password; + var keys2; + if (message.requestHeaders && (keys2 = Object.keys(message.requestHeaders)).length) { + object.requestHeaders = {}; + for (var j = 0; j < keys2.length; ++j) + object.requestHeaders[keys2[j]] = message.requestHeaders[keys2[j]]; + } + if (message.allowedCaCerts && message.allowedCaCerts.length) { + object.allowedCaCerts = []; + for (var j = 0; j < message.allowedCaCerts.length; ++j) + object.allowedCaCerts[j] = options.bytes === String ? $util.base64.encode(message.allowedCaCerts[j], 0, message.allowedCaCerts[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.allowedCaCerts[j]) : message.allowedCaCerts[j]; + } + if (message.webhookType != null && message.hasOwnProperty("webhookType")) + object.webhookType = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.WebhookType[message.webhookType] === undefined ? message.webhookType : $root.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.WebhookType[message.webhookType] : message.webhookType; + if (message.httpMethod != null && message.hasOwnProperty("httpMethod")) + object.httpMethod = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.HttpMethod[message.httpMethod] === undefined ? message.httpMethod : $root.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.HttpMethod[message.httpMethod] : message.httpMethod; + if (message.requestBody != null && message.hasOwnProperty("requestBody")) + object.requestBody = message.requestBody; + if (message.parameterMapping && (keys2 = Object.keys(message.parameterMapping)).length) { + object.parameterMapping = {}; + for (var j = 0; j < keys2.length; ++j) + object.parameterMapping[keys2[j]] = message.parameterMapping[keys2[j]]; + } + if (message.oauthConfig != null && message.hasOwnProperty("oauthConfig")) + object.oauthConfig = $root.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig.toObject(message.oauthConfig, options); + if (message.serviceAgentAuth != null && message.hasOwnProperty("serviceAgentAuth")) + object.serviceAgentAuth = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAgentAuth[message.serviceAgentAuth] === undefined ? message.serviceAgentAuth : $root.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAgentAuth[message.serviceAgentAuth] : message.serviceAgentAuth; + if (message.serviceAccountAuthConfig != null && message.hasOwnProperty("serviceAccountAuthConfig")) + object.serviceAccountAuthConfig = $root.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig.toObject(message.serviceAccountAuthConfig, options); + if (message.secretVersionForUsernamePassword != null && message.hasOwnProperty("secretVersionForUsernamePassword")) + object.secretVersionForUsernamePassword = message.secretVersionForUsernamePassword; + if (message.secretVersionsForRequestHeaders && (keys2 = Object.keys(message.secretVersionsForRequestHeaders)).length) { + object.secretVersionsForRequestHeaders = {}; + for (var j = 0; j < keys2.length; ++j) + object.secretVersionsForRequestHeaders[keys2[j]] = $root.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue.toObject(message.secretVersionsForRequestHeaders[keys2[j]], options); + } + return object; + }; + + /** + * Converts this GenericWebService to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + * @instance + * @returns {Object.} JSON object + */ + GenericWebService.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GenericWebService + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GenericWebService.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Webhook.GenericWebService"; + }; + + GenericWebService.SecretVersionHeaderValue = (function() { + + /** + * Properties of a SecretVersionHeaderValue. + * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + * @interface ISecretVersionHeaderValue + * @property {string|null} [secretVersion] SecretVersionHeaderValue secretVersion + */ + + /** + * Constructs a new SecretVersionHeaderValue. + * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + * @classdesc Represents a SecretVersionHeaderValue. + * @implements ISecretVersionHeaderValue + * @constructor + * @param {google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ISecretVersionHeaderValue=} [properties] Properties to set + */ + function SecretVersionHeaderValue(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]]; + } + + /** + * SecretVersionHeaderValue secretVersion. + * @member {string} secretVersion + * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue + * @instance + */ + SecretVersionHeaderValue.prototype.secretVersion = ""; + + /** + * Creates a new SecretVersionHeaderValue instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue + * @static + * @param {google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ISecretVersionHeaderValue=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue} SecretVersionHeaderValue instance + */ + SecretVersionHeaderValue.create = function create(properties) { + return new SecretVersionHeaderValue(properties); + }; + + /** + * Encodes the specified SecretVersionHeaderValue message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue + * @static + * @param {google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ISecretVersionHeaderValue} message SecretVersionHeaderValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SecretVersionHeaderValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.secretVersion != null && Object.hasOwnProperty.call(message, "secretVersion")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.secretVersion); + return writer; + }; + + /** + * Encodes the specified SecretVersionHeaderValue message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue + * @static + * @param {google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ISecretVersionHeaderValue} message SecretVersionHeaderValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SecretVersionHeaderValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SecretVersionHeaderValue message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue + * @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.Webhook.GenericWebService.SecretVersionHeaderValue} SecretVersionHeaderValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SecretVersionHeaderValue.decode = function decode(reader, length, error) { + 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.Webhook.GenericWebService.SecretVersionHeaderValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.secretVersion = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SecretVersionHeaderValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue} SecretVersionHeaderValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SecretVersionHeaderValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SecretVersionHeaderValue message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SecretVersionHeaderValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.secretVersion != null && message.hasOwnProperty("secretVersion")) + if (!$util.isString(message.secretVersion)) + return "secretVersion: string expected"; + return null; + }; + + /** + * Creates a SecretVersionHeaderValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue} SecretVersionHeaderValue + */ + SecretVersionHeaderValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue(); + if (object.secretVersion != null) + message.secretVersion = String(object.secretVersion); + return message; + }; + + /** + * Creates a plain object from a SecretVersionHeaderValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue + * @static + * @param {google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue} message SecretVersionHeaderValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SecretVersionHeaderValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.secretVersion = ""; + if (message.secretVersion != null && message.hasOwnProperty("secretVersion")) + object.secretVersion = message.secretVersion; + return object; + }; + + /** + * Converts this SecretVersionHeaderValue to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue + * @instance + * @returns {Object.} JSON object + */ + SecretVersionHeaderValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SecretVersionHeaderValue + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SecretVersionHeaderValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.SecretVersionHeaderValue"; + }; + + return SecretVersionHeaderValue; + })(); + + GenericWebService.OAuthConfig = (function() { + + /** + * Properties of a OAuthConfig. + * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + * @interface IOAuthConfig + * @property {string|null} [clientId] OAuthConfig clientId + * @property {string|null} [clientSecret] OAuthConfig clientSecret + * @property {string|null} [secretVersionForClientSecret] OAuthConfig secretVersionForClientSecret + * @property {string|null} [tokenEndpoint] OAuthConfig tokenEndpoint + * @property {Array.|null} [scopes] OAuthConfig scopes + */ + + /** + * Constructs a new OAuthConfig. + * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + * @classdesc Represents a OAuthConfig. + * @implements IOAuthConfig + * @constructor + * @param {google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.IOAuthConfig=} [properties] Properties to set + */ + function OAuthConfig(properties) { + this.scopes = []; + 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]]; + } + + /** + * OAuthConfig clientId. + * @member {string} clientId + * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig + * @instance + */ + OAuthConfig.prototype.clientId = ""; + + /** + * OAuthConfig clientSecret. + * @member {string} clientSecret + * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig + * @instance + */ + OAuthConfig.prototype.clientSecret = ""; + + /** + * OAuthConfig secretVersionForClientSecret. + * @member {string} secretVersionForClientSecret + * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig + * @instance + */ + OAuthConfig.prototype.secretVersionForClientSecret = ""; + + /** + * OAuthConfig tokenEndpoint. + * @member {string} tokenEndpoint + * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig + * @instance + */ + OAuthConfig.prototype.tokenEndpoint = ""; + + /** + * OAuthConfig scopes. + * @member {Array.} scopes + * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig + * @instance + */ + OAuthConfig.prototype.scopes = $util.emptyArray; + + /** + * Creates a new OAuthConfig instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig + * @static + * @param {google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.IOAuthConfig=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig} OAuthConfig instance + */ + OAuthConfig.create = function create(properties) { + return new OAuthConfig(properties); + }; + + /** + * Encodes the specified OAuthConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig + * @static + * @param {google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.IOAuthConfig} message OAuthConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OAuthConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.clientId != null && Object.hasOwnProperty.call(message, "clientId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.clientId); + if (message.clientSecret != null && Object.hasOwnProperty.call(message, "clientSecret")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.clientSecret); + if (message.tokenEndpoint != null && Object.hasOwnProperty.call(message, "tokenEndpoint")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.tokenEndpoint); + if (message.scopes != null && message.scopes.length) + for (var i = 0; i < message.scopes.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.scopes[i]); + if (message.secretVersionForClientSecret != null && Object.hasOwnProperty.call(message, "secretVersionForClientSecret")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.secretVersionForClientSecret); + return writer; + }; + + /** + * Encodes the specified OAuthConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig + * @static + * @param {google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.IOAuthConfig} message OAuthConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OAuthConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a OAuthConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig + * @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.Webhook.GenericWebService.OAuthConfig} OAuthConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OAuthConfig.decode = function decode(reader, length, error) { + 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.Webhook.GenericWebService.OAuthConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.clientId = reader.string(); + break; + } + case 2: { + message.clientSecret = reader.string(); + break; + } + case 5: { + message.secretVersionForClientSecret = reader.string(); + break; + } + case 3: { + message.tokenEndpoint = reader.string(); + break; + } + case 4: { + if (!(message.scopes && message.scopes.length)) + message.scopes = []; + message.scopes.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a OAuthConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig} OAuthConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OAuthConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a OAuthConfig message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OAuthConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.clientId != null && message.hasOwnProperty("clientId")) + if (!$util.isString(message.clientId)) + return "clientId: string expected"; + if (message.clientSecret != null && message.hasOwnProperty("clientSecret")) + if (!$util.isString(message.clientSecret)) + return "clientSecret: string expected"; + if (message.secretVersionForClientSecret != null && message.hasOwnProperty("secretVersionForClientSecret")) + if (!$util.isString(message.secretVersionForClientSecret)) + return "secretVersionForClientSecret: string expected"; + if (message.tokenEndpoint != null && message.hasOwnProperty("tokenEndpoint")) + if (!$util.isString(message.tokenEndpoint)) + return "tokenEndpoint: string expected"; + if (message.scopes != null && message.hasOwnProperty("scopes")) { + if (!Array.isArray(message.scopes)) + return "scopes: array expected"; + for (var i = 0; i < message.scopes.length; ++i) + if (!$util.isString(message.scopes[i])) + return "scopes: string[] expected"; + } + return null; + }; + + /** + * Creates a OAuthConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig} OAuthConfig + */ + OAuthConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig(); + if (object.clientId != null) + message.clientId = String(object.clientId); + if (object.clientSecret != null) + message.clientSecret = String(object.clientSecret); + if (object.secretVersionForClientSecret != null) + message.secretVersionForClientSecret = String(object.secretVersionForClientSecret); + if (object.tokenEndpoint != null) + message.tokenEndpoint = String(object.tokenEndpoint); + if (object.scopes) { + if (!Array.isArray(object.scopes)) + throw TypeError(".google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig.scopes: array expected"); + message.scopes = []; + for (var i = 0; i < object.scopes.length; ++i) + message.scopes[i] = String(object.scopes[i]); + } + return message; + }; + + /** + * Creates a plain object from a OAuthConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig + * @static + * @param {google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig} message OAuthConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OAuthConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.scopes = []; + if (options.defaults) { + object.clientId = ""; + object.clientSecret = ""; + object.tokenEndpoint = ""; + object.secretVersionForClientSecret = ""; + } + if (message.clientId != null && message.hasOwnProperty("clientId")) + object.clientId = message.clientId; + if (message.clientSecret != null && message.hasOwnProperty("clientSecret")) + object.clientSecret = message.clientSecret; + if (message.tokenEndpoint != null && message.hasOwnProperty("tokenEndpoint")) + object.tokenEndpoint = message.tokenEndpoint; + if (message.scopes && message.scopes.length) { + object.scopes = []; + for (var j = 0; j < message.scopes.length; ++j) + object.scopes[j] = message.scopes[j]; + } + if (message.secretVersionForClientSecret != null && message.hasOwnProperty("secretVersionForClientSecret")) + object.secretVersionForClientSecret = message.secretVersionForClientSecret; + return object; + }; + + /** + * Converts this OAuthConfig to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig + * @instance + * @returns {Object.} JSON object + */ + OAuthConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OAuthConfig + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OAuthConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig"; + }; + + return OAuthConfig; + })(); + + /** + * ServiceAgentAuth enum. + * @name google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAgentAuth + * @enum {number} + * @property {number} SERVICE_AGENT_AUTH_UNSPECIFIED=0 SERVICE_AGENT_AUTH_UNSPECIFIED value + * @property {number} NONE=1 NONE value + * @property {number} ID_TOKEN=2 ID_TOKEN value + * @property {number} ACCESS_TOKEN=3 ACCESS_TOKEN value + */ + GenericWebService.ServiceAgentAuth = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SERVICE_AGENT_AUTH_UNSPECIFIED"] = 0; + values[valuesById[1] = "NONE"] = 1; + values[valuesById[2] = "ID_TOKEN"] = 2; + values[valuesById[3] = "ACCESS_TOKEN"] = 3; + return values; + })(); + + GenericWebService.ServiceAccountAuthConfig = (function() { + + /** + * Properties of a ServiceAccountAuthConfig. + * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + * @interface IServiceAccountAuthConfig + * @property {string|null} [serviceAccount] ServiceAccountAuthConfig serviceAccount + */ + + /** + * Constructs a new ServiceAccountAuthConfig. + * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService + * @classdesc Represents a ServiceAccountAuthConfig. + * @implements IServiceAccountAuthConfig + * @constructor + * @param {google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.IServiceAccountAuthConfig=} [properties] Properties to set + */ + function ServiceAccountAuthConfig(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]]; + } + + /** + * ServiceAccountAuthConfig serviceAccount. + * @member {string} serviceAccount + * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig + * @instance + */ + ServiceAccountAuthConfig.prototype.serviceAccount = ""; + + /** + * Creates a new ServiceAccountAuthConfig instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig + * @static + * @param {google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.IServiceAccountAuthConfig=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig} ServiceAccountAuthConfig instance + */ + ServiceAccountAuthConfig.create = function create(properties) { + return new ServiceAccountAuthConfig(properties); + }; + + /** + * Encodes the specified ServiceAccountAuthConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig + * @static + * @param {google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.IServiceAccountAuthConfig} message ServiceAccountAuthConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceAccountAuthConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.serviceAccount); + return writer; + }; + + /** + * Encodes the specified ServiceAccountAuthConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig + * @static + * @param {google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.IServiceAccountAuthConfig} message ServiceAccountAuthConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceAccountAuthConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceAccountAuthConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig + * @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.Webhook.GenericWebService.ServiceAccountAuthConfig} ServiceAccountAuthConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceAccountAuthConfig.decode = function decode(reader, length, error) { + 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.Webhook.GenericWebService.ServiceAccountAuthConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.serviceAccount = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceAccountAuthConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig} ServiceAccountAuthConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceAccountAuthConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceAccountAuthConfig message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceAccountAuthConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + if (!$util.isString(message.serviceAccount)) + return "serviceAccount: string expected"; + return null; + }; + + /** + * Creates a ServiceAccountAuthConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig} ServiceAccountAuthConfig + */ + ServiceAccountAuthConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig(); + if (object.serviceAccount != null) + message.serviceAccount = String(object.serviceAccount); + return message; + }; + + /** + * Creates a plain object from a ServiceAccountAuthConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig + * @static + * @param {google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig} message ServiceAccountAuthConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceAccountAuthConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.serviceAccount = ""; + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + object.serviceAccount = message.serviceAccount; + return object; + }; + + /** + * Converts this ServiceAccountAuthConfig to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig + * @instance + * @returns {Object.} JSON object + */ + ServiceAccountAuthConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ServiceAccountAuthConfig + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceAccountAuthConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAccountAuthConfig"; + }; + + return ServiceAccountAuthConfig; + })(); + + /** + * WebhookType enum. + * @name google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.WebhookType + * @enum {number} + * @property {number} WEBHOOK_TYPE_UNSPECIFIED=0 WEBHOOK_TYPE_UNSPECIFIED value + * @property {number} STANDARD=1 STANDARD value + * @property {number} FLEXIBLE=2 FLEXIBLE value + */ + GenericWebService.WebhookType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "WEBHOOK_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "STANDARD"] = 1; + values[valuesById[2] = "FLEXIBLE"] = 2; + return values; + })(); + + /** + * HttpMethod enum. + * @name google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.HttpMethod + * @enum {number} + * @property {number} HTTP_METHOD_UNSPECIFIED=0 HTTP_METHOD_UNSPECIFIED value + * @property {number} POST=1 POST value + * @property {number} GET=2 GET value + * @property {number} HEAD=3 HEAD value + * @property {number} PUT=4 PUT value + * @property {number} DELETE=5 DELETE value + * @property {number} PATCH=6 PATCH value + * @property {number} OPTIONS=7 OPTIONS value + */ + GenericWebService.HttpMethod = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "HTTP_METHOD_UNSPECIFIED"] = 0; + values[valuesById[1] = "POST"] = 1; + values[valuesById[2] = "GET"] = 2; + values[valuesById[3] = "HEAD"] = 3; + values[valuesById[4] = "PUT"] = 4; + values[valuesById[5] = "DELETE"] = 5; + values[valuesById[6] = "PATCH"] = 6; + values[valuesById[7] = "OPTIONS"] = 7; + return values; + })(); + + return GenericWebService; + })(); + + Webhook.ServiceDirectoryConfig = (function() { + + /** + * Properties of a ServiceDirectoryConfig. + * @memberof google.cloud.dialogflow.cx.v3.Webhook + * @interface IServiceDirectoryConfig + * @property {string|null} [service] ServiceDirectoryConfig service + * @property {google.cloud.dialogflow.cx.v3.Webhook.IGenericWebService|null} [genericWebService] ServiceDirectoryConfig genericWebService + */ + + /** + * Constructs a new ServiceDirectoryConfig. + * @memberof google.cloud.dialogflow.cx.v3.Webhook + * @classdesc Represents a ServiceDirectoryConfig. + * @implements IServiceDirectoryConfig + * @constructor + * @param {google.cloud.dialogflow.cx.v3.Webhook.IServiceDirectoryConfig=} [properties] Properties to set + */ + function ServiceDirectoryConfig(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]]; + } + + /** + * ServiceDirectoryConfig service. + * @member {string} service + * @memberof google.cloud.dialogflow.cx.v3.Webhook.ServiceDirectoryConfig + * @instance + */ + ServiceDirectoryConfig.prototype.service = ""; + + /** + * ServiceDirectoryConfig genericWebService. + * @member {google.cloud.dialogflow.cx.v3.Webhook.IGenericWebService|null|undefined} genericWebService + * @memberof google.cloud.dialogflow.cx.v3.Webhook.ServiceDirectoryConfig + * @instance + */ + ServiceDirectoryConfig.prototype.genericWebService = null; + + /** + * Creates a new ServiceDirectoryConfig instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.Webhook.ServiceDirectoryConfig + * @static + * @param {google.cloud.dialogflow.cx.v3.Webhook.IServiceDirectoryConfig=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.Webhook.ServiceDirectoryConfig} ServiceDirectoryConfig instance + */ + ServiceDirectoryConfig.create = function create(properties) { + return new ServiceDirectoryConfig(properties); + }; + + /** + * Encodes the specified ServiceDirectoryConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Webhook.ServiceDirectoryConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.Webhook.ServiceDirectoryConfig + * @static + * @param {google.cloud.dialogflow.cx.v3.Webhook.IServiceDirectoryConfig} message ServiceDirectoryConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDirectoryConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.service != null && Object.hasOwnProperty.call(message, "service")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.service); + if (message.genericWebService != null && Object.hasOwnProperty.call(message, "genericWebService")) + $root.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.encode(message.genericWebService, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ServiceDirectoryConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Webhook.ServiceDirectoryConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Webhook.ServiceDirectoryConfig + * @static + * @param {google.cloud.dialogflow.cx.v3.Webhook.IServiceDirectoryConfig} message ServiceDirectoryConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDirectoryConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceDirectoryConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.Webhook.ServiceDirectoryConfig + * @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.Webhook.ServiceDirectoryConfig} ServiceDirectoryConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDirectoryConfig.decode = function decode(reader, length, error) { + 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.Webhook.ServiceDirectoryConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.service = reader.string(); + break; + } + case 2: { + message.genericWebService = $root.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceDirectoryConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Webhook.ServiceDirectoryConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.Webhook.ServiceDirectoryConfig} ServiceDirectoryConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDirectoryConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceDirectoryConfig message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.Webhook.ServiceDirectoryConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceDirectoryConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.service != null && message.hasOwnProperty("service")) + if (!$util.isString(message.service)) + return "service: string expected"; + if (message.genericWebService != null && message.hasOwnProperty("genericWebService")) { + var error = $root.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.verify(message.genericWebService); + if (error) + return "genericWebService." + error; + } + return null; + }; + + /** + * Creates a ServiceDirectoryConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.Webhook.ServiceDirectoryConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.Webhook.ServiceDirectoryConfig} ServiceDirectoryConfig + */ + ServiceDirectoryConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.Webhook.ServiceDirectoryConfig) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.Webhook.ServiceDirectoryConfig(); + if (object.service != null) + message.service = String(object.service); + if (object.genericWebService != null) { + if (typeof object.genericWebService !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Webhook.ServiceDirectoryConfig.genericWebService: object expected"); + message.genericWebService = $root.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.fromObject(object.genericWebService); + } + return message; + }; + + /** + * Creates a plain object from a ServiceDirectoryConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.Webhook.ServiceDirectoryConfig + * @static + * @param {google.cloud.dialogflow.cx.v3.Webhook.ServiceDirectoryConfig} message ServiceDirectoryConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceDirectoryConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.service = ""; + object.genericWebService = null; + } + if (message.service != null && message.hasOwnProperty("service")) + object.service = message.service; + if (message.genericWebService != null && message.hasOwnProperty("genericWebService")) + object.genericWebService = $root.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.toObject(message.genericWebService, options); + return object; + }; + + /** + * Converts this ServiceDirectoryConfig to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.Webhook.ServiceDirectoryConfig + * @instance + * @returns {Object.} JSON object + */ + ServiceDirectoryConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ServiceDirectoryConfig + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.Webhook.ServiceDirectoryConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceDirectoryConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Webhook.ServiceDirectoryConfig"; + }; + + return ServiceDirectoryConfig; + })(); + + return Webhook; + })(); + + v3.ListWebhooksRequest = (function() { + + /** + * Properties of a ListWebhooksRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IListWebhooksRequest + * @property {string|null} [parent] ListWebhooksRequest parent + * @property {number|null} [pageSize] ListWebhooksRequest pageSize + * @property {string|null} [pageToken] ListWebhooksRequest pageToken + */ + + /** + * Constructs a new ListWebhooksRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a ListWebhooksRequest. + * @implements IListWebhooksRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IListWebhooksRequest=} [properties] Properties to set + */ + function ListWebhooksRequest(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]]; + } + + /** + * ListWebhooksRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksRequest + * @instance + */ + ListWebhooksRequest.prototype.parent = ""; + + /** + * ListWebhooksRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksRequest + * @instance + */ + ListWebhooksRequest.prototype.pageSize = 0; + + /** + * ListWebhooksRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksRequest + * @instance + */ + ListWebhooksRequest.prototype.pageToken = ""; + + /** + * Creates a new ListWebhooksRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IListWebhooksRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ListWebhooksRequest} ListWebhooksRequest instance + */ + ListWebhooksRequest.create = function create(properties) { + return new ListWebhooksRequest(properties); + }; + + /** + * Encodes the specified ListWebhooksRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListWebhooksRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IListWebhooksRequest} message ListWebhooksRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListWebhooksRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListWebhooksRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListWebhooksRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IListWebhooksRequest} message ListWebhooksRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListWebhooksRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListWebhooksRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksRequest + * @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.ListWebhooksRequest} ListWebhooksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListWebhooksRequest.decode = function decode(reader, length, error) { + 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.ListWebhooksRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListWebhooksRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.ListWebhooksRequest} ListWebhooksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListWebhooksRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListWebhooksRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListWebhooksRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListWebhooksRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.ListWebhooksRequest} ListWebhooksRequest + */ + ListWebhooksRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListWebhooksRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.ListWebhooksRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListWebhooksRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.ListWebhooksRequest} message ListWebhooksRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListWebhooksRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListWebhooksRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksRequest + * @instance + * @returns {Object.} JSON object + */ + ListWebhooksRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListWebhooksRequest + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListWebhooksRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListWebhooksRequest"; + }; + + return ListWebhooksRequest; + })(); + + v3.ListWebhooksResponse = (function() { + + /** + * Properties of a ListWebhooksResponse. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IListWebhooksResponse + * @property {Array.|null} [webhooks] ListWebhooksResponse webhooks + * @property {string|null} [nextPageToken] ListWebhooksResponse nextPageToken + */ + + /** + * Constructs a new ListWebhooksResponse. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a ListWebhooksResponse. + * @implements IListWebhooksResponse + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IListWebhooksResponse=} [properties] Properties to set + */ + function ListWebhooksResponse(properties) { + this.webhooks = []; + 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]]; + } + + /** + * ListWebhooksResponse webhooks. + * @member {Array.} webhooks + * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksResponse + * @instance + */ + ListWebhooksResponse.prototype.webhooks = $util.emptyArray; + + /** + * ListWebhooksResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksResponse + * @instance + */ + ListWebhooksResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListWebhooksResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksResponse + * @static + * @param {google.cloud.dialogflow.cx.v3.IListWebhooksResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ListWebhooksResponse} ListWebhooksResponse instance + */ + ListWebhooksResponse.create = function create(properties) { + return new ListWebhooksResponse(properties); + }; + + /** + * Encodes the specified ListWebhooksResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListWebhooksResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksResponse + * @static + * @param {google.cloud.dialogflow.cx.v3.IListWebhooksResponse} message ListWebhooksResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListWebhooksResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.webhooks != null && message.webhooks.length) + for (var i = 0; i < message.webhooks.length; ++i) + $root.google.cloud.dialogflow.cx.v3.Webhook.encode(message.webhooks[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListWebhooksResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListWebhooksResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksResponse + * @static + * @param {google.cloud.dialogflow.cx.v3.IListWebhooksResponse} message ListWebhooksResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListWebhooksResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListWebhooksResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksResponse + * @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.ListWebhooksResponse} ListWebhooksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListWebhooksResponse.decode = function decode(reader, length, error) { + 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.ListWebhooksResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.webhooks && message.webhooks.length)) + message.webhooks = []; + message.webhooks.push($root.google.cloud.dialogflow.cx.v3.Webhook.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListWebhooksResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.ListWebhooksResponse} ListWebhooksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListWebhooksResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListWebhooksResponse message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListWebhooksResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.webhooks != null && message.hasOwnProperty("webhooks")) { + if (!Array.isArray(message.webhooks)) + return "webhooks: array expected"; + for (var i = 0; i < message.webhooks.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.Webhook.verify(message.webhooks[i]); + if (error) + return "webhooks." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListWebhooksResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.ListWebhooksResponse} ListWebhooksResponse + */ + ListWebhooksResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListWebhooksResponse) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.ListWebhooksResponse(); + if (object.webhooks) { + if (!Array.isArray(object.webhooks)) + throw TypeError(".google.cloud.dialogflow.cx.v3.ListWebhooksResponse.webhooks: array expected"); + message.webhooks = []; + for (var i = 0; i < object.webhooks.length; ++i) { + if (typeof object.webhooks[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.ListWebhooksResponse.webhooks: object expected"); + message.webhooks[i] = $root.google.cloud.dialogflow.cx.v3.Webhook.fromObject(object.webhooks[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListWebhooksResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksResponse + * @static + * @param {google.cloud.dialogflow.cx.v3.ListWebhooksResponse} message ListWebhooksResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListWebhooksResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.webhooks = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.webhooks && message.webhooks.length) { + object.webhooks = []; + for (var j = 0; j < message.webhooks.length; ++j) + object.webhooks[j] = $root.google.cloud.dialogflow.cx.v3.Webhook.toObject(message.webhooks[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListWebhooksResponse to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksResponse + * @instance + * @returns {Object.} JSON object + */ + ListWebhooksResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListWebhooksResponse + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListWebhooksResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListWebhooksResponse"; + }; + + return ListWebhooksResponse; + })(); + + v3.GetWebhookRequest = (function() { + + /** + * Properties of a GetWebhookRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IGetWebhookRequest + * @property {string|null} [name] GetWebhookRequest name + */ + + /** + * Constructs a new GetWebhookRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a GetWebhookRequest. + * @implements IGetWebhookRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IGetWebhookRequest=} [properties] Properties to set + */ + function GetWebhookRequest(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]]; + } + + /** + * GetWebhookRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.GetWebhookRequest + * @instance + */ + GetWebhookRequest.prototype.name = ""; + + /** + * Creates a new GetWebhookRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.GetWebhookRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IGetWebhookRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.GetWebhookRequest} GetWebhookRequest instance + */ + GetWebhookRequest.create = function create(properties) { + return new GetWebhookRequest(properties); + }; + + /** + * Encodes the specified GetWebhookRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetWebhookRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.GetWebhookRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IGetWebhookRequest} message GetWebhookRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetWebhookRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetWebhookRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetWebhookRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.GetWebhookRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IGetWebhookRequest} message GetWebhookRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetWebhookRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetWebhookRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.GetWebhookRequest + * @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.GetWebhookRequest} GetWebhookRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetWebhookRequest.decode = function decode(reader, length, error) { + 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.GetWebhookRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetWebhookRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.GetWebhookRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.GetWebhookRequest} GetWebhookRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetWebhookRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetWebhookRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.GetWebhookRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetWebhookRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetWebhookRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.GetWebhookRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.GetWebhookRequest} GetWebhookRequest + */ + GetWebhookRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.GetWebhookRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.GetWebhookRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetWebhookRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.GetWebhookRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.GetWebhookRequest} message GetWebhookRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetWebhookRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetWebhookRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.GetWebhookRequest + * @instance + * @returns {Object.} JSON object + */ + GetWebhookRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetWebhookRequest + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.GetWebhookRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetWebhookRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.GetWebhookRequest"; + }; + + return GetWebhookRequest; + })(); + + v3.CreateWebhookRequest = (function() { + + /** + * Properties of a CreateWebhookRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface ICreateWebhookRequest + * @property {string|null} [parent] CreateWebhookRequest parent + * @property {google.cloud.dialogflow.cx.v3.IWebhook|null} [webhook] CreateWebhookRequest webhook + */ + + /** + * Constructs a new CreateWebhookRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a CreateWebhookRequest. + * @implements ICreateWebhookRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3.ICreateWebhookRequest=} [properties] Properties to set + */ + function CreateWebhookRequest(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]]; + } + + /** + * CreateWebhookRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.cx.v3.CreateWebhookRequest + * @instance + */ + CreateWebhookRequest.prototype.parent = ""; + + /** + * CreateWebhookRequest webhook. + * @member {google.cloud.dialogflow.cx.v3.IWebhook|null|undefined} webhook + * @memberof google.cloud.dialogflow.cx.v3.CreateWebhookRequest + * @instance + */ + CreateWebhookRequest.prototype.webhook = null; + + /** + * Creates a new CreateWebhookRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.CreateWebhookRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.ICreateWebhookRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.CreateWebhookRequest} CreateWebhookRequest instance + */ + CreateWebhookRequest.create = function create(properties) { + return new CreateWebhookRequest(properties); + }; + + /** + * Encodes the specified CreateWebhookRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateWebhookRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.CreateWebhookRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.ICreateWebhookRequest} message CreateWebhookRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateWebhookRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.webhook != null && Object.hasOwnProperty.call(message, "webhook")) + $root.google.cloud.dialogflow.cx.v3.Webhook.encode(message.webhook, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateWebhookRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateWebhookRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.CreateWebhookRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.ICreateWebhookRequest} message CreateWebhookRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateWebhookRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateWebhookRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.CreateWebhookRequest + * @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.CreateWebhookRequest} CreateWebhookRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateWebhookRequest.decode = function decode(reader, length, error) { + 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.CreateWebhookRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.webhook = $root.google.cloud.dialogflow.cx.v3.Webhook.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateWebhookRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.CreateWebhookRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.CreateWebhookRequest} CreateWebhookRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateWebhookRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateWebhookRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.CreateWebhookRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateWebhookRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.webhook != null && message.hasOwnProperty("webhook")) { + var error = $root.google.cloud.dialogflow.cx.v3.Webhook.verify(message.webhook); + if (error) + return "webhook." + error; + } + return null; + }; + + /** + * Creates a CreateWebhookRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.CreateWebhookRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.CreateWebhookRequest} CreateWebhookRequest + */ + CreateWebhookRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.CreateWebhookRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.CreateWebhookRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.webhook != null) { + if (typeof object.webhook !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.CreateWebhookRequest.webhook: object expected"); + message.webhook = $root.google.cloud.dialogflow.cx.v3.Webhook.fromObject(object.webhook); + } + return message; + }; + + /** + * Creates a plain object from a CreateWebhookRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.CreateWebhookRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.CreateWebhookRequest} message CreateWebhookRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateWebhookRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.webhook = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.webhook != null && message.hasOwnProperty("webhook")) + object.webhook = $root.google.cloud.dialogflow.cx.v3.Webhook.toObject(message.webhook, options); + return object; + }; + + /** + * Converts this CreateWebhookRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.CreateWebhookRequest + * @instance + * @returns {Object.} JSON object + */ + CreateWebhookRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateWebhookRequest + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.CreateWebhookRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateWebhookRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.CreateWebhookRequest"; + }; + + return CreateWebhookRequest; + })(); + + v3.UpdateWebhookRequest = (function() { + + /** + * Properties of an UpdateWebhookRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IUpdateWebhookRequest + * @property {google.cloud.dialogflow.cx.v3.IWebhook|null} [webhook] UpdateWebhookRequest webhook + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateWebhookRequest updateMask + */ + + /** + * Constructs a new UpdateWebhookRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents an UpdateWebhookRequest. + * @implements IUpdateWebhookRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IUpdateWebhookRequest=} [properties] Properties to set + */ + function UpdateWebhookRequest(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]]; + } + + /** + * UpdateWebhookRequest webhook. + * @member {google.cloud.dialogflow.cx.v3.IWebhook|null|undefined} webhook + * @memberof google.cloud.dialogflow.cx.v3.UpdateWebhookRequest + * @instance + */ + UpdateWebhookRequest.prototype.webhook = null; + + /** + * UpdateWebhookRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dialogflow.cx.v3.UpdateWebhookRequest + * @instance + */ + UpdateWebhookRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateWebhookRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.UpdateWebhookRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IUpdateWebhookRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.UpdateWebhookRequest} UpdateWebhookRequest instance + */ + UpdateWebhookRequest.create = function create(properties) { + return new UpdateWebhookRequest(properties); + }; + + /** + * Encodes the specified UpdateWebhookRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateWebhookRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.UpdateWebhookRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IUpdateWebhookRequest} message UpdateWebhookRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateWebhookRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.webhook != null && Object.hasOwnProperty.call(message, "webhook")) + $root.google.cloud.dialogflow.cx.v3.Webhook.encode(message.webhook, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateWebhookRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateWebhookRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.UpdateWebhookRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IUpdateWebhookRequest} message UpdateWebhookRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateWebhookRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateWebhookRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.UpdateWebhookRequest + * @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.UpdateWebhookRequest} UpdateWebhookRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateWebhookRequest.decode = function decode(reader, length, error) { + 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.UpdateWebhookRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.webhook = $root.google.cloud.dialogflow.cx.v3.Webhook.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateWebhookRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.UpdateWebhookRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.UpdateWebhookRequest} UpdateWebhookRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateWebhookRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateWebhookRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.UpdateWebhookRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateWebhookRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.webhook != null && message.hasOwnProperty("webhook")) { + var error = $root.google.cloud.dialogflow.cx.v3.Webhook.verify(message.webhook); + if (error) + return "webhook." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + return null; + }; + + /** + * Creates an UpdateWebhookRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.UpdateWebhookRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.UpdateWebhookRequest} UpdateWebhookRequest + */ + UpdateWebhookRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.UpdateWebhookRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.UpdateWebhookRequest(); + if (object.webhook != null) { + if (typeof object.webhook !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.UpdateWebhookRequest.webhook: object expected"); + message.webhook = $root.google.cloud.dialogflow.cx.v3.Webhook.fromObject(object.webhook); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.UpdateWebhookRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateWebhookRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.UpdateWebhookRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.UpdateWebhookRequest} message UpdateWebhookRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateWebhookRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.webhook = null; + object.updateMask = null; + } + if (message.webhook != null && message.hasOwnProperty("webhook")) + object.webhook = $root.google.cloud.dialogflow.cx.v3.Webhook.toObject(message.webhook, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateWebhookRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.UpdateWebhookRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateWebhookRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateWebhookRequest + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.UpdateWebhookRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateWebhookRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.UpdateWebhookRequest"; + }; + + return UpdateWebhookRequest; + })(); + + v3.DeleteWebhookRequest = (function() { + + /** + * Properties of a DeleteWebhookRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IDeleteWebhookRequest + * @property {string|null} [name] DeleteWebhookRequest name + * @property {boolean|null} [force] DeleteWebhookRequest force + */ + + /** + * Constructs a new DeleteWebhookRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a DeleteWebhookRequest. + * @implements IDeleteWebhookRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IDeleteWebhookRequest=} [properties] Properties to set + */ + function DeleteWebhookRequest(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]]; + } + + /** + * DeleteWebhookRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.DeleteWebhookRequest + * @instance + */ + DeleteWebhookRequest.prototype.name = ""; + + /** + * DeleteWebhookRequest force. + * @member {boolean} force + * @memberof google.cloud.dialogflow.cx.v3.DeleteWebhookRequest + * @instance + */ + DeleteWebhookRequest.prototype.force = false; + + /** + * Creates a new DeleteWebhookRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.DeleteWebhookRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IDeleteWebhookRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.DeleteWebhookRequest} DeleteWebhookRequest instance + */ + DeleteWebhookRequest.create = function create(properties) { + return new DeleteWebhookRequest(properties); + }; + + /** + * Encodes the specified DeleteWebhookRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteWebhookRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.DeleteWebhookRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IDeleteWebhookRequest} message DeleteWebhookRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteWebhookRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.force != null && Object.hasOwnProperty.call(message, "force")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.force); + return writer; + }; + + /** + * Encodes the specified DeleteWebhookRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteWebhookRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.DeleteWebhookRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IDeleteWebhookRequest} message DeleteWebhookRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteWebhookRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteWebhookRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.DeleteWebhookRequest + * @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.DeleteWebhookRequest} DeleteWebhookRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteWebhookRequest.decode = function decode(reader, length, error) { + 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.DeleteWebhookRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.force = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteWebhookRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.DeleteWebhookRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.DeleteWebhookRequest} DeleteWebhookRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteWebhookRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteWebhookRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.DeleteWebhookRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteWebhookRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.force != null && message.hasOwnProperty("force")) + if (typeof message.force !== "boolean") + return "force: boolean expected"; + return null; + }; + + /** + * Creates a DeleteWebhookRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.DeleteWebhookRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.DeleteWebhookRequest} DeleteWebhookRequest + */ + DeleteWebhookRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.DeleteWebhookRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.DeleteWebhookRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.force != null) + message.force = Boolean(object.force); + return message; + }; + + /** + * Creates a plain object from a DeleteWebhookRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.DeleteWebhookRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.DeleteWebhookRequest} message DeleteWebhookRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteWebhookRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.force = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.force != null && message.hasOwnProperty("force")) + object.force = message.force; + return object; + }; + + /** + * Converts this DeleteWebhookRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.DeleteWebhookRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteWebhookRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteWebhookRequest + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.DeleteWebhookRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteWebhookRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.DeleteWebhookRequest"; + }; + + return DeleteWebhookRequest; + })(); + + v3.WebhookRequest = (function() { + + /** + * Properties of a WebhookRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IWebhookRequest + * @property {string|null} [detectIntentResponseId] WebhookRequest detectIntentResponseId + * @property {string|null} [text] WebhookRequest text + * @property {string|null} [triggerIntent] WebhookRequest triggerIntent + * @property {string|null} [transcript] WebhookRequest transcript + * @property {string|null} [triggerEvent] WebhookRequest triggerEvent + * @property {string|null} [dtmfDigits] WebhookRequest dtmfDigits + * @property {string|null} [languageCode] WebhookRequest languageCode + * @property {google.cloud.dialogflow.cx.v3.WebhookRequest.IFulfillmentInfo|null} [fulfillmentInfo] WebhookRequest fulfillmentInfo + * @property {google.cloud.dialogflow.cx.v3.WebhookRequest.IIntentInfo|null} [intentInfo] WebhookRequest intentInfo + * @property {google.cloud.dialogflow.cx.v3.IPageInfo|null} [pageInfo] WebhookRequest pageInfo + * @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 + * @property {google.cloud.dialogflow.cx.v3.ILanguageInfo|null} [languageInfo] WebhookRequest languageInfo + */ + + /** + * Constructs a new WebhookRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a WebhookRequest. + * @implements IWebhookRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IWebhookRequest=} [properties] Properties to set + */ + function WebhookRequest(properties) { + this.messages = []; + 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]]; + } + + /** + * WebhookRequest detectIntentResponseId. + * @member {string} detectIntentResponseId + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest + * @instance + */ + WebhookRequest.prototype.detectIntentResponseId = ""; + + /** + * WebhookRequest text. + * @member {string|null|undefined} text + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest + * @instance + */ + WebhookRequest.prototype.text = null; + + /** + * WebhookRequest triggerIntent. + * @member {string|null|undefined} triggerIntent + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest + * @instance + */ + WebhookRequest.prototype.triggerIntent = null; + + /** + * WebhookRequest transcript. + * @member {string|null|undefined} transcript + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest + * @instance + */ + WebhookRequest.prototype.transcript = null; + + /** + * WebhookRequest triggerEvent. + * @member {string|null|undefined} triggerEvent + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest + * @instance + */ + WebhookRequest.prototype.triggerEvent = null; + + /** + * WebhookRequest dtmfDigits. + * @member {string|null|undefined} dtmfDigits + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest + * @instance + */ + WebhookRequest.prototype.dtmfDigits = null; + + /** + * WebhookRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest + * @instance + */ + WebhookRequest.prototype.languageCode = ""; + + /** + * WebhookRequest fulfillmentInfo. + * @member {google.cloud.dialogflow.cx.v3.WebhookRequest.IFulfillmentInfo|null|undefined} fulfillmentInfo + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest + * @instance + */ + WebhookRequest.prototype.fulfillmentInfo = null; + + /** + * WebhookRequest intentInfo. + * @member {google.cloud.dialogflow.cx.v3.WebhookRequest.IIntentInfo|null|undefined} intentInfo + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest + * @instance + */ + WebhookRequest.prototype.intentInfo = null; + + /** + * WebhookRequest pageInfo. + * @member {google.cloud.dialogflow.cx.v3.IPageInfo|null|undefined} pageInfo + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest + * @instance + */ + WebhookRequest.prototype.pageInfo = null; + + /** + * WebhookRequest sessionInfo. + * @member {google.cloud.dialogflow.cx.v3.ISessionInfo|null|undefined} sessionInfo + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest + * @instance + */ + WebhookRequest.prototype.sessionInfo = null; + + /** + * WebhookRequest messages. + * @member {Array.} messages + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest + * @instance + */ + WebhookRequest.prototype.messages = $util.emptyArray; + + /** + * WebhookRequest payload. + * @member {google.protobuf.IStruct|null|undefined} payload + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest + * @instance + */ + 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; + + /** + * WebhookRequest languageInfo. + * @member {google.cloud.dialogflow.cx.v3.ILanguageInfo|null|undefined} languageInfo + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest + * @instance + */ + WebhookRequest.prototype.languageInfo = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * WebhookRequest query. + * @member {"text"|"triggerIntent"|"transcript"|"triggerEvent"|"dtmfDigits"|undefined} query + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest + * @instance + */ + Object.defineProperty(WebhookRequest.prototype, "query", { + get: $util.oneOfGetter($oneOfFields = ["text", "triggerIntent", "transcript", "triggerEvent", "dtmfDigits"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new WebhookRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IWebhookRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.WebhookRequest} WebhookRequest instance + */ + WebhookRequest.create = function create(properties) { + return new WebhookRequest(properties); + }; + + /** + * Encodes the specified WebhookRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.WebhookRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IWebhookRequest} message WebhookRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WebhookRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.detectIntentResponseId != null && Object.hasOwnProperty.call(message, "detectIntentResponseId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.detectIntentResponseId); + if (message.intentInfo != null && Object.hasOwnProperty.call(message, "intentInfo")) + $root.google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.encode(message.intentInfo, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.pageInfo != null && Object.hasOwnProperty.call(message, "pageInfo")) + $root.google.cloud.dialogflow.cx.v3.PageInfo.encode(message.pageInfo, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.sessionInfo != null && Object.hasOwnProperty.call(message, "sessionInfo")) + $root.google.cloud.dialogflow.cx.v3.SessionInfo.encode(message.sessionInfo, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.fulfillmentInfo != null && Object.hasOwnProperty.call(message, "fulfillmentInfo")) + $root.google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo.encode(message.fulfillmentInfo, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.messages != null && message.messages.length) + for (var i = 0; i < message.messages.length; ++i) + $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(); + if (message.text != null && Object.hasOwnProperty.call(message, "text")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.text); + if (message.triggerIntent != null && Object.hasOwnProperty.call(message, "triggerIntent")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.triggerIntent); + if (message.transcript != null && Object.hasOwnProperty.call(message, "transcript")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.transcript); + if (message.triggerEvent != null && Object.hasOwnProperty.call(message, "triggerEvent")) + writer.uint32(/* id 14, wireType 2 =*/114).string(message.triggerEvent); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.languageCode); + if (message.dtmfDigits != null && Object.hasOwnProperty.call(message, "dtmfDigits")) + writer.uint32(/* id 17, wireType 2 =*/138).string(message.dtmfDigits); + if (message.languageInfo != null && Object.hasOwnProperty.call(message, "languageInfo")) + $root.google.cloud.dialogflow.cx.v3.LanguageInfo.encode(message.languageInfo, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified WebhookRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.WebhookRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IWebhookRequest} message WebhookRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WebhookRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WebhookRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest + * @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} WebhookRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WebhookRequest.decode = function decode(reader, length, error) { + 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(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.detectIntentResponseId = reader.string(); + break; + } + case 10: { + message.text = reader.string(); + break; + } + case 11: { + message.triggerIntent = reader.string(); + break; + } + case 12: { + message.transcript = reader.string(); + break; + } + case 14: { + message.triggerEvent = reader.string(); + break; + } + case 17: { + message.dtmfDigits = reader.string(); + break; + } + case 15: { + message.languageCode = reader.string(); + break; + } + case 6: { + message.fulfillmentInfo = $root.google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo.decode(reader, reader.uint32()); + break; + } + case 3: { + message.intentInfo = $root.google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.decode(reader, reader.uint32()); + break; + } + case 4: { + message.pageInfo = $root.google.cloud.dialogflow.cx.v3.PageInfo.decode(reader, reader.uint32()); + break; + } + case 5: { + message.sessionInfo = $root.google.cloud.dialogflow.cx.v3.SessionInfo.decode(reader, reader.uint32()); + break; + } + case 7: { + if (!(message.messages && message.messages.length)) + message.messages = []; + message.messages.push($root.google.cloud.dialogflow.cx.v3.ResponseMessage.decode(reader, reader.uint32())); + break; + } + 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; + } + case 18: { + message.languageInfo = $root.google.cloud.dialogflow.cx.v3.LanguageInfo.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WebhookRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.WebhookRequest} WebhookRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WebhookRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WebhookRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WebhookRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.detectIntentResponseId != null && message.hasOwnProperty("detectIntentResponseId")) + if (!$util.isString(message.detectIntentResponseId)) + return "detectIntentResponseId: string expected"; + if (message.text != null && message.hasOwnProperty("text")) { + properties.query = 1; + if (!$util.isString(message.text)) + return "text: string expected"; + } + if (message.triggerIntent != null && message.hasOwnProperty("triggerIntent")) { + if (properties.query === 1) + return "query: multiple values"; + properties.query = 1; + if (!$util.isString(message.triggerIntent)) + return "triggerIntent: string expected"; + } + if (message.transcript != null && message.hasOwnProperty("transcript")) { + if (properties.query === 1) + return "query: multiple values"; + properties.query = 1; + if (!$util.isString(message.transcript)) + return "transcript: string expected"; + } + if (message.triggerEvent != null && message.hasOwnProperty("triggerEvent")) { + if (properties.query === 1) + return "query: multiple values"; + properties.query = 1; + if (!$util.isString(message.triggerEvent)) + return "triggerEvent: string expected"; + } + if (message.dtmfDigits != null && message.hasOwnProperty("dtmfDigits")) { + if (properties.query === 1) + return "query: multiple values"; + properties.query = 1; + if (!$util.isString(message.dtmfDigits)) + return "dtmfDigits: string expected"; + } + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; + if (message.fulfillmentInfo != null && message.hasOwnProperty("fulfillmentInfo")) { + var error = $root.google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo.verify(message.fulfillmentInfo); + if (error) + return "fulfillmentInfo." + error; + } + if (message.intentInfo != null && message.hasOwnProperty("intentInfo")) { + var error = $root.google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.verify(message.intentInfo); + if (error) + return "intentInfo." + error; + } + if (message.pageInfo != null && message.hasOwnProperty("pageInfo")) { + var error = $root.google.cloud.dialogflow.cx.v3.PageInfo.verify(message.pageInfo); + if (error) + return "pageInfo." + error; + } + if (message.sessionInfo != null && message.hasOwnProperty("sessionInfo")) { + var error = $root.google.cloud.dialogflow.cx.v3.SessionInfo.verify(message.sessionInfo); + if (error) + return "sessionInfo." + error; + } + if (message.messages != null && message.hasOwnProperty("messages")) { + if (!Array.isArray(message.messages)) + return "messages: array expected"; + for (var i = 0; i < message.messages.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.verify(message.messages[i]); + if (error) + return "messages." + error; + } + } + if (message.payload != null && message.hasOwnProperty("payload")) { + var error = $root.google.protobuf.Struct.verify(message.payload); + 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; + } + if (message.languageInfo != null && message.hasOwnProperty("languageInfo")) { + var error = $root.google.cloud.dialogflow.cx.v3.LanguageInfo.verify(message.languageInfo); + if (error) + return "languageInfo." + error; + } + return null; + }; + + /** + * Creates a WebhookRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.WebhookRequest} WebhookRequest + */ + WebhookRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.WebhookRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.WebhookRequest(); + if (object.detectIntentResponseId != null) + message.detectIntentResponseId = String(object.detectIntentResponseId); + if (object.text != null) + message.text = String(object.text); + if (object.triggerIntent != null) + message.triggerIntent = String(object.triggerIntent); + if (object.transcript != null) + message.transcript = String(object.transcript); + if (object.triggerEvent != null) + message.triggerEvent = String(object.triggerEvent); + if (object.dtmfDigits != null) + message.dtmfDigits = String(object.dtmfDigits); + if (object.languageCode != null) + message.languageCode = String(object.languageCode); + if (object.fulfillmentInfo != null) { + if (typeof object.fulfillmentInfo !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.WebhookRequest.fulfillmentInfo: object expected"); + message.fulfillmentInfo = $root.google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo.fromObject(object.fulfillmentInfo); + } + if (object.intentInfo != null) { + if (typeof object.intentInfo !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.WebhookRequest.intentInfo: object expected"); + message.intentInfo = $root.google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.fromObject(object.intentInfo); + } + if (object.pageInfo != null) { + if (typeof object.pageInfo !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.WebhookRequest.pageInfo: object expected"); + message.pageInfo = $root.google.cloud.dialogflow.cx.v3.PageInfo.fromObject(object.pageInfo); + } + if (object.sessionInfo != null) { + if (typeof object.sessionInfo !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.WebhookRequest.sessionInfo: object expected"); + message.sessionInfo = $root.google.cloud.dialogflow.cx.v3.SessionInfo.fromObject(object.sessionInfo); + } + if (object.messages) { + if (!Array.isArray(object.messages)) + throw TypeError(".google.cloud.dialogflow.cx.v3.WebhookRequest.messages: array expected"); + message.messages = []; + for (var i = 0; i < object.messages.length; ++i) { + if (typeof object.messages[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.WebhookRequest.messages: object expected"); + message.messages[i] = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.fromObject(object.messages[i]); + } + } + if (object.payload != null) { + if (typeof object.payload !== "object") + 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); + } + if (object.languageInfo != null) { + if (typeof object.languageInfo !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.WebhookRequest.languageInfo: object expected"); + message.languageInfo = $root.google.cloud.dialogflow.cx.v3.LanguageInfo.fromObject(object.languageInfo); + } + return message; + }; + + /** + * Creates a plain object from a WebhookRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.WebhookRequest} message WebhookRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WebhookRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.messages = []; + if (options.defaults) { + object.detectIntentResponseId = ""; + object.intentInfo = null; + object.pageInfo = null; + object.sessionInfo = null; + object.fulfillmentInfo = null; + object.payload = null; + object.sentimentAnalysisResult = null; + object.languageCode = ""; + object.languageInfo = null; + } + if (message.detectIntentResponseId != null && message.hasOwnProperty("detectIntentResponseId")) + object.detectIntentResponseId = message.detectIntentResponseId; + if (message.intentInfo != null && message.hasOwnProperty("intentInfo")) + object.intentInfo = $root.google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.toObject(message.intentInfo, options); + if (message.pageInfo != null && message.hasOwnProperty("pageInfo")) + object.pageInfo = $root.google.cloud.dialogflow.cx.v3.PageInfo.toObject(message.pageInfo, options); + if (message.sessionInfo != null && message.hasOwnProperty("sessionInfo")) + object.sessionInfo = $root.google.cloud.dialogflow.cx.v3.SessionInfo.toObject(message.sessionInfo, options); + if (message.fulfillmentInfo != null && message.hasOwnProperty("fulfillmentInfo")) + object.fulfillmentInfo = $root.google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo.toObject(message.fulfillmentInfo, options); + if (message.messages && message.messages.length) { + object.messages = []; + for (var j = 0; j < message.messages.length; ++j) + object.messages[j] = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.toObject(message.messages[j], options); + } + 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); + if (message.text != null && message.hasOwnProperty("text")) { + object.text = message.text; + if (options.oneofs) + object.query = "text"; + } + if (message.triggerIntent != null && message.hasOwnProperty("triggerIntent")) { + object.triggerIntent = message.triggerIntent; + if (options.oneofs) + object.query = "triggerIntent"; + } + if (message.transcript != null && message.hasOwnProperty("transcript")) { + object.transcript = message.transcript; + if (options.oneofs) + object.query = "transcript"; + } + if (message.triggerEvent != null && message.hasOwnProperty("triggerEvent")) { + object.triggerEvent = message.triggerEvent; + if (options.oneofs) + object.query = "triggerEvent"; + } + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; + if (message.dtmfDigits != null && message.hasOwnProperty("dtmfDigits")) { + object.dtmfDigits = message.dtmfDigits; + if (options.oneofs) + object.query = "dtmfDigits"; + } + if (message.languageInfo != null && message.hasOwnProperty("languageInfo")) + object.languageInfo = $root.google.cloud.dialogflow.cx.v3.LanguageInfo.toObject(message.languageInfo, options); + return object; + }; + + /** + * Converts this WebhookRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest + * @instance + * @returns {Object.} JSON object + */ + WebhookRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WebhookRequest + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WebhookRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.WebhookRequest"; + }; + + WebhookRequest.FulfillmentInfo = (function() { + + /** + * Properties of a FulfillmentInfo. + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest + * @interface IFulfillmentInfo + * @property {string|null} [tag] FulfillmentInfo tag + */ + + /** + * Constructs a new FulfillmentInfo. + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest + * @classdesc Represents a FulfillmentInfo. + * @implements IFulfillmentInfo + * @constructor + * @param {google.cloud.dialogflow.cx.v3.WebhookRequest.IFulfillmentInfo=} [properties] Properties to set + */ + function FulfillmentInfo(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]]; + } + + /** + * FulfillmentInfo tag. + * @member {string} tag + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo + * @instance + */ + FulfillmentInfo.prototype.tag = ""; + + /** + * Creates a new FulfillmentInfo instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo + * @static + * @param {google.cloud.dialogflow.cx.v3.WebhookRequest.IFulfillmentInfo=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo} FulfillmentInfo instance + */ + FulfillmentInfo.create = function create(properties) { + return new FulfillmentInfo(properties); + }; + + /** + * Encodes the specified FulfillmentInfo message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo + * @static + * @param {google.cloud.dialogflow.cx.v3.WebhookRequest.IFulfillmentInfo} message FulfillmentInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FulfillmentInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tag != null && Object.hasOwnProperty.call(message, "tag")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.tag); + return writer; + }; + + /** + * Encodes the specified FulfillmentInfo message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo + * @static + * @param {google.cloud.dialogflow.cx.v3.WebhookRequest.IFulfillmentInfo} message FulfillmentInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FulfillmentInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FulfillmentInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo + * @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.FulfillmentInfo} FulfillmentInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FulfillmentInfo.decode = function decode(reader, length, error) { + 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.FulfillmentInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.tag = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FulfillmentInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo} FulfillmentInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FulfillmentInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FulfillmentInfo message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FulfillmentInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tag != null && message.hasOwnProperty("tag")) + if (!$util.isString(message.tag)) + return "tag: string expected"; + return null; + }; + + /** + * Creates a FulfillmentInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo} FulfillmentInfo + */ + FulfillmentInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo(); + if (object.tag != null) + message.tag = String(object.tag); + return message; + }; + + /** + * Creates a plain object from a FulfillmentInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo + * @static + * @param {google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo} message FulfillmentInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FulfillmentInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.tag = ""; + if (message.tag != null && message.hasOwnProperty("tag")) + object.tag = message.tag; + return object; + }; + + /** + * Converts this FulfillmentInfo to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo + * @instance + * @returns {Object.} JSON object + */ + FulfillmentInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FulfillmentInfo + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FulfillmentInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo"; + }; + + return FulfillmentInfo; + })(); + + WebhookRequest.IntentInfo = (function() { + + /** + * Properties of an IntentInfo. + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest + * @interface IIntentInfo + * @property {string|null} [lastMatchedIntent] IntentInfo lastMatchedIntent + * @property {string|null} [displayName] IntentInfo displayName + * @property {Object.|null} [parameters] IntentInfo parameters + * @property {number|null} [confidence] IntentInfo confidence + */ + + /** + * Constructs a new IntentInfo. + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest + * @classdesc Represents an IntentInfo. + * @implements IIntentInfo + * @constructor + * @param {google.cloud.dialogflow.cx.v3.WebhookRequest.IIntentInfo=} [properties] Properties to set + */ + function IntentInfo(properties) { + this.parameters = {}; + 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]]; + } + + /** + * IntentInfo lastMatchedIntent. + * @member {string} lastMatchedIntent + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo + * @instance + */ + IntentInfo.prototype.lastMatchedIntent = ""; + + /** + * IntentInfo displayName. + * @member {string} displayName + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo + * @instance + */ + IntentInfo.prototype.displayName = ""; + + /** + * IntentInfo parameters. + * @member {Object.} parameters + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo + * @instance + */ + IntentInfo.prototype.parameters = $util.emptyObject; + + /** + * IntentInfo confidence. + * @member {number} confidence + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo + * @instance + */ + IntentInfo.prototype.confidence = 0; + + /** + * Creates a new IntentInfo instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo + * @static + * @param {google.cloud.dialogflow.cx.v3.WebhookRequest.IIntentInfo=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo} IntentInfo instance + */ + IntentInfo.create = function create(properties) { + return new IntentInfo(properties); + }; + + /** + * Encodes the specified IntentInfo message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo + * @static + * @param {google.cloud.dialogflow.cx.v3.WebhookRequest.IIntentInfo} message IntentInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IntentInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.lastMatchedIntent != null && Object.hasOwnProperty.call(message, "lastMatchedIntent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.lastMatchedIntent); + if (message.parameters != null && Object.hasOwnProperty.call(message, "parameters")) + for (var keys = Object.keys(message.parameters), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue.encode(message.parameters[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.displayName); + if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) + writer.uint32(/* id 4, wireType 5 =*/37).float(message.confidence); + return writer; + }; + + /** + * Encodes the specified IntentInfo message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo + * @static + * @param {google.cloud.dialogflow.cx.v3.WebhookRequest.IIntentInfo} message IntentInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IntentInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IntentInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo + * @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.IntentInfo} IntentInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IntentInfo.decode = function decode(reader, length, error) { + 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.IntentInfo(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.lastMatchedIntent = reader.string(); + break; + } + case 3: { + message.displayName = reader.string(); + break; + } + case 2: { + if (message.parameters === $util.emptyObject) + message.parameters = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.parameters[key] = value; + break; + } + case 4: { + message.confidence = reader.float(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IntentInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo} IntentInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IntentInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IntentInfo message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IntentInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.lastMatchedIntent != null && message.hasOwnProperty("lastMatchedIntent")) + if (!$util.isString(message.lastMatchedIntent)) + return "lastMatchedIntent: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.parameters != null && message.hasOwnProperty("parameters")) { + if (!$util.isObject(message.parameters)) + return "parameters: object expected"; + var key = Object.keys(message.parameters); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue.verify(message.parameters[key[i]]); + if (error) + return "parameters." + error; + } + } + if (message.confidence != null && message.hasOwnProperty("confidence")) + if (typeof message.confidence !== "number") + return "confidence: number expected"; + return null; + }; + + /** + * Creates an IntentInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo} IntentInfo + */ + IntentInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo(); + if (object.lastMatchedIntent != null) + message.lastMatchedIntent = String(object.lastMatchedIntent); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.parameters) { + if (typeof object.parameters !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.parameters: object expected"); + message.parameters = {}; + for (var keys = Object.keys(object.parameters), i = 0; i < keys.length; ++i) { + if (typeof object.parameters[keys[i]] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.parameters: object expected"); + message.parameters[keys[i]] = $root.google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue.fromObject(object.parameters[keys[i]]); + } + } + if (object.confidence != null) + message.confidence = Number(object.confidence); + return message; + }; + + /** + * Creates a plain object from an IntentInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo + * @static + * @param {google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo} message IntentInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IntentInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.parameters = {}; + if (options.defaults) { + object.lastMatchedIntent = ""; + object.displayName = ""; + object.confidence = 0; + } + if (message.lastMatchedIntent != null && message.hasOwnProperty("lastMatchedIntent")) + object.lastMatchedIntent = message.lastMatchedIntent; + var keys2; + if (message.parameters && (keys2 = Object.keys(message.parameters)).length) { + object.parameters = {}; + for (var j = 0; j < keys2.length; ++j) + object.parameters[keys2[j]] = $root.google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue.toObject(message.parameters[keys2[j]], options); + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.confidence != null && message.hasOwnProperty("confidence")) + object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence; + return object; + }; + + /** + * Converts this IntentInfo to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo + * @instance + * @returns {Object.} JSON object + */ + IntentInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for IntentInfo + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + IntentInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo"; + }; + + IntentInfo.IntentParameterValue = (function() { + + /** + * Properties of an IntentParameterValue. + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo + * @interface IIntentParameterValue + * @property {string|null} [originalValue] IntentParameterValue originalValue + * @property {google.protobuf.IValue|null} [resolvedValue] IntentParameterValue resolvedValue + */ + + /** + * Constructs a new IntentParameterValue. + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo + * @classdesc Represents an IntentParameterValue. + * @implements IIntentParameterValue + * @constructor + * @param {google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IIntentParameterValue=} [properties] Properties to set + */ + function IntentParameterValue(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]]; + } + + /** + * IntentParameterValue originalValue. + * @member {string} originalValue + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue + * @instance + */ + IntentParameterValue.prototype.originalValue = ""; + + /** + * IntentParameterValue resolvedValue. + * @member {google.protobuf.IValue|null|undefined} resolvedValue + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue + * @instance + */ + IntentParameterValue.prototype.resolvedValue = null; + + /** + * Creates a new IntentParameterValue instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue + * @static + * @param {google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IIntentParameterValue=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue} IntentParameterValue instance + */ + IntentParameterValue.create = function create(properties) { + return new IntentParameterValue(properties); + }; + + /** + * Encodes the specified IntentParameterValue message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue + * @static + * @param {google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IIntentParameterValue} message IntentParameterValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IntentParameterValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.originalValue != null && Object.hasOwnProperty.call(message, "originalValue")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.originalValue); + if (message.resolvedValue != null && Object.hasOwnProperty.call(message, "resolvedValue")) + $root.google.protobuf.Value.encode(message.resolvedValue, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified IntentParameterValue message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue + * @static + * @param {google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IIntentParameterValue} message IntentParameterValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IntentParameterValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IntentParameterValue message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue + * @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.IntentInfo.IntentParameterValue} IntentParameterValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IntentParameterValue.decode = function decode(reader, length, error) { + 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.IntentInfo.IntentParameterValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.originalValue = reader.string(); + break; + } + case 2: { + message.resolvedValue = $root.google.protobuf.Value.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IntentParameterValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue} IntentParameterValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IntentParameterValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IntentParameterValue message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IntentParameterValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.originalValue != null && message.hasOwnProperty("originalValue")) + if (!$util.isString(message.originalValue)) + return "originalValue: string expected"; + if (message.resolvedValue != null && message.hasOwnProperty("resolvedValue")) { + var error = $root.google.protobuf.Value.verify(message.resolvedValue); + if (error) + return "resolvedValue." + error; + } + return null; + }; + + /** + * Creates an IntentParameterValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue} IntentParameterValue + */ + IntentParameterValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue(); + if (object.originalValue != null) + message.originalValue = String(object.originalValue); + if (object.resolvedValue != null) { + if (typeof object.resolvedValue !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue.resolvedValue: object expected"); + message.resolvedValue = $root.google.protobuf.Value.fromObject(object.resolvedValue); + } + return message; + }; + + /** + * Creates a plain object from an IntentParameterValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue + * @static + * @param {google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue} message IntentParameterValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IntentParameterValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.originalValue = ""; + object.resolvedValue = null; + } + if (message.originalValue != null && message.hasOwnProperty("originalValue")) + object.originalValue = message.originalValue; + if (message.resolvedValue != null && message.hasOwnProperty("resolvedValue")) + object.resolvedValue = $root.google.protobuf.Value.toObject(message.resolvedValue, options); + return object; + }; + + /** + * Converts this IntentParameterValue to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue + * @instance + * @returns {Object.} JSON object + */ + IntentParameterValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for IntentParameterValue + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + IntentParameterValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue"; + }; + + return IntentParameterValue; + })(); + + 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, error) { + 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(); + if (tag === error) + break; + 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); + }; + + /** + * Gets the default type url for SentimentAnalysisResult + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SentimentAnalysisResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult"; + }; + + return SentimentAnalysisResult; + })(); + + return WebhookRequest; + })(); + + v3.WebhookResponse = (function() { + + /** + * Properties of a WebhookResponse. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IWebhookResponse + * @property {google.cloud.dialogflow.cx.v3.WebhookResponse.IFulfillmentResponse|null} [fulfillmentResponse] WebhookResponse fulfillmentResponse + * @property {google.cloud.dialogflow.cx.v3.IPageInfo|null} [pageInfo] WebhookResponse pageInfo + * @property {google.cloud.dialogflow.cx.v3.ISessionInfo|null} [sessionInfo] WebhookResponse sessionInfo + * @property {google.protobuf.IStruct|null} [payload] WebhookResponse payload + * @property {string|null} [targetPage] WebhookResponse targetPage + * @property {string|null} [targetFlow] WebhookResponse targetFlow + */ + + /** + * Constructs a new WebhookResponse. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a WebhookResponse. + * @implements IWebhookResponse + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IWebhookResponse=} [properties] Properties to set + */ + function WebhookResponse(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]]; + } + + /** + * WebhookResponse fulfillmentResponse. + * @member {google.cloud.dialogflow.cx.v3.WebhookResponse.IFulfillmentResponse|null|undefined} fulfillmentResponse + * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse + * @instance + */ + WebhookResponse.prototype.fulfillmentResponse = null; + + /** + * WebhookResponse pageInfo. + * @member {google.cloud.dialogflow.cx.v3.IPageInfo|null|undefined} pageInfo + * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse + * @instance + */ + WebhookResponse.prototype.pageInfo = null; + + /** + * WebhookResponse sessionInfo. + * @member {google.cloud.dialogflow.cx.v3.ISessionInfo|null|undefined} sessionInfo + * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse + * @instance + */ + WebhookResponse.prototype.sessionInfo = null; + + /** + * WebhookResponse payload. + * @member {google.protobuf.IStruct|null|undefined} payload + * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse + * @instance + */ + WebhookResponse.prototype.payload = null; + + /** + * WebhookResponse targetPage. + * @member {string|null|undefined} targetPage + * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse + * @instance + */ + WebhookResponse.prototype.targetPage = null; + + /** + * WebhookResponse targetFlow. + * @member {string|null|undefined} targetFlow + * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse + * @instance + */ + WebhookResponse.prototype.targetFlow = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * WebhookResponse transition. + * @member {"targetPage"|"targetFlow"|undefined} transition + * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse + * @instance + */ + Object.defineProperty(WebhookResponse.prototype, "transition", { + get: $util.oneOfGetter($oneOfFields = ["targetPage", "targetFlow"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new WebhookResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse + * @static + * @param {google.cloud.dialogflow.cx.v3.IWebhookResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.WebhookResponse} WebhookResponse instance + */ + WebhookResponse.create = function create(properties) { + return new WebhookResponse(properties); + }; + + /** + * Encodes the specified WebhookResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.WebhookResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse + * @static + * @param {google.cloud.dialogflow.cx.v3.IWebhookResponse} message WebhookResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WebhookResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fulfillmentResponse != null && Object.hasOwnProperty.call(message, "fulfillmentResponse")) + $root.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.encode(message.fulfillmentResponse, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.pageInfo != null && Object.hasOwnProperty.call(message, "pageInfo")) + $root.google.cloud.dialogflow.cx.v3.PageInfo.encode(message.pageInfo, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.sessionInfo != null && Object.hasOwnProperty.call(message, "sessionInfo")) + $root.google.cloud.dialogflow.cx.v3.SessionInfo.encode(message.sessionInfo, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.payload != null && Object.hasOwnProperty.call(message, "payload")) + $root.google.protobuf.Struct.encode(message.payload, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.targetPage != null && Object.hasOwnProperty.call(message, "targetPage")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.targetPage); + if (message.targetFlow != null && Object.hasOwnProperty.call(message, "targetFlow")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.targetFlow); + return writer; + }; + + /** + * Encodes the specified WebhookResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.WebhookResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse + * @static + * @param {google.cloud.dialogflow.cx.v3.IWebhookResponse} message WebhookResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WebhookResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WebhookResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse + * @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.WebhookResponse} WebhookResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WebhookResponse.decode = function decode(reader, length, error) { + 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.WebhookResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.fulfillmentResponse = $root.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.decode(reader, reader.uint32()); + break; + } + case 2: { + message.pageInfo = $root.google.cloud.dialogflow.cx.v3.PageInfo.decode(reader, reader.uint32()); + break; + } + case 3: { + message.sessionInfo = $root.google.cloud.dialogflow.cx.v3.SessionInfo.decode(reader, reader.uint32()); + break; + } + case 4: { + message.payload = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + } + case 5: { + message.targetPage = reader.string(); + break; + } + case 6: { + message.targetFlow = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WebhookResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.WebhookResponse} WebhookResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WebhookResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WebhookResponse message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WebhookResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.fulfillmentResponse != null && message.hasOwnProperty("fulfillmentResponse")) { + var error = $root.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.verify(message.fulfillmentResponse); + if (error) + return "fulfillmentResponse." + error; + } + if (message.pageInfo != null && message.hasOwnProperty("pageInfo")) { + var error = $root.google.cloud.dialogflow.cx.v3.PageInfo.verify(message.pageInfo); + if (error) + return "pageInfo." + error; + } + if (message.sessionInfo != null && message.hasOwnProperty("sessionInfo")) { + var error = $root.google.cloud.dialogflow.cx.v3.SessionInfo.verify(message.sessionInfo); + if (error) + return "sessionInfo." + error; + } + if (message.payload != null && message.hasOwnProperty("payload")) { + var error = $root.google.protobuf.Struct.verify(message.payload); + if (error) + return "payload." + error; + } + if (message.targetPage != null && message.hasOwnProperty("targetPage")) { + properties.transition = 1; + if (!$util.isString(message.targetPage)) + return "targetPage: string expected"; + } + if (message.targetFlow != null && message.hasOwnProperty("targetFlow")) { + if (properties.transition === 1) + return "transition: multiple values"; + properties.transition = 1; + if (!$util.isString(message.targetFlow)) + return "targetFlow: string expected"; + } + return null; + }; + + /** + * Creates a WebhookResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.WebhookResponse} WebhookResponse + */ + WebhookResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.WebhookResponse) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.WebhookResponse(); + if (object.fulfillmentResponse != null) { + if (typeof object.fulfillmentResponse !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.WebhookResponse.fulfillmentResponse: object expected"); + message.fulfillmentResponse = $root.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.fromObject(object.fulfillmentResponse); + } + if (object.pageInfo != null) { + if (typeof object.pageInfo !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.WebhookResponse.pageInfo: object expected"); + message.pageInfo = $root.google.cloud.dialogflow.cx.v3.PageInfo.fromObject(object.pageInfo); + } + if (object.sessionInfo != null) { + if (typeof object.sessionInfo !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.WebhookResponse.sessionInfo: object expected"); + message.sessionInfo = $root.google.cloud.dialogflow.cx.v3.SessionInfo.fromObject(object.sessionInfo); + } + if (object.payload != null) { + if (typeof object.payload !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.WebhookResponse.payload: object expected"); + message.payload = $root.google.protobuf.Struct.fromObject(object.payload); + } + if (object.targetPage != null) + message.targetPage = String(object.targetPage); + if (object.targetFlow != null) + message.targetFlow = String(object.targetFlow); + return message; + }; + + /** + * Creates a plain object from a WebhookResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse + * @static + * @param {google.cloud.dialogflow.cx.v3.WebhookResponse} message WebhookResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WebhookResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.fulfillmentResponse = null; + object.pageInfo = null; + object.sessionInfo = null; + object.payload = null; + } + if (message.fulfillmentResponse != null && message.hasOwnProperty("fulfillmentResponse")) + object.fulfillmentResponse = $root.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.toObject(message.fulfillmentResponse, options); + if (message.pageInfo != null && message.hasOwnProperty("pageInfo")) + object.pageInfo = $root.google.cloud.dialogflow.cx.v3.PageInfo.toObject(message.pageInfo, options); + if (message.sessionInfo != null && message.hasOwnProperty("sessionInfo")) + object.sessionInfo = $root.google.cloud.dialogflow.cx.v3.SessionInfo.toObject(message.sessionInfo, options); + if (message.payload != null && message.hasOwnProperty("payload")) + object.payload = $root.google.protobuf.Struct.toObject(message.payload, options); + if (message.targetPage != null && message.hasOwnProperty("targetPage")) { + object.targetPage = message.targetPage; + if (options.oneofs) + object.transition = "targetPage"; + } + if (message.targetFlow != null && message.hasOwnProperty("targetFlow")) { + object.targetFlow = message.targetFlow; + if (options.oneofs) + object.transition = "targetFlow"; + } + return object; + }; + + /** + * Converts this WebhookResponse to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse + * @instance + * @returns {Object.} JSON object + */ + WebhookResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WebhookResponse + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WebhookResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.WebhookResponse"; + }; + + WebhookResponse.FulfillmentResponse = (function() { + + /** + * Properties of a FulfillmentResponse. + * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse + * @interface IFulfillmentResponse + * @property {Array.|null} [messages] FulfillmentResponse messages + * @property {google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.MergeBehavior|null} [mergeBehavior] FulfillmentResponse mergeBehavior + */ + + /** + * Constructs a new FulfillmentResponse. + * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse + * @classdesc Represents a FulfillmentResponse. + * @implements IFulfillmentResponse + * @constructor + * @param {google.cloud.dialogflow.cx.v3.WebhookResponse.IFulfillmentResponse=} [properties] Properties to set + */ + function FulfillmentResponse(properties) { + this.messages = []; + 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]]; + } + + /** + * FulfillmentResponse messages. + * @member {Array.} messages + * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse + * @instance + */ + FulfillmentResponse.prototype.messages = $util.emptyArray; + + /** + * FulfillmentResponse mergeBehavior. + * @member {google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.MergeBehavior} mergeBehavior + * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse + * @instance + */ + FulfillmentResponse.prototype.mergeBehavior = 0; + + /** + * Creates a new FulfillmentResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse + * @static + * @param {google.cloud.dialogflow.cx.v3.WebhookResponse.IFulfillmentResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse} FulfillmentResponse instance + */ + FulfillmentResponse.create = function create(properties) { + return new FulfillmentResponse(properties); + }; + + /** + * Encodes the specified FulfillmentResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse + * @static + * @param {google.cloud.dialogflow.cx.v3.WebhookResponse.IFulfillmentResponse} message FulfillmentResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FulfillmentResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.messages != null && message.messages.length) + for (var i = 0; i < message.messages.length; ++i) + $root.google.cloud.dialogflow.cx.v3.ResponseMessage.encode(message.messages[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.mergeBehavior != null && Object.hasOwnProperty.call(message, "mergeBehavior")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.mergeBehavior); + return writer; + }; + + /** + * Encodes the specified FulfillmentResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse + * @static + * @param {google.cloud.dialogflow.cx.v3.WebhookResponse.IFulfillmentResponse} message FulfillmentResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FulfillmentResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FulfillmentResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse + * @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.WebhookResponse.FulfillmentResponse} FulfillmentResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FulfillmentResponse.decode = function decode(reader, length, error) { + 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.WebhookResponse.FulfillmentResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.messages && message.messages.length)) + message.messages = []; + message.messages.push($root.google.cloud.dialogflow.cx.v3.ResponseMessage.decode(reader, reader.uint32())); + break; + } + case 2: { + message.mergeBehavior = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FulfillmentResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse} FulfillmentResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FulfillmentResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FulfillmentResponse message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FulfillmentResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.messages != null && message.hasOwnProperty("messages")) { + if (!Array.isArray(message.messages)) + return "messages: array expected"; + for (var i = 0; i < message.messages.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.verify(message.messages[i]); + if (error) + return "messages." + error; + } + } + if (message.mergeBehavior != null && message.hasOwnProperty("mergeBehavior")) + switch (message.mergeBehavior) { + default: + return "mergeBehavior: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a FulfillmentResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse} FulfillmentResponse + */ + FulfillmentResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse(); + if (object.messages) { + if (!Array.isArray(object.messages)) + throw TypeError(".google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.messages: array expected"); + message.messages = []; + for (var i = 0; i < object.messages.length; ++i) { + if (typeof object.messages[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.messages: object expected"); + message.messages[i] = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.fromObject(object.messages[i]); + } + } + switch (object.mergeBehavior) { + default: + if (typeof object.mergeBehavior === "number") { + message.mergeBehavior = object.mergeBehavior; + break; + } + break; + case "MERGE_BEHAVIOR_UNSPECIFIED": + case 0: + message.mergeBehavior = 0; + break; + case "APPEND": + case 1: + message.mergeBehavior = 1; + break; + case "REPLACE": + case 2: + message.mergeBehavior = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a FulfillmentResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse + * @static + * @param {google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse} message FulfillmentResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FulfillmentResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.messages = []; + if (options.defaults) + object.mergeBehavior = options.enums === String ? "MERGE_BEHAVIOR_UNSPECIFIED" : 0; + if (message.messages && message.messages.length) { + object.messages = []; + for (var j = 0; j < message.messages.length; ++j) + object.messages[j] = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.toObject(message.messages[j], options); + } + if (message.mergeBehavior != null && message.hasOwnProperty("mergeBehavior")) + object.mergeBehavior = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.MergeBehavior[message.mergeBehavior] === undefined ? message.mergeBehavior : $root.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.MergeBehavior[message.mergeBehavior] : message.mergeBehavior; + return object; + }; + + /** + * Converts this FulfillmentResponse to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse + * @instance + * @returns {Object.} JSON object + */ + FulfillmentResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FulfillmentResponse + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FulfillmentResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse"; + }; + + /** + * MergeBehavior enum. + * @name google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.MergeBehavior + * @enum {number} + * @property {number} MERGE_BEHAVIOR_UNSPECIFIED=0 MERGE_BEHAVIOR_UNSPECIFIED value + * @property {number} APPEND=1 APPEND value + * @property {number} REPLACE=2 REPLACE value + */ + FulfillmentResponse.MergeBehavior = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MERGE_BEHAVIOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "APPEND"] = 1; + values[valuesById[2] = "REPLACE"] = 2; + return values; + })(); + + return FulfillmentResponse; + })(); + + return WebhookResponse; + })(); + + v3.PageInfo = (function() { + + /** + * Properties of a PageInfo. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IPageInfo + * @property {string|null} [currentPage] PageInfo currentPage + * @property {string|null} [displayName] PageInfo displayName + * @property {google.cloud.dialogflow.cx.v3.PageInfo.IFormInfo|null} [formInfo] PageInfo formInfo + */ + + /** + * Constructs a new PageInfo. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a PageInfo. + * @implements IPageInfo + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IPageInfo=} [properties] Properties to set + */ + function PageInfo(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]]; + } + + /** + * PageInfo currentPage. + * @member {string} currentPage + * @memberof google.cloud.dialogflow.cx.v3.PageInfo + * @instance + */ + PageInfo.prototype.currentPage = ""; + + /** + * PageInfo displayName. + * @member {string} displayName + * @memberof google.cloud.dialogflow.cx.v3.PageInfo + * @instance + */ + PageInfo.prototype.displayName = ""; + + /** + * PageInfo formInfo. + * @member {google.cloud.dialogflow.cx.v3.PageInfo.IFormInfo|null|undefined} formInfo + * @memberof google.cloud.dialogflow.cx.v3.PageInfo + * @instance + */ + PageInfo.prototype.formInfo = null; + + /** + * Creates a new PageInfo instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.PageInfo + * @static + * @param {google.cloud.dialogflow.cx.v3.IPageInfo=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.PageInfo} PageInfo instance + */ + PageInfo.create = function create(properties) { + return new PageInfo(properties); + }; + + /** + * Encodes the specified PageInfo message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.PageInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.PageInfo + * @static + * @param {google.cloud.dialogflow.cx.v3.IPageInfo} message PageInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PageInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.currentPage != null && Object.hasOwnProperty.call(message, "currentPage")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.currentPage); + if (message.formInfo != null && Object.hasOwnProperty.call(message, "formInfo")) + $root.google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.encode(message.formInfo, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.displayName); + return writer; + }; + + /** + * Encodes the specified PageInfo message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.PageInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.PageInfo + * @static + * @param {google.cloud.dialogflow.cx.v3.IPageInfo} message PageInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PageInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PageInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.PageInfo + * @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.PageInfo} PageInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PageInfo.decode = function decode(reader, length, error) { + 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.PageInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.currentPage = reader.string(); + break; + } + case 4: { + message.displayName = reader.string(); + break; + } + case 3: { + message.formInfo = $root.google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PageInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.PageInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.PageInfo} PageInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PageInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PageInfo message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.PageInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PageInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.currentPage != null && message.hasOwnProperty("currentPage")) + if (!$util.isString(message.currentPage)) + return "currentPage: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.formInfo != null && message.hasOwnProperty("formInfo")) { + var error = $root.google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.verify(message.formInfo); + if (error) + return "formInfo." + error; + } + return null; + }; + + /** + * Creates a PageInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.PageInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.PageInfo} PageInfo + */ + PageInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.PageInfo) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.PageInfo(); + if (object.currentPage != null) + message.currentPage = String(object.currentPage); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.formInfo != null) { + if (typeof object.formInfo !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.PageInfo.formInfo: object expected"); + message.formInfo = $root.google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.fromObject(object.formInfo); + } + return message; + }; + + /** + * Creates a plain object from a PageInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.PageInfo + * @static + * @param {google.cloud.dialogflow.cx.v3.PageInfo} message PageInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PageInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.currentPage = ""; + object.formInfo = null; + object.displayName = ""; + } + if (message.currentPage != null && message.hasOwnProperty("currentPage")) + object.currentPage = message.currentPage; + if (message.formInfo != null && message.hasOwnProperty("formInfo")) + object.formInfo = $root.google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.toObject(message.formInfo, options); + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + return object; + }; + + /** + * Converts this PageInfo to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.PageInfo + * @instance + * @returns {Object.} JSON object + */ + PageInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PageInfo + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.PageInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PageInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.PageInfo"; + }; + + PageInfo.FormInfo = (function() { + + /** + * Properties of a FormInfo. + * @memberof google.cloud.dialogflow.cx.v3.PageInfo + * @interface IFormInfo + * @property {Array.|null} [parameterInfo] FormInfo parameterInfo + */ + + /** + * Constructs a new FormInfo. + * @memberof google.cloud.dialogflow.cx.v3.PageInfo + * @classdesc Represents a FormInfo. + * @implements IFormInfo + * @constructor + * @param {google.cloud.dialogflow.cx.v3.PageInfo.IFormInfo=} [properties] Properties to set + */ + function FormInfo(properties) { + this.parameterInfo = []; + 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]]; + } + + /** + * FormInfo parameterInfo. + * @member {Array.} parameterInfo + * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo + * @instance + */ + FormInfo.prototype.parameterInfo = $util.emptyArray; + + /** + * Creates a new FormInfo instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo + * @static + * @param {google.cloud.dialogflow.cx.v3.PageInfo.IFormInfo=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.PageInfo.FormInfo} FormInfo instance + */ + FormInfo.create = function create(properties) { + return new FormInfo(properties); + }; + + /** + * Encodes the specified FormInfo message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo + * @static + * @param {google.cloud.dialogflow.cx.v3.PageInfo.IFormInfo} message FormInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FormInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parameterInfo != null && message.parameterInfo.length) + for (var i = 0; i < message.parameterInfo.length; ++i) + $root.google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo.encode(message.parameterInfo[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FormInfo message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo + * @static + * @param {google.cloud.dialogflow.cx.v3.PageInfo.IFormInfo} message FormInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FormInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FormInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo + * @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.PageInfo.FormInfo} FormInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FormInfo.decode = function decode(reader, length, error) { + 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.PageInfo.FormInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + if (!(message.parameterInfo && message.parameterInfo.length)) + message.parameterInfo = []; + message.parameterInfo.push($root.google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FormInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.PageInfo.FormInfo} FormInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FormInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FormInfo message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FormInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parameterInfo != null && message.hasOwnProperty("parameterInfo")) { + if (!Array.isArray(message.parameterInfo)) + return "parameterInfo: array expected"; + for (var i = 0; i < message.parameterInfo.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo.verify(message.parameterInfo[i]); + if (error) + return "parameterInfo." + error; + } + } + return null; + }; + + /** + * Creates a FormInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.PageInfo.FormInfo} FormInfo + */ + FormInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.PageInfo.FormInfo) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.PageInfo.FormInfo(); + if (object.parameterInfo) { + if (!Array.isArray(object.parameterInfo)) + throw TypeError(".google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.parameterInfo: array expected"); + message.parameterInfo = []; + for (var i = 0; i < object.parameterInfo.length; ++i) { + if (typeof object.parameterInfo[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.parameterInfo: object expected"); + message.parameterInfo[i] = $root.google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo.fromObject(object.parameterInfo[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FormInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo + * @static + * @param {google.cloud.dialogflow.cx.v3.PageInfo.FormInfo} message FormInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FormInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.parameterInfo = []; + if (message.parameterInfo && message.parameterInfo.length) { + object.parameterInfo = []; + for (var j = 0; j < message.parameterInfo.length; ++j) + object.parameterInfo[j] = $root.google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo.toObject(message.parameterInfo[j], options); + } + return object; + }; + + /** + * Converts this FormInfo to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo + * @instance + * @returns {Object.} JSON object + */ + FormInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FormInfo + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FormInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.PageInfo.FormInfo"; + }; + + FormInfo.ParameterInfo = (function() { + + /** + * Properties of a ParameterInfo. + * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo + * @interface IParameterInfo + * @property {string|null} [displayName] ParameterInfo displayName + * @property {boolean|null} [required] ParameterInfo required + * @property {google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo.ParameterState|null} [state] ParameterInfo state + * @property {google.protobuf.IValue|null} [value] ParameterInfo value + * @property {boolean|null} [justCollected] ParameterInfo justCollected + */ + + /** + * Constructs a new ParameterInfo. + * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo + * @classdesc Represents a ParameterInfo. + * @implements IParameterInfo + * @constructor + * @param {google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.IParameterInfo=} [properties] Properties to set + */ + function ParameterInfo(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]]; + } + + /** + * ParameterInfo displayName. + * @member {string} displayName + * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo + * @instance + */ + ParameterInfo.prototype.displayName = ""; + + /** + * ParameterInfo required. + * @member {boolean} required + * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo + * @instance + */ + ParameterInfo.prototype.required = false; + + /** + * ParameterInfo state. + * @member {google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo.ParameterState} state + * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo + * @instance + */ + ParameterInfo.prototype.state = 0; + + /** + * ParameterInfo value. + * @member {google.protobuf.IValue|null|undefined} value + * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo + * @instance + */ + ParameterInfo.prototype.value = null; + + /** + * ParameterInfo justCollected. + * @member {boolean} justCollected + * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo + * @instance + */ + ParameterInfo.prototype.justCollected = false; + + /** + * Creates a new ParameterInfo instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo + * @static + * @param {google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.IParameterInfo=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo} ParameterInfo instance + */ + ParameterInfo.create = function create(properties) { + return new ParameterInfo(properties); + }; + + /** + * Encodes the specified ParameterInfo message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo + * @static + * @param {google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.IParameterInfo} message ParameterInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ParameterInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.required != null && Object.hasOwnProperty.call(message, "required")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.required); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.state); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + $root.google.protobuf.Value.encode(message.value, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.justCollected != null && Object.hasOwnProperty.call(message, "justCollected")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.justCollected); + return writer; + }; + + /** + * Encodes the specified ParameterInfo message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo + * @static + * @param {google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.IParameterInfo} message ParameterInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ParameterInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ParameterInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo + * @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.PageInfo.FormInfo.ParameterInfo} ParameterInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ParameterInfo.decode = function decode(reader, length, error) { + 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.PageInfo.FormInfo.ParameterInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.displayName = reader.string(); + break; + } + case 2: { + message.required = reader.bool(); + break; + } + case 3: { + message.state = reader.int32(); + break; + } + case 4: { + message.value = $root.google.protobuf.Value.decode(reader, reader.uint32()); + break; + } + case 5: { + message.justCollected = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ParameterInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo} ParameterInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ParameterInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ParameterInfo message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ParameterInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.required != null && message.hasOwnProperty("required")) + if (typeof message.required !== "boolean") + return "required: boolean expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.value != null && message.hasOwnProperty("value")) { + var error = $root.google.protobuf.Value.verify(message.value); + if (error) + return "value." + error; + } + if (message.justCollected != null && message.hasOwnProperty("justCollected")) + if (typeof message.justCollected !== "boolean") + return "justCollected: boolean expected"; + return null; + }; + + /** + * Creates a ParameterInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo} ParameterInfo + */ + ParameterInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.required != null) + message.required = Boolean(object.required); + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "PARAMETER_STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "EMPTY": + case 1: + message.state = 1; + break; + case "INVALID": + case 2: + message.state = 2; + break; + case "FILLED": + case 3: + message.state = 3; + break; + } + if (object.value != null) { + if (typeof object.value !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo.value: object expected"); + message.value = $root.google.protobuf.Value.fromObject(object.value); + } + if (object.justCollected != null) + message.justCollected = Boolean(object.justCollected); + return message; + }; + + /** + * Creates a plain object from a ParameterInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo + * @static + * @param {google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo} message ParameterInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ParameterInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.displayName = ""; + object.required = false; + object.state = options.enums === String ? "PARAMETER_STATE_UNSPECIFIED" : 0; + object.value = null; + object.justCollected = false; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.required != null && message.hasOwnProperty("required")) + object.required = message.required; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo.ParameterState[message.state] === undefined ? message.state : $root.google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo.ParameterState[message.state] : message.state; + if (message.value != null && message.hasOwnProperty("value")) + object.value = $root.google.protobuf.Value.toObject(message.value, options); + if (message.justCollected != null && message.hasOwnProperty("justCollected")) + object.justCollected = message.justCollected; + return object; + }; + + /** + * Converts this ParameterInfo to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo + * @instance + * @returns {Object.} JSON object + */ + ParameterInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ParameterInfo + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ParameterInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo"; + }; + + /** + * ParameterState enum. + * @name google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo.ParameterState + * @enum {number} + * @property {number} PARAMETER_STATE_UNSPECIFIED=0 PARAMETER_STATE_UNSPECIFIED value + * @property {number} EMPTY=1 EMPTY value + * @property {number} INVALID=2 INVALID value + * @property {number} FILLED=3 FILLED value + */ + ParameterInfo.ParameterState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PARAMETER_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "EMPTY"] = 1; + values[valuesById[2] = "INVALID"] = 2; + values[valuesById[3] = "FILLED"] = 3; + return values; + })(); + + return ParameterInfo; + })(); + + return FormInfo; + })(); + + return PageInfo; + })(); + + v3.SessionInfo = (function() { + + /** + * Properties of a SessionInfo. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface ISessionInfo + * @property {string|null} [session] SessionInfo session + * @property {Object.|null} [parameters] SessionInfo parameters + */ + + /** + * Constructs a new SessionInfo. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a SessionInfo. + * @implements ISessionInfo + * @constructor + * @param {google.cloud.dialogflow.cx.v3.ISessionInfo=} [properties] Properties to set + */ + function SessionInfo(properties) { + this.parameters = {}; + 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]]; + } + + /** + * SessionInfo session. + * @member {string} session + * @memberof google.cloud.dialogflow.cx.v3.SessionInfo + * @instance + */ + SessionInfo.prototype.session = ""; + + /** + * SessionInfo parameters. + * @member {Object.} parameters + * @memberof google.cloud.dialogflow.cx.v3.SessionInfo + * @instance + */ + SessionInfo.prototype.parameters = $util.emptyObject; + + /** + * Creates a new SessionInfo instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.SessionInfo + * @static + * @param {google.cloud.dialogflow.cx.v3.ISessionInfo=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.SessionInfo} SessionInfo instance + */ + SessionInfo.create = function create(properties) { + return new SessionInfo(properties); + }; + + /** + * Encodes the specified SessionInfo message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SessionInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.SessionInfo + * @static + * @param {google.cloud.dialogflow.cx.v3.ISessionInfo} message SessionInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SessionInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.session != null && Object.hasOwnProperty.call(message, "session")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.session); + if (message.parameters != null && Object.hasOwnProperty.call(message, "parameters")) + for (var keys = Object.keys(message.parameters), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.protobuf.Value.encode(message.parameters[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + return writer; + }; + + /** + * Encodes the specified SessionInfo message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SessionInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.SessionInfo + * @static + * @param {google.cloud.dialogflow.cx.v3.ISessionInfo} message SessionInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SessionInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SessionInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.SessionInfo + * @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.SessionInfo} SessionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SessionInfo.decode = function decode(reader, length, error) { + 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.SessionInfo(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.session = reader.string(); + break; + } + case 2: { + if (message.parameters === $util.emptyObject) + message.parameters = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.protobuf.Value.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.parameters[key] = value; + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SessionInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.SessionInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.SessionInfo} SessionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SessionInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SessionInfo message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.SessionInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SessionInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.session != null && message.hasOwnProperty("session")) + if (!$util.isString(message.session)) + return "session: string expected"; + if (message.parameters != null && message.hasOwnProperty("parameters")) { + if (!$util.isObject(message.parameters)) + return "parameters: object expected"; + var key = Object.keys(message.parameters); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.protobuf.Value.verify(message.parameters[key[i]]); + if (error) + return "parameters." + error; + } + } + return null; + }; + + /** + * Creates a SessionInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.SessionInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.SessionInfo} SessionInfo + */ + SessionInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.SessionInfo) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.SessionInfo(); + if (object.session != null) + message.session = String(object.session); + if (object.parameters) { + if (typeof object.parameters !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.SessionInfo.parameters: object expected"); + message.parameters = {}; + for (var keys = Object.keys(object.parameters), i = 0; i < keys.length; ++i) { + if (typeof object.parameters[keys[i]] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.SessionInfo.parameters: object expected"); + message.parameters[keys[i]] = $root.google.protobuf.Value.fromObject(object.parameters[keys[i]]); + } + } + return message; + }; + + /** + * Creates a plain object from a SessionInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.SessionInfo + * @static + * @param {google.cloud.dialogflow.cx.v3.SessionInfo} message SessionInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SessionInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.parameters = {}; + if (options.defaults) + object.session = ""; + if (message.session != null && message.hasOwnProperty("session")) + object.session = message.session; + var keys2; + if (message.parameters && (keys2 = Object.keys(message.parameters)).length) { + object.parameters = {}; + for (var j = 0; j < keys2.length; ++j) + object.parameters[keys2[j]] = $root.google.protobuf.Value.toObject(message.parameters[keys2[j]], options); + } + return object; + }; + + /** + * Converts this SessionInfo to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.SessionInfo + * @instance + * @returns {Object.} JSON object + */ + SessionInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SessionInfo + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.SessionInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SessionInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.SessionInfo"; + }; + + return SessionInfo; + })(); + + v3.LanguageInfo = (function() { + + /** + * Properties of a LanguageInfo. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface ILanguageInfo + * @property {string|null} [inputLanguageCode] LanguageInfo inputLanguageCode + * @property {string|null} [resolvedLanguageCode] LanguageInfo resolvedLanguageCode + * @property {number|null} [confidenceScore] LanguageInfo confidenceScore + */ + + /** + * Constructs a new LanguageInfo. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a LanguageInfo. + * @implements ILanguageInfo + * @constructor + * @param {google.cloud.dialogflow.cx.v3.ILanguageInfo=} [properties] Properties to set + */ + function LanguageInfo(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]]; + } + + /** + * LanguageInfo inputLanguageCode. + * @member {string} inputLanguageCode + * @memberof google.cloud.dialogflow.cx.v3.LanguageInfo + * @instance + */ + LanguageInfo.prototype.inputLanguageCode = ""; + + /** + * LanguageInfo resolvedLanguageCode. + * @member {string} resolvedLanguageCode + * @memberof google.cloud.dialogflow.cx.v3.LanguageInfo + * @instance + */ + LanguageInfo.prototype.resolvedLanguageCode = ""; + + /** + * LanguageInfo confidenceScore. + * @member {number} confidenceScore + * @memberof google.cloud.dialogflow.cx.v3.LanguageInfo + * @instance + */ + LanguageInfo.prototype.confidenceScore = 0; + + /** + * Creates a new LanguageInfo instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.LanguageInfo + * @static + * @param {google.cloud.dialogflow.cx.v3.ILanguageInfo=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.LanguageInfo} LanguageInfo instance + */ + LanguageInfo.create = function create(properties) { + return new LanguageInfo(properties); + }; + + /** + * Encodes the specified LanguageInfo message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.LanguageInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.LanguageInfo + * @static + * @param {google.cloud.dialogflow.cx.v3.ILanguageInfo} message LanguageInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LanguageInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.inputLanguageCode != null && Object.hasOwnProperty.call(message, "inputLanguageCode")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.inputLanguageCode); + if (message.resolvedLanguageCode != null && Object.hasOwnProperty.call(message, "resolvedLanguageCode")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.resolvedLanguageCode); + if (message.confidenceScore != null && Object.hasOwnProperty.call(message, "confidenceScore")) + writer.uint32(/* id 3, wireType 5 =*/29).float(message.confidenceScore); + return writer; + }; + + /** + * Encodes the specified LanguageInfo message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.LanguageInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.LanguageInfo + * @static + * @param {google.cloud.dialogflow.cx.v3.ILanguageInfo} message LanguageInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LanguageInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LanguageInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.LanguageInfo + * @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.LanguageInfo} LanguageInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LanguageInfo.decode = function decode(reader, length, error) { + 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.LanguageInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.inputLanguageCode = reader.string(); + break; + } + case 2: { + message.resolvedLanguageCode = reader.string(); + break; + } + case 3: { + message.confidenceScore = reader.float(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LanguageInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.LanguageInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.LanguageInfo} LanguageInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LanguageInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LanguageInfo message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.LanguageInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LanguageInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.inputLanguageCode != null && message.hasOwnProperty("inputLanguageCode")) + if (!$util.isString(message.inputLanguageCode)) + return "inputLanguageCode: string expected"; + if (message.resolvedLanguageCode != null && message.hasOwnProperty("resolvedLanguageCode")) + if (!$util.isString(message.resolvedLanguageCode)) + return "resolvedLanguageCode: string expected"; + if (message.confidenceScore != null && message.hasOwnProperty("confidenceScore")) + if (typeof message.confidenceScore !== "number") + return "confidenceScore: number expected"; + return null; + }; + + /** + * Creates a LanguageInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.LanguageInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.LanguageInfo} LanguageInfo + */ + LanguageInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.LanguageInfo) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.LanguageInfo(); + if (object.inputLanguageCode != null) + message.inputLanguageCode = String(object.inputLanguageCode); + if (object.resolvedLanguageCode != null) + message.resolvedLanguageCode = String(object.resolvedLanguageCode); + if (object.confidenceScore != null) + message.confidenceScore = Number(object.confidenceScore); + return message; + }; + + /** + * Creates a plain object from a LanguageInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.LanguageInfo + * @static + * @param {google.cloud.dialogflow.cx.v3.LanguageInfo} message LanguageInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LanguageInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.inputLanguageCode = ""; + object.resolvedLanguageCode = ""; + object.confidenceScore = 0; + } + if (message.inputLanguageCode != null && message.hasOwnProperty("inputLanguageCode")) + object.inputLanguageCode = message.inputLanguageCode; + if (message.resolvedLanguageCode != null && message.hasOwnProperty("resolvedLanguageCode")) + object.resolvedLanguageCode = message.resolvedLanguageCode; + if (message.confidenceScore != null && message.hasOwnProperty("confidenceScore")) + object.confidenceScore = options.json && !isFinite(message.confidenceScore) ? String(message.confidenceScore) : message.confidenceScore; + return object; + }; + + /** + * Converts this LanguageInfo to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.LanguageInfo + * @instance + * @returns {Object.} JSON object + */ + LanguageInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LanguageInfo + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.LanguageInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LanguageInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.LanguageInfo"; + }; + + return LanguageInfo; + })(); + + v3.Examples = (function() { + + /** + * Constructs a new Examples service. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents an Examples + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Examples(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Examples.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Examples; + + /** + * Creates new Examples service using the specified rpc implementation. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.Examples + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Examples} RPC service. Useful where requests and/or responses are streamed. + */ + Examples.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Examples|createExample}. + * @memberof google.cloud.dialogflow.cx.v3.Examples + * @typedef CreateExampleCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.Example} [response] Example + */ + + /** + * Calls CreateExample. + * @function createExample + * @memberof google.cloud.dialogflow.cx.v3.Examples + * @instance + * @param {google.cloud.dialogflow.cx.v3.ICreateExampleRequest} request CreateExampleRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Examples.CreateExampleCallback} callback Node-style callback called with the error, if any, and Example + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Examples.prototype.createExample = function createExample(request, callback) { + return this.rpcCall(createExample, $root.google.cloud.dialogflow.cx.v3.CreateExampleRequest, $root.google.cloud.dialogflow.cx.v3.Example, request, callback); + }, "name", { value: "CreateExample" }); + + /** + * Calls CreateExample. + * @function createExample + * @memberof google.cloud.dialogflow.cx.v3.Examples + * @instance + * @param {google.cloud.dialogflow.cx.v3.ICreateExampleRequest} request CreateExampleRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Examples|deleteExample}. + * @memberof google.cloud.dialogflow.cx.v3.Examples + * @typedef DeleteExampleCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteExample. + * @function deleteExample + * @memberof google.cloud.dialogflow.cx.v3.Examples + * @instance + * @param {google.cloud.dialogflow.cx.v3.IDeleteExampleRequest} request DeleteExampleRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Examples.DeleteExampleCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Examples.prototype.deleteExample = function deleteExample(request, callback) { + return this.rpcCall(deleteExample, $root.google.cloud.dialogflow.cx.v3.DeleteExampleRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteExample" }); + + /** + * Calls DeleteExample. + * @function deleteExample + * @memberof google.cloud.dialogflow.cx.v3.Examples + * @instance + * @param {google.cloud.dialogflow.cx.v3.IDeleteExampleRequest} request DeleteExampleRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Examples|listExamples}. + * @memberof google.cloud.dialogflow.cx.v3.Examples + * @typedef ListExamplesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.ListExamplesResponse} [response] ListExamplesResponse + */ + + /** + * Calls ListExamples. + * @function listExamples + * @memberof google.cloud.dialogflow.cx.v3.Examples + * @instance + * @param {google.cloud.dialogflow.cx.v3.IListExamplesRequest} request ListExamplesRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Examples.ListExamplesCallback} callback Node-style callback called with the error, if any, and ListExamplesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Examples.prototype.listExamples = function listExamples(request, callback) { + return this.rpcCall(listExamples, $root.google.cloud.dialogflow.cx.v3.ListExamplesRequest, $root.google.cloud.dialogflow.cx.v3.ListExamplesResponse, request, callback); + }, "name", { value: "ListExamples" }); + + /** + * Calls ListExamples. + * @function listExamples + * @memberof google.cloud.dialogflow.cx.v3.Examples + * @instance + * @param {google.cloud.dialogflow.cx.v3.IListExamplesRequest} request ListExamplesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Examples|getExample}. + * @memberof google.cloud.dialogflow.cx.v3.Examples + * @typedef GetExampleCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.Example} [response] Example + */ + + /** + * Calls GetExample. + * @function getExample + * @memberof google.cloud.dialogflow.cx.v3.Examples + * @instance + * @param {google.cloud.dialogflow.cx.v3.IGetExampleRequest} request GetExampleRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Examples.GetExampleCallback} callback Node-style callback called with the error, if any, and Example + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Examples.prototype.getExample = function getExample(request, callback) { + return this.rpcCall(getExample, $root.google.cloud.dialogflow.cx.v3.GetExampleRequest, $root.google.cloud.dialogflow.cx.v3.Example, request, callback); + }, "name", { value: "GetExample" }); + + /** + * Calls GetExample. + * @function getExample + * @memberof google.cloud.dialogflow.cx.v3.Examples + * @instance + * @param {google.cloud.dialogflow.cx.v3.IGetExampleRequest} request GetExampleRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Examples|updateExample}. + * @memberof google.cloud.dialogflow.cx.v3.Examples + * @typedef UpdateExampleCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.Example} [response] Example + */ + + /** + * Calls UpdateExample. + * @function updateExample + * @memberof google.cloud.dialogflow.cx.v3.Examples + * @instance + * @param {google.cloud.dialogflow.cx.v3.IUpdateExampleRequest} request UpdateExampleRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Examples.UpdateExampleCallback} callback Node-style callback called with the error, if any, and Example + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Examples.prototype.updateExample = function updateExample(request, callback) { + return this.rpcCall(updateExample, $root.google.cloud.dialogflow.cx.v3.UpdateExampleRequest, $root.google.cloud.dialogflow.cx.v3.Example, request, callback); + }, "name", { value: "UpdateExample" }); + + /** + * Calls UpdateExample. + * @function updateExample + * @memberof google.cloud.dialogflow.cx.v3.Examples + * @instance + * @param {google.cloud.dialogflow.cx.v3.IUpdateExampleRequest} request UpdateExampleRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Examples; + })(); + + v3.CreateExampleRequest = (function() { + + /** + * Properties of a CreateExampleRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface ICreateExampleRequest + * @property {string|null} [parent] CreateExampleRequest parent + * @property {google.cloud.dialogflow.cx.v3.IExample|null} [example] CreateExampleRequest example + */ + + /** + * Constructs a new CreateExampleRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a CreateExampleRequest. + * @implements ICreateExampleRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3.ICreateExampleRequest=} [properties] Properties to set + */ + function CreateExampleRequest(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]]; + } + + /** + * CreateExampleRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.cx.v3.CreateExampleRequest + * @instance + */ + CreateExampleRequest.prototype.parent = ""; + + /** + * CreateExampleRequest example. + * @member {google.cloud.dialogflow.cx.v3.IExample|null|undefined} example + * @memberof google.cloud.dialogflow.cx.v3.CreateExampleRequest + * @instance + */ + CreateExampleRequest.prototype.example = null; + + /** + * Creates a new CreateExampleRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.CreateExampleRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.ICreateExampleRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.CreateExampleRequest} CreateExampleRequest instance + */ + CreateExampleRequest.create = function create(properties) { + return new CreateExampleRequest(properties); + }; + + /** + * Encodes the specified CreateExampleRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateExampleRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.CreateExampleRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.ICreateExampleRequest} message CreateExampleRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateExampleRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.example != null && Object.hasOwnProperty.call(message, "example")) + $root.google.cloud.dialogflow.cx.v3.Example.encode(message.example, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateExampleRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateExampleRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.CreateExampleRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.ICreateExampleRequest} message CreateExampleRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateExampleRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateExampleRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.CreateExampleRequest + * @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.CreateExampleRequest} CreateExampleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateExampleRequest.decode = function decode(reader, length, error) { + 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.CreateExampleRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.example = $root.google.cloud.dialogflow.cx.v3.Example.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateExampleRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.CreateExampleRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.CreateExampleRequest} CreateExampleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateExampleRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateExampleRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.CreateExampleRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateExampleRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.example != null && message.hasOwnProperty("example")) { + var error = $root.google.cloud.dialogflow.cx.v3.Example.verify(message.example); + if (error) + return "example." + error; + } + return null; + }; + + /** + * Creates a CreateExampleRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.CreateExampleRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.CreateExampleRequest} CreateExampleRequest + */ + CreateExampleRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.CreateExampleRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.CreateExampleRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.example != null) { + if (typeof object.example !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.CreateExampleRequest.example: object expected"); + message.example = $root.google.cloud.dialogflow.cx.v3.Example.fromObject(object.example); + } + return message; + }; + + /** + * Creates a plain object from a CreateExampleRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.CreateExampleRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.CreateExampleRequest} message CreateExampleRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateExampleRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.example = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.example != null && message.hasOwnProperty("example")) + object.example = $root.google.cloud.dialogflow.cx.v3.Example.toObject(message.example, options); + return object; + }; + + /** + * Converts this CreateExampleRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.CreateExampleRequest + * @instance + * @returns {Object.} JSON object + */ + CreateExampleRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateExampleRequest + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.CreateExampleRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateExampleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.CreateExampleRequest"; + }; + + return CreateExampleRequest; + })(); + + v3.DeleteExampleRequest = (function() { + + /** + * Properties of a DeleteExampleRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IDeleteExampleRequest + * @property {string|null} [name] DeleteExampleRequest name + */ + + /** + * Constructs a new DeleteExampleRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a DeleteExampleRequest. + * @implements IDeleteExampleRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IDeleteExampleRequest=} [properties] Properties to set + */ + function DeleteExampleRequest(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]]; + } + + /** + * DeleteExampleRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.DeleteExampleRequest + * @instance + */ + DeleteExampleRequest.prototype.name = ""; + + /** + * Creates a new DeleteExampleRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.DeleteExampleRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IDeleteExampleRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.DeleteExampleRequest} DeleteExampleRequest instance + */ + DeleteExampleRequest.create = function create(properties) { + return new DeleteExampleRequest(properties); + }; + + /** + * Encodes the specified DeleteExampleRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteExampleRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.DeleteExampleRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IDeleteExampleRequest} message DeleteExampleRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteExampleRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteExampleRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteExampleRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.DeleteExampleRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IDeleteExampleRequest} message DeleteExampleRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteExampleRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteExampleRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.DeleteExampleRequest + * @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.DeleteExampleRequest} DeleteExampleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteExampleRequest.decode = function decode(reader, length, error) { + 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.DeleteExampleRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteExampleRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.DeleteExampleRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.DeleteExampleRequest} DeleteExampleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteExampleRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteExampleRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.DeleteExampleRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteExampleRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteExampleRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.DeleteExampleRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.DeleteExampleRequest} DeleteExampleRequest + */ + DeleteExampleRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.DeleteExampleRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.DeleteExampleRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteExampleRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.DeleteExampleRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.DeleteExampleRequest} message DeleteExampleRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteExampleRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteExampleRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.DeleteExampleRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteExampleRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteExampleRequest + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.DeleteExampleRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteExampleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.DeleteExampleRequest"; + }; + + return DeleteExampleRequest; + })(); + + v3.ListExamplesRequest = (function() { + + /** + * Properties of a ListExamplesRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IListExamplesRequest + * @property {string|null} [parent] ListExamplesRequest parent + * @property {number|null} [pageSize] ListExamplesRequest pageSize + * @property {string|null} [pageToken] ListExamplesRequest pageToken + * @property {string|null} [languageCode] ListExamplesRequest languageCode + */ + + /** + * Constructs a new ListExamplesRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a ListExamplesRequest. + * @implements IListExamplesRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IListExamplesRequest=} [properties] Properties to set + */ + function ListExamplesRequest(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]]; + } + + /** + * ListExamplesRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.cx.v3.ListExamplesRequest + * @instance + */ + ListExamplesRequest.prototype.parent = ""; + + /** + * ListExamplesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dialogflow.cx.v3.ListExamplesRequest + * @instance + */ + ListExamplesRequest.prototype.pageSize = 0; + + /** + * ListExamplesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dialogflow.cx.v3.ListExamplesRequest + * @instance + */ + ListExamplesRequest.prototype.pageToken = ""; + + /** + * ListExamplesRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3.ListExamplesRequest + * @instance + */ + ListExamplesRequest.prototype.languageCode = ""; + + /** + * Creates a new ListExamplesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.ListExamplesRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IListExamplesRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ListExamplesRequest} ListExamplesRequest instance + */ + ListExamplesRequest.create = function create(properties) { + return new ListExamplesRequest(properties); + }; + + /** + * Encodes the specified ListExamplesRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListExamplesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.ListExamplesRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IListExamplesRequest} message ListExamplesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListExamplesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.languageCode); + return writer; + }; + + /** + * Encodes the specified ListExamplesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListExamplesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.ListExamplesRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IListExamplesRequest} message ListExamplesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListExamplesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListExamplesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.ListExamplesRequest + * @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.ListExamplesRequest} ListExamplesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListExamplesRequest.decode = function decode(reader, length, error) { + 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.ListExamplesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.languageCode = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListExamplesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.ListExamplesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.ListExamplesRequest} ListExamplesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListExamplesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListExamplesRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.ListExamplesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListExamplesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; + return null; + }; + + /** + * Creates a ListExamplesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.ListExamplesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.ListExamplesRequest} ListExamplesRequest + */ + ListExamplesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListExamplesRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.ListExamplesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.languageCode != null) + message.languageCode = String(object.languageCode); + return message; + }; + + /** + * Creates a plain object from a ListExamplesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.ListExamplesRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.ListExamplesRequest} message ListExamplesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListExamplesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.languageCode = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; + return object; + }; + + /** + * Converts this ListExamplesRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.ListExamplesRequest + * @instance + * @returns {Object.} JSON object + */ + ListExamplesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListExamplesRequest + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.ListExamplesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListExamplesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListExamplesRequest"; + }; + + return ListExamplesRequest; + })(); + + v3.ListExamplesResponse = (function() { + + /** + * Properties of a ListExamplesResponse. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IListExamplesResponse + * @property {Array.|null} [examples] ListExamplesResponse examples + * @property {string|null} [nextPageToken] ListExamplesResponse nextPageToken + */ + + /** + * Constructs a new ListExamplesResponse. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a ListExamplesResponse. + * @implements IListExamplesResponse + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IListExamplesResponse=} [properties] Properties to set + */ + function ListExamplesResponse(properties) { + this.examples = []; + 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]]; + } + + /** + * ListExamplesResponse examples. + * @member {Array.} examples + * @memberof google.cloud.dialogflow.cx.v3.ListExamplesResponse + * @instance + */ + ListExamplesResponse.prototype.examples = $util.emptyArray; + + /** + * ListExamplesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dialogflow.cx.v3.ListExamplesResponse + * @instance + */ + ListExamplesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListExamplesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.ListExamplesResponse + * @static + * @param {google.cloud.dialogflow.cx.v3.IListExamplesResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ListExamplesResponse} ListExamplesResponse instance + */ + ListExamplesResponse.create = function create(properties) { + return new ListExamplesResponse(properties); + }; + + /** + * Encodes the specified ListExamplesResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListExamplesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.ListExamplesResponse + * @static + * @param {google.cloud.dialogflow.cx.v3.IListExamplesResponse} message ListExamplesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListExamplesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.examples != null && message.examples.length) + for (var i = 0; i < message.examples.length; ++i) + $root.google.cloud.dialogflow.cx.v3.Example.encode(message.examples[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListExamplesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListExamplesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.ListExamplesResponse + * @static + * @param {google.cloud.dialogflow.cx.v3.IListExamplesResponse} message ListExamplesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListExamplesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListExamplesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.ListExamplesResponse + * @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.ListExamplesResponse} ListExamplesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListExamplesResponse.decode = function decode(reader, length, error) { + 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.ListExamplesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.examples && message.examples.length)) + message.examples = []; + message.examples.push($root.google.cloud.dialogflow.cx.v3.Example.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListExamplesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.ListExamplesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.ListExamplesResponse} ListExamplesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListExamplesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListExamplesResponse message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.ListExamplesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListExamplesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.examples != null && message.hasOwnProperty("examples")) { + if (!Array.isArray(message.examples)) + return "examples: array expected"; + for (var i = 0; i < message.examples.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.Example.verify(message.examples[i]); + if (error) + return "examples." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListExamplesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.ListExamplesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.ListExamplesResponse} ListExamplesResponse + */ + ListExamplesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListExamplesResponse) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.ListExamplesResponse(); + if (object.examples) { + if (!Array.isArray(object.examples)) + throw TypeError(".google.cloud.dialogflow.cx.v3.ListExamplesResponse.examples: array expected"); + message.examples = []; + for (var i = 0; i < object.examples.length; ++i) { + if (typeof object.examples[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.ListExamplesResponse.examples: object expected"); + message.examples[i] = $root.google.cloud.dialogflow.cx.v3.Example.fromObject(object.examples[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListExamplesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.ListExamplesResponse + * @static + * @param {google.cloud.dialogflow.cx.v3.ListExamplesResponse} message ListExamplesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListExamplesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.examples = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.examples && message.examples.length) { + object.examples = []; + for (var j = 0; j < message.examples.length; ++j) + object.examples[j] = $root.google.cloud.dialogflow.cx.v3.Example.toObject(message.examples[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListExamplesResponse to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.ListExamplesResponse + * @instance + * @returns {Object.} JSON object + */ + ListExamplesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListExamplesResponse + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.ListExamplesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListExamplesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListExamplesResponse"; + }; + + return ListExamplesResponse; + })(); + + v3.GetExampleRequest = (function() { + + /** + * Properties of a GetExampleRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IGetExampleRequest + * @property {string|null} [name] GetExampleRequest name + */ + + /** + * Constructs a new GetExampleRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a GetExampleRequest. + * @implements IGetExampleRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IGetExampleRequest=} [properties] Properties to set + */ + function GetExampleRequest(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]]; + } + + /** + * GetExampleRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.GetExampleRequest + * @instance + */ + GetExampleRequest.prototype.name = ""; + + /** + * Creates a new GetExampleRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.GetExampleRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IGetExampleRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.GetExampleRequest} GetExampleRequest instance + */ + GetExampleRequest.create = function create(properties) { + return new GetExampleRequest(properties); + }; + + /** + * Encodes the specified GetExampleRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetExampleRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.GetExampleRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IGetExampleRequest} message GetExampleRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetExampleRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetExampleRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetExampleRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.GetExampleRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IGetExampleRequest} message GetExampleRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetExampleRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetExampleRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.GetExampleRequest + * @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.GetExampleRequest} GetExampleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetExampleRequest.decode = function decode(reader, length, error) { + 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.GetExampleRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetExampleRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.GetExampleRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.GetExampleRequest} GetExampleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetExampleRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetExampleRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.GetExampleRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetExampleRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetExampleRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.GetExampleRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.GetExampleRequest} GetExampleRequest + */ + GetExampleRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.GetExampleRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.GetExampleRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetExampleRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.GetExampleRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.GetExampleRequest} message GetExampleRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetExampleRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetExampleRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.GetExampleRequest + * @instance + * @returns {Object.} JSON object + */ + GetExampleRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetExampleRequest + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.GetExampleRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetExampleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.GetExampleRequest"; + }; + + return GetExampleRequest; + })(); + + v3.UpdateExampleRequest = (function() { + + /** + * Properties of an UpdateExampleRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IUpdateExampleRequest + * @property {google.cloud.dialogflow.cx.v3.IExample|null} [example] UpdateExampleRequest example + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateExampleRequest updateMask + */ + + /** + * Constructs a new UpdateExampleRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents an UpdateExampleRequest. + * @implements IUpdateExampleRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IUpdateExampleRequest=} [properties] Properties to set + */ + function UpdateExampleRequest(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]]; + } + + /** + * UpdateExampleRequest example. + * @member {google.cloud.dialogflow.cx.v3.IExample|null|undefined} example + * @memberof google.cloud.dialogflow.cx.v3.UpdateExampleRequest + * @instance + */ + UpdateExampleRequest.prototype.example = null; + + /** + * UpdateExampleRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dialogflow.cx.v3.UpdateExampleRequest + * @instance + */ + UpdateExampleRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateExampleRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.UpdateExampleRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IUpdateExampleRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.UpdateExampleRequest} UpdateExampleRequest instance + */ + UpdateExampleRequest.create = function create(properties) { + return new UpdateExampleRequest(properties); + }; + + /** + * Encodes the specified UpdateExampleRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateExampleRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.UpdateExampleRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IUpdateExampleRequest} message UpdateExampleRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateExampleRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.example != null && Object.hasOwnProperty.call(message, "example")) + $root.google.cloud.dialogflow.cx.v3.Example.encode(message.example, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateExampleRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateExampleRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.UpdateExampleRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IUpdateExampleRequest} message UpdateExampleRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateExampleRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateExampleRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.UpdateExampleRequest + * @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.UpdateExampleRequest} UpdateExampleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateExampleRequest.decode = function decode(reader, length, error) { + 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.UpdateExampleRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.example = $root.google.cloud.dialogflow.cx.v3.Example.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateExampleRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.UpdateExampleRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.UpdateExampleRequest} UpdateExampleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateExampleRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateExampleRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.UpdateExampleRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateExampleRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.example != null && message.hasOwnProperty("example")) { + var error = $root.google.cloud.dialogflow.cx.v3.Example.verify(message.example); + if (error) + return "example." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + return null; + }; + + /** + * Creates an UpdateExampleRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.UpdateExampleRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.UpdateExampleRequest} UpdateExampleRequest + */ + UpdateExampleRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.UpdateExampleRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.UpdateExampleRequest(); + if (object.example != null) { + if (typeof object.example !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.UpdateExampleRequest.example: object expected"); + message.example = $root.google.cloud.dialogflow.cx.v3.Example.fromObject(object.example); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.UpdateExampleRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateExampleRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.UpdateExampleRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.UpdateExampleRequest} message UpdateExampleRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateExampleRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.example = null; + object.updateMask = null; + } + if (message.example != null && message.hasOwnProperty("example")) + object.example = $root.google.cloud.dialogflow.cx.v3.Example.toObject(message.example, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateExampleRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.UpdateExampleRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateExampleRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateExampleRequest + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.UpdateExampleRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateExampleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.UpdateExampleRequest"; + }; + + return UpdateExampleRequest; + })(); + + v3.Example = (function() { + + /** + * Properties of an Example. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IExample + * @property {string|null} [name] Example name + * @property {google.cloud.dialogflow.cx.v3.IPlaybookInput|null} [playbookInput] Example playbookInput + * @property {google.cloud.dialogflow.cx.v3.IPlaybookOutput|null} [playbookOutput] Example playbookOutput + * @property {Array.|null} [actions] Example actions + * @property {string|null} [displayName] Example displayName + * @property {string|null} [description] Example description + * @property {number|Long|null} [tokenCount] Example tokenCount + * @property {google.protobuf.ITimestamp|null} [createTime] Example createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Example updateTime + * @property {google.cloud.dialogflow.cx.v3.OutputState|null} [conversationState] Example conversationState + * @property {string|null} [languageCode] Example languageCode + */ + + /** + * Constructs a new Example. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents an Example. + * @implements IExample + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IExample=} [properties] Properties to set + */ + function Example(properties) { + this.actions = []; + 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]]; + } + + /** + * Example name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.Example + * @instance + */ + Example.prototype.name = ""; + + /** + * Example playbookInput. + * @member {google.cloud.dialogflow.cx.v3.IPlaybookInput|null|undefined} playbookInput + * @memberof google.cloud.dialogflow.cx.v3.Example + * @instance + */ + Example.prototype.playbookInput = null; + + /** + * Example playbookOutput. + * @member {google.cloud.dialogflow.cx.v3.IPlaybookOutput|null|undefined} playbookOutput + * @memberof google.cloud.dialogflow.cx.v3.Example + * @instance + */ + Example.prototype.playbookOutput = null; + + /** + * Example actions. + * @member {Array.} actions + * @memberof google.cloud.dialogflow.cx.v3.Example + * @instance + */ + Example.prototype.actions = $util.emptyArray; + + /** + * Example displayName. + * @member {string} displayName + * @memberof google.cloud.dialogflow.cx.v3.Example + * @instance + */ + Example.prototype.displayName = ""; + + /** + * Example description. + * @member {string} description + * @memberof google.cloud.dialogflow.cx.v3.Example + * @instance + */ + Example.prototype.description = ""; + + /** + * Example tokenCount. + * @member {number|Long} tokenCount + * @memberof google.cloud.dialogflow.cx.v3.Example + * @instance + */ + Example.prototype.tokenCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Example createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.dialogflow.cx.v3.Example + * @instance + */ + Example.prototype.createTime = null; + + /** + * Example updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.dialogflow.cx.v3.Example + * @instance + */ + Example.prototype.updateTime = null; + + /** + * Example conversationState. + * @member {google.cloud.dialogflow.cx.v3.OutputState} conversationState + * @memberof google.cloud.dialogflow.cx.v3.Example + * @instance + */ + Example.prototype.conversationState = 0; + + /** + * Example languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3.Example + * @instance + */ + Example.prototype.languageCode = ""; + + /** + * Creates a new Example instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.Example + * @static + * @param {google.cloud.dialogflow.cx.v3.IExample=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.Example} Example instance + */ + Example.create = function create(properties) { + return new Example(properties); + }; + + /** + * Encodes the specified Example message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Example.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.Example + * @static + * @param {google.cloud.dialogflow.cx.v3.IExample} message Example message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Example.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.actions != null && message.actions.length) + for (var i = 0; i < message.actions.length; ++i) + $root.google.cloud.dialogflow.cx.v3.Action.encode(message.actions[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.playbookInput != null && Object.hasOwnProperty.call(message, "playbookInput")) + $root.google.cloud.dialogflow.cx.v3.PlaybookInput.encode(message.playbookInput, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.playbookOutput != null && Object.hasOwnProperty.call(message, "playbookOutput")) + $root.google.cloud.dialogflow.cx.v3.PlaybookOutput.encode(message.playbookOutput, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.displayName); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.description); + if (message.tokenCount != null && Object.hasOwnProperty.call(message, "tokenCount")) + writer.uint32(/* id 9, wireType 0 =*/72).int64(message.tokenCount); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.conversationState != null && Object.hasOwnProperty.call(message, "conversationState")) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.conversationState); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.languageCode); + return writer; + }; + + /** + * Encodes the specified Example message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Example.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Example + * @static + * @param {google.cloud.dialogflow.cx.v3.IExample} message Example message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Example.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Example message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.Example + * @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.Example} Example + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Example.decode = function decode(reader, length, error) { + 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.Example(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 3: { + message.playbookInput = $root.google.cloud.dialogflow.cx.v3.PlaybookInput.decode(reader, reader.uint32()); + break; + } + case 4: { + message.playbookOutput = $root.google.cloud.dialogflow.cx.v3.PlaybookOutput.decode(reader, reader.uint32()); + break; + } + case 2: { + if (!(message.actions && message.actions.length)) + message.actions = []; + message.actions.push($root.google.cloud.dialogflow.cx.v3.Action.decode(reader, reader.uint32())); + break; + } + case 6: { + message.displayName = reader.string(); + break; + } + case 8: { + message.description = reader.string(); + break; + } + case 9: { + message.tokenCount = reader.int64(); + break; + } + case 10: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 11: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 12: { + message.conversationState = reader.int32(); + break; + } + case 13: { + message.languageCode = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Example message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Example + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.Example} Example + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Example.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Example message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.Example + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Example.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.playbookInput != null && message.hasOwnProperty("playbookInput")) { + var error = $root.google.cloud.dialogflow.cx.v3.PlaybookInput.verify(message.playbookInput); + if (error) + return "playbookInput." + error; + } + if (message.playbookOutput != null && message.hasOwnProperty("playbookOutput")) { + var error = $root.google.cloud.dialogflow.cx.v3.PlaybookOutput.verify(message.playbookOutput); + if (error) + return "playbookOutput." + error; + } + if (message.actions != null && message.hasOwnProperty("actions")) { + if (!Array.isArray(message.actions)) + return "actions: array expected"; + for (var i = 0; i < message.actions.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.Action.verify(message.actions[i]); + if (error) + return "actions." + error; + } + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.tokenCount != null && message.hasOwnProperty("tokenCount")) + if (!$util.isInteger(message.tokenCount) && !(message.tokenCount && $util.isInteger(message.tokenCount.low) && $util.isInteger(message.tokenCount.high))) + return "tokenCount: integer|Long expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.conversationState != null && message.hasOwnProperty("conversationState")) + switch (message.conversationState) { + default: + return "conversationState: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; + return null; + }; + + /** + * Creates an Example message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.Example + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.Example} Example + */ + Example.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.Example) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.Example(); + if (object.name != null) + message.name = String(object.name); + if (object.playbookInput != null) { + if (typeof object.playbookInput !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Example.playbookInput: object expected"); + message.playbookInput = $root.google.cloud.dialogflow.cx.v3.PlaybookInput.fromObject(object.playbookInput); + } + if (object.playbookOutput != null) { + if (typeof object.playbookOutput !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Example.playbookOutput: object expected"); + message.playbookOutput = $root.google.cloud.dialogflow.cx.v3.PlaybookOutput.fromObject(object.playbookOutput); + } + if (object.actions) { + if (!Array.isArray(object.actions)) + throw TypeError(".google.cloud.dialogflow.cx.v3.Example.actions: array expected"); + message.actions = []; + for (var i = 0; i < object.actions.length; ++i) { + if (typeof object.actions[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Example.actions: object expected"); + message.actions[i] = $root.google.cloud.dialogflow.cx.v3.Action.fromObject(object.actions[i]); + } + } + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.description != null) + message.description = String(object.description); + if (object.tokenCount != null) + if ($util.Long) + (message.tokenCount = $util.Long.fromValue(object.tokenCount)).unsigned = false; + else if (typeof object.tokenCount === "string") + message.tokenCount = parseInt(object.tokenCount, 10); + else if (typeof object.tokenCount === "number") + message.tokenCount = object.tokenCount; + else if (typeof object.tokenCount === "object") + message.tokenCount = new $util.LongBits(object.tokenCount.low >>> 0, object.tokenCount.high >>> 0).toNumber(); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Example.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Example.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + switch (object.conversationState) { + default: + if (typeof object.conversationState === "number") { + message.conversationState = object.conversationState; + break; + } + break; + case "OUTPUT_STATE_UNSPECIFIED": + case 0: + message.conversationState = 0; + break; + case "OUTPUT_STATE_OK": + case 1: + message.conversationState = 1; + break; + case "OUTPUT_STATE_CANCELLED": + case 2: + message.conversationState = 2; + break; + case "OUTPUT_STATE_FAILED": + case 3: + message.conversationState = 3; + break; + case "OUTPUT_STATE_ESCALATED": + case 4: + message.conversationState = 4; + break; + case "OUTPUT_STATE_PENDING": + case 5: + message.conversationState = 5; + break; + } + if (object.languageCode != null) + message.languageCode = String(object.languageCode); + return message; + }; + + /** + * Creates a plain object from an Example message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.Example + * @static + * @param {google.cloud.dialogflow.cx.v3.Example} message Example + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Example.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.actions = []; + if (options.defaults) { + object.name = ""; + object.playbookInput = null; + object.playbookOutput = null; + object.displayName = ""; + object.description = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.tokenCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.tokenCount = options.longs === String ? "0" : 0; + object.createTime = null; + object.updateTime = null; + object.conversationState = options.enums === String ? "OUTPUT_STATE_UNSPECIFIED" : 0; + object.languageCode = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.actions && message.actions.length) { + object.actions = []; + for (var j = 0; j < message.actions.length; ++j) + object.actions[j] = $root.google.cloud.dialogflow.cx.v3.Action.toObject(message.actions[j], options); + } + if (message.playbookInput != null && message.hasOwnProperty("playbookInput")) + object.playbookInput = $root.google.cloud.dialogflow.cx.v3.PlaybookInput.toObject(message.playbookInput, options); + if (message.playbookOutput != null && message.hasOwnProperty("playbookOutput")) + object.playbookOutput = $root.google.cloud.dialogflow.cx.v3.PlaybookOutput.toObject(message.playbookOutput, options); + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.tokenCount != null && message.hasOwnProperty("tokenCount")) + if (typeof message.tokenCount === "number") + object.tokenCount = options.longs === String ? String(message.tokenCount) : message.tokenCount; + else + object.tokenCount = options.longs === String ? $util.Long.prototype.toString.call(message.tokenCount) : options.longs === Number ? new $util.LongBits(message.tokenCount.low >>> 0, message.tokenCount.high >>> 0).toNumber() : message.tokenCount; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.conversationState != null && message.hasOwnProperty("conversationState")) + object.conversationState = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.OutputState[message.conversationState] === undefined ? message.conversationState : $root.google.cloud.dialogflow.cx.v3.OutputState[message.conversationState] : message.conversationState; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; + return object; + }; + + /** + * Converts this Example to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.Example + * @instance + * @returns {Object.} JSON object + */ + Example.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Example + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.Example + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Example.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Example"; + }; + + return Example; + })(); + + v3.PlaybookInput = (function() { + + /** + * Properties of a PlaybookInput. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IPlaybookInput + * @property {string|null} [precedingConversationSummary] PlaybookInput precedingConversationSummary + */ + + /** + * Constructs a new PlaybookInput. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a PlaybookInput. + * @implements IPlaybookInput + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IPlaybookInput=} [properties] Properties to set + */ + function PlaybookInput(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]]; + } + + /** + * PlaybookInput precedingConversationSummary. + * @member {string} precedingConversationSummary + * @memberof google.cloud.dialogflow.cx.v3.PlaybookInput + * @instance + */ + PlaybookInput.prototype.precedingConversationSummary = ""; + + /** + * Creates a new PlaybookInput instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.PlaybookInput + * @static + * @param {google.cloud.dialogflow.cx.v3.IPlaybookInput=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.PlaybookInput} PlaybookInput instance + */ + PlaybookInput.create = function create(properties) { + return new PlaybookInput(properties); + }; + + /** + * Encodes the specified PlaybookInput message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.PlaybookInput.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.PlaybookInput + * @static + * @param {google.cloud.dialogflow.cx.v3.IPlaybookInput} message PlaybookInput message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PlaybookInput.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.precedingConversationSummary != null && Object.hasOwnProperty.call(message, "precedingConversationSummary")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.precedingConversationSummary); + return writer; + }; + + /** + * Encodes the specified PlaybookInput message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.PlaybookInput.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.PlaybookInput + * @static + * @param {google.cloud.dialogflow.cx.v3.IPlaybookInput} message PlaybookInput message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PlaybookInput.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PlaybookInput message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.PlaybookInput + * @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.PlaybookInput} PlaybookInput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PlaybookInput.decode = function decode(reader, length, error) { + 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.PlaybookInput(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.precedingConversationSummary = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PlaybookInput message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.PlaybookInput + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.PlaybookInput} PlaybookInput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PlaybookInput.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PlaybookInput message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.PlaybookInput + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PlaybookInput.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.precedingConversationSummary != null && message.hasOwnProperty("precedingConversationSummary")) + if (!$util.isString(message.precedingConversationSummary)) + return "precedingConversationSummary: string expected"; + return null; + }; + + /** + * Creates a PlaybookInput message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.PlaybookInput + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.PlaybookInput} PlaybookInput + */ + PlaybookInput.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.PlaybookInput) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.PlaybookInput(); + if (object.precedingConversationSummary != null) + message.precedingConversationSummary = String(object.precedingConversationSummary); + return message; + }; + + /** + * Creates a plain object from a PlaybookInput message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.PlaybookInput + * @static + * @param {google.cloud.dialogflow.cx.v3.PlaybookInput} message PlaybookInput + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PlaybookInput.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.precedingConversationSummary = ""; + if (message.precedingConversationSummary != null && message.hasOwnProperty("precedingConversationSummary")) + object.precedingConversationSummary = message.precedingConversationSummary; + return object; + }; + + /** + * Converts this PlaybookInput to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.PlaybookInput + * @instance + * @returns {Object.} JSON object + */ + PlaybookInput.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PlaybookInput + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.PlaybookInput + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PlaybookInput.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.PlaybookInput"; + }; + + return PlaybookInput; + })(); + + v3.PlaybookOutput = (function() { + + /** + * Properties of a PlaybookOutput. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IPlaybookOutput + * @property {string|null} [executionSummary] PlaybookOutput executionSummary + */ + + /** + * Constructs a new PlaybookOutput. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a PlaybookOutput. + * @implements IPlaybookOutput + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IPlaybookOutput=} [properties] Properties to set + */ + function PlaybookOutput(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]]; + } + + /** + * PlaybookOutput executionSummary. + * @member {string} executionSummary + * @memberof google.cloud.dialogflow.cx.v3.PlaybookOutput + * @instance + */ + PlaybookOutput.prototype.executionSummary = ""; + + /** + * Creates a new PlaybookOutput instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.PlaybookOutput + * @static + * @param {google.cloud.dialogflow.cx.v3.IPlaybookOutput=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.PlaybookOutput} PlaybookOutput instance + */ + PlaybookOutput.create = function create(properties) { + return new PlaybookOutput(properties); + }; + + /** + * Encodes the specified PlaybookOutput message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.PlaybookOutput.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.PlaybookOutput + * @static + * @param {google.cloud.dialogflow.cx.v3.IPlaybookOutput} message PlaybookOutput message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PlaybookOutput.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.executionSummary != null && Object.hasOwnProperty.call(message, "executionSummary")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.executionSummary); + return writer; + }; + + /** + * Encodes the specified PlaybookOutput message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.PlaybookOutput.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.PlaybookOutput + * @static + * @param {google.cloud.dialogflow.cx.v3.IPlaybookOutput} message PlaybookOutput message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PlaybookOutput.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PlaybookOutput message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.PlaybookOutput + * @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.PlaybookOutput} PlaybookOutput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PlaybookOutput.decode = function decode(reader, length, error) { + 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.PlaybookOutput(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.executionSummary = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PlaybookOutput message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.PlaybookOutput + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.PlaybookOutput} PlaybookOutput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PlaybookOutput.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PlaybookOutput message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.PlaybookOutput + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PlaybookOutput.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.executionSummary != null && message.hasOwnProperty("executionSummary")) + if (!$util.isString(message.executionSummary)) + return "executionSummary: string expected"; + return null; + }; + + /** + * Creates a PlaybookOutput message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.PlaybookOutput + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.PlaybookOutput} PlaybookOutput + */ + PlaybookOutput.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.PlaybookOutput) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.PlaybookOutput(); + if (object.executionSummary != null) + message.executionSummary = String(object.executionSummary); + return message; + }; + + /** + * Creates a plain object from a PlaybookOutput message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.PlaybookOutput + * @static + * @param {google.cloud.dialogflow.cx.v3.PlaybookOutput} message PlaybookOutput + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PlaybookOutput.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.executionSummary = ""; + if (message.executionSummary != null && message.hasOwnProperty("executionSummary")) + object.executionSummary = message.executionSummary; + return object; + }; + + /** + * Converts this PlaybookOutput to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.PlaybookOutput + * @instance + * @returns {Object.} JSON object + */ + PlaybookOutput.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PlaybookOutput + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.PlaybookOutput + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PlaybookOutput.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.PlaybookOutput"; + }; + + return PlaybookOutput; + })(); + + v3.Action = (function() { + + /** + * Properties of an Action. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IAction + * @property {google.cloud.dialogflow.cx.v3.IUserUtterance|null} [userUtterance] Action userUtterance + * @property {google.cloud.dialogflow.cx.v3.IAgentUtterance|null} [agentUtterance] Action agentUtterance + * @property {google.cloud.dialogflow.cx.v3.IToolUse|null} [toolUse] Action toolUse + * @property {google.cloud.dialogflow.cx.v3.IPlaybookInvocation|null} [playbookInvocation] Action playbookInvocation + * @property {google.cloud.dialogflow.cx.v3.IFlowInvocation|null} [flowInvocation] Action flowInvocation + * @property {google.cloud.dialogflow.cx.v3.IPlaybookTransition|null} [playbookTransition] Action playbookTransition + * @property {google.cloud.dialogflow.cx.v3.IFlowTransition|null} [flowTransition] Action flowTransition + */ + + /** + * Constructs a new Action. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents an Action. + * @implements IAction + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IAction=} [properties] Properties to set + */ + function Action(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]]; + } + + /** + * Action userUtterance. + * @member {google.cloud.dialogflow.cx.v3.IUserUtterance|null|undefined} userUtterance + * @memberof google.cloud.dialogflow.cx.v3.Action + * @instance + */ + Action.prototype.userUtterance = null; + + /** + * Action agentUtterance. + * @member {google.cloud.dialogflow.cx.v3.IAgentUtterance|null|undefined} agentUtterance + * @memberof google.cloud.dialogflow.cx.v3.Action + * @instance + */ + Action.prototype.agentUtterance = null; + + /** + * Action toolUse. + * @member {google.cloud.dialogflow.cx.v3.IToolUse|null|undefined} toolUse + * @memberof google.cloud.dialogflow.cx.v3.Action + * @instance + */ + Action.prototype.toolUse = null; + + /** + * Action playbookInvocation. + * @member {google.cloud.dialogflow.cx.v3.IPlaybookInvocation|null|undefined} playbookInvocation + * @memberof google.cloud.dialogflow.cx.v3.Action + * @instance + */ + Action.prototype.playbookInvocation = null; + + /** + * Action flowInvocation. + * @member {google.cloud.dialogflow.cx.v3.IFlowInvocation|null|undefined} flowInvocation + * @memberof google.cloud.dialogflow.cx.v3.Action + * @instance + */ + Action.prototype.flowInvocation = null; + + /** + * Action playbookTransition. + * @member {google.cloud.dialogflow.cx.v3.IPlaybookTransition|null|undefined} playbookTransition + * @memberof google.cloud.dialogflow.cx.v3.Action + * @instance + */ + Action.prototype.playbookTransition = null; + + /** + * Action flowTransition. + * @member {google.cloud.dialogflow.cx.v3.IFlowTransition|null|undefined} flowTransition + * @memberof google.cloud.dialogflow.cx.v3.Action + * @instance + */ + Action.prototype.flowTransition = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Action action. + * @member {"userUtterance"|"agentUtterance"|"toolUse"|"playbookInvocation"|"flowInvocation"|"playbookTransition"|"flowTransition"|undefined} action + * @memberof google.cloud.dialogflow.cx.v3.Action + * @instance + */ + Object.defineProperty(Action.prototype, "action", { + get: $util.oneOfGetter($oneOfFields = ["userUtterance", "agentUtterance", "toolUse", "playbookInvocation", "flowInvocation", "playbookTransition", "flowTransition"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Action instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.Action + * @static + * @param {google.cloud.dialogflow.cx.v3.IAction=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.Action} Action instance + */ + Action.create = function create(properties) { + return new Action(properties); + }; + + /** + * Encodes the specified Action message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Action.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.Action + * @static + * @param {google.cloud.dialogflow.cx.v3.IAction} message Action message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Action.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.userUtterance != null && Object.hasOwnProperty.call(message, "userUtterance")) + $root.google.cloud.dialogflow.cx.v3.UserUtterance.encode(message.userUtterance, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.agentUtterance != null && Object.hasOwnProperty.call(message, "agentUtterance")) + $root.google.cloud.dialogflow.cx.v3.AgentUtterance.encode(message.agentUtterance, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.toolUse != null && Object.hasOwnProperty.call(message, "toolUse")) + $root.google.cloud.dialogflow.cx.v3.ToolUse.encode(message.toolUse, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.playbookInvocation != null && Object.hasOwnProperty.call(message, "playbookInvocation")) + $root.google.cloud.dialogflow.cx.v3.PlaybookInvocation.encode(message.playbookInvocation, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.flowInvocation != null && Object.hasOwnProperty.call(message, "flowInvocation")) + $root.google.cloud.dialogflow.cx.v3.FlowInvocation.encode(message.flowInvocation, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.playbookTransition != null && Object.hasOwnProperty.call(message, "playbookTransition")) + $root.google.cloud.dialogflow.cx.v3.PlaybookTransition.encode(message.playbookTransition, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.flowTransition != null && Object.hasOwnProperty.call(message, "flowTransition")) + $root.google.cloud.dialogflow.cx.v3.FlowTransition.encode(message.flowTransition, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Action message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Action.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Action + * @static + * @param {google.cloud.dialogflow.cx.v3.IAction} message Action message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Action.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Action message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.Action + * @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.Action} Action + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Action.decode = function decode(reader, length, error) { + 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.Action(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.userUtterance = $root.google.cloud.dialogflow.cx.v3.UserUtterance.decode(reader, reader.uint32()); + break; + } + case 2: { + message.agentUtterance = $root.google.cloud.dialogflow.cx.v3.AgentUtterance.decode(reader, reader.uint32()); + break; + } + case 3: { + message.toolUse = $root.google.cloud.dialogflow.cx.v3.ToolUse.decode(reader, reader.uint32()); + break; + } + case 4: { + message.playbookInvocation = $root.google.cloud.dialogflow.cx.v3.PlaybookInvocation.decode(reader, reader.uint32()); + break; + } + case 5: { + message.flowInvocation = $root.google.cloud.dialogflow.cx.v3.FlowInvocation.decode(reader, reader.uint32()); + break; + } + case 12: { + message.playbookTransition = $root.google.cloud.dialogflow.cx.v3.PlaybookTransition.decode(reader, reader.uint32()); + break; + } + case 13: { + message.flowTransition = $root.google.cloud.dialogflow.cx.v3.FlowTransition.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Action message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Action + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.Action} Action + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Action.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Action message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.Action + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Action.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.userUtterance != null && message.hasOwnProperty("userUtterance")) { + properties.action = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3.UserUtterance.verify(message.userUtterance); + if (error) + return "userUtterance." + error; + } + } + if (message.agentUtterance != null && message.hasOwnProperty("agentUtterance")) { + if (properties.action === 1) + return "action: multiple values"; + properties.action = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3.AgentUtterance.verify(message.agentUtterance); + if (error) + return "agentUtterance." + error; + } + } + if (message.toolUse != null && message.hasOwnProperty("toolUse")) { + if (properties.action === 1) + return "action: multiple values"; + properties.action = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3.ToolUse.verify(message.toolUse); + if (error) + return "toolUse." + error; + } + } + if (message.playbookInvocation != null && message.hasOwnProperty("playbookInvocation")) { + if (properties.action === 1) + return "action: multiple values"; + properties.action = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3.PlaybookInvocation.verify(message.playbookInvocation); + if (error) + return "playbookInvocation." + error; + } + } + if (message.flowInvocation != null && message.hasOwnProperty("flowInvocation")) { + if (properties.action === 1) + return "action: multiple values"; + properties.action = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3.FlowInvocation.verify(message.flowInvocation); + if (error) + return "flowInvocation." + error; + } + } + if (message.playbookTransition != null && message.hasOwnProperty("playbookTransition")) { + if (properties.action === 1) + return "action: multiple values"; + properties.action = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3.PlaybookTransition.verify(message.playbookTransition); + if (error) + return "playbookTransition." + error; + } + } + if (message.flowTransition != null && message.hasOwnProperty("flowTransition")) { + if (properties.action === 1) + return "action: multiple values"; + properties.action = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3.FlowTransition.verify(message.flowTransition); + if (error) + return "flowTransition." + error; + } + } + return null; + }; + + /** + * Creates an Action message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.Action + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.Action} Action + */ + Action.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.Action) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.Action(); + if (object.userUtterance != null) { + if (typeof object.userUtterance !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Action.userUtterance: object expected"); + message.userUtterance = $root.google.cloud.dialogflow.cx.v3.UserUtterance.fromObject(object.userUtterance); + } + if (object.agentUtterance != null) { + if (typeof object.agentUtterance !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Action.agentUtterance: object expected"); + message.agentUtterance = $root.google.cloud.dialogflow.cx.v3.AgentUtterance.fromObject(object.agentUtterance); + } + if (object.toolUse != null) { + if (typeof object.toolUse !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Action.toolUse: object expected"); + message.toolUse = $root.google.cloud.dialogflow.cx.v3.ToolUse.fromObject(object.toolUse); + } + if (object.playbookInvocation != null) { + if (typeof object.playbookInvocation !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Action.playbookInvocation: object expected"); + message.playbookInvocation = $root.google.cloud.dialogflow.cx.v3.PlaybookInvocation.fromObject(object.playbookInvocation); + } + if (object.flowInvocation != null) { + if (typeof object.flowInvocation !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Action.flowInvocation: object expected"); + message.flowInvocation = $root.google.cloud.dialogflow.cx.v3.FlowInvocation.fromObject(object.flowInvocation); + } + if (object.playbookTransition != null) { + if (typeof object.playbookTransition !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Action.playbookTransition: object expected"); + message.playbookTransition = $root.google.cloud.dialogflow.cx.v3.PlaybookTransition.fromObject(object.playbookTransition); + } + if (object.flowTransition != null) { + if (typeof object.flowTransition !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Action.flowTransition: object expected"); + message.flowTransition = $root.google.cloud.dialogflow.cx.v3.FlowTransition.fromObject(object.flowTransition); + } + return message; + }; + + /** + * Creates a plain object from an Action message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.Action + * @static + * @param {google.cloud.dialogflow.cx.v3.Action} message Action + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Action.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.userUtterance != null && message.hasOwnProperty("userUtterance")) { + object.userUtterance = $root.google.cloud.dialogflow.cx.v3.UserUtterance.toObject(message.userUtterance, options); + if (options.oneofs) + object.action = "userUtterance"; + } + if (message.agentUtterance != null && message.hasOwnProperty("agentUtterance")) { + object.agentUtterance = $root.google.cloud.dialogflow.cx.v3.AgentUtterance.toObject(message.agentUtterance, options); + if (options.oneofs) + object.action = "agentUtterance"; + } + if (message.toolUse != null && message.hasOwnProperty("toolUse")) { + object.toolUse = $root.google.cloud.dialogflow.cx.v3.ToolUse.toObject(message.toolUse, options); + if (options.oneofs) + object.action = "toolUse"; + } + if (message.playbookInvocation != null && message.hasOwnProperty("playbookInvocation")) { + object.playbookInvocation = $root.google.cloud.dialogflow.cx.v3.PlaybookInvocation.toObject(message.playbookInvocation, options); + if (options.oneofs) + object.action = "playbookInvocation"; + } + if (message.flowInvocation != null && message.hasOwnProperty("flowInvocation")) { + object.flowInvocation = $root.google.cloud.dialogflow.cx.v3.FlowInvocation.toObject(message.flowInvocation, options); + if (options.oneofs) + object.action = "flowInvocation"; + } + if (message.playbookTransition != null && message.hasOwnProperty("playbookTransition")) { + object.playbookTransition = $root.google.cloud.dialogflow.cx.v3.PlaybookTransition.toObject(message.playbookTransition, options); + if (options.oneofs) + object.action = "playbookTransition"; + } + if (message.flowTransition != null && message.hasOwnProperty("flowTransition")) { + object.flowTransition = $root.google.cloud.dialogflow.cx.v3.FlowTransition.toObject(message.flowTransition, options); + if (options.oneofs) + object.action = "flowTransition"; + } + return object; + }; + + /** + * Converts this Action to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.Action + * @instance + * @returns {Object.} JSON object + */ + Action.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Action + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.Action + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Action.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Action"; + }; + + return Action; + })(); + + v3.UserUtterance = (function() { + + /** + * Properties of a UserUtterance. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IUserUtterance + * @property {string|null} [text] UserUtterance text + */ + + /** + * Constructs a new UserUtterance. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a UserUtterance. + * @implements IUserUtterance + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IUserUtterance=} [properties] Properties to set + */ + function UserUtterance(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]]; + } + + /** + * UserUtterance text. + * @member {string} text + * @memberof google.cloud.dialogflow.cx.v3.UserUtterance + * @instance + */ + UserUtterance.prototype.text = ""; + + /** + * Creates a new UserUtterance instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.UserUtterance + * @static + * @param {google.cloud.dialogflow.cx.v3.IUserUtterance=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.UserUtterance} UserUtterance instance + */ + UserUtterance.create = function create(properties) { + return new UserUtterance(properties); + }; + + /** + * Encodes the specified UserUtterance message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UserUtterance.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.UserUtterance + * @static + * @param {google.cloud.dialogflow.cx.v3.IUserUtterance} message UserUtterance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserUtterance.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.text != null && Object.hasOwnProperty.call(message, "text")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.text); + return writer; + }; + + /** + * Encodes the specified UserUtterance message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UserUtterance.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.UserUtterance + * @static + * @param {google.cloud.dialogflow.cx.v3.IUserUtterance} message UserUtterance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserUtterance.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UserUtterance message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.UserUtterance + * @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.UserUtterance} UserUtterance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserUtterance.decode = function decode(reader, length, error) { + 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.UserUtterance(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.text = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UserUtterance message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.UserUtterance + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.UserUtterance} UserUtterance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserUtterance.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UserUtterance message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.UserUtterance + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UserUtterance.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.text != null && message.hasOwnProperty("text")) + if (!$util.isString(message.text)) + return "text: string expected"; + return null; + }; + + /** + * Creates a UserUtterance message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.UserUtterance + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.UserUtterance} UserUtterance + */ + UserUtterance.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.UserUtterance) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.UserUtterance(); + if (object.text != null) + message.text = String(object.text); + return message; + }; + + /** + * Creates a plain object from a UserUtterance message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.UserUtterance + * @static + * @param {google.cloud.dialogflow.cx.v3.UserUtterance} message UserUtterance + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UserUtterance.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.text = ""; + if (message.text != null && message.hasOwnProperty("text")) + object.text = message.text; + return object; + }; + + /** + * Converts this UserUtterance to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.UserUtterance + * @instance + * @returns {Object.} JSON object + */ + UserUtterance.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UserUtterance + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.UserUtterance + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UserUtterance.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.UserUtterance"; + }; + + return UserUtterance; + })(); + + v3.AgentUtterance = (function() { + + /** + * Properties of an AgentUtterance. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IAgentUtterance + * @property {string|null} [text] AgentUtterance text + */ + + /** + * Constructs a new AgentUtterance. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents an AgentUtterance. + * @implements IAgentUtterance + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IAgentUtterance=} [properties] Properties to set + */ + function AgentUtterance(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]]; + } + + /** + * AgentUtterance text. + * @member {string} text + * @memberof google.cloud.dialogflow.cx.v3.AgentUtterance + * @instance + */ + AgentUtterance.prototype.text = ""; + + /** + * Creates a new AgentUtterance instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.AgentUtterance + * @static + * @param {google.cloud.dialogflow.cx.v3.IAgentUtterance=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.AgentUtterance} AgentUtterance instance + */ + AgentUtterance.create = function create(properties) { + return new AgentUtterance(properties); + }; + + /** + * Encodes the specified AgentUtterance message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.AgentUtterance.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.AgentUtterance + * @static + * @param {google.cloud.dialogflow.cx.v3.IAgentUtterance} message AgentUtterance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AgentUtterance.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.text != null && Object.hasOwnProperty.call(message, "text")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.text); + return writer; + }; + + /** + * Encodes the specified AgentUtterance message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.AgentUtterance.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.AgentUtterance + * @static + * @param {google.cloud.dialogflow.cx.v3.IAgentUtterance} message AgentUtterance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AgentUtterance.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AgentUtterance message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.AgentUtterance + * @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.AgentUtterance} AgentUtterance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AgentUtterance.decode = function decode(reader, length, error) { + 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.AgentUtterance(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.text = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AgentUtterance message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.AgentUtterance + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.AgentUtterance} AgentUtterance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AgentUtterance.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AgentUtterance message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.AgentUtterance + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AgentUtterance.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.text != null && message.hasOwnProperty("text")) + if (!$util.isString(message.text)) + return "text: string expected"; + return null; + }; + + /** + * Creates an AgentUtterance message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.AgentUtterance + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.AgentUtterance} AgentUtterance + */ + AgentUtterance.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.AgentUtterance) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.AgentUtterance(); + if (object.text != null) + message.text = String(object.text); + return message; + }; + + /** + * Creates a plain object from an AgentUtterance message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.AgentUtterance + * @static + * @param {google.cloud.dialogflow.cx.v3.AgentUtterance} message AgentUtterance + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AgentUtterance.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.text = ""; + if (message.text != null && message.hasOwnProperty("text")) + object.text = message.text; + return object; + }; + + /** + * Converts this AgentUtterance to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.AgentUtterance + * @instance + * @returns {Object.} JSON object + */ + AgentUtterance.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AgentUtterance + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.AgentUtterance + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AgentUtterance.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.AgentUtterance"; + }; + + return AgentUtterance; + })(); + + v3.ToolUse = (function() { + + /** + * Properties of a ToolUse. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IToolUse + * @property {string|null} [tool] ToolUse tool + * @property {string|null} [displayName] ToolUse displayName + * @property {string|null} [action] ToolUse action + * @property {google.protobuf.IStruct|null} [inputActionParameters] ToolUse inputActionParameters + * @property {google.protobuf.IStruct|null} [outputActionParameters] ToolUse outputActionParameters + */ + + /** + * Constructs a new ToolUse. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a ToolUse. + * @implements IToolUse + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IToolUse=} [properties] Properties to set + */ + function ToolUse(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]]; + } + + /** + * ToolUse tool. + * @member {string} tool + * @memberof google.cloud.dialogflow.cx.v3.ToolUse + * @instance + */ + ToolUse.prototype.tool = ""; + + /** + * ToolUse displayName. + * @member {string} displayName + * @memberof google.cloud.dialogflow.cx.v3.ToolUse + * @instance + */ + ToolUse.prototype.displayName = ""; + + /** + * ToolUse action. + * @member {string} action + * @memberof google.cloud.dialogflow.cx.v3.ToolUse + * @instance + */ + ToolUse.prototype.action = ""; + + /** + * ToolUse inputActionParameters. + * @member {google.protobuf.IStruct|null|undefined} inputActionParameters + * @memberof google.cloud.dialogflow.cx.v3.ToolUse + * @instance + */ + ToolUse.prototype.inputActionParameters = null; + + /** + * ToolUse outputActionParameters. + * @member {google.protobuf.IStruct|null|undefined} outputActionParameters + * @memberof google.cloud.dialogflow.cx.v3.ToolUse + * @instance + */ + ToolUse.prototype.outputActionParameters = null; + + /** + * Creates a new ToolUse instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.ToolUse + * @static + * @param {google.cloud.dialogflow.cx.v3.IToolUse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ToolUse} ToolUse instance + */ + ToolUse.create = function create(properties) { + return new ToolUse(properties); + }; + + /** + * Encodes the specified ToolUse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ToolUse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.ToolUse + * @static + * @param {google.cloud.dialogflow.cx.v3.IToolUse} message ToolUse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ToolUse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tool != null && Object.hasOwnProperty.call(message, "tool")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.tool); + if (message.action != null && Object.hasOwnProperty.call(message, "action")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.action); + if (message.inputActionParameters != null && Object.hasOwnProperty.call(message, "inputActionParameters")) + $root.google.protobuf.Struct.encode(message.inputActionParameters, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.outputActionParameters != null && Object.hasOwnProperty.call(message, "outputActionParameters")) + $root.google.protobuf.Struct.encode(message.outputActionParameters, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.displayName); + return writer; + }; + + /** + * Encodes the specified ToolUse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ToolUse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.ToolUse + * @static + * @param {google.cloud.dialogflow.cx.v3.IToolUse} message ToolUse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ToolUse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ToolUse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.ToolUse + * @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.ToolUse} ToolUse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ToolUse.decode = function decode(reader, length, error) { + 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.ToolUse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.tool = reader.string(); + break; + } + case 8: { + message.displayName = reader.string(); + break; + } + case 2: { + message.action = reader.string(); + break; + } + case 5: { + message.inputActionParameters = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + } + case 6: { + message.outputActionParameters = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ToolUse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.ToolUse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.ToolUse} ToolUse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ToolUse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ToolUse message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.ToolUse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ToolUse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tool != null && message.hasOwnProperty("tool")) + if (!$util.isString(message.tool)) + return "tool: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.action != null && message.hasOwnProperty("action")) + if (!$util.isString(message.action)) + return "action: string expected"; + if (message.inputActionParameters != null && message.hasOwnProperty("inputActionParameters")) { + var error = $root.google.protobuf.Struct.verify(message.inputActionParameters); + if (error) + return "inputActionParameters." + error; + } + if (message.outputActionParameters != null && message.hasOwnProperty("outputActionParameters")) { + var error = $root.google.protobuf.Struct.verify(message.outputActionParameters); + if (error) + return "outputActionParameters." + error; + } + return null; + }; + + /** + * Creates a ToolUse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.ToolUse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.ToolUse} ToolUse + */ + ToolUse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ToolUse) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.ToolUse(); + if (object.tool != null) + message.tool = String(object.tool); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.action != null) + message.action = String(object.action); + if (object.inputActionParameters != null) { + if (typeof object.inputActionParameters !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.ToolUse.inputActionParameters: object expected"); + message.inputActionParameters = $root.google.protobuf.Struct.fromObject(object.inputActionParameters); + } + if (object.outputActionParameters != null) { + if (typeof object.outputActionParameters !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.ToolUse.outputActionParameters: object expected"); + message.outputActionParameters = $root.google.protobuf.Struct.fromObject(object.outputActionParameters); + } + return message; + }; + + /** + * Creates a plain object from a ToolUse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.ToolUse + * @static + * @param {google.cloud.dialogflow.cx.v3.ToolUse} message ToolUse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ToolUse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.tool = ""; + object.action = ""; + object.inputActionParameters = null; + object.outputActionParameters = null; + object.displayName = ""; + } + if (message.tool != null && message.hasOwnProperty("tool")) + object.tool = message.tool; + if (message.action != null && message.hasOwnProperty("action")) + object.action = message.action; + if (message.inputActionParameters != null && message.hasOwnProperty("inputActionParameters")) + object.inputActionParameters = $root.google.protobuf.Struct.toObject(message.inputActionParameters, options); + if (message.outputActionParameters != null && message.hasOwnProperty("outputActionParameters")) + object.outputActionParameters = $root.google.protobuf.Struct.toObject(message.outputActionParameters, options); + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + return object; + }; + + /** + * Converts this ToolUse to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.ToolUse + * @instance + * @returns {Object.} JSON object + */ + ToolUse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ToolUse + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.ToolUse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ToolUse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ToolUse"; + }; + + return ToolUse; + })(); + + v3.PlaybookInvocation = (function() { + + /** + * Properties of a PlaybookInvocation. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IPlaybookInvocation + * @property {string|null} [playbook] PlaybookInvocation playbook + * @property {string|null} [displayName] PlaybookInvocation displayName + * @property {google.cloud.dialogflow.cx.v3.IPlaybookInput|null} [playbookInput] PlaybookInvocation playbookInput + * @property {google.cloud.dialogflow.cx.v3.IPlaybookOutput|null} [playbookOutput] PlaybookInvocation playbookOutput + * @property {google.cloud.dialogflow.cx.v3.OutputState|null} [playbookState] PlaybookInvocation playbookState + */ + + /** + * Constructs a new PlaybookInvocation. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a PlaybookInvocation. + * @implements IPlaybookInvocation + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IPlaybookInvocation=} [properties] Properties to set + */ + function PlaybookInvocation(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]]; + } + + /** + * PlaybookInvocation playbook. + * @member {string} playbook + * @memberof google.cloud.dialogflow.cx.v3.PlaybookInvocation + * @instance + */ + PlaybookInvocation.prototype.playbook = ""; + + /** + * PlaybookInvocation displayName. + * @member {string} displayName + * @memberof google.cloud.dialogflow.cx.v3.PlaybookInvocation + * @instance + */ + PlaybookInvocation.prototype.displayName = ""; + + /** + * PlaybookInvocation playbookInput. + * @member {google.cloud.dialogflow.cx.v3.IPlaybookInput|null|undefined} playbookInput + * @memberof google.cloud.dialogflow.cx.v3.PlaybookInvocation + * @instance + */ + PlaybookInvocation.prototype.playbookInput = null; + + /** + * PlaybookInvocation playbookOutput. + * @member {google.cloud.dialogflow.cx.v3.IPlaybookOutput|null|undefined} playbookOutput + * @memberof google.cloud.dialogflow.cx.v3.PlaybookInvocation + * @instance + */ + PlaybookInvocation.prototype.playbookOutput = null; + + /** + * PlaybookInvocation playbookState. + * @member {google.cloud.dialogflow.cx.v3.OutputState} playbookState + * @memberof google.cloud.dialogflow.cx.v3.PlaybookInvocation + * @instance + */ + PlaybookInvocation.prototype.playbookState = 0; + + /** + * Creates a new PlaybookInvocation instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.PlaybookInvocation + * @static + * @param {google.cloud.dialogflow.cx.v3.IPlaybookInvocation=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.PlaybookInvocation} PlaybookInvocation instance + */ + PlaybookInvocation.create = function create(properties) { + return new PlaybookInvocation(properties); + }; + + /** + * Encodes the specified PlaybookInvocation message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.PlaybookInvocation.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.PlaybookInvocation + * @static + * @param {google.cloud.dialogflow.cx.v3.IPlaybookInvocation} message PlaybookInvocation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PlaybookInvocation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.playbook != null && Object.hasOwnProperty.call(message, "playbook")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.playbook); + if (message.playbookInput != null && Object.hasOwnProperty.call(message, "playbookInput")) + $root.google.cloud.dialogflow.cx.v3.PlaybookInput.encode(message.playbookInput, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.playbookOutput != null && Object.hasOwnProperty.call(message, "playbookOutput")) + $root.google.cloud.dialogflow.cx.v3.PlaybookOutput.encode(message.playbookOutput, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.playbookState != null && Object.hasOwnProperty.call(message, "playbookState")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.playbookState); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.displayName); + return writer; + }; + + /** + * Encodes the specified PlaybookInvocation message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.PlaybookInvocation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.PlaybookInvocation + * @static + * @param {google.cloud.dialogflow.cx.v3.IPlaybookInvocation} message PlaybookInvocation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PlaybookInvocation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PlaybookInvocation message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.PlaybookInvocation + * @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.PlaybookInvocation} PlaybookInvocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PlaybookInvocation.decode = function decode(reader, length, error) { + 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.PlaybookInvocation(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.playbook = reader.string(); + break; + } + case 5: { + message.displayName = reader.string(); + break; + } + case 2: { + message.playbookInput = $root.google.cloud.dialogflow.cx.v3.PlaybookInput.decode(reader, reader.uint32()); + break; + } + case 3: { + message.playbookOutput = $root.google.cloud.dialogflow.cx.v3.PlaybookOutput.decode(reader, reader.uint32()); + break; + } + case 4: { + message.playbookState = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PlaybookInvocation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.PlaybookInvocation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.PlaybookInvocation} PlaybookInvocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PlaybookInvocation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PlaybookInvocation message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.PlaybookInvocation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PlaybookInvocation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.playbook != null && message.hasOwnProperty("playbook")) + if (!$util.isString(message.playbook)) + return "playbook: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.playbookInput != null && message.hasOwnProperty("playbookInput")) { + var error = $root.google.cloud.dialogflow.cx.v3.PlaybookInput.verify(message.playbookInput); + if (error) + return "playbookInput." + error; + } + if (message.playbookOutput != null && message.hasOwnProperty("playbookOutput")) { + var error = $root.google.cloud.dialogflow.cx.v3.PlaybookOutput.verify(message.playbookOutput); + if (error) + return "playbookOutput." + error; + } + if (message.playbookState != null && message.hasOwnProperty("playbookState")) + switch (message.playbookState) { + default: + return "playbookState: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + return null; + }; + + /** + * Creates a PlaybookInvocation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.PlaybookInvocation + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.PlaybookInvocation} PlaybookInvocation + */ + PlaybookInvocation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.PlaybookInvocation) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.PlaybookInvocation(); + if (object.playbook != null) + message.playbook = String(object.playbook); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.playbookInput != null) { + if (typeof object.playbookInput !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.PlaybookInvocation.playbookInput: object expected"); + message.playbookInput = $root.google.cloud.dialogflow.cx.v3.PlaybookInput.fromObject(object.playbookInput); + } + if (object.playbookOutput != null) { + if (typeof object.playbookOutput !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.PlaybookInvocation.playbookOutput: object expected"); + message.playbookOutput = $root.google.cloud.dialogflow.cx.v3.PlaybookOutput.fromObject(object.playbookOutput); + } + switch (object.playbookState) { + default: + if (typeof object.playbookState === "number") { + message.playbookState = object.playbookState; + break; + } + break; + case "OUTPUT_STATE_UNSPECIFIED": + case 0: + message.playbookState = 0; + break; + case "OUTPUT_STATE_OK": + case 1: + message.playbookState = 1; + break; + case "OUTPUT_STATE_CANCELLED": + case 2: + message.playbookState = 2; + break; + case "OUTPUT_STATE_FAILED": + case 3: + message.playbookState = 3; + break; + case "OUTPUT_STATE_ESCALATED": + case 4: + message.playbookState = 4; + break; + case "OUTPUT_STATE_PENDING": + case 5: + message.playbookState = 5; + break; + } + return message; + }; + + /** + * Creates a plain object from a PlaybookInvocation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.PlaybookInvocation + * @static + * @param {google.cloud.dialogflow.cx.v3.PlaybookInvocation} message PlaybookInvocation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PlaybookInvocation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.playbook = ""; + object.playbookInput = null; + object.playbookOutput = null; + object.playbookState = options.enums === String ? "OUTPUT_STATE_UNSPECIFIED" : 0; + object.displayName = ""; + } + if (message.playbook != null && message.hasOwnProperty("playbook")) + object.playbook = message.playbook; + if (message.playbookInput != null && message.hasOwnProperty("playbookInput")) + object.playbookInput = $root.google.cloud.dialogflow.cx.v3.PlaybookInput.toObject(message.playbookInput, options); + if (message.playbookOutput != null && message.hasOwnProperty("playbookOutput")) + object.playbookOutput = $root.google.cloud.dialogflow.cx.v3.PlaybookOutput.toObject(message.playbookOutput, options); + if (message.playbookState != null && message.hasOwnProperty("playbookState")) + object.playbookState = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.OutputState[message.playbookState] === undefined ? message.playbookState : $root.google.cloud.dialogflow.cx.v3.OutputState[message.playbookState] : message.playbookState; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + return object; + }; + + /** + * Converts this PlaybookInvocation to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.PlaybookInvocation + * @instance + * @returns {Object.} JSON object + */ + PlaybookInvocation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PlaybookInvocation + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.PlaybookInvocation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PlaybookInvocation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.PlaybookInvocation"; + }; + + return PlaybookInvocation; + })(); + + v3.FlowInvocation = (function() { + + /** + * Properties of a FlowInvocation. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IFlowInvocation + * @property {string|null} [flow] FlowInvocation flow + * @property {string|null} [displayName] FlowInvocation displayName + * @property {google.cloud.dialogflow.cx.v3.OutputState|null} [flowState] FlowInvocation flowState + */ + + /** + * Constructs a new FlowInvocation. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a FlowInvocation. + * @implements IFlowInvocation + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IFlowInvocation=} [properties] Properties to set + */ + function FlowInvocation(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]]; + } + + /** + * FlowInvocation flow. + * @member {string} flow + * @memberof google.cloud.dialogflow.cx.v3.FlowInvocation + * @instance + */ + FlowInvocation.prototype.flow = ""; + + /** + * FlowInvocation displayName. + * @member {string} displayName + * @memberof google.cloud.dialogflow.cx.v3.FlowInvocation + * @instance + */ + FlowInvocation.prototype.displayName = ""; + + /** + * FlowInvocation flowState. + * @member {google.cloud.dialogflow.cx.v3.OutputState} flowState + * @memberof google.cloud.dialogflow.cx.v3.FlowInvocation + * @instance + */ + FlowInvocation.prototype.flowState = 0; + + /** + * Creates a new FlowInvocation instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.FlowInvocation + * @static + * @param {google.cloud.dialogflow.cx.v3.IFlowInvocation=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.FlowInvocation} FlowInvocation instance + */ + FlowInvocation.create = function create(properties) { + return new FlowInvocation(properties); + }; + + /** + * Encodes the specified FlowInvocation message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.FlowInvocation.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.FlowInvocation + * @static + * @param {google.cloud.dialogflow.cx.v3.IFlowInvocation} message FlowInvocation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FlowInvocation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.flow != null && Object.hasOwnProperty.call(message, "flow")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.flow); + if (message.flowState != null && Object.hasOwnProperty.call(message, "flowState")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.flowState); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.displayName); + return writer; + }; + + /** + * Encodes the specified FlowInvocation message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.FlowInvocation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.FlowInvocation + * @static + * @param {google.cloud.dialogflow.cx.v3.IFlowInvocation} message FlowInvocation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FlowInvocation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FlowInvocation message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.FlowInvocation + * @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.FlowInvocation} FlowInvocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FlowInvocation.decode = function decode(reader, length, error) { + 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.FlowInvocation(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.flow = reader.string(); + break; + } + case 7: { + message.displayName = reader.string(); + break; + } + case 4: { + message.flowState = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FlowInvocation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.FlowInvocation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.FlowInvocation} FlowInvocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FlowInvocation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FlowInvocation message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.FlowInvocation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FlowInvocation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.flow != null && message.hasOwnProperty("flow")) + if (!$util.isString(message.flow)) + return "flow: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.flowState != null && message.hasOwnProperty("flowState")) + switch (message.flowState) { + default: + return "flowState: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + return null; + }; + + /** + * Creates a FlowInvocation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.FlowInvocation + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.FlowInvocation} FlowInvocation + */ + FlowInvocation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.FlowInvocation) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.FlowInvocation(); + if (object.flow != null) + message.flow = String(object.flow); + if (object.displayName != null) + message.displayName = String(object.displayName); + switch (object.flowState) { + default: + if (typeof object.flowState === "number") { + message.flowState = object.flowState; + break; + } + break; + case "OUTPUT_STATE_UNSPECIFIED": + case 0: + message.flowState = 0; + break; + case "OUTPUT_STATE_OK": + case 1: + message.flowState = 1; + break; + case "OUTPUT_STATE_CANCELLED": + case 2: + message.flowState = 2; + break; + case "OUTPUT_STATE_FAILED": + case 3: + message.flowState = 3; + break; + case "OUTPUT_STATE_ESCALATED": + case 4: + message.flowState = 4; + break; + case "OUTPUT_STATE_PENDING": + case 5: + message.flowState = 5; + break; + } + return message; + }; + + /** + * Creates a plain object from a FlowInvocation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.FlowInvocation + * @static + * @param {google.cloud.dialogflow.cx.v3.FlowInvocation} message FlowInvocation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FlowInvocation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.flow = ""; + object.flowState = options.enums === String ? "OUTPUT_STATE_UNSPECIFIED" : 0; + object.displayName = ""; + } + if (message.flow != null && message.hasOwnProperty("flow")) + object.flow = message.flow; + if (message.flowState != null && message.hasOwnProperty("flowState")) + object.flowState = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.OutputState[message.flowState] === undefined ? message.flowState : $root.google.cloud.dialogflow.cx.v3.OutputState[message.flowState] : message.flowState; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + return object; + }; + + /** + * Converts this FlowInvocation to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.FlowInvocation + * @instance + * @returns {Object.} JSON object + */ + FlowInvocation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FlowInvocation + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.FlowInvocation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FlowInvocation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.FlowInvocation"; + }; + + return FlowInvocation; + })(); + + v3.PlaybookTransition = (function() { + + /** + * Properties of a PlaybookTransition. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IPlaybookTransition + * @property {string|null} [playbook] PlaybookTransition playbook + * @property {string|null} [displayName] PlaybookTransition displayName + */ + + /** + * Constructs a new PlaybookTransition. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a PlaybookTransition. + * @implements IPlaybookTransition + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IPlaybookTransition=} [properties] Properties to set + */ + function PlaybookTransition(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]]; + } + + /** + * PlaybookTransition playbook. + * @member {string} playbook + * @memberof google.cloud.dialogflow.cx.v3.PlaybookTransition + * @instance + */ + PlaybookTransition.prototype.playbook = ""; + + /** + * PlaybookTransition displayName. + * @member {string} displayName + * @memberof google.cloud.dialogflow.cx.v3.PlaybookTransition + * @instance + */ + PlaybookTransition.prototype.displayName = ""; + + /** + * Creates a new PlaybookTransition instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.PlaybookTransition + * @static + * @param {google.cloud.dialogflow.cx.v3.IPlaybookTransition=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.PlaybookTransition} PlaybookTransition instance + */ + PlaybookTransition.create = function create(properties) { + return new PlaybookTransition(properties); + }; + + /** + * Encodes the specified PlaybookTransition message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.PlaybookTransition.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.PlaybookTransition + * @static + * @param {google.cloud.dialogflow.cx.v3.IPlaybookTransition} message PlaybookTransition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PlaybookTransition.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.playbook != null && Object.hasOwnProperty.call(message, "playbook")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.playbook); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.displayName); + return writer; + }; + + /** + * Encodes the specified PlaybookTransition message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.PlaybookTransition.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.PlaybookTransition + * @static + * @param {google.cloud.dialogflow.cx.v3.IPlaybookTransition} message PlaybookTransition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PlaybookTransition.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PlaybookTransition message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.PlaybookTransition + * @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.PlaybookTransition} PlaybookTransition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PlaybookTransition.decode = function decode(reader, length, error) { + 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.PlaybookTransition(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.playbook = reader.string(); + break; + } + case 3: { + message.displayName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PlaybookTransition message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.PlaybookTransition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.PlaybookTransition} PlaybookTransition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PlaybookTransition.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PlaybookTransition message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.PlaybookTransition + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PlaybookTransition.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.playbook != null && message.hasOwnProperty("playbook")) + if (!$util.isString(message.playbook)) + return "playbook: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + return null; + }; + + /** + * Creates a PlaybookTransition message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.PlaybookTransition + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.PlaybookTransition} PlaybookTransition + */ + PlaybookTransition.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.PlaybookTransition) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.PlaybookTransition(); + if (object.playbook != null) + message.playbook = String(object.playbook); + if (object.displayName != null) + message.displayName = String(object.displayName); + return message; + }; + + /** + * Creates a plain object from a PlaybookTransition message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.PlaybookTransition + * @static + * @param {google.cloud.dialogflow.cx.v3.PlaybookTransition} message PlaybookTransition + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PlaybookTransition.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.playbook = ""; + object.displayName = ""; + } + if (message.playbook != null && message.hasOwnProperty("playbook")) + object.playbook = message.playbook; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + return object; + }; + + /** + * Converts this PlaybookTransition to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.PlaybookTransition + * @instance + * @returns {Object.} JSON object + */ + PlaybookTransition.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PlaybookTransition + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.PlaybookTransition + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PlaybookTransition.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.PlaybookTransition"; + }; + + return PlaybookTransition; + })(); + + v3.FlowTransition = (function() { + + /** + * Properties of a FlowTransition. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IFlowTransition + * @property {string|null} [flow] FlowTransition flow + * @property {string|null} [displayName] FlowTransition displayName + */ + + /** + * Constructs a new FlowTransition. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a FlowTransition. + * @implements IFlowTransition + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IFlowTransition=} [properties] Properties to set + */ + function FlowTransition(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]]; + } + + /** + * FlowTransition flow. + * @member {string} flow + * @memberof google.cloud.dialogflow.cx.v3.FlowTransition + * @instance + */ + FlowTransition.prototype.flow = ""; + + /** + * FlowTransition displayName. + * @member {string} displayName + * @memberof google.cloud.dialogflow.cx.v3.FlowTransition + * @instance + */ + FlowTransition.prototype.displayName = ""; + + /** + * Creates a new FlowTransition instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.FlowTransition + * @static + * @param {google.cloud.dialogflow.cx.v3.IFlowTransition=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.FlowTransition} FlowTransition instance + */ + FlowTransition.create = function create(properties) { + return new FlowTransition(properties); + }; + + /** + * Encodes the specified FlowTransition message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.FlowTransition.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.FlowTransition + * @static + * @param {google.cloud.dialogflow.cx.v3.IFlowTransition} message FlowTransition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FlowTransition.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.flow != null && Object.hasOwnProperty.call(message, "flow")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.flow); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.displayName); + return writer; + }; + + /** + * Encodes the specified FlowTransition message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.FlowTransition.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.FlowTransition + * @static + * @param {google.cloud.dialogflow.cx.v3.IFlowTransition} message FlowTransition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FlowTransition.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FlowTransition message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.FlowTransition + * @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.FlowTransition} FlowTransition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FlowTransition.decode = function decode(reader, length, error) { + 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.FlowTransition(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.flow = reader.string(); + break; + } + case 3: { + message.displayName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FlowTransition message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.FlowTransition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.FlowTransition} FlowTransition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FlowTransition.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FlowTransition message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.FlowTransition + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FlowTransition.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.flow != null && message.hasOwnProperty("flow")) + if (!$util.isString(message.flow)) + return "flow: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + return null; + }; + + /** + * Creates a FlowTransition message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.FlowTransition + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.FlowTransition} FlowTransition + */ + FlowTransition.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.FlowTransition) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.FlowTransition(); + if (object.flow != null) + message.flow = String(object.flow); + if (object.displayName != null) + message.displayName = String(object.displayName); + return message; + }; + + /** + * Creates a plain object from a FlowTransition message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.FlowTransition + * @static + * @param {google.cloud.dialogflow.cx.v3.FlowTransition} message FlowTransition + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FlowTransition.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.flow = ""; + object.displayName = ""; + } + if (message.flow != null && message.hasOwnProperty("flow")) + object.flow = message.flow; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + return object; + }; + + /** + * Converts this FlowTransition to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.FlowTransition + * @instance + * @returns {Object.} JSON object + */ + FlowTransition.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FlowTransition + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.FlowTransition + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FlowTransition.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.FlowTransition"; + }; + + return FlowTransition; + })(); + + /** + * OutputState enum. + * @name google.cloud.dialogflow.cx.v3.OutputState + * @enum {number} + * @property {number} OUTPUT_STATE_UNSPECIFIED=0 OUTPUT_STATE_UNSPECIFIED value + * @property {number} OUTPUT_STATE_OK=1 OUTPUT_STATE_OK value + * @property {number} OUTPUT_STATE_CANCELLED=2 OUTPUT_STATE_CANCELLED value + * @property {number} OUTPUT_STATE_FAILED=3 OUTPUT_STATE_FAILED value + * @property {number} OUTPUT_STATE_ESCALATED=4 OUTPUT_STATE_ESCALATED value + * @property {number} OUTPUT_STATE_PENDING=5 OUTPUT_STATE_PENDING value + */ + v3.OutputState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "OUTPUT_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "OUTPUT_STATE_OK"] = 1; + values[valuesById[2] = "OUTPUT_STATE_CANCELLED"] = 2; + values[valuesById[3] = "OUTPUT_STATE_FAILED"] = 3; + values[valuesById[4] = "OUTPUT_STATE_ESCALATED"] = 4; + values[valuesById[5] = "OUTPUT_STATE_PENDING"] = 5; + return values; + })(); + + v3.Experiments = (function() { + + /** + * Constructs a new Experiments service. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents an Experiments + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Experiments(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Experiments.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Experiments; + + /** + * Creates new Experiments service using the specified rpc implementation. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.Experiments + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Experiments} RPC service. Useful where requests and/or responses are streamed. + */ + Experiments.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Experiments|listExperiments}. + * @memberof google.cloud.dialogflow.cx.v3.Experiments + * @typedef ListExperimentsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.ListExperimentsResponse} [response] ListExperimentsResponse + */ + + /** + * Calls ListExperiments. + * @function listExperiments + * @memberof google.cloud.dialogflow.cx.v3.Experiments + * @instance + * @param {google.cloud.dialogflow.cx.v3.IListExperimentsRequest} request ListExperimentsRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Experiments.ListExperimentsCallback} callback Node-style callback called with the error, if any, and ListExperimentsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Experiments.prototype.listExperiments = function listExperiments(request, callback) { + return this.rpcCall(listExperiments, $root.google.cloud.dialogflow.cx.v3.ListExperimentsRequest, $root.google.cloud.dialogflow.cx.v3.ListExperimentsResponse, request, callback); + }, "name", { value: "ListExperiments" }); + + /** + * Calls ListExperiments. + * @function listExperiments + * @memberof google.cloud.dialogflow.cx.v3.Experiments + * @instance + * @param {google.cloud.dialogflow.cx.v3.IListExperimentsRequest} request ListExperimentsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Experiments|getExperiment}. + * @memberof google.cloud.dialogflow.cx.v3.Experiments + * @typedef GetExperimentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.Experiment} [response] Experiment + */ + + /** + * Calls GetExperiment. + * @function getExperiment + * @memberof google.cloud.dialogflow.cx.v3.Experiments + * @instance + * @param {google.cloud.dialogflow.cx.v3.IGetExperimentRequest} request GetExperimentRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Experiments.GetExperimentCallback} callback Node-style callback called with the error, if any, and Experiment + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Experiments.prototype.getExperiment = function getExperiment(request, callback) { + return this.rpcCall(getExperiment, $root.google.cloud.dialogflow.cx.v3.GetExperimentRequest, $root.google.cloud.dialogflow.cx.v3.Experiment, request, callback); + }, "name", { value: "GetExperiment" }); + + /** + * Calls GetExperiment. + * @function getExperiment + * @memberof google.cloud.dialogflow.cx.v3.Experiments + * @instance + * @param {google.cloud.dialogflow.cx.v3.IGetExperimentRequest} request GetExperimentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Experiments|createExperiment}. + * @memberof google.cloud.dialogflow.cx.v3.Experiments + * @typedef CreateExperimentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.Experiment} [response] Experiment + */ + + /** + * Calls CreateExperiment. + * @function createExperiment + * @memberof google.cloud.dialogflow.cx.v3.Experiments + * @instance + * @param {google.cloud.dialogflow.cx.v3.ICreateExperimentRequest} request CreateExperimentRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Experiments.CreateExperimentCallback} callback Node-style callback called with the error, if any, and Experiment + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Experiments.prototype.createExperiment = function createExperiment(request, callback) { + return this.rpcCall(createExperiment, $root.google.cloud.dialogflow.cx.v3.CreateExperimentRequest, $root.google.cloud.dialogflow.cx.v3.Experiment, request, callback); + }, "name", { value: "CreateExperiment" }); + + /** + * Calls CreateExperiment. + * @function createExperiment + * @memberof google.cloud.dialogflow.cx.v3.Experiments + * @instance + * @param {google.cloud.dialogflow.cx.v3.ICreateExperimentRequest} request CreateExperimentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Experiments|updateExperiment}. + * @memberof google.cloud.dialogflow.cx.v3.Experiments + * @typedef UpdateExperimentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.Experiment} [response] Experiment + */ + + /** + * Calls UpdateExperiment. + * @function updateExperiment + * @memberof google.cloud.dialogflow.cx.v3.Experiments + * @instance + * @param {google.cloud.dialogflow.cx.v3.IUpdateExperimentRequest} request UpdateExperimentRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Experiments.UpdateExperimentCallback} callback Node-style callback called with the error, if any, and Experiment + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Experiments.prototype.updateExperiment = function updateExperiment(request, callback) { + return this.rpcCall(updateExperiment, $root.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest, $root.google.cloud.dialogflow.cx.v3.Experiment, request, callback); + }, "name", { value: "UpdateExperiment" }); + + /** + * Calls UpdateExperiment. + * @function updateExperiment + * @memberof google.cloud.dialogflow.cx.v3.Experiments + * @instance + * @param {google.cloud.dialogflow.cx.v3.IUpdateExperimentRequest} request UpdateExperimentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Experiments|deleteExperiment}. + * @memberof google.cloud.dialogflow.cx.v3.Experiments + * @typedef DeleteExperimentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteExperiment. + * @function deleteExperiment + * @memberof google.cloud.dialogflow.cx.v3.Experiments + * @instance + * @param {google.cloud.dialogflow.cx.v3.IDeleteExperimentRequest} request DeleteExperimentRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Experiments.DeleteExperimentCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Experiments.prototype.deleteExperiment = function deleteExperiment(request, callback) { + return this.rpcCall(deleteExperiment, $root.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteExperiment" }); + + /** + * Calls DeleteExperiment. + * @function deleteExperiment + * @memberof google.cloud.dialogflow.cx.v3.Experiments + * @instance + * @param {google.cloud.dialogflow.cx.v3.IDeleteExperimentRequest} request DeleteExperimentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Experiments|startExperiment}. + * @memberof google.cloud.dialogflow.cx.v3.Experiments + * @typedef StartExperimentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.Experiment} [response] Experiment + */ + + /** + * Calls StartExperiment. + * @function startExperiment + * @memberof google.cloud.dialogflow.cx.v3.Experiments + * @instance + * @param {google.cloud.dialogflow.cx.v3.IStartExperimentRequest} request StartExperimentRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Experiments.StartExperimentCallback} callback Node-style callback called with the error, if any, and Experiment + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Experiments.prototype.startExperiment = function startExperiment(request, callback) { + return this.rpcCall(startExperiment, $root.google.cloud.dialogflow.cx.v3.StartExperimentRequest, $root.google.cloud.dialogflow.cx.v3.Experiment, request, callback); + }, "name", { value: "StartExperiment" }); + + /** + * Calls StartExperiment. + * @function startExperiment + * @memberof google.cloud.dialogflow.cx.v3.Experiments + * @instance + * @param {google.cloud.dialogflow.cx.v3.IStartExperimentRequest} request StartExperimentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Experiments|stopExperiment}. + * @memberof google.cloud.dialogflow.cx.v3.Experiments + * @typedef StopExperimentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.Experiment} [response] Experiment + */ + + /** + * Calls StopExperiment. + * @function stopExperiment + * @memberof google.cloud.dialogflow.cx.v3.Experiments + * @instance + * @param {google.cloud.dialogflow.cx.v3.IStopExperimentRequest} request StopExperimentRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Experiments.StopExperimentCallback} callback Node-style callback called with the error, if any, and Experiment + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Experiments.prototype.stopExperiment = function stopExperiment(request, callback) { + return this.rpcCall(stopExperiment, $root.google.cloud.dialogflow.cx.v3.StopExperimentRequest, $root.google.cloud.dialogflow.cx.v3.Experiment, request, callback); + }, "name", { value: "StopExperiment" }); + + /** + * Calls StopExperiment. + * @function stopExperiment + * @memberof google.cloud.dialogflow.cx.v3.Experiments + * @instance + * @param {google.cloud.dialogflow.cx.v3.IStopExperimentRequest} request StopExperimentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Experiments; + })(); + + v3.Experiment = (function() { + + /** + * Properties of an Experiment. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IExperiment + * @property {string|null} [name] Experiment name + * @property {string|null} [displayName] Experiment displayName + * @property {string|null} [description] Experiment description + * @property {google.cloud.dialogflow.cx.v3.Experiment.State|null} [state] Experiment state + * @property {google.cloud.dialogflow.cx.v3.Experiment.IDefinition|null} [definition] Experiment definition + * @property {google.cloud.dialogflow.cx.v3.IRolloutConfig|null} [rolloutConfig] Experiment rolloutConfig + * @property {google.cloud.dialogflow.cx.v3.IRolloutState|null} [rolloutState] Experiment rolloutState + * @property {string|null} [rolloutFailureReason] Experiment rolloutFailureReason + * @property {google.cloud.dialogflow.cx.v3.Experiment.IResult|null} [result] Experiment result + * @property {google.protobuf.ITimestamp|null} [createTime] Experiment createTime + * @property {google.protobuf.ITimestamp|null} [startTime] Experiment startTime + * @property {google.protobuf.ITimestamp|null} [endTime] Experiment endTime + * @property {google.protobuf.ITimestamp|null} [lastUpdateTime] Experiment lastUpdateTime + * @property {google.protobuf.IDuration|null} [experimentLength] Experiment experimentLength + * @property {Array.|null} [variantsHistory] Experiment variantsHistory + */ + + /** + * Constructs a new Experiment. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents an Experiment. + * @implements IExperiment + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IExperiment=} [properties] Properties to set + */ + function Experiment(properties) { + this.variantsHistory = []; + 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]]; + } + + /** + * Experiment name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.Experiment + * @instance + */ + Experiment.prototype.name = ""; + + /** + * Experiment displayName. + * @member {string} displayName + * @memberof google.cloud.dialogflow.cx.v3.Experiment + * @instance + */ + Experiment.prototype.displayName = ""; + + /** + * Experiment description. + * @member {string} description + * @memberof google.cloud.dialogflow.cx.v3.Experiment + * @instance + */ + Experiment.prototype.description = ""; + + /** + * Experiment state. + * @member {google.cloud.dialogflow.cx.v3.Experiment.State} state + * @memberof google.cloud.dialogflow.cx.v3.Experiment + * @instance + */ + Experiment.prototype.state = 0; + + /** + * Experiment definition. + * @member {google.cloud.dialogflow.cx.v3.Experiment.IDefinition|null|undefined} definition + * @memberof google.cloud.dialogflow.cx.v3.Experiment + * @instance + */ + Experiment.prototype.definition = null; + + /** + * Experiment rolloutConfig. + * @member {google.cloud.dialogflow.cx.v3.IRolloutConfig|null|undefined} rolloutConfig + * @memberof google.cloud.dialogflow.cx.v3.Experiment + * @instance + */ + Experiment.prototype.rolloutConfig = null; + + /** + * Experiment rolloutState. + * @member {google.cloud.dialogflow.cx.v3.IRolloutState|null|undefined} rolloutState + * @memberof google.cloud.dialogflow.cx.v3.Experiment + * @instance + */ + Experiment.prototype.rolloutState = null; + + /** + * Experiment rolloutFailureReason. + * @member {string} rolloutFailureReason + * @memberof google.cloud.dialogflow.cx.v3.Experiment + * @instance + */ + Experiment.prototype.rolloutFailureReason = ""; + + /** + * Experiment result. + * @member {google.cloud.dialogflow.cx.v3.Experiment.IResult|null|undefined} result + * @memberof google.cloud.dialogflow.cx.v3.Experiment + * @instance + */ + Experiment.prototype.result = null; + + /** + * Experiment createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.dialogflow.cx.v3.Experiment + * @instance + */ + Experiment.prototype.createTime = null; + + /** + * Experiment startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.cloud.dialogflow.cx.v3.Experiment + * @instance + */ + Experiment.prototype.startTime = null; + + /** + * Experiment endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.dialogflow.cx.v3.Experiment + * @instance + */ + Experiment.prototype.endTime = null; + + /** + * Experiment lastUpdateTime. + * @member {google.protobuf.ITimestamp|null|undefined} lastUpdateTime + * @memberof google.cloud.dialogflow.cx.v3.Experiment + * @instance + */ + Experiment.prototype.lastUpdateTime = null; + + /** + * Experiment experimentLength. + * @member {google.protobuf.IDuration|null|undefined} experimentLength + * @memberof google.cloud.dialogflow.cx.v3.Experiment + * @instance + */ + Experiment.prototype.experimentLength = null; + + /** + * Experiment variantsHistory. + * @member {Array.} variantsHistory + * @memberof google.cloud.dialogflow.cx.v3.Experiment + * @instance + */ + Experiment.prototype.variantsHistory = $util.emptyArray; + + /** + * Creates a new Experiment instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.Experiment + * @static + * @param {google.cloud.dialogflow.cx.v3.IExperiment=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.Experiment} Experiment instance + */ + Experiment.create = function create(properties) { + return new Experiment(properties); + }; + + /** + * Encodes the specified Experiment message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Experiment.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.Experiment + * @static + * @param {google.cloud.dialogflow.cx.v3.IExperiment} message Experiment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Experiment.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.state); + if (message.definition != null && Object.hasOwnProperty.call(message, "definition")) + $root.google.cloud.dialogflow.cx.v3.Experiment.Definition.encode(message.definition, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.result != null && Object.hasOwnProperty.call(message, "result")) + $root.google.cloud.dialogflow.cx.v3.Experiment.Result.encode(message.result, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.lastUpdateTime != null && Object.hasOwnProperty.call(message, "lastUpdateTime")) + $root.google.protobuf.Timestamp.encode(message.lastUpdateTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.experimentLength != null && Object.hasOwnProperty.call(message, "experimentLength")) + $root.google.protobuf.Duration.encode(message.experimentLength, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.variantsHistory != null && message.variantsHistory.length) + for (var i = 0; i < message.variantsHistory.length; ++i) + $root.google.cloud.dialogflow.cx.v3.VariantsHistory.encode(message.variantsHistory[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.rolloutConfig != null && Object.hasOwnProperty.call(message, "rolloutConfig")) + $root.google.cloud.dialogflow.cx.v3.RolloutConfig.encode(message.rolloutConfig, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.rolloutState != null && Object.hasOwnProperty.call(message, "rolloutState")) + $root.google.cloud.dialogflow.cx.v3.RolloutState.encode(message.rolloutState, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.rolloutFailureReason != null && Object.hasOwnProperty.call(message, "rolloutFailureReason")) + writer.uint32(/* id 16, wireType 2 =*/130).string(message.rolloutFailureReason); + return writer; + }; + + /** + * Encodes the specified Experiment message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Experiment.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Experiment + * @static + * @param {google.cloud.dialogflow.cx.v3.IExperiment} message Experiment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Experiment.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Experiment message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.Experiment + * @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.Experiment} Experiment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Experiment.decode = function decode(reader, length, error) { + 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.Experiment(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.displayName = reader.string(); + break; + } + case 3: { + message.description = reader.string(); + break; + } + case 4: { + message.state = reader.int32(); + break; + } + case 5: { + message.definition = $root.google.cloud.dialogflow.cx.v3.Experiment.Definition.decode(reader, reader.uint32()); + break; + } + case 14: { + message.rolloutConfig = $root.google.cloud.dialogflow.cx.v3.RolloutConfig.decode(reader, reader.uint32()); + break; + } + case 15: { + message.rolloutState = $root.google.cloud.dialogflow.cx.v3.RolloutState.decode(reader, reader.uint32()); + break; + } + case 16: { + message.rolloutFailureReason = reader.string(); + break; + } + case 6: { + message.result = $root.google.cloud.dialogflow.cx.v3.Experiment.Result.decode(reader, reader.uint32()); + break; + } + case 7: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 8: { + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 9: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 10: { + message.lastUpdateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 11: { + message.experimentLength = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 12: { + if (!(message.variantsHistory && message.variantsHistory.length)) + message.variantsHistory = []; + message.variantsHistory.push($root.google.cloud.dialogflow.cx.v3.VariantsHistory.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Experiment message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Experiment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.Experiment} Experiment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Experiment.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Experiment message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.Experiment + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Experiment.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.definition != null && message.hasOwnProperty("definition")) { + var error = $root.google.cloud.dialogflow.cx.v3.Experiment.Definition.verify(message.definition); + if (error) + return "definition." + error; + } + if (message.rolloutConfig != null && message.hasOwnProperty("rolloutConfig")) { + var error = $root.google.cloud.dialogflow.cx.v3.RolloutConfig.verify(message.rolloutConfig); + if (error) + return "rolloutConfig." + error; + } + if (message.rolloutState != null && message.hasOwnProperty("rolloutState")) { + var error = $root.google.cloud.dialogflow.cx.v3.RolloutState.verify(message.rolloutState); + if (error) + return "rolloutState." + error; + } + if (message.rolloutFailureReason != null && message.hasOwnProperty("rolloutFailureReason")) + if (!$util.isString(message.rolloutFailureReason)) + return "rolloutFailureReason: string expected"; + if (message.result != null && message.hasOwnProperty("result")) { + var error = $root.google.cloud.dialogflow.cx.v3.Experiment.Result.verify(message.result); + if (error) + return "result." + error; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + if (message.lastUpdateTime != null && message.hasOwnProperty("lastUpdateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.lastUpdateTime); + if (error) + return "lastUpdateTime." + error; + } + if (message.experimentLength != null && message.hasOwnProperty("experimentLength")) { + var error = $root.google.protobuf.Duration.verify(message.experimentLength); + if (error) + return "experimentLength." + error; + } + if (message.variantsHistory != null && message.hasOwnProperty("variantsHistory")) { + if (!Array.isArray(message.variantsHistory)) + return "variantsHistory: array expected"; + for (var i = 0; i < message.variantsHistory.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.VariantsHistory.verify(message.variantsHistory[i]); + if (error) + return "variantsHistory." + error; + } + } + return null; + }; + + /** + * Creates an Experiment message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.Experiment + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.Experiment} Experiment + */ + Experiment.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.Experiment) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.Experiment(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.description != null) + message.description = String(object.description); + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "DRAFT": + case 1: + message.state = 1; + break; + case "RUNNING": + case 2: + message.state = 2; + break; + case "DONE": + case 3: + message.state = 3; + break; + case "ROLLOUT_FAILED": + case 4: + message.state = 4; + break; + } + if (object.definition != null) { + if (typeof object.definition !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Experiment.definition: object expected"); + message.definition = $root.google.cloud.dialogflow.cx.v3.Experiment.Definition.fromObject(object.definition); + } + if (object.rolloutConfig != null) { + if (typeof object.rolloutConfig !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Experiment.rolloutConfig: object expected"); + message.rolloutConfig = $root.google.cloud.dialogflow.cx.v3.RolloutConfig.fromObject(object.rolloutConfig); + } + if (object.rolloutState != null) { + if (typeof object.rolloutState !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Experiment.rolloutState: object expected"); + message.rolloutState = $root.google.cloud.dialogflow.cx.v3.RolloutState.fromObject(object.rolloutState); + } + if (object.rolloutFailureReason != null) + message.rolloutFailureReason = String(object.rolloutFailureReason); + if (object.result != null) { + if (typeof object.result !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Experiment.result: object expected"); + message.result = $root.google.cloud.dialogflow.cx.v3.Experiment.Result.fromObject(object.result); + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Experiment.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Experiment.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Experiment.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + if (object.lastUpdateTime != null) { + if (typeof object.lastUpdateTime !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Experiment.lastUpdateTime: object expected"); + message.lastUpdateTime = $root.google.protobuf.Timestamp.fromObject(object.lastUpdateTime); + } + if (object.experimentLength != null) { + if (typeof object.experimentLength !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Experiment.experimentLength: object expected"); + message.experimentLength = $root.google.protobuf.Duration.fromObject(object.experimentLength); + } + if (object.variantsHistory) { + if (!Array.isArray(object.variantsHistory)) + throw TypeError(".google.cloud.dialogflow.cx.v3.Experiment.variantsHistory: array expected"); + message.variantsHistory = []; + for (var i = 0; i < object.variantsHistory.length; ++i) { + if (typeof object.variantsHistory[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Experiment.variantsHistory: object expected"); + message.variantsHistory[i] = $root.google.cloud.dialogflow.cx.v3.VariantsHistory.fromObject(object.variantsHistory[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an Experiment message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.Experiment + * @static + * @param {google.cloud.dialogflow.cx.v3.Experiment} message Experiment + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Experiment.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.variantsHistory = []; + if (options.defaults) { + object.name = ""; + object.displayName = ""; + object.description = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.definition = null; + object.result = null; + object.createTime = null; + object.startTime = null; + object.endTime = null; + object.lastUpdateTime = null; + object.experimentLength = null; + object.rolloutConfig = null; + object.rolloutState = null; + object.rolloutFailureReason = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.Experiment.State[message.state] === undefined ? message.state : $root.google.cloud.dialogflow.cx.v3.Experiment.State[message.state] : message.state; + if (message.definition != null && message.hasOwnProperty("definition")) + object.definition = $root.google.cloud.dialogflow.cx.v3.Experiment.Definition.toObject(message.definition, options); + if (message.result != null && message.hasOwnProperty("result")) + object.result = $root.google.cloud.dialogflow.cx.v3.Experiment.Result.toObject(message.result, options); + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.lastUpdateTime != null && message.hasOwnProperty("lastUpdateTime")) + object.lastUpdateTime = $root.google.protobuf.Timestamp.toObject(message.lastUpdateTime, options); + if (message.experimentLength != null && message.hasOwnProperty("experimentLength")) + object.experimentLength = $root.google.protobuf.Duration.toObject(message.experimentLength, options); + if (message.variantsHistory && message.variantsHistory.length) { + object.variantsHistory = []; + for (var j = 0; j < message.variantsHistory.length; ++j) + object.variantsHistory[j] = $root.google.cloud.dialogflow.cx.v3.VariantsHistory.toObject(message.variantsHistory[j], options); + } + if (message.rolloutConfig != null && message.hasOwnProperty("rolloutConfig")) + object.rolloutConfig = $root.google.cloud.dialogflow.cx.v3.RolloutConfig.toObject(message.rolloutConfig, options); + if (message.rolloutState != null && message.hasOwnProperty("rolloutState")) + object.rolloutState = $root.google.cloud.dialogflow.cx.v3.RolloutState.toObject(message.rolloutState, options); + if (message.rolloutFailureReason != null && message.hasOwnProperty("rolloutFailureReason")) + object.rolloutFailureReason = message.rolloutFailureReason; + return object; + }; + + /** + * Converts this Experiment to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.Experiment + * @instance + * @returns {Object.} JSON object + */ + Experiment.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Experiment + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.Experiment + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Experiment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Experiment"; + }; + + /** + * State enum. + * @name google.cloud.dialogflow.cx.v3.Experiment.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} DRAFT=1 DRAFT value + * @property {number} RUNNING=2 RUNNING value + * @property {number} DONE=3 DONE value + * @property {number} ROLLOUT_FAILED=4 ROLLOUT_FAILED value + */ + Experiment.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DRAFT"] = 1; + values[valuesById[2] = "RUNNING"] = 2; + values[valuesById[3] = "DONE"] = 3; + values[valuesById[4] = "ROLLOUT_FAILED"] = 4; + return values; + })(); + + Experiment.Definition = (function() { + + /** + * Properties of a Definition. + * @memberof google.cloud.dialogflow.cx.v3.Experiment + * @interface IDefinition + * @property {string|null} [condition] Definition condition + * @property {google.cloud.dialogflow.cx.v3.IVersionVariants|null} [versionVariants] Definition versionVariants + */ + + /** + * Constructs a new Definition. + * @memberof google.cloud.dialogflow.cx.v3.Experiment + * @classdesc Represents a Definition. + * @implements IDefinition + * @constructor + * @param {google.cloud.dialogflow.cx.v3.Experiment.IDefinition=} [properties] Properties to set + */ + function Definition(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]]; + } + + /** + * Definition condition. + * @member {string} condition + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Definition + * @instance + */ + Definition.prototype.condition = ""; + + /** + * Definition versionVariants. + * @member {google.cloud.dialogflow.cx.v3.IVersionVariants|null|undefined} versionVariants + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Definition + * @instance + */ + Definition.prototype.versionVariants = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Definition variants. + * @member {"versionVariants"|undefined} variants + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Definition + * @instance + */ + Object.defineProperty(Definition.prototype, "variants", { + get: $util.oneOfGetter($oneOfFields = ["versionVariants"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Definition instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Definition + * @static + * @param {google.cloud.dialogflow.cx.v3.Experiment.IDefinition=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.Experiment.Definition} Definition instance + */ + Definition.create = function create(properties) { + return new Definition(properties); + }; + + /** + * Encodes the specified Definition message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Experiment.Definition.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Definition + * @static + * @param {google.cloud.dialogflow.cx.v3.Experiment.IDefinition} message Definition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Definition.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.condition); + if (message.versionVariants != null && Object.hasOwnProperty.call(message, "versionVariants")) + $root.google.cloud.dialogflow.cx.v3.VersionVariants.encode(message.versionVariants, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Definition message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Experiment.Definition.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Definition + * @static + * @param {google.cloud.dialogflow.cx.v3.Experiment.IDefinition} message Definition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Definition.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Definition message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Definition + * @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.Experiment.Definition} Definition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Definition.decode = function decode(reader, length, error) { + 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.Experiment.Definition(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.condition = reader.string(); + break; + } + case 2: { + message.versionVariants = $root.google.cloud.dialogflow.cx.v3.VersionVariants.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Definition message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Definition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.Experiment.Definition} Definition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Definition.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Definition message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Definition + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Definition.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.condition != null && message.hasOwnProperty("condition")) + if (!$util.isString(message.condition)) + return "condition: string expected"; + if (message.versionVariants != null && message.hasOwnProperty("versionVariants")) { + properties.variants = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3.VersionVariants.verify(message.versionVariants); + if (error) + return "versionVariants." + error; + } + } + return null; + }; + + /** + * Creates a Definition message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Definition + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.Experiment.Definition} Definition + */ + Definition.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.Experiment.Definition) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.Experiment.Definition(); + if (object.condition != null) + message.condition = String(object.condition); + if (object.versionVariants != null) { + if (typeof object.versionVariants !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Experiment.Definition.versionVariants: object expected"); + message.versionVariants = $root.google.cloud.dialogflow.cx.v3.VersionVariants.fromObject(object.versionVariants); + } + return message; + }; + + /** + * Creates a plain object from a Definition message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Definition + * @static + * @param {google.cloud.dialogflow.cx.v3.Experiment.Definition} message Definition + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Definition.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.condition = ""; + if (message.condition != null && message.hasOwnProperty("condition")) + object.condition = message.condition; + if (message.versionVariants != null && message.hasOwnProperty("versionVariants")) { + object.versionVariants = $root.google.cloud.dialogflow.cx.v3.VersionVariants.toObject(message.versionVariants, options); + if (options.oneofs) + object.variants = "versionVariants"; + } + return object; + }; + + /** + * Converts this Definition to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Definition + * @instance + * @returns {Object.} JSON object + */ + Definition.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Definition + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Definition + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Definition.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Experiment.Definition"; + }; + + return Definition; + })(); + + Experiment.Result = (function() { + + /** + * Properties of a Result. + * @memberof google.cloud.dialogflow.cx.v3.Experiment + * @interface IResult + * @property {Array.|null} [versionMetrics] Result versionMetrics + * @property {google.protobuf.ITimestamp|null} [lastUpdateTime] Result lastUpdateTime + */ + + /** + * Constructs a new Result. + * @memberof google.cloud.dialogflow.cx.v3.Experiment + * @classdesc Represents a Result. + * @implements IResult + * @constructor + * @param {google.cloud.dialogflow.cx.v3.Experiment.IResult=} [properties] Properties to set + */ + function Result(properties) { + this.versionMetrics = []; + 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]]; + } + + /** + * Result versionMetrics. + * @member {Array.} versionMetrics + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result + * @instance + */ + Result.prototype.versionMetrics = $util.emptyArray; + + /** + * Result lastUpdateTime. + * @member {google.protobuf.ITimestamp|null|undefined} lastUpdateTime + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result + * @instance + */ + Result.prototype.lastUpdateTime = null; + + /** + * Creates a new Result instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result + * @static + * @param {google.cloud.dialogflow.cx.v3.Experiment.IResult=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.Experiment.Result} Result instance + */ + Result.create = function create(properties) { + return new Result(properties); + }; + + /** + * Encodes the specified Result message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Experiment.Result.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result + * @static + * @param {google.cloud.dialogflow.cx.v3.Experiment.IResult} message Result message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Result.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.versionMetrics != null && message.versionMetrics.length) + for (var i = 0; i < message.versionMetrics.length; ++i) + $root.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics.encode(message.versionMetrics[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.lastUpdateTime != null && Object.hasOwnProperty.call(message, "lastUpdateTime")) + $root.google.protobuf.Timestamp.encode(message.lastUpdateTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Result message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Experiment.Result.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result + * @static + * @param {google.cloud.dialogflow.cx.v3.Experiment.IResult} message Result message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Result.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Result message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result + * @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.Experiment.Result} Result + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Result.decode = function decode(reader, length, error) { + 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.Experiment.Result(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.versionMetrics && message.versionMetrics.length)) + message.versionMetrics = []; + message.versionMetrics.push($root.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics.decode(reader, reader.uint32())); + break; + } + case 2: { + message.lastUpdateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Result message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.Experiment.Result} Result + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Result.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Result message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Result.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.versionMetrics != null && message.hasOwnProperty("versionMetrics")) { + if (!Array.isArray(message.versionMetrics)) + return "versionMetrics: array expected"; + for (var i = 0; i < message.versionMetrics.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics.verify(message.versionMetrics[i]); + if (error) + return "versionMetrics." + error; + } + } + if (message.lastUpdateTime != null && message.hasOwnProperty("lastUpdateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.lastUpdateTime); + if (error) + return "lastUpdateTime." + error; + } + return null; + }; + + /** + * Creates a Result message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.Experiment.Result} Result + */ + Result.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.Experiment.Result) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.Experiment.Result(); + if (object.versionMetrics) { + if (!Array.isArray(object.versionMetrics)) + throw TypeError(".google.cloud.dialogflow.cx.v3.Experiment.Result.versionMetrics: array expected"); + message.versionMetrics = []; + for (var i = 0; i < object.versionMetrics.length; ++i) { + if (typeof object.versionMetrics[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Experiment.Result.versionMetrics: object expected"); + message.versionMetrics[i] = $root.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics.fromObject(object.versionMetrics[i]); + } + } + if (object.lastUpdateTime != null) { + if (typeof object.lastUpdateTime !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Experiment.Result.lastUpdateTime: object expected"); + message.lastUpdateTime = $root.google.protobuf.Timestamp.fromObject(object.lastUpdateTime); + } + return message; + }; + + /** + * Creates a plain object from a Result message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result + * @static + * @param {google.cloud.dialogflow.cx.v3.Experiment.Result} message Result + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Result.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.versionMetrics = []; + if (options.defaults) + object.lastUpdateTime = null; + if (message.versionMetrics && message.versionMetrics.length) { + object.versionMetrics = []; + for (var j = 0; j < message.versionMetrics.length; ++j) + object.versionMetrics[j] = $root.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics.toObject(message.versionMetrics[j], options); + } + if (message.lastUpdateTime != null && message.hasOwnProperty("lastUpdateTime")) + object.lastUpdateTime = $root.google.protobuf.Timestamp.toObject(message.lastUpdateTime, options); + return object; + }; + + /** + * Converts this Result to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result + * @instance + * @returns {Object.} JSON object + */ + Result.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Result + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Result.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Experiment.Result"; + }; + + /** + * MetricType enum. + * @name google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType + * @enum {number} + * @property {number} METRIC_UNSPECIFIED=0 METRIC_UNSPECIFIED value + * @property {number} CONTAINED_SESSION_NO_CALLBACK_RATE=1 CONTAINED_SESSION_NO_CALLBACK_RATE value + * @property {number} LIVE_AGENT_HANDOFF_RATE=2 LIVE_AGENT_HANDOFF_RATE value + * @property {number} CALLBACK_SESSION_RATE=3 CALLBACK_SESSION_RATE value + * @property {number} ABANDONED_SESSION_RATE=4 ABANDONED_SESSION_RATE value + * @property {number} SESSION_END_RATE=5 SESSION_END_RATE value + */ + Result.MetricType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "METRIC_UNSPECIFIED"] = 0; + values[valuesById[1] = "CONTAINED_SESSION_NO_CALLBACK_RATE"] = 1; + values[valuesById[2] = "LIVE_AGENT_HANDOFF_RATE"] = 2; + values[valuesById[3] = "CALLBACK_SESSION_RATE"] = 3; + values[valuesById[4] = "ABANDONED_SESSION_RATE"] = 4; + values[valuesById[5] = "SESSION_END_RATE"] = 5; + return values; + })(); + + /** + * CountType enum. + * @name google.cloud.dialogflow.cx.v3.Experiment.Result.CountType + * @enum {number} + * @property {number} COUNT_TYPE_UNSPECIFIED=0 COUNT_TYPE_UNSPECIFIED value + * @property {number} TOTAL_NO_MATCH_COUNT=1 TOTAL_NO_MATCH_COUNT value + * @property {number} TOTAL_TURN_COUNT=2 TOTAL_TURN_COUNT value + * @property {number} AVERAGE_TURN_COUNT=3 AVERAGE_TURN_COUNT value + */ + Result.CountType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "COUNT_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "TOTAL_NO_MATCH_COUNT"] = 1; + values[valuesById[2] = "TOTAL_TURN_COUNT"] = 2; + values[valuesById[3] = "AVERAGE_TURN_COUNT"] = 3; + return values; + })(); + + Result.ConfidenceInterval = (function() { + + /** + * Properties of a ConfidenceInterval. + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result + * @interface IConfidenceInterval + * @property {number|null} [confidenceLevel] ConfidenceInterval confidenceLevel + * @property {number|null} [ratio] ConfidenceInterval ratio + * @property {number|null} [lowerBound] ConfidenceInterval lowerBound + * @property {number|null} [upperBound] ConfidenceInterval upperBound + */ + + /** + * Constructs a new ConfidenceInterval. + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result + * @classdesc Represents a ConfidenceInterval. + * @implements IConfidenceInterval + * @constructor + * @param {google.cloud.dialogflow.cx.v3.Experiment.Result.IConfidenceInterval=} [properties] Properties to set + */ + function ConfidenceInterval(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]]; + } + + /** + * ConfidenceInterval confidenceLevel. + * @member {number} confidenceLevel + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval + * @instance + */ + ConfidenceInterval.prototype.confidenceLevel = 0; + + /** + * ConfidenceInterval ratio. + * @member {number} ratio + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval + * @instance + */ + ConfidenceInterval.prototype.ratio = 0; + + /** + * ConfidenceInterval lowerBound. + * @member {number} lowerBound + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval + * @instance + */ + ConfidenceInterval.prototype.lowerBound = 0; + + /** + * ConfidenceInterval upperBound. + * @member {number} upperBound + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval + * @instance + */ + ConfidenceInterval.prototype.upperBound = 0; + + /** + * Creates a new ConfidenceInterval instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval + * @static + * @param {google.cloud.dialogflow.cx.v3.Experiment.Result.IConfidenceInterval=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval} ConfidenceInterval instance + */ + ConfidenceInterval.create = function create(properties) { + return new ConfidenceInterval(properties); + }; + + /** + * Encodes the specified ConfidenceInterval message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval + * @static + * @param {google.cloud.dialogflow.cx.v3.Experiment.Result.IConfidenceInterval} message ConfidenceInterval message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConfidenceInterval.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.confidenceLevel != null && Object.hasOwnProperty.call(message, "confidenceLevel")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.confidenceLevel); + if (message.ratio != null && Object.hasOwnProperty.call(message, "ratio")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.ratio); + if (message.lowerBound != null && Object.hasOwnProperty.call(message, "lowerBound")) + writer.uint32(/* id 3, wireType 1 =*/25).double(message.lowerBound); + if (message.upperBound != null && Object.hasOwnProperty.call(message, "upperBound")) + writer.uint32(/* id 4, wireType 1 =*/33).double(message.upperBound); + return writer; + }; + + /** + * Encodes the specified ConfidenceInterval message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval + * @static + * @param {google.cloud.dialogflow.cx.v3.Experiment.Result.IConfidenceInterval} message ConfidenceInterval message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConfidenceInterval.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConfidenceInterval message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval + * @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.Experiment.Result.ConfidenceInterval} ConfidenceInterval + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConfidenceInterval.decode = function decode(reader, length, error) { + 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.Experiment.Result.ConfidenceInterval(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.confidenceLevel = reader.double(); + break; + } + case 2: { + message.ratio = reader.double(); + break; + } + case 3: { + message.lowerBound = reader.double(); + break; + } + case 4: { + message.upperBound = reader.double(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ConfidenceInterval message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval} ConfidenceInterval + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConfidenceInterval.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConfidenceInterval message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConfidenceInterval.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.confidenceLevel != null && message.hasOwnProperty("confidenceLevel")) + if (typeof message.confidenceLevel !== "number") + return "confidenceLevel: number expected"; + if (message.ratio != null && message.hasOwnProperty("ratio")) + if (typeof message.ratio !== "number") + return "ratio: number expected"; + if (message.lowerBound != null && message.hasOwnProperty("lowerBound")) + if (typeof message.lowerBound !== "number") + return "lowerBound: number expected"; + if (message.upperBound != null && message.hasOwnProperty("upperBound")) + if (typeof message.upperBound !== "number") + return "upperBound: number expected"; + return null; + }; + + /** + * Creates a ConfidenceInterval message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval} ConfidenceInterval + */ + ConfidenceInterval.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval(); + if (object.confidenceLevel != null) + message.confidenceLevel = Number(object.confidenceLevel); + if (object.ratio != null) + message.ratio = Number(object.ratio); + if (object.lowerBound != null) + message.lowerBound = Number(object.lowerBound); + if (object.upperBound != null) + message.upperBound = Number(object.upperBound); + return message; + }; + + /** + * Creates a plain object from a ConfidenceInterval message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval + * @static + * @param {google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval} message ConfidenceInterval + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConfidenceInterval.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.confidenceLevel = 0; + object.ratio = 0; + object.lowerBound = 0; + object.upperBound = 0; + } + if (message.confidenceLevel != null && message.hasOwnProperty("confidenceLevel")) + object.confidenceLevel = options.json && !isFinite(message.confidenceLevel) ? String(message.confidenceLevel) : message.confidenceLevel; + if (message.ratio != null && message.hasOwnProperty("ratio")) + object.ratio = options.json && !isFinite(message.ratio) ? String(message.ratio) : message.ratio; + if (message.lowerBound != null && message.hasOwnProperty("lowerBound")) + object.lowerBound = options.json && !isFinite(message.lowerBound) ? String(message.lowerBound) : message.lowerBound; + if (message.upperBound != null && message.hasOwnProperty("upperBound")) + object.upperBound = options.json && !isFinite(message.upperBound) ? String(message.upperBound) : message.upperBound; + return object; + }; + + /** + * Converts this ConfidenceInterval to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval + * @instance + * @returns {Object.} JSON object + */ + ConfidenceInterval.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ConfidenceInterval + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ConfidenceInterval.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval"; + }; + + return ConfidenceInterval; + })(); + + Result.Metric = (function() { + + /** + * Properties of a Metric. + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result + * @interface IMetric + * @property {google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType|null} [type] Metric type + * @property {google.cloud.dialogflow.cx.v3.Experiment.Result.CountType|null} [countType] Metric countType + * @property {number|null} [ratio] Metric ratio + * @property {number|null} [count] Metric count + * @property {google.cloud.dialogflow.cx.v3.Experiment.Result.IConfidenceInterval|null} [confidenceInterval] Metric confidenceInterval + */ + + /** + * Constructs a new Metric. + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result + * @classdesc Represents a Metric. + * @implements IMetric + * @constructor + * @param {google.cloud.dialogflow.cx.v3.Experiment.Result.IMetric=} [properties] Properties to set + */ + function Metric(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]]; + } + + /** + * Metric type. + * @member {google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType} type + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.Metric + * @instance + */ + Metric.prototype.type = 0; + + /** + * Metric countType. + * @member {google.cloud.dialogflow.cx.v3.Experiment.Result.CountType} countType + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.Metric + * @instance + */ + Metric.prototype.countType = 0; + + /** + * Metric ratio. + * @member {number|null|undefined} ratio + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.Metric + * @instance + */ + Metric.prototype.ratio = null; + + /** + * Metric count. + * @member {number|null|undefined} count + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.Metric + * @instance + */ + Metric.prototype.count = null; + + /** + * Metric confidenceInterval. + * @member {google.cloud.dialogflow.cx.v3.Experiment.Result.IConfidenceInterval|null|undefined} confidenceInterval + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.Metric + * @instance + */ + Metric.prototype.confidenceInterval = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Metric value. + * @member {"ratio"|"count"|undefined} value + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.Metric + * @instance + */ + Object.defineProperty(Metric.prototype, "value", { + get: $util.oneOfGetter($oneOfFields = ["ratio", "count"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Metric instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.Metric + * @static + * @param {google.cloud.dialogflow.cx.v3.Experiment.Result.IMetric=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.Experiment.Result.Metric} Metric instance + */ + Metric.create = function create(properties) { + return new Metric(properties); + }; + + /** + * Encodes the specified Metric message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Experiment.Result.Metric.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.Metric + * @static + * @param {google.cloud.dialogflow.cx.v3.Experiment.Result.IMetric} message Metric message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Metric.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); + if (message.ratio != null && Object.hasOwnProperty.call(message, "ratio")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.ratio); + if (message.confidenceInterval != null && Object.hasOwnProperty.call(message, "confidenceInterval")) + $root.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval.encode(message.confidenceInterval, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.count != null && Object.hasOwnProperty.call(message, "count")) + writer.uint32(/* id 4, wireType 1 =*/33).double(message.count); + if (message.countType != null && Object.hasOwnProperty.call(message, "countType")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.countType); + return writer; + }; + + /** + * Encodes the specified Metric message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Experiment.Result.Metric.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.Metric + * @static + * @param {google.cloud.dialogflow.cx.v3.Experiment.Result.IMetric} message Metric message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Metric.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Metric message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.Metric + * @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.Experiment.Result.Metric} Metric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Metric.decode = function decode(reader, length, error) { + 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.Experiment.Result.Metric(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.type = reader.int32(); + break; + } + case 5: { + message.countType = reader.int32(); + break; + } + case 2: { + message.ratio = reader.double(); + break; + } + case 4: { + message.count = reader.double(); + break; + } + case 3: { + message.confidenceInterval = $root.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Metric message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.Metric + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.Experiment.Result.Metric} Metric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Metric.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Metric message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.Metric + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Metric.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.countType != null && message.hasOwnProperty("countType")) + switch (message.countType) { + default: + return "countType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.ratio != null && message.hasOwnProperty("ratio")) { + properties.value = 1; + if (typeof message.ratio !== "number") + return "ratio: number expected"; + } + if (message.count != null && message.hasOwnProperty("count")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + if (typeof message.count !== "number") + return "count: number expected"; + } + if (message.confidenceInterval != null && message.hasOwnProperty("confidenceInterval")) { + var error = $root.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval.verify(message.confidenceInterval); + if (error) + return "confidenceInterval." + error; + } + return null; + }; + + /** + * Creates a Metric message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.Metric + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.Experiment.Result.Metric} Metric + */ + Metric.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric(); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "METRIC_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "CONTAINED_SESSION_NO_CALLBACK_RATE": + case 1: + message.type = 1; + break; + case "LIVE_AGENT_HANDOFF_RATE": + case 2: + message.type = 2; + break; + case "CALLBACK_SESSION_RATE": + case 3: + message.type = 3; + break; + case "ABANDONED_SESSION_RATE": + case 4: + message.type = 4; + break; + case "SESSION_END_RATE": + case 5: + message.type = 5; + break; + } + switch (object.countType) { + default: + if (typeof object.countType === "number") { + message.countType = object.countType; + break; + } + break; + case "COUNT_TYPE_UNSPECIFIED": + case 0: + message.countType = 0; + break; + case "TOTAL_NO_MATCH_COUNT": + case 1: + message.countType = 1; + break; + case "TOTAL_TURN_COUNT": + case 2: + message.countType = 2; + break; + case "AVERAGE_TURN_COUNT": + case 3: + message.countType = 3; + break; + } + if (object.ratio != null) + message.ratio = Number(object.ratio); + if (object.count != null) + message.count = Number(object.count); + if (object.confidenceInterval != null) { + if (typeof object.confidenceInterval !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Experiment.Result.Metric.confidenceInterval: object expected"); + message.confidenceInterval = $root.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval.fromObject(object.confidenceInterval); + } + return message; + }; + + /** + * Creates a plain object from a Metric message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.Metric + * @static + * @param {google.cloud.dialogflow.cx.v3.Experiment.Result.Metric} message Metric + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Metric.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = options.enums === String ? "METRIC_UNSPECIFIED" : 0; + object.confidenceInterval = null; + object.countType = options.enums === String ? "COUNT_TYPE_UNSPECIFIED" : 0; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType[message.type] === undefined ? message.type : $root.google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType[message.type] : message.type; + if (message.ratio != null && message.hasOwnProperty("ratio")) { + object.ratio = options.json && !isFinite(message.ratio) ? String(message.ratio) : message.ratio; + if (options.oneofs) + object.value = "ratio"; + } + if (message.confidenceInterval != null && message.hasOwnProperty("confidenceInterval")) + object.confidenceInterval = $root.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval.toObject(message.confidenceInterval, options); + if (message.count != null && message.hasOwnProperty("count")) { + object.count = options.json && !isFinite(message.count) ? String(message.count) : message.count; + if (options.oneofs) + object.value = "count"; + } + if (message.countType != null && message.hasOwnProperty("countType")) + object.countType = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.Experiment.Result.CountType[message.countType] === undefined ? message.countType : $root.google.cloud.dialogflow.cx.v3.Experiment.Result.CountType[message.countType] : message.countType; + return object; + }; + + /** + * Converts this Metric to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.Metric + * @instance + * @returns {Object.} JSON object + */ + Metric.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Metric + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.Metric + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Metric.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Experiment.Result.Metric"; + }; + + return Metric; + })(); + + Result.VersionMetrics = (function() { + + /** + * Properties of a VersionMetrics. + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result + * @interface IVersionMetrics + * @property {string|null} [version] VersionMetrics version + * @property {Array.|null} [metrics] VersionMetrics metrics + * @property {number|null} [sessionCount] VersionMetrics sessionCount + */ + + /** + * Constructs a new VersionMetrics. + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result + * @classdesc Represents a VersionMetrics. + * @implements IVersionMetrics + * @constructor + * @param {google.cloud.dialogflow.cx.v3.Experiment.Result.IVersionMetrics=} [properties] Properties to set + */ + function VersionMetrics(properties) { + this.metrics = []; + 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]]; + } + + /** + * VersionMetrics version. + * @member {string} version + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics + * @instance + */ + VersionMetrics.prototype.version = ""; + + /** + * VersionMetrics metrics. + * @member {Array.} metrics + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics + * @instance + */ + VersionMetrics.prototype.metrics = $util.emptyArray; + + /** + * VersionMetrics sessionCount. + * @member {number} sessionCount + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics + * @instance + */ + VersionMetrics.prototype.sessionCount = 0; + + /** + * Creates a new VersionMetrics instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics + * @static + * @param {google.cloud.dialogflow.cx.v3.Experiment.Result.IVersionMetrics=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics} VersionMetrics instance + */ + VersionMetrics.create = function create(properties) { + return new VersionMetrics(properties); + }; + + /** + * Encodes the specified VersionMetrics message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics + * @static + * @param {google.cloud.dialogflow.cx.v3.Experiment.Result.IVersionMetrics} message VersionMetrics message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VersionMetrics.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); + if (message.metrics != null && message.metrics.length) + for (var i = 0; i < message.metrics.length; ++i) + $root.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric.encode(message.metrics[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.sessionCount != null && Object.hasOwnProperty.call(message, "sessionCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.sessionCount); + return writer; + }; + + /** + * Encodes the specified VersionMetrics message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics + * @static + * @param {google.cloud.dialogflow.cx.v3.Experiment.Result.IVersionMetrics} message VersionMetrics message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VersionMetrics.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VersionMetrics message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics + * @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.Experiment.Result.VersionMetrics} VersionMetrics + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VersionMetrics.decode = function decode(reader, length, error) { + 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.Experiment.Result.VersionMetrics(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.version = reader.string(); + break; + } + case 2: { + if (!(message.metrics && message.metrics.length)) + message.metrics = []; + message.metrics.push($root.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric.decode(reader, reader.uint32())); + break; + } + case 3: { + message.sessionCount = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VersionMetrics message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics} VersionMetrics + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VersionMetrics.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VersionMetrics message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VersionMetrics.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.metrics != null && message.hasOwnProperty("metrics")) { + if (!Array.isArray(message.metrics)) + return "metrics: array expected"; + for (var i = 0; i < message.metrics.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric.verify(message.metrics[i]); + if (error) + return "metrics." + error; + } + } + if (message.sessionCount != null && message.hasOwnProperty("sessionCount")) + if (!$util.isInteger(message.sessionCount)) + return "sessionCount: integer expected"; + return null; + }; + + /** + * Creates a VersionMetrics message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics} VersionMetrics + */ + VersionMetrics.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics(); + if (object.version != null) + message.version = String(object.version); + if (object.metrics) { + if (!Array.isArray(object.metrics)) + throw TypeError(".google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics.metrics: array expected"); + message.metrics = []; + for (var i = 0; i < object.metrics.length; ++i) { + if (typeof object.metrics[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics.metrics: object expected"); + message.metrics[i] = $root.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric.fromObject(object.metrics[i]); + } + } + if (object.sessionCount != null) + message.sessionCount = object.sessionCount | 0; + return message; + }; + + /** + * Creates a plain object from a VersionMetrics message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics + * @static + * @param {google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics} message VersionMetrics + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VersionMetrics.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.metrics = []; + if (options.defaults) { + object.version = ""; + object.sessionCount = 0; + } + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.metrics && message.metrics.length) { + object.metrics = []; + for (var j = 0; j < message.metrics.length; ++j) + object.metrics[j] = $root.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric.toObject(message.metrics[j], options); + } + if (message.sessionCount != null && message.hasOwnProperty("sessionCount")) + object.sessionCount = message.sessionCount; + return object; + }; + + /** + * Converts this VersionMetrics to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics + * @instance + * @returns {Object.} JSON object + */ + VersionMetrics.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VersionMetrics + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VersionMetrics.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics"; + }; + + return VersionMetrics; + })(); + + return Result; + })(); + + return Experiment; + })(); + + v3.VersionVariants = (function() { + + /** + * Properties of a VersionVariants. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IVersionVariants + * @property {Array.|null} [variants] VersionVariants variants + */ + + /** + * Constructs a new VersionVariants. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a VersionVariants. + * @implements IVersionVariants + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IVersionVariants=} [properties] Properties to set + */ + function VersionVariants(properties) { + this.variants = []; + 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]]; + } + + /** + * VersionVariants variants. + * @member {Array.} variants + * @memberof google.cloud.dialogflow.cx.v3.VersionVariants + * @instance + */ + VersionVariants.prototype.variants = $util.emptyArray; + + /** + * Creates a new VersionVariants instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.VersionVariants + * @static + * @param {google.cloud.dialogflow.cx.v3.IVersionVariants=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.VersionVariants} VersionVariants instance + */ + VersionVariants.create = function create(properties) { + return new VersionVariants(properties); + }; + + /** + * Encodes the specified VersionVariants message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.VersionVariants.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.VersionVariants + * @static + * @param {google.cloud.dialogflow.cx.v3.IVersionVariants} message VersionVariants message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VersionVariants.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.variants != null && message.variants.length) + for (var i = 0; i < message.variants.length; ++i) + $root.google.cloud.dialogflow.cx.v3.VersionVariants.Variant.encode(message.variants[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified VersionVariants message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.VersionVariants.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.VersionVariants + * @static + * @param {google.cloud.dialogflow.cx.v3.IVersionVariants} message VersionVariants message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VersionVariants.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VersionVariants message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.VersionVariants + * @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.VersionVariants} VersionVariants + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VersionVariants.decode = function decode(reader, length, error) { + 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.VersionVariants(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.variants && message.variants.length)) + message.variants = []; + message.variants.push($root.google.cloud.dialogflow.cx.v3.VersionVariants.Variant.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VersionVariants message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.VersionVariants + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.VersionVariants} VersionVariants + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VersionVariants.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VersionVariants message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.VersionVariants + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VersionVariants.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.variants != null && message.hasOwnProperty("variants")) { + if (!Array.isArray(message.variants)) + return "variants: array expected"; + for (var i = 0; i < message.variants.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.VersionVariants.Variant.verify(message.variants[i]); + if (error) + return "variants." + error; + } + } + return null; + }; + + /** + * Creates a VersionVariants message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.VersionVariants + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.VersionVariants} VersionVariants + */ + VersionVariants.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.VersionVariants) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.VersionVariants(); + if (object.variants) { + if (!Array.isArray(object.variants)) + throw TypeError(".google.cloud.dialogflow.cx.v3.VersionVariants.variants: array expected"); + message.variants = []; + for (var i = 0; i < object.variants.length; ++i) { + if (typeof object.variants[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.VersionVariants.variants: object expected"); + message.variants[i] = $root.google.cloud.dialogflow.cx.v3.VersionVariants.Variant.fromObject(object.variants[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a VersionVariants message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.VersionVariants + * @static + * @param {google.cloud.dialogflow.cx.v3.VersionVariants} message VersionVariants + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VersionVariants.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.variants = []; + if (message.variants && message.variants.length) { + object.variants = []; + for (var j = 0; j < message.variants.length; ++j) + object.variants[j] = $root.google.cloud.dialogflow.cx.v3.VersionVariants.Variant.toObject(message.variants[j], options); + } + return object; + }; + + /** + * Converts this VersionVariants to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.VersionVariants + * @instance + * @returns {Object.} JSON object + */ + VersionVariants.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VersionVariants + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.VersionVariants + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VersionVariants.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.VersionVariants"; + }; + + VersionVariants.Variant = (function() { + + /** + * Properties of a Variant. + * @memberof google.cloud.dialogflow.cx.v3.VersionVariants + * @interface IVariant + * @property {string|null} [version] Variant version + * @property {number|null} [trafficAllocation] Variant trafficAllocation + * @property {boolean|null} [isControlGroup] Variant isControlGroup + */ + + /** + * Constructs a new Variant. + * @memberof google.cloud.dialogflow.cx.v3.VersionVariants + * @classdesc Represents a Variant. + * @implements IVariant + * @constructor + * @param {google.cloud.dialogflow.cx.v3.VersionVariants.IVariant=} [properties] Properties to set + */ + function Variant(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]]; + } + + /** + * Variant version. + * @member {string} version + * @memberof google.cloud.dialogflow.cx.v3.VersionVariants.Variant + * @instance + */ + Variant.prototype.version = ""; + + /** + * Variant trafficAllocation. + * @member {number} trafficAllocation + * @memberof google.cloud.dialogflow.cx.v3.VersionVariants.Variant + * @instance + */ + Variant.prototype.trafficAllocation = 0; + + /** + * Variant isControlGroup. + * @member {boolean} isControlGroup + * @memberof google.cloud.dialogflow.cx.v3.VersionVariants.Variant + * @instance + */ + Variant.prototype.isControlGroup = false; + + /** + * Creates a new Variant instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.VersionVariants.Variant + * @static + * @param {google.cloud.dialogflow.cx.v3.VersionVariants.IVariant=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.VersionVariants.Variant} Variant instance + */ + Variant.create = function create(properties) { + return new Variant(properties); + }; + + /** + * Encodes the specified Variant message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.VersionVariants.Variant.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.VersionVariants.Variant + * @static + * @param {google.cloud.dialogflow.cx.v3.VersionVariants.IVariant} message Variant message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Variant.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); + if (message.trafficAllocation != null && Object.hasOwnProperty.call(message, "trafficAllocation")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.trafficAllocation); + if (message.isControlGroup != null && Object.hasOwnProperty.call(message, "isControlGroup")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.isControlGroup); + return writer; + }; + + /** + * Encodes the specified Variant message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.VersionVariants.Variant.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.VersionVariants.Variant + * @static + * @param {google.cloud.dialogflow.cx.v3.VersionVariants.IVariant} message Variant message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Variant.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Variant message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.VersionVariants.Variant + * @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.VersionVariants.Variant} Variant + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Variant.decode = function decode(reader, length, error) { + 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.VersionVariants.Variant(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.version = reader.string(); + break; + } + case 2: { + message.trafficAllocation = reader.float(); + break; + } + case 3: { + message.isControlGroup = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Variant message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.VersionVariants.Variant + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.VersionVariants.Variant} Variant + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Variant.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Variant message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.VersionVariants.Variant + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Variant.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.trafficAllocation != null && message.hasOwnProperty("trafficAllocation")) + if (typeof message.trafficAllocation !== "number") + return "trafficAllocation: number expected"; + if (message.isControlGroup != null && message.hasOwnProperty("isControlGroup")) + if (typeof message.isControlGroup !== "boolean") + return "isControlGroup: boolean expected"; + return null; + }; + + /** + * Creates a Variant message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.VersionVariants.Variant + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.VersionVariants.Variant} Variant + */ + Variant.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.VersionVariants.Variant) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.VersionVariants.Variant(); + if (object.version != null) + message.version = String(object.version); + if (object.trafficAllocation != null) + message.trafficAllocation = Number(object.trafficAllocation); + if (object.isControlGroup != null) + message.isControlGroup = Boolean(object.isControlGroup); + return message; + }; + + /** + * Creates a plain object from a Variant message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.VersionVariants.Variant + * @static + * @param {google.cloud.dialogflow.cx.v3.VersionVariants.Variant} message Variant + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Variant.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.version = ""; + object.trafficAllocation = 0; + object.isControlGroup = false; + } + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.trafficAllocation != null && message.hasOwnProperty("trafficAllocation")) + object.trafficAllocation = options.json && !isFinite(message.trafficAllocation) ? String(message.trafficAllocation) : message.trafficAllocation; + if (message.isControlGroup != null && message.hasOwnProperty("isControlGroup")) + object.isControlGroup = message.isControlGroup; + return object; + }; + + /** + * Converts this Variant to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.VersionVariants.Variant + * @instance + * @returns {Object.} JSON object + */ + Variant.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Variant + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.VersionVariants.Variant + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Variant.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.VersionVariants.Variant"; + }; + + return Variant; + })(); + + return VersionVariants; + })(); + + v3.VariantsHistory = (function() { + + /** + * Properties of a VariantsHistory. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IVariantsHistory + * @property {google.cloud.dialogflow.cx.v3.IVersionVariants|null} [versionVariants] VariantsHistory versionVariants + * @property {google.protobuf.ITimestamp|null} [updateTime] VariantsHistory updateTime + */ + + /** + * Constructs a new VariantsHistory. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a VariantsHistory. + * @implements IVariantsHistory + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IVariantsHistory=} [properties] Properties to set + */ + function VariantsHistory(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]]; + } + + /** + * VariantsHistory versionVariants. + * @member {google.cloud.dialogflow.cx.v3.IVersionVariants|null|undefined} versionVariants + * @memberof google.cloud.dialogflow.cx.v3.VariantsHistory + * @instance + */ + VariantsHistory.prototype.versionVariants = null; + + /** + * VariantsHistory updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.dialogflow.cx.v3.VariantsHistory + * @instance + */ + VariantsHistory.prototype.updateTime = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * VariantsHistory variants. + * @member {"versionVariants"|undefined} variants + * @memberof google.cloud.dialogflow.cx.v3.VariantsHistory + * @instance + */ + Object.defineProperty(VariantsHistory.prototype, "variants", { + get: $util.oneOfGetter($oneOfFields = ["versionVariants"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new VariantsHistory instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.VariantsHistory + * @static + * @param {google.cloud.dialogflow.cx.v3.IVariantsHistory=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.VariantsHistory} VariantsHistory instance + */ + VariantsHistory.create = function create(properties) { + return new VariantsHistory(properties); + }; + + /** + * Encodes the specified VariantsHistory message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.VariantsHistory.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.VariantsHistory + * @static + * @param {google.cloud.dialogflow.cx.v3.IVariantsHistory} message VariantsHistory message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VariantsHistory.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.versionVariants != null && Object.hasOwnProperty.call(message, "versionVariants")) + $root.google.cloud.dialogflow.cx.v3.VersionVariants.encode(message.versionVariants, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified VariantsHistory message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.VariantsHistory.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.VariantsHistory + * @static + * @param {google.cloud.dialogflow.cx.v3.IVariantsHistory} message VariantsHistory message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VariantsHistory.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VariantsHistory message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.VariantsHistory + * @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.VariantsHistory} VariantsHistory + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VariantsHistory.decode = function decode(reader, length, error) { + 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.VariantsHistory(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.versionVariants = $root.google.cloud.dialogflow.cx.v3.VersionVariants.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VariantsHistory message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.VariantsHistory + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.VariantsHistory} VariantsHistory + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VariantsHistory.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VariantsHistory message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.VariantsHistory + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VariantsHistory.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.versionVariants != null && message.hasOwnProperty("versionVariants")) { + properties.variants = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3.VersionVariants.verify(message.versionVariants); + if (error) + return "versionVariants." + error; + } + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + return null; + }; + + /** + * Creates a VariantsHistory message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.VariantsHistory + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.VariantsHistory} VariantsHistory + */ + VariantsHistory.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.VariantsHistory) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.VariantsHistory(); + if (object.versionVariants != null) { + if (typeof object.versionVariants !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.VariantsHistory.versionVariants: object expected"); + message.versionVariants = $root.google.cloud.dialogflow.cx.v3.VersionVariants.fromObject(object.versionVariants); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.VariantsHistory.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + return message; + }; + + /** + * Creates a plain object from a VariantsHistory message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.VariantsHistory + * @static + * @param {google.cloud.dialogflow.cx.v3.VariantsHistory} message VariantsHistory + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VariantsHistory.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.updateTime = null; + if (message.versionVariants != null && message.hasOwnProperty("versionVariants")) { + object.versionVariants = $root.google.cloud.dialogflow.cx.v3.VersionVariants.toObject(message.versionVariants, options); + if (options.oneofs) + object.variants = "versionVariants"; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + return object; + }; + + /** + * Converts this VariantsHistory to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.VariantsHistory + * @instance + * @returns {Object.} JSON object + */ + VariantsHistory.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VariantsHistory + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.VariantsHistory + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VariantsHistory.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.VariantsHistory"; + }; + + return VariantsHistory; + })(); + + v3.RolloutConfig = (function() { + + /** + * Properties of a RolloutConfig. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IRolloutConfig + * @property {Array.|null} [rolloutSteps] RolloutConfig rolloutSteps + * @property {string|null} [rolloutCondition] RolloutConfig rolloutCondition + * @property {string|null} [failureCondition] RolloutConfig failureCondition + */ + + /** + * Constructs a new RolloutConfig. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a RolloutConfig. + * @implements IRolloutConfig + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IRolloutConfig=} [properties] Properties to set + */ + function RolloutConfig(properties) { + this.rolloutSteps = []; + 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]]; + } + + /** + * RolloutConfig rolloutSteps. + * @member {Array.} rolloutSteps + * @memberof google.cloud.dialogflow.cx.v3.RolloutConfig + * @instance + */ + RolloutConfig.prototype.rolloutSteps = $util.emptyArray; + + /** + * RolloutConfig rolloutCondition. + * @member {string} rolloutCondition + * @memberof google.cloud.dialogflow.cx.v3.RolloutConfig + * @instance + */ + RolloutConfig.prototype.rolloutCondition = ""; + + /** + * RolloutConfig failureCondition. + * @member {string} failureCondition + * @memberof google.cloud.dialogflow.cx.v3.RolloutConfig + * @instance + */ + RolloutConfig.prototype.failureCondition = ""; + + /** + * Creates a new RolloutConfig instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.RolloutConfig + * @static + * @param {google.cloud.dialogflow.cx.v3.IRolloutConfig=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.RolloutConfig} RolloutConfig instance + */ + RolloutConfig.create = function create(properties) { + return new RolloutConfig(properties); + }; + + /** + * Encodes the specified RolloutConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.RolloutConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.RolloutConfig + * @static + * @param {google.cloud.dialogflow.cx.v3.IRolloutConfig} message RolloutConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RolloutConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rolloutSteps != null && message.rolloutSteps.length) + for (var i = 0; i < message.rolloutSteps.length; ++i) + $root.google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep.encode(message.rolloutSteps[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.rolloutCondition != null && Object.hasOwnProperty.call(message, "rolloutCondition")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.rolloutCondition); + if (message.failureCondition != null && Object.hasOwnProperty.call(message, "failureCondition")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.failureCondition); + return writer; + }; + + /** + * Encodes the specified RolloutConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.RolloutConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.RolloutConfig + * @static + * @param {google.cloud.dialogflow.cx.v3.IRolloutConfig} message RolloutConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RolloutConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RolloutConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.RolloutConfig + * @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.RolloutConfig} RolloutConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RolloutConfig.decode = function decode(reader, length, error) { + 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.RolloutConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.rolloutSteps && message.rolloutSteps.length)) + message.rolloutSteps = []; + message.rolloutSteps.push($root.google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep.decode(reader, reader.uint32())); + break; + } + case 2: { + message.rolloutCondition = reader.string(); + break; + } + case 3: { + message.failureCondition = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RolloutConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.RolloutConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.RolloutConfig} RolloutConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RolloutConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RolloutConfig message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.RolloutConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RolloutConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rolloutSteps != null && message.hasOwnProperty("rolloutSteps")) { + if (!Array.isArray(message.rolloutSteps)) + return "rolloutSteps: array expected"; + for (var i = 0; i < message.rolloutSteps.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep.verify(message.rolloutSteps[i]); + if (error) + return "rolloutSteps." + error; + } + } + if (message.rolloutCondition != null && message.hasOwnProperty("rolloutCondition")) + if (!$util.isString(message.rolloutCondition)) + return "rolloutCondition: string expected"; + if (message.failureCondition != null && message.hasOwnProperty("failureCondition")) + if (!$util.isString(message.failureCondition)) + return "failureCondition: string expected"; + return null; + }; + + /** + * Creates a RolloutConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.RolloutConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.RolloutConfig} RolloutConfig + */ + RolloutConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.RolloutConfig) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.RolloutConfig(); + if (object.rolloutSteps) { + if (!Array.isArray(object.rolloutSteps)) + throw TypeError(".google.cloud.dialogflow.cx.v3.RolloutConfig.rolloutSteps: array expected"); + message.rolloutSteps = []; + for (var i = 0; i < object.rolloutSteps.length; ++i) { + if (typeof object.rolloutSteps[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.RolloutConfig.rolloutSteps: object expected"); + message.rolloutSteps[i] = $root.google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep.fromObject(object.rolloutSteps[i]); + } + } + if (object.rolloutCondition != null) + message.rolloutCondition = String(object.rolloutCondition); + if (object.failureCondition != null) + message.failureCondition = String(object.failureCondition); + return message; + }; + + /** + * Creates a plain object from a RolloutConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.RolloutConfig + * @static + * @param {google.cloud.dialogflow.cx.v3.RolloutConfig} message RolloutConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RolloutConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.rolloutSteps = []; + if (options.defaults) { + object.rolloutCondition = ""; + object.failureCondition = ""; + } + if (message.rolloutSteps && message.rolloutSteps.length) { + object.rolloutSteps = []; + for (var j = 0; j < message.rolloutSteps.length; ++j) + object.rolloutSteps[j] = $root.google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep.toObject(message.rolloutSteps[j], options); + } + if (message.rolloutCondition != null && message.hasOwnProperty("rolloutCondition")) + object.rolloutCondition = message.rolloutCondition; + if (message.failureCondition != null && message.hasOwnProperty("failureCondition")) + object.failureCondition = message.failureCondition; + return object; + }; + + /** + * Converts this RolloutConfig to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.RolloutConfig + * @instance + * @returns {Object.} JSON object + */ + RolloutConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RolloutConfig + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.RolloutConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RolloutConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.RolloutConfig"; + }; + + RolloutConfig.RolloutStep = (function() { + + /** + * Properties of a RolloutStep. + * @memberof google.cloud.dialogflow.cx.v3.RolloutConfig + * @interface IRolloutStep + * @property {string|null} [displayName] RolloutStep displayName + * @property {number|null} [trafficPercent] RolloutStep trafficPercent + * @property {google.protobuf.IDuration|null} [minDuration] RolloutStep minDuration + */ + + /** + * Constructs a new RolloutStep. + * @memberof google.cloud.dialogflow.cx.v3.RolloutConfig + * @classdesc Represents a RolloutStep. + * @implements IRolloutStep + * @constructor + * @param {google.cloud.dialogflow.cx.v3.RolloutConfig.IRolloutStep=} [properties] Properties to set + */ + function RolloutStep(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]]; + } + + /** + * RolloutStep displayName. + * @member {string} displayName + * @memberof google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep + * @instance + */ + RolloutStep.prototype.displayName = ""; + + /** + * RolloutStep trafficPercent. + * @member {number} trafficPercent + * @memberof google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep + * @instance + */ + RolloutStep.prototype.trafficPercent = 0; + + /** + * RolloutStep minDuration. + * @member {google.protobuf.IDuration|null|undefined} minDuration + * @memberof google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep + * @instance + */ + RolloutStep.prototype.minDuration = null; + + /** + * Creates a new RolloutStep instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep + * @static + * @param {google.cloud.dialogflow.cx.v3.RolloutConfig.IRolloutStep=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep} RolloutStep instance + */ + RolloutStep.create = function create(properties) { + return new RolloutStep(properties); + }; + + /** + * Encodes the specified RolloutStep message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep + * @static + * @param {google.cloud.dialogflow.cx.v3.RolloutConfig.IRolloutStep} message RolloutStep message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RolloutStep.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.trafficPercent != null && Object.hasOwnProperty.call(message, "trafficPercent")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.trafficPercent); + if (message.minDuration != null && Object.hasOwnProperty.call(message, "minDuration")) + $root.google.protobuf.Duration.encode(message.minDuration, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RolloutStep message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep + * @static + * @param {google.cloud.dialogflow.cx.v3.RolloutConfig.IRolloutStep} message RolloutStep message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RolloutStep.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RolloutStep message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep + * @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.RolloutConfig.RolloutStep} RolloutStep + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RolloutStep.decode = function decode(reader, length, error) { + 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.RolloutConfig.RolloutStep(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.displayName = reader.string(); + break; + } + case 2: { + message.trafficPercent = reader.int32(); + break; + } + case 3: { + message.minDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RolloutStep message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep} RolloutStep + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RolloutStep.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RolloutStep message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RolloutStep.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.trafficPercent != null && message.hasOwnProperty("trafficPercent")) + if (!$util.isInteger(message.trafficPercent)) + return "trafficPercent: integer expected"; + if (message.minDuration != null && message.hasOwnProperty("minDuration")) { + var error = $root.google.protobuf.Duration.verify(message.minDuration); + if (error) + return "minDuration." + error; + } + return null; + }; + + /** + * Creates a RolloutStep message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep} RolloutStep + */ + RolloutStep.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.trafficPercent != null) + message.trafficPercent = object.trafficPercent | 0; + if (object.minDuration != null) { + if (typeof object.minDuration !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep.minDuration: object expected"); + message.minDuration = $root.google.protobuf.Duration.fromObject(object.minDuration); + } + return message; + }; + + /** + * Creates a plain object from a RolloutStep message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep + * @static + * @param {google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep} message RolloutStep + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RolloutStep.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.displayName = ""; + object.trafficPercent = 0; + object.minDuration = null; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.trafficPercent != null && message.hasOwnProperty("trafficPercent")) + object.trafficPercent = message.trafficPercent; + if (message.minDuration != null && message.hasOwnProperty("minDuration")) + object.minDuration = $root.google.protobuf.Duration.toObject(message.minDuration, options); + return object; + }; + + /** + * Converts this RolloutStep to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep + * @instance + * @returns {Object.} JSON object + */ + RolloutStep.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RolloutStep + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RolloutStep.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep"; + }; + + return RolloutStep; + })(); + + return RolloutConfig; + })(); + + v3.RolloutState = (function() { + + /** + * Properties of a RolloutState. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IRolloutState + * @property {string|null} [step] RolloutState step + * @property {number|null} [stepIndex] RolloutState stepIndex + * @property {google.protobuf.ITimestamp|null} [startTime] RolloutState startTime + */ + + /** + * Constructs a new RolloutState. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a RolloutState. + * @implements IRolloutState + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IRolloutState=} [properties] Properties to set + */ + function RolloutState(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]]; + } + + /** + * RolloutState step. + * @member {string} step + * @memberof google.cloud.dialogflow.cx.v3.RolloutState + * @instance + */ + RolloutState.prototype.step = ""; + + /** + * RolloutState stepIndex. + * @member {number} stepIndex + * @memberof google.cloud.dialogflow.cx.v3.RolloutState + * @instance + */ + RolloutState.prototype.stepIndex = 0; + + /** + * RolloutState startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.cloud.dialogflow.cx.v3.RolloutState + * @instance + */ + RolloutState.prototype.startTime = null; + + /** + * Creates a new RolloutState instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.RolloutState + * @static + * @param {google.cloud.dialogflow.cx.v3.IRolloutState=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.RolloutState} RolloutState instance + */ + RolloutState.create = function create(properties) { + return new RolloutState(properties); + }; + + /** + * Encodes the specified RolloutState message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.RolloutState.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.RolloutState + * @static + * @param {google.cloud.dialogflow.cx.v3.IRolloutState} message RolloutState message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RolloutState.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.step != null && Object.hasOwnProperty.call(message, "step")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.step); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.stepIndex != null && Object.hasOwnProperty.call(message, "stepIndex")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.stepIndex); + return writer; + }; + + /** + * Encodes the specified RolloutState message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.RolloutState.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.RolloutState + * @static + * @param {google.cloud.dialogflow.cx.v3.IRolloutState} message RolloutState message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RolloutState.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RolloutState message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.RolloutState + * @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.RolloutState} RolloutState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RolloutState.decode = function decode(reader, length, error) { + 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.RolloutState(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.step = reader.string(); + break; + } + case 3: { + message.stepIndex = reader.int32(); + break; + } + case 2: { + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RolloutState message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.RolloutState + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.RolloutState} RolloutState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RolloutState.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RolloutState message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.RolloutState + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RolloutState.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.step != null && message.hasOwnProperty("step")) + if (!$util.isString(message.step)) + return "step: string expected"; + if (message.stepIndex != null && message.hasOwnProperty("stepIndex")) + if (!$util.isInteger(message.stepIndex)) + return "stepIndex: integer expected"; + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + return null; + }; + + /** + * Creates a RolloutState message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.RolloutState + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.RolloutState} RolloutState + */ + RolloutState.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.RolloutState) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.RolloutState(); + if (object.step != null) + message.step = String(object.step); + if (object.stepIndex != null) + message.stepIndex = object.stepIndex | 0; + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.RolloutState.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + return message; + }; + + /** + * Creates a plain object from a RolloutState message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.RolloutState + * @static + * @param {google.cloud.dialogflow.cx.v3.RolloutState} message RolloutState + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RolloutState.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.step = ""; + object.startTime = null; + object.stepIndex = 0; + } + if (message.step != null && message.hasOwnProperty("step")) + object.step = message.step; + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.stepIndex != null && message.hasOwnProperty("stepIndex")) + object.stepIndex = message.stepIndex; + return object; + }; + + /** + * Converts this RolloutState to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.RolloutState + * @instance + * @returns {Object.} JSON object + */ + RolloutState.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RolloutState + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.RolloutState + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RolloutState.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.RolloutState"; + }; + + return RolloutState; + })(); + + v3.ListExperimentsRequest = (function() { + + /** + * Properties of a ListExperimentsRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IListExperimentsRequest + * @property {string|null} [parent] ListExperimentsRequest parent + * @property {number|null} [pageSize] ListExperimentsRequest pageSize + * @property {string|null} [pageToken] ListExperimentsRequest pageToken + */ + + /** + * Constructs a new ListExperimentsRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a ListExperimentsRequest. + * @implements IListExperimentsRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IListExperimentsRequest=} [properties] Properties to set + */ + function ListExperimentsRequest(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]]; + } + + /** + * ListExperimentsRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.cx.v3.ListExperimentsRequest + * @instance + */ + ListExperimentsRequest.prototype.parent = ""; + + /** + * ListExperimentsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dialogflow.cx.v3.ListExperimentsRequest + * @instance + */ + ListExperimentsRequest.prototype.pageSize = 0; + + /** + * ListExperimentsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dialogflow.cx.v3.ListExperimentsRequest + * @instance + */ + ListExperimentsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListExperimentsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.ListExperimentsRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IListExperimentsRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ListExperimentsRequest} ListExperimentsRequest instance + */ + ListExperimentsRequest.create = function create(properties) { + return new ListExperimentsRequest(properties); + }; + + /** + * Encodes the specified ListExperimentsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListExperimentsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.ListExperimentsRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IListExperimentsRequest} message ListExperimentsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListExperimentsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListExperimentsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListExperimentsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.ListExperimentsRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IListExperimentsRequest} message ListExperimentsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListExperimentsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListExperimentsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.ListExperimentsRequest + * @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.ListExperimentsRequest} ListExperimentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListExperimentsRequest.decode = function decode(reader, length, error) { + 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.ListExperimentsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListExperimentsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.ListExperimentsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.ListExperimentsRequest} ListExperimentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListExperimentsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListExperimentsRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.ListExperimentsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListExperimentsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListExperimentsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.ListExperimentsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.ListExperimentsRequest} ListExperimentsRequest + */ + ListExperimentsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListExperimentsRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.ListExperimentsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListExperimentsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.ListExperimentsRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.ListExperimentsRequest} message ListExperimentsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListExperimentsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListExperimentsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.ListExperimentsRequest + * @instance + * @returns {Object.} JSON object + */ + ListExperimentsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListExperimentsRequest + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.ListExperimentsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListExperimentsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListExperimentsRequest"; + }; + + return ListExperimentsRequest; + })(); + + v3.ListExperimentsResponse = (function() { + + /** + * Properties of a ListExperimentsResponse. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IListExperimentsResponse + * @property {Array.|null} [experiments] ListExperimentsResponse experiments + * @property {string|null} [nextPageToken] ListExperimentsResponse nextPageToken + */ + + /** + * Constructs a new ListExperimentsResponse. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a ListExperimentsResponse. + * @implements IListExperimentsResponse + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IListExperimentsResponse=} [properties] Properties to set + */ + function ListExperimentsResponse(properties) { + this.experiments = []; + 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]]; + } + + /** + * ListExperimentsResponse experiments. + * @member {Array.} experiments + * @memberof google.cloud.dialogflow.cx.v3.ListExperimentsResponse + * @instance + */ + ListExperimentsResponse.prototype.experiments = $util.emptyArray; + + /** + * ListExperimentsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dialogflow.cx.v3.ListExperimentsResponse + * @instance + */ + ListExperimentsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListExperimentsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.ListExperimentsResponse + * @static + * @param {google.cloud.dialogflow.cx.v3.IListExperimentsResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ListExperimentsResponse} ListExperimentsResponse instance + */ + ListExperimentsResponse.create = function create(properties) { + return new ListExperimentsResponse(properties); + }; + + /** + * Encodes the specified ListExperimentsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListExperimentsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.ListExperimentsResponse + * @static + * @param {google.cloud.dialogflow.cx.v3.IListExperimentsResponse} message ListExperimentsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListExperimentsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.experiments != null && message.experiments.length) + for (var i = 0; i < message.experiments.length; ++i) + $root.google.cloud.dialogflow.cx.v3.Experiment.encode(message.experiments[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListExperimentsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListExperimentsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.ListExperimentsResponse + * @static + * @param {google.cloud.dialogflow.cx.v3.IListExperimentsResponse} message ListExperimentsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListExperimentsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListExperimentsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.ListExperimentsResponse + * @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.ListExperimentsResponse} ListExperimentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListExperimentsResponse.decode = function decode(reader, length, error) { + 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.ListExperimentsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.experiments && message.experiments.length)) + message.experiments = []; + message.experiments.push($root.google.cloud.dialogflow.cx.v3.Experiment.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListExperimentsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.ListExperimentsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.ListExperimentsResponse} ListExperimentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListExperimentsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListExperimentsResponse message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.ListExperimentsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListExperimentsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.experiments != null && message.hasOwnProperty("experiments")) { + if (!Array.isArray(message.experiments)) + return "experiments: array expected"; + for (var i = 0; i < message.experiments.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.Experiment.verify(message.experiments[i]); + if (error) + return "experiments." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListExperimentsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.ListExperimentsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.ListExperimentsResponse} ListExperimentsResponse + */ + ListExperimentsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListExperimentsResponse) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.ListExperimentsResponse(); + if (object.experiments) { + if (!Array.isArray(object.experiments)) + throw TypeError(".google.cloud.dialogflow.cx.v3.ListExperimentsResponse.experiments: array expected"); + message.experiments = []; + for (var i = 0; i < object.experiments.length; ++i) { + if (typeof object.experiments[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.ListExperimentsResponse.experiments: object expected"); + message.experiments[i] = $root.google.cloud.dialogflow.cx.v3.Experiment.fromObject(object.experiments[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListExperimentsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.ListExperimentsResponse + * @static + * @param {google.cloud.dialogflow.cx.v3.ListExperimentsResponse} message ListExperimentsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListExperimentsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.experiments = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.experiments && message.experiments.length) { + object.experiments = []; + for (var j = 0; j < message.experiments.length; ++j) + object.experiments[j] = $root.google.cloud.dialogflow.cx.v3.Experiment.toObject(message.experiments[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListExperimentsResponse to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.ListExperimentsResponse + * @instance + * @returns {Object.} JSON object + */ + ListExperimentsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListExperimentsResponse + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.ListExperimentsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListExperimentsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListExperimentsResponse"; + }; + + return ListExperimentsResponse; + })(); + + v3.GetExperimentRequest = (function() { + + /** + * Properties of a GetExperimentRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IGetExperimentRequest + * @property {string|null} [name] GetExperimentRequest name + */ + + /** + * Constructs a new GetExperimentRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a GetExperimentRequest. + * @implements IGetExperimentRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IGetExperimentRequest=} [properties] Properties to set + */ + function GetExperimentRequest(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]]; + } + + /** + * GetExperimentRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.GetExperimentRequest + * @instance + */ + GetExperimentRequest.prototype.name = ""; + + /** + * Creates a new GetExperimentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.GetExperimentRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IGetExperimentRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.GetExperimentRequest} GetExperimentRequest instance + */ + GetExperimentRequest.create = function create(properties) { + return new GetExperimentRequest(properties); + }; + + /** + * Encodes the specified GetExperimentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetExperimentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.GetExperimentRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IGetExperimentRequest} message GetExperimentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetExperimentRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetExperimentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetExperimentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.GetExperimentRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IGetExperimentRequest} message GetExperimentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetExperimentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetExperimentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.GetExperimentRequest + * @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.GetExperimentRequest} GetExperimentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetExperimentRequest.decode = function decode(reader, length, error) { + 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.GetExperimentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetExperimentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.GetExperimentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.GetExperimentRequest} GetExperimentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetExperimentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetExperimentRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.GetExperimentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetExperimentRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetExperimentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.GetExperimentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.GetExperimentRequest} GetExperimentRequest + */ + GetExperimentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.GetExperimentRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.GetExperimentRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetExperimentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.GetExperimentRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.GetExperimentRequest} message GetExperimentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetExperimentRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetExperimentRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.GetExperimentRequest + * @instance + * @returns {Object.} JSON object + */ + GetExperimentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetExperimentRequest + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.GetExperimentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetExperimentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.GetExperimentRequest"; + }; + + return GetExperimentRequest; + })(); + + v3.CreateExperimentRequest = (function() { + + /** + * Properties of a CreateExperimentRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface ICreateExperimentRequest + * @property {string|null} [parent] CreateExperimentRequest parent + * @property {google.cloud.dialogflow.cx.v3.IExperiment|null} [experiment] CreateExperimentRequest experiment + */ + + /** + * Constructs a new CreateExperimentRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a CreateExperimentRequest. + * @implements ICreateExperimentRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3.ICreateExperimentRequest=} [properties] Properties to set + */ + function CreateExperimentRequest(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]]; + } + + /** + * CreateExperimentRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.cx.v3.CreateExperimentRequest + * @instance + */ + CreateExperimentRequest.prototype.parent = ""; + + /** + * CreateExperimentRequest experiment. + * @member {google.cloud.dialogflow.cx.v3.IExperiment|null|undefined} experiment + * @memberof google.cloud.dialogflow.cx.v3.CreateExperimentRequest + * @instance + */ + CreateExperimentRequest.prototype.experiment = null; + + /** + * Creates a new CreateExperimentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.CreateExperimentRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.ICreateExperimentRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.CreateExperimentRequest} CreateExperimentRequest instance + */ + CreateExperimentRequest.create = function create(properties) { + return new CreateExperimentRequest(properties); + }; + + /** + * Encodes the specified CreateExperimentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateExperimentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.CreateExperimentRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.ICreateExperimentRequest} message CreateExperimentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateExperimentRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.experiment != null && Object.hasOwnProperty.call(message, "experiment")) + $root.google.cloud.dialogflow.cx.v3.Experiment.encode(message.experiment, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateExperimentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateExperimentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.CreateExperimentRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.ICreateExperimentRequest} message CreateExperimentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateExperimentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateExperimentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.CreateExperimentRequest + * @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.CreateExperimentRequest} CreateExperimentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateExperimentRequest.decode = function decode(reader, length, error) { + 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.CreateExperimentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.experiment = $root.google.cloud.dialogflow.cx.v3.Experiment.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateExperimentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.CreateExperimentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.CreateExperimentRequest} CreateExperimentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateExperimentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateExperimentRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.CreateExperimentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateExperimentRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.experiment != null && message.hasOwnProperty("experiment")) { + var error = $root.google.cloud.dialogflow.cx.v3.Experiment.verify(message.experiment); + if (error) + return "experiment." + error; + } + return null; + }; + + /** + * Creates a CreateExperimentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.CreateExperimentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.CreateExperimentRequest} CreateExperimentRequest + */ + CreateExperimentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.CreateExperimentRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.CreateExperimentRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.experiment != null) { + if (typeof object.experiment !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.CreateExperimentRequest.experiment: object expected"); + message.experiment = $root.google.cloud.dialogflow.cx.v3.Experiment.fromObject(object.experiment); + } + return message; + }; + + /** + * Creates a plain object from a CreateExperimentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.CreateExperimentRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.CreateExperimentRequest} message CreateExperimentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateExperimentRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.experiment = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.experiment != null && message.hasOwnProperty("experiment")) + object.experiment = $root.google.cloud.dialogflow.cx.v3.Experiment.toObject(message.experiment, options); + return object; + }; + + /** + * Converts this CreateExperimentRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.CreateExperimentRequest + * @instance + * @returns {Object.} JSON object + */ + CreateExperimentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateExperimentRequest + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.CreateExperimentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateExperimentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.CreateExperimentRequest"; + }; + + return CreateExperimentRequest; + })(); + + v3.UpdateExperimentRequest = (function() { + + /** + * Properties of an UpdateExperimentRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IUpdateExperimentRequest + * @property {google.cloud.dialogflow.cx.v3.IExperiment|null} [experiment] UpdateExperimentRequest experiment + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateExperimentRequest updateMask + */ + + /** + * Constructs a new UpdateExperimentRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents an UpdateExperimentRequest. + * @implements IUpdateExperimentRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IUpdateExperimentRequest=} [properties] Properties to set + */ + function UpdateExperimentRequest(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]]; + } + + /** + * UpdateExperimentRequest experiment. + * @member {google.cloud.dialogflow.cx.v3.IExperiment|null|undefined} experiment + * @memberof google.cloud.dialogflow.cx.v3.UpdateExperimentRequest + * @instance + */ + UpdateExperimentRequest.prototype.experiment = null; + + /** + * UpdateExperimentRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dialogflow.cx.v3.UpdateExperimentRequest + * @instance + */ + UpdateExperimentRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateExperimentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.UpdateExperimentRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IUpdateExperimentRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.UpdateExperimentRequest} UpdateExperimentRequest instance + */ + UpdateExperimentRequest.create = function create(properties) { + return new UpdateExperimentRequest(properties); + }; + + /** + * Encodes the specified UpdateExperimentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateExperimentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.UpdateExperimentRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IUpdateExperimentRequest} message UpdateExperimentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateExperimentRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.experiment != null && Object.hasOwnProperty.call(message, "experiment")) + $root.google.cloud.dialogflow.cx.v3.Experiment.encode(message.experiment, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateExperimentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateExperimentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.UpdateExperimentRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IUpdateExperimentRequest} message UpdateExperimentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateExperimentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateExperimentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.UpdateExperimentRequest + * @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.UpdateExperimentRequest} UpdateExperimentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateExperimentRequest.decode = function decode(reader, length, error) { + 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.UpdateExperimentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.experiment = $root.google.cloud.dialogflow.cx.v3.Experiment.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateExperimentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.UpdateExperimentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.UpdateExperimentRequest} UpdateExperimentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateExperimentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateExperimentRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.UpdateExperimentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateExperimentRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.experiment != null && message.hasOwnProperty("experiment")) { + var error = $root.google.cloud.dialogflow.cx.v3.Experiment.verify(message.experiment); + if (error) + return "experiment." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + return null; + }; + + /** + * Creates an UpdateExperimentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.UpdateExperimentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.UpdateExperimentRequest} UpdateExperimentRequest + */ + UpdateExperimentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest(); + if (object.experiment != null) { + if (typeof object.experiment !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.UpdateExperimentRequest.experiment: object expected"); + message.experiment = $root.google.cloud.dialogflow.cx.v3.Experiment.fromObject(object.experiment); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.UpdateExperimentRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateExperimentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.UpdateExperimentRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.UpdateExperimentRequest} message UpdateExperimentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateExperimentRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.experiment = null; + object.updateMask = null; + } + if (message.experiment != null && message.hasOwnProperty("experiment")) + object.experiment = $root.google.cloud.dialogflow.cx.v3.Experiment.toObject(message.experiment, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateExperimentRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.UpdateExperimentRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateExperimentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateExperimentRequest + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.UpdateExperimentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateExperimentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.UpdateExperimentRequest"; + }; + + return UpdateExperimentRequest; + })(); + + v3.DeleteExperimentRequest = (function() { + + /** + * Properties of a DeleteExperimentRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IDeleteExperimentRequest + * @property {string|null} [name] DeleteExperimentRequest name + */ + + /** + * Constructs a new DeleteExperimentRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a DeleteExperimentRequest. + * @implements IDeleteExperimentRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IDeleteExperimentRequest=} [properties] Properties to set + */ + function DeleteExperimentRequest(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]]; + } + + /** + * DeleteExperimentRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.DeleteExperimentRequest + * @instance + */ + DeleteExperimentRequest.prototype.name = ""; + + /** + * Creates a new DeleteExperimentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.DeleteExperimentRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IDeleteExperimentRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.DeleteExperimentRequest} DeleteExperimentRequest instance + */ + DeleteExperimentRequest.create = function create(properties) { + return new DeleteExperimentRequest(properties); + }; + + /** + * Encodes the specified DeleteExperimentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteExperimentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.DeleteExperimentRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IDeleteExperimentRequest} message DeleteExperimentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteExperimentRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteExperimentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteExperimentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.DeleteExperimentRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IDeleteExperimentRequest} message DeleteExperimentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteExperimentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteExperimentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.DeleteExperimentRequest + * @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.DeleteExperimentRequest} DeleteExperimentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteExperimentRequest.decode = function decode(reader, length, error) { + 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.DeleteExperimentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteExperimentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.DeleteExperimentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.DeleteExperimentRequest} DeleteExperimentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteExperimentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteExperimentRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.DeleteExperimentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteExperimentRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteExperimentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.DeleteExperimentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.DeleteExperimentRequest} DeleteExperimentRequest + */ + DeleteExperimentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteExperimentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.DeleteExperimentRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.DeleteExperimentRequest} message DeleteExperimentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteExperimentRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteExperimentRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.DeleteExperimentRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteExperimentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteExperimentRequest + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.DeleteExperimentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteExperimentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.DeleteExperimentRequest"; + }; + + return DeleteExperimentRequest; + })(); + + v3.StartExperimentRequest = (function() { + + /** + * Properties of a StartExperimentRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IStartExperimentRequest + * @property {string|null} [name] StartExperimentRequest name + */ + + /** + * Constructs a new StartExperimentRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a StartExperimentRequest. + * @implements IStartExperimentRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IStartExperimentRequest=} [properties] Properties to set + */ + function StartExperimentRequest(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]]; + } + + /** + * StartExperimentRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.StartExperimentRequest + * @instance + */ + StartExperimentRequest.prototype.name = ""; + + /** + * Creates a new StartExperimentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.StartExperimentRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IStartExperimentRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.StartExperimentRequest} StartExperimentRequest instance + */ + StartExperimentRequest.create = function create(properties) { + return new StartExperimentRequest(properties); + }; + + /** + * Encodes the specified StartExperimentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.StartExperimentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.StartExperimentRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IStartExperimentRequest} message StartExperimentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StartExperimentRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified StartExperimentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.StartExperimentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.StartExperimentRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IStartExperimentRequest} message StartExperimentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StartExperimentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StartExperimentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.StartExperimentRequest + * @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.StartExperimentRequest} StartExperimentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StartExperimentRequest.decode = function decode(reader, length, error) { + 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.StartExperimentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StartExperimentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.StartExperimentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.StartExperimentRequest} StartExperimentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StartExperimentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StartExperimentRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.StartExperimentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StartExperimentRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a StartExperimentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.StartExperimentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.StartExperimentRequest} StartExperimentRequest + */ + StartExperimentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.StartExperimentRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.StartExperimentRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a StartExperimentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.StartExperimentRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.StartExperimentRequest} message StartExperimentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StartExperimentRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this StartExperimentRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.StartExperimentRequest + * @instance + * @returns {Object.} JSON object + */ + StartExperimentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StartExperimentRequest + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.StartExperimentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StartExperimentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.StartExperimentRequest"; + }; + + return StartExperimentRequest; + })(); + + v3.StopExperimentRequest = (function() { + + /** + * Properties of a StopExperimentRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IStopExperimentRequest + * @property {string|null} [name] StopExperimentRequest name + */ + + /** + * Constructs a new StopExperimentRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a StopExperimentRequest. + * @implements IStopExperimentRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IStopExperimentRequest=} [properties] Properties to set + */ + function StopExperimentRequest(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]]; + } + + /** + * StopExperimentRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.StopExperimentRequest + * @instance + */ + StopExperimentRequest.prototype.name = ""; + + /** + * Creates a new StopExperimentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.StopExperimentRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IStopExperimentRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.StopExperimentRequest} StopExperimentRequest instance + */ + StopExperimentRequest.create = function create(properties) { + return new StopExperimentRequest(properties); + }; + + /** + * Encodes the specified StopExperimentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.StopExperimentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.StopExperimentRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IStopExperimentRequest} message StopExperimentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StopExperimentRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified StopExperimentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.StopExperimentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.StopExperimentRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IStopExperimentRequest} message StopExperimentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StopExperimentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StopExperimentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.StopExperimentRequest + * @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.StopExperimentRequest} StopExperimentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StopExperimentRequest.decode = function decode(reader, length, error) { + 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.StopExperimentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StopExperimentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.StopExperimentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.StopExperimentRequest} StopExperimentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StopExperimentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StopExperimentRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.StopExperimentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StopExperimentRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a StopExperimentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.StopExperimentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.StopExperimentRequest} StopExperimentRequest + */ + StopExperimentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.StopExperimentRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.StopExperimentRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a StopExperimentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.StopExperimentRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.StopExperimentRequest} message StopExperimentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StopExperimentRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this StopExperimentRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.StopExperimentRequest + * @instance + * @returns {Object.} JSON object + */ + StopExperimentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StopExperimentRequest + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.StopExperimentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StopExperimentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.StopExperimentRequest"; + }; + + return StopExperimentRequest; + })(); + + v3.Generators = (function() { + + /** + * Constructs a new Generators service. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a Generators + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Generators(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Generators.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Generators; + + /** + * Creates new Generators service using the specified rpc implementation. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.Generators + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Generators} RPC service. Useful where requests and/or responses are streamed. + */ + Generators.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Generators|listGenerators}. + * @memberof google.cloud.dialogflow.cx.v3.Generators + * @typedef ListGeneratorsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.ListGeneratorsResponse} [response] ListGeneratorsResponse + */ + + /** + * Calls ListGenerators. + * @function listGenerators + * @memberof google.cloud.dialogflow.cx.v3.Generators + * @instance + * @param {google.cloud.dialogflow.cx.v3.IListGeneratorsRequest} request ListGeneratorsRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Generators.ListGeneratorsCallback} callback Node-style callback called with the error, if any, and ListGeneratorsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Generators.prototype.listGenerators = function listGenerators(request, callback) { + return this.rpcCall(listGenerators, $root.google.cloud.dialogflow.cx.v3.ListGeneratorsRequest, $root.google.cloud.dialogflow.cx.v3.ListGeneratorsResponse, request, callback); + }, "name", { value: "ListGenerators" }); + + /** + * Calls ListGenerators. + * @function listGenerators + * @memberof google.cloud.dialogflow.cx.v3.Generators + * @instance + * @param {google.cloud.dialogflow.cx.v3.IListGeneratorsRequest} request ListGeneratorsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Generators|getGenerator}. + * @memberof google.cloud.dialogflow.cx.v3.Generators + * @typedef GetGeneratorCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.Generator} [response] Generator + */ + + /** + * Calls GetGenerator. + * @function getGenerator + * @memberof google.cloud.dialogflow.cx.v3.Generators + * @instance + * @param {google.cloud.dialogflow.cx.v3.IGetGeneratorRequest} request GetGeneratorRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Generators.GetGeneratorCallback} callback Node-style callback called with the error, if any, and Generator + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Generators.prototype.getGenerator = function getGenerator(request, callback) { + return this.rpcCall(getGenerator, $root.google.cloud.dialogflow.cx.v3.GetGeneratorRequest, $root.google.cloud.dialogflow.cx.v3.Generator, request, callback); + }, "name", { value: "GetGenerator" }); + + /** + * Calls GetGenerator. + * @function getGenerator + * @memberof google.cloud.dialogflow.cx.v3.Generators + * @instance + * @param {google.cloud.dialogflow.cx.v3.IGetGeneratorRequest} request GetGeneratorRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Generators|createGenerator}. + * @memberof google.cloud.dialogflow.cx.v3.Generators + * @typedef CreateGeneratorCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.Generator} [response] Generator + */ + + /** + * Calls CreateGenerator. + * @function createGenerator + * @memberof google.cloud.dialogflow.cx.v3.Generators + * @instance + * @param {google.cloud.dialogflow.cx.v3.ICreateGeneratorRequest} request CreateGeneratorRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Generators.CreateGeneratorCallback} callback Node-style callback called with the error, if any, and Generator + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Generators.prototype.createGenerator = function createGenerator(request, callback) { + return this.rpcCall(createGenerator, $root.google.cloud.dialogflow.cx.v3.CreateGeneratorRequest, $root.google.cloud.dialogflow.cx.v3.Generator, request, callback); + }, "name", { value: "CreateGenerator" }); + + /** + * Calls CreateGenerator. + * @function createGenerator + * @memberof google.cloud.dialogflow.cx.v3.Generators + * @instance + * @param {google.cloud.dialogflow.cx.v3.ICreateGeneratorRequest} request CreateGeneratorRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Generators|updateGenerator}. + * @memberof google.cloud.dialogflow.cx.v3.Generators + * @typedef UpdateGeneratorCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.Generator} [response] Generator + */ + + /** + * Calls UpdateGenerator. + * @function updateGenerator + * @memberof google.cloud.dialogflow.cx.v3.Generators + * @instance + * @param {google.cloud.dialogflow.cx.v3.IUpdateGeneratorRequest} request UpdateGeneratorRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Generators.UpdateGeneratorCallback} callback Node-style callback called with the error, if any, and Generator + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Generators.prototype.updateGenerator = function updateGenerator(request, callback) { + return this.rpcCall(updateGenerator, $root.google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest, $root.google.cloud.dialogflow.cx.v3.Generator, request, callback); + }, "name", { value: "UpdateGenerator" }); + + /** + * Calls UpdateGenerator. + * @function updateGenerator + * @memberof google.cloud.dialogflow.cx.v3.Generators + * @instance + * @param {google.cloud.dialogflow.cx.v3.IUpdateGeneratorRequest} request UpdateGeneratorRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Generators|deleteGenerator}. + * @memberof google.cloud.dialogflow.cx.v3.Generators + * @typedef DeleteGeneratorCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteGenerator. + * @function deleteGenerator + * @memberof google.cloud.dialogflow.cx.v3.Generators + * @instance + * @param {google.cloud.dialogflow.cx.v3.IDeleteGeneratorRequest} request DeleteGeneratorRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Generators.DeleteGeneratorCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Generators.prototype.deleteGenerator = function deleteGenerator(request, callback) { + return this.rpcCall(deleteGenerator, $root.google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteGenerator" }); + + /** + * Calls DeleteGenerator. + * @function deleteGenerator + * @memberof google.cloud.dialogflow.cx.v3.Generators + * @instance + * @param {google.cloud.dialogflow.cx.v3.IDeleteGeneratorRequest} request DeleteGeneratorRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Generators; + })(); + + v3.Generator = (function() { + + /** + * Properties of a Generator. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IGenerator + * @property {string|null} [name] Generator name + * @property {string|null} [displayName] Generator displayName + * @property {google.cloud.dialogflow.cx.v3.IPhrase|null} [promptText] Generator promptText + * @property {Array.|null} [placeholders] Generator placeholders + * @property {google.cloud.dialogflow.cx.v3.ILlmModelSettings|null} [llmModelSettings] Generator llmModelSettings + * @property {google.cloud.dialogflow.cx.v3.Generator.IModelParameter|null} [modelParameter] Generator modelParameter + */ + + /** + * Constructs a new Generator. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a Generator. + * @implements IGenerator + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IGenerator=} [properties] Properties to set + */ + function Generator(properties) { + this.placeholders = []; + 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]]; + } + + /** + * Generator name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.Generator + * @instance + */ + Generator.prototype.name = ""; + + /** + * Generator displayName. + * @member {string} displayName + * @memberof google.cloud.dialogflow.cx.v3.Generator + * @instance + */ + Generator.prototype.displayName = ""; + + /** + * Generator promptText. + * @member {google.cloud.dialogflow.cx.v3.IPhrase|null|undefined} promptText + * @memberof google.cloud.dialogflow.cx.v3.Generator + * @instance + */ + Generator.prototype.promptText = null; + + /** + * Generator placeholders. + * @member {Array.} placeholders + * @memberof google.cloud.dialogflow.cx.v3.Generator + * @instance + */ + Generator.prototype.placeholders = $util.emptyArray; + + /** + * Generator llmModelSettings. + * @member {google.cloud.dialogflow.cx.v3.ILlmModelSettings|null|undefined} llmModelSettings + * @memberof google.cloud.dialogflow.cx.v3.Generator + * @instance + */ + Generator.prototype.llmModelSettings = null; + + /** + * Generator modelParameter. + * @member {google.cloud.dialogflow.cx.v3.Generator.IModelParameter|null|undefined} modelParameter + * @memberof google.cloud.dialogflow.cx.v3.Generator + * @instance + */ + Generator.prototype.modelParameter = null; + + /** + * Creates a new Generator instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.Generator + * @static + * @param {google.cloud.dialogflow.cx.v3.IGenerator=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.Generator} Generator instance + */ + Generator.create = function create(properties) { + return new Generator(properties); + }; + + /** + * Encodes the specified Generator message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Generator.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.Generator + * @static + * @param {google.cloud.dialogflow.cx.v3.IGenerator} message Generator message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Generator.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.promptText != null && Object.hasOwnProperty.call(message, "promptText")) + $root.google.cloud.dialogflow.cx.v3.Phrase.encode(message.promptText, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.placeholders != null && message.placeholders.length) + for (var i = 0; i < message.placeholders.length; ++i) + $root.google.cloud.dialogflow.cx.v3.Generator.Placeholder.encode(message.placeholders[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.modelParameter != null && Object.hasOwnProperty.call(message, "modelParameter")) + $root.google.cloud.dialogflow.cx.v3.Generator.ModelParameter.encode(message.modelParameter, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.llmModelSettings != null && Object.hasOwnProperty.call(message, "llmModelSettings")) + $root.google.cloud.dialogflow.cx.v3.LlmModelSettings.encode(message.llmModelSettings, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Generator message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Generator.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Generator + * @static + * @param {google.cloud.dialogflow.cx.v3.IGenerator} message Generator message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Generator.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Generator message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.Generator + * @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.Generator} Generator + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Generator.decode = function decode(reader, length, error) { + 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.Generator(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.displayName = reader.string(); + break; + } + case 3: { + message.promptText = $root.google.cloud.dialogflow.cx.v3.Phrase.decode(reader, reader.uint32()); + break; + } + case 5: { + if (!(message.placeholders && message.placeholders.length)) + message.placeholders = []; + message.placeholders.push($root.google.cloud.dialogflow.cx.v3.Generator.Placeholder.decode(reader, reader.uint32())); + break; + } + case 9: { + message.llmModelSettings = $root.google.cloud.dialogflow.cx.v3.LlmModelSettings.decode(reader, reader.uint32()); + break; + } + case 8: { + message.modelParameter = $root.google.cloud.dialogflow.cx.v3.Generator.ModelParameter.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Generator message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Generator + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.Generator} Generator + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Generator.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Generator message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.Generator + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Generator.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.promptText != null && message.hasOwnProperty("promptText")) { + var error = $root.google.cloud.dialogflow.cx.v3.Phrase.verify(message.promptText); + if (error) + return "promptText." + error; + } + if (message.placeholders != null && message.hasOwnProperty("placeholders")) { + if (!Array.isArray(message.placeholders)) + return "placeholders: array expected"; + for (var i = 0; i < message.placeholders.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.Generator.Placeholder.verify(message.placeholders[i]); + if (error) + return "placeholders." + error; + } + } + if (message.llmModelSettings != null && message.hasOwnProperty("llmModelSettings")) { + var error = $root.google.cloud.dialogflow.cx.v3.LlmModelSettings.verify(message.llmModelSettings); + if (error) + return "llmModelSettings." + error; + } + if (message.modelParameter != null && message.hasOwnProperty("modelParameter")) { + var error = $root.google.cloud.dialogflow.cx.v3.Generator.ModelParameter.verify(message.modelParameter); + if (error) + return "modelParameter." + error; + } + return null; + }; + + /** + * Creates a Generator message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.Generator + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.Generator} Generator + */ + Generator.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.Generator) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.Generator(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.promptText != null) { + if (typeof object.promptText !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Generator.promptText: object expected"); + message.promptText = $root.google.cloud.dialogflow.cx.v3.Phrase.fromObject(object.promptText); + } + if (object.placeholders) { + if (!Array.isArray(object.placeholders)) + throw TypeError(".google.cloud.dialogflow.cx.v3.Generator.placeholders: array expected"); + message.placeholders = []; + for (var i = 0; i < object.placeholders.length; ++i) { + if (typeof object.placeholders[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Generator.placeholders: object expected"); + message.placeholders[i] = $root.google.cloud.dialogflow.cx.v3.Generator.Placeholder.fromObject(object.placeholders[i]); + } + } + if (object.llmModelSettings != null) { + if (typeof object.llmModelSettings !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Generator.llmModelSettings: object expected"); + message.llmModelSettings = $root.google.cloud.dialogflow.cx.v3.LlmModelSettings.fromObject(object.llmModelSettings); + } + if (object.modelParameter != null) { + if (typeof object.modelParameter !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Generator.modelParameter: object expected"); + message.modelParameter = $root.google.cloud.dialogflow.cx.v3.Generator.ModelParameter.fromObject(object.modelParameter); + } + return message; + }; + + /** + * Creates a plain object from a Generator message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.Generator + * @static + * @param {google.cloud.dialogflow.cx.v3.Generator} message Generator + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Generator.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.placeholders = []; + if (options.defaults) { + object.name = ""; + object.displayName = ""; + object.promptText = null; + object.modelParameter = null; + object.llmModelSettings = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.promptText != null && message.hasOwnProperty("promptText")) + object.promptText = $root.google.cloud.dialogflow.cx.v3.Phrase.toObject(message.promptText, options); + if (message.placeholders && message.placeholders.length) { + object.placeholders = []; + for (var j = 0; j < message.placeholders.length; ++j) + object.placeholders[j] = $root.google.cloud.dialogflow.cx.v3.Generator.Placeholder.toObject(message.placeholders[j], options); + } + if (message.modelParameter != null && message.hasOwnProperty("modelParameter")) + object.modelParameter = $root.google.cloud.dialogflow.cx.v3.Generator.ModelParameter.toObject(message.modelParameter, options); + if (message.llmModelSettings != null && message.hasOwnProperty("llmModelSettings")) + object.llmModelSettings = $root.google.cloud.dialogflow.cx.v3.LlmModelSettings.toObject(message.llmModelSettings, options); + return object; + }; + + /** + * Converts this Generator to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.Generator + * @instance + * @returns {Object.} JSON object + */ + Generator.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Generator + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.Generator + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Generator.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Generator"; + }; + + Generator.Placeholder = (function() { + + /** + * Properties of a Placeholder. + * @memberof google.cloud.dialogflow.cx.v3.Generator + * @interface IPlaceholder + * @property {string|null} [id] Placeholder id + * @property {string|null} [name] Placeholder name + */ + + /** + * Constructs a new Placeholder. + * @memberof google.cloud.dialogflow.cx.v3.Generator + * @classdesc Represents a Placeholder. + * @implements IPlaceholder + * @constructor + * @param {google.cloud.dialogflow.cx.v3.Generator.IPlaceholder=} [properties] Properties to set + */ + function Placeholder(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]]; + } + + /** + * Placeholder id. + * @member {string} id + * @memberof google.cloud.dialogflow.cx.v3.Generator.Placeholder + * @instance + */ + Placeholder.prototype.id = ""; + + /** + * Placeholder name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.Generator.Placeholder + * @instance + */ + Placeholder.prototype.name = ""; + + /** + * Creates a new Placeholder instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.Generator.Placeholder + * @static + * @param {google.cloud.dialogflow.cx.v3.Generator.IPlaceholder=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.Generator.Placeholder} Placeholder instance + */ + Placeholder.create = function create(properties) { + return new Placeholder(properties); + }; + + /** + * Encodes the specified Placeholder message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Generator.Placeholder.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.Generator.Placeholder + * @static + * @param {google.cloud.dialogflow.cx.v3.Generator.IPlaceholder} message Placeholder message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Placeholder.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); + return writer; + }; + + /** + * Encodes the specified Placeholder message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Generator.Placeholder.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Generator.Placeholder + * @static + * @param {google.cloud.dialogflow.cx.v3.Generator.IPlaceholder} message Placeholder message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Placeholder.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Placeholder message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.Generator.Placeholder + * @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.Generator.Placeholder} Placeholder + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Placeholder.decode = function decode(reader, length, error) { + 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.Generator.Placeholder(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.id = reader.string(); + break; + } + case 2: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Placeholder message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Generator.Placeholder + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.Generator.Placeholder} Placeholder + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Placeholder.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Placeholder message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.Generator.Placeholder + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Placeholder.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a Placeholder message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.Generator.Placeholder + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.Generator.Placeholder} Placeholder + */ + Placeholder.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.Generator.Placeholder) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.Generator.Placeholder(); + if (object.id != null) + message.id = String(object.id); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a Placeholder message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.Generator.Placeholder + * @static + * @param {google.cloud.dialogflow.cx.v3.Generator.Placeholder} message Placeholder + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Placeholder.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.id = ""; + object.name = ""; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this Placeholder to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.Generator.Placeholder + * @instance + * @returns {Object.} JSON object + */ + Placeholder.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Placeholder + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.Generator.Placeholder + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Placeholder.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Generator.Placeholder"; + }; + + return Placeholder; + })(); + + Generator.ModelParameter = (function() { + + /** + * Properties of a ModelParameter. + * @memberof google.cloud.dialogflow.cx.v3.Generator + * @interface IModelParameter + * @property {number|null} [temperature] ModelParameter temperature + * @property {number|null} [maxDecodeSteps] ModelParameter maxDecodeSteps + * @property {number|null} [topP] ModelParameter topP + * @property {number|null} [topK] ModelParameter topK + */ + + /** + * Constructs a new ModelParameter. + * @memberof google.cloud.dialogflow.cx.v3.Generator + * @classdesc Represents a ModelParameter. + * @implements IModelParameter + * @constructor + * @param {google.cloud.dialogflow.cx.v3.Generator.IModelParameter=} [properties] Properties to set + */ + function ModelParameter(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]]; + } + + /** + * ModelParameter temperature. + * @member {number|null|undefined} temperature + * @memberof google.cloud.dialogflow.cx.v3.Generator.ModelParameter + * @instance + */ + ModelParameter.prototype.temperature = null; + + /** + * ModelParameter maxDecodeSteps. + * @member {number|null|undefined} maxDecodeSteps + * @memberof google.cloud.dialogflow.cx.v3.Generator.ModelParameter + * @instance + */ + ModelParameter.prototype.maxDecodeSteps = null; + + /** + * ModelParameter topP. + * @member {number|null|undefined} topP + * @memberof google.cloud.dialogflow.cx.v3.Generator.ModelParameter + * @instance + */ + ModelParameter.prototype.topP = null; + + /** + * ModelParameter topK. + * @member {number|null|undefined} topK + * @memberof google.cloud.dialogflow.cx.v3.Generator.ModelParameter + * @instance + */ + ModelParameter.prototype.topK = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ModelParameter.prototype, "_temperature", { + get: $util.oneOfGetter($oneOfFields = ["temperature"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ModelParameter.prototype, "_maxDecodeSteps", { + get: $util.oneOfGetter($oneOfFields = ["maxDecodeSteps"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ModelParameter.prototype, "_topP", { + get: $util.oneOfGetter($oneOfFields = ["topP"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ModelParameter.prototype, "_topK", { + get: $util.oneOfGetter($oneOfFields = ["topK"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ModelParameter instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.Generator.ModelParameter + * @static + * @param {google.cloud.dialogflow.cx.v3.Generator.IModelParameter=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.Generator.ModelParameter} ModelParameter instance + */ + ModelParameter.create = function create(properties) { + return new ModelParameter(properties); + }; + + /** + * Encodes the specified ModelParameter message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Generator.ModelParameter.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.Generator.ModelParameter + * @static + * @param {google.cloud.dialogflow.cx.v3.Generator.IModelParameter} message ModelParameter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ModelParameter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.temperature != null && Object.hasOwnProperty.call(message, "temperature")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.temperature); + if (message.maxDecodeSteps != null && Object.hasOwnProperty.call(message, "maxDecodeSteps")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.maxDecodeSteps); + if (message.topP != null && Object.hasOwnProperty.call(message, "topP")) + writer.uint32(/* id 3, wireType 5 =*/29).float(message.topP); + if (message.topK != null && Object.hasOwnProperty.call(message, "topK")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.topK); + return writer; + }; + + /** + * Encodes the specified ModelParameter message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Generator.ModelParameter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Generator.ModelParameter + * @static + * @param {google.cloud.dialogflow.cx.v3.Generator.IModelParameter} message ModelParameter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ModelParameter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ModelParameter message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.Generator.ModelParameter + * @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.Generator.ModelParameter} ModelParameter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ModelParameter.decode = function decode(reader, length, error) { + 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.Generator.ModelParameter(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.temperature = reader.float(); + break; + } + case 2: { + message.maxDecodeSteps = reader.int32(); + break; + } + case 3: { + message.topP = reader.float(); + break; + } + case 4: { + message.topK = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ModelParameter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Generator.ModelParameter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.Generator.ModelParameter} ModelParameter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ModelParameter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ModelParameter message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.Generator.ModelParameter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ModelParameter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.temperature != null && message.hasOwnProperty("temperature")) { + properties._temperature = 1; + if (typeof message.temperature !== "number") + return "temperature: number expected"; + } + if (message.maxDecodeSteps != null && message.hasOwnProperty("maxDecodeSteps")) { + properties._maxDecodeSteps = 1; + if (!$util.isInteger(message.maxDecodeSteps)) + return "maxDecodeSteps: integer expected"; + } + if (message.topP != null && message.hasOwnProperty("topP")) { + properties._topP = 1; + if (typeof message.topP !== "number") + return "topP: number expected"; + } + if (message.topK != null && message.hasOwnProperty("topK")) { + properties._topK = 1; + if (!$util.isInteger(message.topK)) + return "topK: integer expected"; + } + return null; + }; + + /** + * Creates a ModelParameter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.Generator.ModelParameter + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.Generator.ModelParameter} ModelParameter + */ + ModelParameter.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.Generator.ModelParameter) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.Generator.ModelParameter(); + if (object.temperature != null) + message.temperature = Number(object.temperature); + if (object.maxDecodeSteps != null) + message.maxDecodeSteps = object.maxDecodeSteps | 0; + if (object.topP != null) + message.topP = Number(object.topP); + if (object.topK != null) + message.topK = object.topK | 0; + return message; + }; + + /** + * Creates a plain object from a ModelParameter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.Generator.ModelParameter + * @static + * @param {google.cloud.dialogflow.cx.v3.Generator.ModelParameter} message ModelParameter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ModelParameter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.temperature != null && message.hasOwnProperty("temperature")) { + object.temperature = options.json && !isFinite(message.temperature) ? String(message.temperature) : message.temperature; + if (options.oneofs) + object._temperature = "temperature"; + } + if (message.maxDecodeSteps != null && message.hasOwnProperty("maxDecodeSteps")) { + object.maxDecodeSteps = message.maxDecodeSteps; + if (options.oneofs) + object._maxDecodeSteps = "maxDecodeSteps"; + } + if (message.topP != null && message.hasOwnProperty("topP")) { + object.topP = options.json && !isFinite(message.topP) ? String(message.topP) : message.topP; + if (options.oneofs) + object._topP = "topP"; + } + if (message.topK != null && message.hasOwnProperty("topK")) { + object.topK = message.topK; + if (options.oneofs) + object._topK = "topK"; + } + return object; + }; + + /** + * Converts this ModelParameter to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.Generator.ModelParameter + * @instance + * @returns {Object.} JSON object + */ + ModelParameter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ModelParameter + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.Generator.ModelParameter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ModelParameter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Generator.ModelParameter"; + }; + + return ModelParameter; + })(); + + return Generator; + })(); + + v3.Phrase = (function() { + + /** + * Properties of a Phrase. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IPhrase + * @property {string|null} [text] Phrase text + */ + + /** + * Constructs a new Phrase. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a Phrase. + * @implements IPhrase + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IPhrase=} [properties] Properties to set + */ + function Phrase(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]]; + } + + /** + * Phrase text. + * @member {string} text + * @memberof google.cloud.dialogflow.cx.v3.Phrase + * @instance + */ + Phrase.prototype.text = ""; + + /** + * Creates a new Phrase instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.Phrase + * @static + * @param {google.cloud.dialogflow.cx.v3.IPhrase=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.Phrase} Phrase instance + */ + Phrase.create = function create(properties) { + return new Phrase(properties); + }; + + /** + * Encodes the specified Phrase message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Phrase.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.Phrase + * @static + * @param {google.cloud.dialogflow.cx.v3.IPhrase} message Phrase message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Phrase.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.text != null && Object.hasOwnProperty.call(message, "text")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.text); + return writer; + }; + + /** + * Encodes the specified Phrase message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Phrase.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Phrase + * @static + * @param {google.cloud.dialogflow.cx.v3.IPhrase} message Phrase message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Phrase.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Phrase message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.Phrase + * @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.Phrase} Phrase + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Phrase.decode = function decode(reader, length, error) { + 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.Phrase(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.text = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Phrase message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Phrase + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.Phrase} Phrase + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Phrase.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Phrase message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.Phrase + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Phrase.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.text != null && message.hasOwnProperty("text")) + if (!$util.isString(message.text)) + return "text: string expected"; + return null; + }; + + /** + * Creates a Phrase message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.Phrase + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.Phrase} Phrase + */ + Phrase.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.Phrase) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.Phrase(); + if (object.text != null) + message.text = String(object.text); + return message; + }; + + /** + * Creates a plain object from a Phrase message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.Phrase + * @static + * @param {google.cloud.dialogflow.cx.v3.Phrase} message Phrase + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Phrase.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.text = ""; + if (message.text != null && message.hasOwnProperty("text")) + object.text = message.text; + return object; + }; + + /** + * Converts this Phrase to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.Phrase + * @instance + * @returns {Object.} JSON object + */ + Phrase.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Phrase + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.Phrase + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Phrase.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Phrase"; + }; + + return Phrase; + })(); + + v3.ListGeneratorsRequest = (function() { + + /** + * Properties of a ListGeneratorsRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IListGeneratorsRequest + * @property {string|null} [parent] ListGeneratorsRequest parent + * @property {string|null} [languageCode] ListGeneratorsRequest languageCode + * @property {number|null} [pageSize] ListGeneratorsRequest pageSize + * @property {string|null} [pageToken] ListGeneratorsRequest pageToken + */ + + /** + * Constructs a new ListGeneratorsRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a ListGeneratorsRequest. + * @implements IListGeneratorsRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IListGeneratorsRequest=} [properties] Properties to set + */ + function ListGeneratorsRequest(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]]; + } + + /** + * ListGeneratorsRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.cx.v3.ListGeneratorsRequest + * @instance + */ + ListGeneratorsRequest.prototype.parent = ""; + + /** + * ListGeneratorsRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3.ListGeneratorsRequest + * @instance + */ + ListGeneratorsRequest.prototype.languageCode = ""; + + /** + * ListGeneratorsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dialogflow.cx.v3.ListGeneratorsRequest + * @instance + */ + ListGeneratorsRequest.prototype.pageSize = 0; + + /** + * ListGeneratorsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dialogflow.cx.v3.ListGeneratorsRequest + * @instance + */ + ListGeneratorsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListGeneratorsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.ListGeneratorsRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IListGeneratorsRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ListGeneratorsRequest} ListGeneratorsRequest instance + */ + ListGeneratorsRequest.create = function create(properties) { + return new ListGeneratorsRequest(properties); + }; + + /** + * Encodes the specified ListGeneratorsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListGeneratorsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.ListGeneratorsRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IListGeneratorsRequest} message ListGeneratorsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListGeneratorsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListGeneratorsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListGeneratorsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.ListGeneratorsRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IListGeneratorsRequest} message ListGeneratorsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListGeneratorsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListGeneratorsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.ListGeneratorsRequest + * @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.ListGeneratorsRequest} ListGeneratorsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListGeneratorsRequest.decode = function decode(reader, length, error) { + 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.ListGeneratorsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.languageCode = reader.string(); + break; + } + case 3: { + message.pageSize = reader.int32(); + break; + } + case 4: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListGeneratorsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.ListGeneratorsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.ListGeneratorsRequest} ListGeneratorsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListGeneratorsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListGeneratorsRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.ListGeneratorsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListGeneratorsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListGeneratorsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.ListGeneratorsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.ListGeneratorsRequest} ListGeneratorsRequest + */ + ListGeneratorsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListGeneratorsRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.ListGeneratorsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.languageCode != null) + message.languageCode = String(object.languageCode); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListGeneratorsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.ListGeneratorsRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.ListGeneratorsRequest} message ListGeneratorsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListGeneratorsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.languageCode = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListGeneratorsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.ListGeneratorsRequest + * @instance + * @returns {Object.} JSON object + */ + ListGeneratorsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListGeneratorsRequest + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.ListGeneratorsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListGeneratorsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListGeneratorsRequest"; + }; + + return ListGeneratorsRequest; + })(); + + v3.ListGeneratorsResponse = (function() { + + /** + * Properties of a ListGeneratorsResponse. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IListGeneratorsResponse + * @property {Array.|null} [generators] ListGeneratorsResponse generators + * @property {string|null} [nextPageToken] ListGeneratorsResponse nextPageToken + */ + + /** + * Constructs a new ListGeneratorsResponse. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a ListGeneratorsResponse. + * @implements IListGeneratorsResponse + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IListGeneratorsResponse=} [properties] Properties to set + */ + function ListGeneratorsResponse(properties) { + this.generators = []; + 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]]; + } + + /** + * ListGeneratorsResponse generators. + * @member {Array.} generators + * @memberof google.cloud.dialogflow.cx.v3.ListGeneratorsResponse + * @instance + */ + ListGeneratorsResponse.prototype.generators = $util.emptyArray; + + /** + * ListGeneratorsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dialogflow.cx.v3.ListGeneratorsResponse + * @instance + */ + ListGeneratorsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListGeneratorsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.ListGeneratorsResponse + * @static + * @param {google.cloud.dialogflow.cx.v3.IListGeneratorsResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ListGeneratorsResponse} ListGeneratorsResponse instance + */ + ListGeneratorsResponse.create = function create(properties) { + return new ListGeneratorsResponse(properties); + }; + + /** + * Encodes the specified ListGeneratorsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListGeneratorsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.ListGeneratorsResponse + * @static + * @param {google.cloud.dialogflow.cx.v3.IListGeneratorsResponse} message ListGeneratorsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListGeneratorsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.generators != null && message.generators.length) + for (var i = 0; i < message.generators.length; ++i) + $root.google.cloud.dialogflow.cx.v3.Generator.encode(message.generators[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListGeneratorsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListGeneratorsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.ListGeneratorsResponse + * @static + * @param {google.cloud.dialogflow.cx.v3.IListGeneratorsResponse} message ListGeneratorsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListGeneratorsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListGeneratorsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.ListGeneratorsResponse + * @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.ListGeneratorsResponse} ListGeneratorsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListGeneratorsResponse.decode = function decode(reader, length, error) { + 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.ListGeneratorsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.generators && message.generators.length)) + message.generators = []; + message.generators.push($root.google.cloud.dialogflow.cx.v3.Generator.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListGeneratorsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.ListGeneratorsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.ListGeneratorsResponse} ListGeneratorsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListGeneratorsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListGeneratorsResponse message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.ListGeneratorsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListGeneratorsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.generators != null && message.hasOwnProperty("generators")) { + if (!Array.isArray(message.generators)) + return "generators: array expected"; + for (var i = 0; i < message.generators.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.Generator.verify(message.generators[i]); + if (error) + return "generators." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListGeneratorsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.ListGeneratorsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.ListGeneratorsResponse} ListGeneratorsResponse + */ + ListGeneratorsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListGeneratorsResponse) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.ListGeneratorsResponse(); + if (object.generators) { + if (!Array.isArray(object.generators)) + throw TypeError(".google.cloud.dialogflow.cx.v3.ListGeneratorsResponse.generators: array expected"); + message.generators = []; + for (var i = 0; i < object.generators.length; ++i) { + if (typeof object.generators[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.ListGeneratorsResponse.generators: object expected"); + message.generators[i] = $root.google.cloud.dialogflow.cx.v3.Generator.fromObject(object.generators[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListGeneratorsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.ListGeneratorsResponse + * @static + * @param {google.cloud.dialogflow.cx.v3.ListGeneratorsResponse} message ListGeneratorsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListGeneratorsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.generators = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.generators && message.generators.length) { + object.generators = []; + for (var j = 0; j < message.generators.length; ++j) + object.generators[j] = $root.google.cloud.dialogflow.cx.v3.Generator.toObject(message.generators[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListGeneratorsResponse to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.ListGeneratorsResponse + * @instance + * @returns {Object.} JSON object + */ + ListGeneratorsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListGeneratorsResponse + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.ListGeneratorsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListGeneratorsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListGeneratorsResponse"; + }; + + return ListGeneratorsResponse; + })(); + + v3.GetGeneratorRequest = (function() { + + /** + * Properties of a GetGeneratorRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IGetGeneratorRequest + * @property {string|null} [name] GetGeneratorRequest name + * @property {string|null} [languageCode] GetGeneratorRequest languageCode + */ + + /** + * Constructs a new GetGeneratorRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a GetGeneratorRequest. + * @implements IGetGeneratorRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IGetGeneratorRequest=} [properties] Properties to set + */ + function GetGeneratorRequest(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]]; + } + + /** + * GetGeneratorRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.GetGeneratorRequest + * @instance + */ + GetGeneratorRequest.prototype.name = ""; + + /** + * GetGeneratorRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3.GetGeneratorRequest + * @instance + */ + GetGeneratorRequest.prototype.languageCode = ""; + + /** + * Creates a new GetGeneratorRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.GetGeneratorRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IGetGeneratorRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.GetGeneratorRequest} GetGeneratorRequest instance + */ + GetGeneratorRequest.create = function create(properties) { + return new GetGeneratorRequest(properties); + }; + + /** + * Encodes the specified GetGeneratorRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetGeneratorRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.GetGeneratorRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IGetGeneratorRequest} message GetGeneratorRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetGeneratorRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); + return writer; + }; + + /** + * Encodes the specified GetGeneratorRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetGeneratorRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.GetGeneratorRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IGetGeneratorRequest} message GetGeneratorRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetGeneratorRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetGeneratorRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.GetGeneratorRequest + * @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.GetGeneratorRequest} GetGeneratorRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetGeneratorRequest.decode = function decode(reader, length, error) { + 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.GetGeneratorRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.languageCode = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetGeneratorRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.GetGeneratorRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.GetGeneratorRequest} GetGeneratorRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetGeneratorRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetGeneratorRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.GetGeneratorRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetGeneratorRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; + return null; + }; + + /** + * Creates a GetGeneratorRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.GetGeneratorRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.GetGeneratorRequest} GetGeneratorRequest + */ + GetGeneratorRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.GetGeneratorRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.GetGeneratorRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.languageCode != null) + message.languageCode = String(object.languageCode); + return message; + }; + + /** + * Creates a plain object from a GetGeneratorRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.GetGeneratorRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.GetGeneratorRequest} message GetGeneratorRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetGeneratorRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.languageCode = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; + return object; + }; + + /** + * Converts this GetGeneratorRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.GetGeneratorRequest + * @instance + * @returns {Object.} JSON object + */ + GetGeneratorRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetGeneratorRequest + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.GetGeneratorRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetGeneratorRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.GetGeneratorRequest"; + }; + + return GetGeneratorRequest; + })(); + + v3.CreateGeneratorRequest = (function() { + + /** + * Properties of a CreateGeneratorRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface ICreateGeneratorRequest + * @property {string|null} [parent] CreateGeneratorRequest parent + * @property {google.cloud.dialogflow.cx.v3.IGenerator|null} [generator] CreateGeneratorRequest generator + * @property {string|null} [languageCode] CreateGeneratorRequest languageCode + */ + + /** + * Constructs a new CreateGeneratorRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a CreateGeneratorRequest. + * @implements ICreateGeneratorRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3.ICreateGeneratorRequest=} [properties] Properties to set + */ + function CreateGeneratorRequest(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]]; + } + + /** + * CreateGeneratorRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.cx.v3.CreateGeneratorRequest + * @instance + */ + CreateGeneratorRequest.prototype.parent = ""; + + /** + * CreateGeneratorRequest generator. + * @member {google.cloud.dialogflow.cx.v3.IGenerator|null|undefined} generator + * @memberof google.cloud.dialogflow.cx.v3.CreateGeneratorRequest + * @instance + */ + CreateGeneratorRequest.prototype.generator = null; + + /** + * CreateGeneratorRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3.CreateGeneratorRequest + * @instance + */ + CreateGeneratorRequest.prototype.languageCode = ""; + + /** + * Creates a new CreateGeneratorRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.CreateGeneratorRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.ICreateGeneratorRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.CreateGeneratorRequest} CreateGeneratorRequest instance + */ + CreateGeneratorRequest.create = function create(properties) { + return new CreateGeneratorRequest(properties); + }; + + /** + * Encodes the specified CreateGeneratorRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateGeneratorRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.CreateGeneratorRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.ICreateGeneratorRequest} message CreateGeneratorRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateGeneratorRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.generator != null && Object.hasOwnProperty.call(message, "generator")) + $root.google.cloud.dialogflow.cx.v3.Generator.encode(message.generator, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.languageCode); + return writer; + }; + + /** + * Encodes the specified CreateGeneratorRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateGeneratorRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.CreateGeneratorRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.ICreateGeneratorRequest} message CreateGeneratorRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateGeneratorRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateGeneratorRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.CreateGeneratorRequest + * @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.CreateGeneratorRequest} CreateGeneratorRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateGeneratorRequest.decode = function decode(reader, length, error) { + 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.CreateGeneratorRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.generator = $root.google.cloud.dialogflow.cx.v3.Generator.decode(reader, reader.uint32()); + break; + } + case 3: { + message.languageCode = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateGeneratorRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.CreateGeneratorRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.CreateGeneratorRequest} CreateGeneratorRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateGeneratorRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateGeneratorRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.CreateGeneratorRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateGeneratorRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.generator != null && message.hasOwnProperty("generator")) { + var error = $root.google.cloud.dialogflow.cx.v3.Generator.verify(message.generator); + if (error) + return "generator." + error; + } + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; + return null; + }; + + /** + * Creates a CreateGeneratorRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.CreateGeneratorRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.CreateGeneratorRequest} CreateGeneratorRequest + */ + CreateGeneratorRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.CreateGeneratorRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.CreateGeneratorRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.generator != null) { + if (typeof object.generator !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.CreateGeneratorRequest.generator: object expected"); + message.generator = $root.google.cloud.dialogflow.cx.v3.Generator.fromObject(object.generator); + } + if (object.languageCode != null) + message.languageCode = String(object.languageCode); + return message; + }; + + /** + * Creates a plain object from a CreateGeneratorRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.CreateGeneratorRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.CreateGeneratorRequest} message CreateGeneratorRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateGeneratorRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.generator = null; + object.languageCode = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.generator != null && message.hasOwnProperty("generator")) + object.generator = $root.google.cloud.dialogflow.cx.v3.Generator.toObject(message.generator, options); + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; + return object; + }; + + /** + * Converts this CreateGeneratorRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.CreateGeneratorRequest + * @instance + * @returns {Object.} JSON object + */ + CreateGeneratorRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateGeneratorRequest + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.CreateGeneratorRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateGeneratorRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.CreateGeneratorRequest"; + }; + + return CreateGeneratorRequest; + })(); + + v3.UpdateGeneratorRequest = (function() { + + /** + * Properties of an UpdateGeneratorRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IUpdateGeneratorRequest + * @property {google.cloud.dialogflow.cx.v3.IGenerator|null} [generator] UpdateGeneratorRequest generator + * @property {string|null} [languageCode] UpdateGeneratorRequest languageCode + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateGeneratorRequest updateMask + */ + + /** + * Constructs a new UpdateGeneratorRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents an UpdateGeneratorRequest. + * @implements IUpdateGeneratorRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IUpdateGeneratorRequest=} [properties] Properties to set + */ + function UpdateGeneratorRequest(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]]; + } + + /** + * UpdateGeneratorRequest generator. + * @member {google.cloud.dialogflow.cx.v3.IGenerator|null|undefined} generator + * @memberof google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest + * @instance + */ + UpdateGeneratorRequest.prototype.generator = null; + + /** + * UpdateGeneratorRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest + * @instance + */ + UpdateGeneratorRequest.prototype.languageCode = ""; + + /** + * UpdateGeneratorRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest + * @instance + */ + UpdateGeneratorRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateGeneratorRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IUpdateGeneratorRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest} UpdateGeneratorRequest instance + */ + UpdateGeneratorRequest.create = function create(properties) { + return new UpdateGeneratorRequest(properties); + }; + + /** + * Encodes the specified UpdateGeneratorRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IUpdateGeneratorRequest} message UpdateGeneratorRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateGeneratorRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.generator != null && Object.hasOwnProperty.call(message, "generator")) + $root.google.cloud.dialogflow.cx.v3.Generator.encode(message.generator, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateGeneratorRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IUpdateGeneratorRequest} message UpdateGeneratorRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateGeneratorRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateGeneratorRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest + * @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.UpdateGeneratorRequest} UpdateGeneratorRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateGeneratorRequest.decode = function decode(reader, length, error) { + 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.UpdateGeneratorRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.generator = $root.google.cloud.dialogflow.cx.v3.Generator.decode(reader, reader.uint32()); + break; + } + case 2: { + message.languageCode = reader.string(); + break; + } + case 3: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateGeneratorRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest} UpdateGeneratorRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateGeneratorRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateGeneratorRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateGeneratorRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.generator != null && message.hasOwnProperty("generator")) { + var error = $root.google.cloud.dialogflow.cx.v3.Generator.verify(message.generator); + if (error) + return "generator." + error; + } + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + return null; + }; + + /** + * Creates an UpdateGeneratorRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest} UpdateGeneratorRequest + */ + UpdateGeneratorRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest(); + if (object.generator != null) { + if (typeof object.generator !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest.generator: object expected"); + message.generator = $root.google.cloud.dialogflow.cx.v3.Generator.fromObject(object.generator); + } + if (object.languageCode != null) + message.languageCode = String(object.languageCode); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateGeneratorRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest} message UpdateGeneratorRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateGeneratorRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.generator = null; + object.languageCode = ""; + object.updateMask = null; + } + if (message.generator != null && message.hasOwnProperty("generator")) + object.generator = $root.google.cloud.dialogflow.cx.v3.Generator.toObject(message.generator, options); + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateGeneratorRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateGeneratorRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateGeneratorRequest + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateGeneratorRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest"; + }; + + return UpdateGeneratorRequest; + })(); + + v3.DeleteGeneratorRequest = (function() { + + /** + * Properties of a DeleteGeneratorRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IDeleteGeneratorRequest + * @property {string|null} [name] DeleteGeneratorRequest name + * @property {boolean|null} [force] DeleteGeneratorRequest force + */ + + /** + * Constructs a new DeleteGeneratorRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a DeleteGeneratorRequest. + * @implements IDeleteGeneratorRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IDeleteGeneratorRequest=} [properties] Properties to set + */ + function DeleteGeneratorRequest(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]]; + } + + /** + * DeleteGeneratorRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest + * @instance + */ + DeleteGeneratorRequest.prototype.name = ""; + + /** + * DeleteGeneratorRequest force. + * @member {boolean} force + * @memberof google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest + * @instance + */ + DeleteGeneratorRequest.prototype.force = false; + + /** + * Creates a new DeleteGeneratorRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IDeleteGeneratorRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest} DeleteGeneratorRequest instance + */ + DeleteGeneratorRequest.create = function create(properties) { + return new DeleteGeneratorRequest(properties); + }; + + /** + * Encodes the specified DeleteGeneratorRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IDeleteGeneratorRequest} message DeleteGeneratorRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteGeneratorRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.force != null && Object.hasOwnProperty.call(message, "force")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.force); + return writer; + }; + + /** + * Encodes the specified DeleteGeneratorRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IDeleteGeneratorRequest} message DeleteGeneratorRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteGeneratorRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteGeneratorRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest + * @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.DeleteGeneratorRequest} DeleteGeneratorRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteGeneratorRequest.decode = function decode(reader, length, error) { + 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.DeleteGeneratorRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.force = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteGeneratorRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest} DeleteGeneratorRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteGeneratorRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteGeneratorRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteGeneratorRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.force != null && message.hasOwnProperty("force")) + if (typeof message.force !== "boolean") + return "force: boolean expected"; + return null; + }; + + /** + * Creates a DeleteGeneratorRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest} DeleteGeneratorRequest + */ + DeleteGeneratorRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.force != null) + message.force = Boolean(object.force); + return message; + }; + + /** + * Creates a plain object from a DeleteGeneratorRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest} message DeleteGeneratorRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteGeneratorRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.force = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.force != null && message.hasOwnProperty("force")) + object.force = message.force; + return object; + }; + + /** + * Converts this DeleteGeneratorRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteGeneratorRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteGeneratorRequest + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteGeneratorRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest"; + }; + + return DeleteGeneratorRequest; + })(); + + v3.Playbooks = (function() { + + /** + * Constructs a new Playbooks service. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a Playbooks + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Playbooks(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Playbooks.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Playbooks; + + /** + * Creates new Playbooks service using the specified rpc implementation. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.Playbooks + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Playbooks} RPC service. Useful where requests and/or responses are streamed. + */ + Playbooks.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Playbooks|createPlaybook}. + * @memberof google.cloud.dialogflow.cx.v3.Playbooks + * @typedef CreatePlaybookCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.Playbook} [response] Playbook + */ + + /** + * Calls CreatePlaybook. + * @function createPlaybook + * @memberof google.cloud.dialogflow.cx.v3.Playbooks + * @instance + * @param {google.cloud.dialogflow.cx.v3.ICreatePlaybookRequest} request CreatePlaybookRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Playbooks.CreatePlaybookCallback} callback Node-style callback called with the error, if any, and Playbook + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Playbooks.prototype.createPlaybook = function createPlaybook(request, callback) { + return this.rpcCall(createPlaybook, $root.google.cloud.dialogflow.cx.v3.CreatePlaybookRequest, $root.google.cloud.dialogflow.cx.v3.Playbook, request, callback); + }, "name", { value: "CreatePlaybook" }); + + /** + * Calls CreatePlaybook. + * @function createPlaybook + * @memberof google.cloud.dialogflow.cx.v3.Playbooks + * @instance + * @param {google.cloud.dialogflow.cx.v3.ICreatePlaybookRequest} request CreatePlaybookRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Playbooks|deletePlaybook}. + * @memberof google.cloud.dialogflow.cx.v3.Playbooks + * @typedef DeletePlaybookCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeletePlaybook. + * @function deletePlaybook + * @memberof google.cloud.dialogflow.cx.v3.Playbooks + * @instance + * @param {google.cloud.dialogflow.cx.v3.IDeletePlaybookRequest} request DeletePlaybookRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Playbooks.DeletePlaybookCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Playbooks.prototype.deletePlaybook = function deletePlaybook(request, callback) { + return this.rpcCall(deletePlaybook, $root.google.cloud.dialogflow.cx.v3.DeletePlaybookRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeletePlaybook" }); + + /** + * Calls DeletePlaybook. + * @function deletePlaybook + * @memberof google.cloud.dialogflow.cx.v3.Playbooks + * @instance + * @param {google.cloud.dialogflow.cx.v3.IDeletePlaybookRequest} request DeletePlaybookRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Playbooks|listPlaybooks}. + * @memberof google.cloud.dialogflow.cx.v3.Playbooks + * @typedef ListPlaybooksCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.ListPlaybooksResponse} [response] ListPlaybooksResponse + */ + + /** + * Calls ListPlaybooks. + * @function listPlaybooks + * @memberof google.cloud.dialogflow.cx.v3.Playbooks + * @instance + * @param {google.cloud.dialogflow.cx.v3.IListPlaybooksRequest} request ListPlaybooksRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Playbooks.ListPlaybooksCallback} callback Node-style callback called with the error, if any, and ListPlaybooksResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Playbooks.prototype.listPlaybooks = function listPlaybooks(request, callback) { + return this.rpcCall(listPlaybooks, $root.google.cloud.dialogflow.cx.v3.ListPlaybooksRequest, $root.google.cloud.dialogflow.cx.v3.ListPlaybooksResponse, request, callback); + }, "name", { value: "ListPlaybooks" }); + + /** + * Calls ListPlaybooks. + * @function listPlaybooks + * @memberof google.cloud.dialogflow.cx.v3.Playbooks + * @instance + * @param {google.cloud.dialogflow.cx.v3.IListPlaybooksRequest} request ListPlaybooksRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Playbooks|getPlaybook}. + * @memberof google.cloud.dialogflow.cx.v3.Playbooks + * @typedef GetPlaybookCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.Playbook} [response] Playbook + */ + + /** + * Calls GetPlaybook. + * @function getPlaybook + * @memberof google.cloud.dialogflow.cx.v3.Playbooks + * @instance + * @param {google.cloud.dialogflow.cx.v3.IGetPlaybookRequest} request GetPlaybookRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Playbooks.GetPlaybookCallback} callback Node-style callback called with the error, if any, and Playbook + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Playbooks.prototype.getPlaybook = function getPlaybook(request, callback) { + return this.rpcCall(getPlaybook, $root.google.cloud.dialogflow.cx.v3.GetPlaybookRequest, $root.google.cloud.dialogflow.cx.v3.Playbook, request, callback); + }, "name", { value: "GetPlaybook" }); + + /** + * Calls GetPlaybook. + * @function getPlaybook + * @memberof google.cloud.dialogflow.cx.v3.Playbooks + * @instance + * @param {google.cloud.dialogflow.cx.v3.IGetPlaybookRequest} request GetPlaybookRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Playbooks|exportPlaybook}. + * @memberof google.cloud.dialogflow.cx.v3.Playbooks + * @typedef ExportPlaybookCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls ExportPlaybook. + * @function exportPlaybook + * @memberof google.cloud.dialogflow.cx.v3.Playbooks + * @instance + * @param {google.cloud.dialogflow.cx.v3.IExportPlaybookRequest} request ExportPlaybookRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Playbooks.ExportPlaybookCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Playbooks.prototype.exportPlaybook = function exportPlaybook(request, callback) { + return this.rpcCall(exportPlaybook, $root.google.cloud.dialogflow.cx.v3.ExportPlaybookRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "ExportPlaybook" }); + + /** + * Calls ExportPlaybook. + * @function exportPlaybook + * @memberof google.cloud.dialogflow.cx.v3.Playbooks + * @instance + * @param {google.cloud.dialogflow.cx.v3.IExportPlaybookRequest} request ExportPlaybookRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Playbooks|importPlaybook}. + * @memberof google.cloud.dialogflow.cx.v3.Playbooks + * @typedef ImportPlaybookCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls ImportPlaybook. + * @function importPlaybook + * @memberof google.cloud.dialogflow.cx.v3.Playbooks + * @instance + * @param {google.cloud.dialogflow.cx.v3.IImportPlaybookRequest} request ImportPlaybookRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Playbooks.ImportPlaybookCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Playbooks.prototype.importPlaybook = function importPlaybook(request, callback) { + return this.rpcCall(importPlaybook, $root.google.cloud.dialogflow.cx.v3.ImportPlaybookRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "ImportPlaybook" }); + + /** + * Calls ImportPlaybook. + * @function importPlaybook + * @memberof google.cloud.dialogflow.cx.v3.Playbooks + * @instance + * @param {google.cloud.dialogflow.cx.v3.IImportPlaybookRequest} request ImportPlaybookRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Playbooks|updatePlaybook}. + * @memberof google.cloud.dialogflow.cx.v3.Playbooks + * @typedef UpdatePlaybookCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.Playbook} [response] Playbook + */ + + /** + * Calls UpdatePlaybook. + * @function updatePlaybook + * @memberof google.cloud.dialogflow.cx.v3.Playbooks + * @instance + * @param {google.cloud.dialogflow.cx.v3.IUpdatePlaybookRequest} request UpdatePlaybookRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Playbooks.UpdatePlaybookCallback} callback Node-style callback called with the error, if any, and Playbook + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Playbooks.prototype.updatePlaybook = function updatePlaybook(request, callback) { + return this.rpcCall(updatePlaybook, $root.google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest, $root.google.cloud.dialogflow.cx.v3.Playbook, request, callback); + }, "name", { value: "UpdatePlaybook" }); + + /** + * Calls UpdatePlaybook. + * @function updatePlaybook + * @memberof google.cloud.dialogflow.cx.v3.Playbooks + * @instance + * @param {google.cloud.dialogflow.cx.v3.IUpdatePlaybookRequest} request UpdatePlaybookRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Playbooks|createPlaybookVersion}. + * @memberof google.cloud.dialogflow.cx.v3.Playbooks + * @typedef CreatePlaybookVersionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.PlaybookVersion} [response] PlaybookVersion + */ + + /** + * Calls CreatePlaybookVersion. + * @function createPlaybookVersion + * @memberof google.cloud.dialogflow.cx.v3.Playbooks + * @instance + * @param {google.cloud.dialogflow.cx.v3.ICreatePlaybookVersionRequest} request CreatePlaybookVersionRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Playbooks.CreatePlaybookVersionCallback} callback Node-style callback called with the error, if any, and PlaybookVersion + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Playbooks.prototype.createPlaybookVersion = function createPlaybookVersion(request, callback) { + return this.rpcCall(createPlaybookVersion, $root.google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest, $root.google.cloud.dialogflow.cx.v3.PlaybookVersion, request, callback); + }, "name", { value: "CreatePlaybookVersion" }); - /** - * Creates a plain object from a GenericWebService message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService - * @static - * @param {google.cloud.dialogflow.cx.v3.Webhook.GenericWebService} message GenericWebService - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GenericWebService.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.allowedCaCerts = []; - if (options.objects || options.defaults) { - object.requestHeaders = {}; - object.parameterMapping = {}; - } - if (options.defaults) { - object.uri = ""; - object.username = ""; - object.password = ""; - object.webhookType = options.enums === String ? "WEBHOOK_TYPE_UNSPECIFIED" : 0; - object.httpMethod = options.enums === String ? "HTTP_METHOD_UNSPECIFIED" : 0; - object.requestBody = ""; - object.oauthConfig = null; - object.serviceAgentAuth = options.enums === String ? "SERVICE_AGENT_AUTH_UNSPECIFIED" : 0; - } - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - if (message.username != null && message.hasOwnProperty("username")) - object.username = message.username; - if (message.password != null && message.hasOwnProperty("password")) - object.password = message.password; - var keys2; - if (message.requestHeaders && (keys2 = Object.keys(message.requestHeaders)).length) { - object.requestHeaders = {}; - for (var j = 0; j < keys2.length; ++j) - object.requestHeaders[keys2[j]] = message.requestHeaders[keys2[j]]; - } - if (message.allowedCaCerts && message.allowedCaCerts.length) { - object.allowedCaCerts = []; - for (var j = 0; j < message.allowedCaCerts.length; ++j) - object.allowedCaCerts[j] = options.bytes === String ? $util.base64.encode(message.allowedCaCerts[j], 0, message.allowedCaCerts[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.allowedCaCerts[j]) : message.allowedCaCerts[j]; - } - if (message.webhookType != null && message.hasOwnProperty("webhookType")) - object.webhookType = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.WebhookType[message.webhookType] === undefined ? message.webhookType : $root.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.WebhookType[message.webhookType] : message.webhookType; - if (message.httpMethod != null && message.hasOwnProperty("httpMethod")) - object.httpMethod = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.HttpMethod[message.httpMethod] === undefined ? message.httpMethod : $root.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.HttpMethod[message.httpMethod] : message.httpMethod; - if (message.requestBody != null && message.hasOwnProperty("requestBody")) - object.requestBody = message.requestBody; - if (message.parameterMapping && (keys2 = Object.keys(message.parameterMapping)).length) { - object.parameterMapping = {}; - for (var j = 0; j < keys2.length; ++j) - object.parameterMapping[keys2[j]] = message.parameterMapping[keys2[j]]; - } - if (message.oauthConfig != null && message.hasOwnProperty("oauthConfig")) - object.oauthConfig = $root.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig.toObject(message.oauthConfig, options); - if (message.serviceAgentAuth != null && message.hasOwnProperty("serviceAgentAuth")) - object.serviceAgentAuth = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAgentAuth[message.serviceAgentAuth] === undefined ? message.serviceAgentAuth : $root.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAgentAuth[message.serviceAgentAuth] : message.serviceAgentAuth; - return object; - }; + /** + * Calls CreatePlaybookVersion. + * @function createPlaybookVersion + * @memberof google.cloud.dialogflow.cx.v3.Playbooks + * @instance + * @param {google.cloud.dialogflow.cx.v3.ICreatePlaybookVersionRequest} request CreatePlaybookVersionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Converts this GenericWebService to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService - * @instance - * @returns {Object.} JSON object - */ - GenericWebService.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Playbooks|getPlaybookVersion}. + * @memberof google.cloud.dialogflow.cx.v3.Playbooks + * @typedef GetPlaybookVersionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.PlaybookVersion} [response] PlaybookVersion + */ - /** - * Gets the default type url for GenericWebService - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GenericWebService.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Webhook.GenericWebService"; - }; + /** + * Calls GetPlaybookVersion. + * @function getPlaybookVersion + * @memberof google.cloud.dialogflow.cx.v3.Playbooks + * @instance + * @param {google.cloud.dialogflow.cx.v3.IGetPlaybookVersionRequest} request GetPlaybookVersionRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Playbooks.GetPlaybookVersionCallback} callback Node-style callback called with the error, if any, and PlaybookVersion + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Playbooks.prototype.getPlaybookVersion = function getPlaybookVersion(request, callback) { + return this.rpcCall(getPlaybookVersion, $root.google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest, $root.google.cloud.dialogflow.cx.v3.PlaybookVersion, request, callback); + }, "name", { value: "GetPlaybookVersion" }); - GenericWebService.OAuthConfig = (function() { + /** + * Calls GetPlaybookVersion. + * @function getPlaybookVersion + * @memberof google.cloud.dialogflow.cx.v3.Playbooks + * @instance + * @param {google.cloud.dialogflow.cx.v3.IGetPlaybookVersionRequest} request GetPlaybookVersionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Properties of a OAuthConfig. - * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService - * @interface IOAuthConfig - * @property {string|null} [clientId] OAuthConfig clientId - * @property {string|null} [clientSecret] OAuthConfig clientSecret - * @property {string|null} [tokenEndpoint] OAuthConfig tokenEndpoint - * @property {Array.|null} [scopes] OAuthConfig scopes - */ + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Playbooks|restorePlaybookVersion}. + * @memberof google.cloud.dialogflow.cx.v3.Playbooks + * @typedef RestorePlaybookVersionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse} [response] RestorePlaybookVersionResponse + */ - /** - * Constructs a new OAuthConfig. - * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService - * @classdesc Represents a OAuthConfig. - * @implements IOAuthConfig - * @constructor - * @param {google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.IOAuthConfig=} [properties] Properties to set - */ - function OAuthConfig(properties) { - this.scopes = []; - 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]]; - } + /** + * Calls RestorePlaybookVersion. + * @function restorePlaybookVersion + * @memberof google.cloud.dialogflow.cx.v3.Playbooks + * @instance + * @param {google.cloud.dialogflow.cx.v3.IRestorePlaybookVersionRequest} request RestorePlaybookVersionRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Playbooks.RestorePlaybookVersionCallback} callback Node-style callback called with the error, if any, and RestorePlaybookVersionResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Playbooks.prototype.restorePlaybookVersion = function restorePlaybookVersion(request, callback) { + return this.rpcCall(restorePlaybookVersion, $root.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest, $root.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse, request, callback); + }, "name", { value: "RestorePlaybookVersion" }); - /** - * OAuthConfig clientId. - * @member {string} clientId - * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig - * @instance - */ - OAuthConfig.prototype.clientId = ""; + /** + * Calls RestorePlaybookVersion. + * @function restorePlaybookVersion + * @memberof google.cloud.dialogflow.cx.v3.Playbooks + * @instance + * @param {google.cloud.dialogflow.cx.v3.IRestorePlaybookVersionRequest} request RestorePlaybookVersionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * OAuthConfig clientSecret. - * @member {string} clientSecret - * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig - * @instance - */ - OAuthConfig.prototype.clientSecret = ""; + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Playbooks|listPlaybookVersions}. + * @memberof google.cloud.dialogflow.cx.v3.Playbooks + * @typedef ListPlaybookVersionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponse} [response] ListPlaybookVersionsResponse + */ - /** - * OAuthConfig tokenEndpoint. - * @member {string} tokenEndpoint - * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig - * @instance - */ - OAuthConfig.prototype.tokenEndpoint = ""; + /** + * Calls ListPlaybookVersions. + * @function listPlaybookVersions + * @memberof google.cloud.dialogflow.cx.v3.Playbooks + * @instance + * @param {google.cloud.dialogflow.cx.v3.IListPlaybookVersionsRequest} request ListPlaybookVersionsRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Playbooks.ListPlaybookVersionsCallback} callback Node-style callback called with the error, if any, and ListPlaybookVersionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Playbooks.prototype.listPlaybookVersions = function listPlaybookVersions(request, callback) { + return this.rpcCall(listPlaybookVersions, $root.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest, $root.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponse, request, callback); + }, "name", { value: "ListPlaybookVersions" }); - /** - * OAuthConfig scopes. - * @member {Array.} scopes - * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig - * @instance - */ - OAuthConfig.prototype.scopes = $util.emptyArray; + /** + * Calls ListPlaybookVersions. + * @function listPlaybookVersions + * @memberof google.cloud.dialogflow.cx.v3.Playbooks + * @instance + * @param {google.cloud.dialogflow.cx.v3.IListPlaybookVersionsRequest} request ListPlaybookVersionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Creates a new OAuthConfig instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig - * @static - * @param {google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.IOAuthConfig=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig} OAuthConfig instance - */ - OAuthConfig.create = function create(properties) { - return new OAuthConfig(properties); - }; + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Playbooks|deletePlaybookVersion}. + * @memberof google.cloud.dialogflow.cx.v3.Playbooks + * @typedef DeletePlaybookVersionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ - /** - * Encodes the specified OAuthConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig - * @static - * @param {google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.IOAuthConfig} message OAuthConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OAuthConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.clientId != null && Object.hasOwnProperty.call(message, "clientId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.clientId); - if (message.clientSecret != null && Object.hasOwnProperty.call(message, "clientSecret")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.clientSecret); - if (message.tokenEndpoint != null && Object.hasOwnProperty.call(message, "tokenEndpoint")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.tokenEndpoint); - if (message.scopes != null && message.scopes.length) - for (var i = 0; i < message.scopes.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.scopes[i]); - return writer; - }; + /** + * Calls DeletePlaybookVersion. + * @function deletePlaybookVersion + * @memberof google.cloud.dialogflow.cx.v3.Playbooks + * @instance + * @param {google.cloud.dialogflow.cx.v3.IDeletePlaybookVersionRequest} request DeletePlaybookVersionRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Playbooks.DeletePlaybookVersionCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Playbooks.prototype.deletePlaybookVersion = function deletePlaybookVersion(request, callback) { + return this.rpcCall(deletePlaybookVersion, $root.google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeletePlaybookVersion" }); - /** - * Encodes the specified OAuthConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig - * @static - * @param {google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.IOAuthConfig} message OAuthConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OAuthConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Calls DeletePlaybookVersion. + * @function deletePlaybookVersion + * @memberof google.cloud.dialogflow.cx.v3.Playbooks + * @instance + * @param {google.cloud.dialogflow.cx.v3.IDeletePlaybookVersionRequest} request DeletePlaybookVersionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Decodes a OAuthConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig - * @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.Webhook.GenericWebService.OAuthConfig} OAuthConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OAuthConfig.decode = function decode(reader, length, error) { - 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.Webhook.GenericWebService.OAuthConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.clientId = reader.string(); - break; - } - case 2: { - message.clientSecret = reader.string(); - break; - } - case 3: { - message.tokenEndpoint = reader.string(); - break; - } - case 4: { - if (!(message.scopes && message.scopes.length)) - message.scopes = []; - message.scopes.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + return Playbooks; + })(); - /** - * Decodes a OAuthConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig} OAuthConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OAuthConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + v3.CreatePlaybookRequest = (function() { - /** - * Verifies a OAuthConfig message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OAuthConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.clientId != null && message.hasOwnProperty("clientId")) - if (!$util.isString(message.clientId)) - return "clientId: string expected"; - if (message.clientSecret != null && message.hasOwnProperty("clientSecret")) - if (!$util.isString(message.clientSecret)) - return "clientSecret: string expected"; - if (message.tokenEndpoint != null && message.hasOwnProperty("tokenEndpoint")) - if (!$util.isString(message.tokenEndpoint)) - return "tokenEndpoint: string expected"; - if (message.scopes != null && message.hasOwnProperty("scopes")) { - if (!Array.isArray(message.scopes)) - return "scopes: array expected"; - for (var i = 0; i < message.scopes.length; ++i) - if (!$util.isString(message.scopes[i])) - return "scopes: string[] expected"; - } - return null; - }; + /** + * Properties of a CreatePlaybookRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface ICreatePlaybookRequest + * @property {string|null} [parent] CreatePlaybookRequest parent + * @property {google.cloud.dialogflow.cx.v3.IPlaybook|null} [playbook] CreatePlaybookRequest playbook + */ - /** - * Creates a OAuthConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig} OAuthConfig - */ - OAuthConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig(); - if (object.clientId != null) - message.clientId = String(object.clientId); - if (object.clientSecret != null) - message.clientSecret = String(object.clientSecret); - if (object.tokenEndpoint != null) - message.tokenEndpoint = String(object.tokenEndpoint); - if (object.scopes) { - if (!Array.isArray(object.scopes)) - throw TypeError(".google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig.scopes: array expected"); - message.scopes = []; - for (var i = 0; i < object.scopes.length; ++i) - message.scopes[i] = String(object.scopes[i]); - } - return message; - }; + /** + * Constructs a new CreatePlaybookRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a CreatePlaybookRequest. + * @implements ICreatePlaybookRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3.ICreatePlaybookRequest=} [properties] Properties to set + */ + function CreatePlaybookRequest(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]]; + } - /** - * Creates a plain object from a OAuthConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig - * @static - * @param {google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig} message OAuthConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OAuthConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.scopes = []; - if (options.defaults) { - object.clientId = ""; - object.clientSecret = ""; - object.tokenEndpoint = ""; + /** + * CreatePlaybookRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.cx.v3.CreatePlaybookRequest + * @instance + */ + CreatePlaybookRequest.prototype.parent = ""; + + /** + * CreatePlaybookRequest playbook. + * @member {google.cloud.dialogflow.cx.v3.IPlaybook|null|undefined} playbook + * @memberof google.cloud.dialogflow.cx.v3.CreatePlaybookRequest + * @instance + */ + CreatePlaybookRequest.prototype.playbook = null; + + /** + * Creates a new CreatePlaybookRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.CreatePlaybookRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.ICreatePlaybookRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.CreatePlaybookRequest} CreatePlaybookRequest instance + */ + CreatePlaybookRequest.create = function create(properties) { + return new CreatePlaybookRequest(properties); + }; + + /** + * Encodes the specified CreatePlaybookRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreatePlaybookRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.CreatePlaybookRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.ICreatePlaybookRequest} message CreatePlaybookRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreatePlaybookRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.playbook != null && Object.hasOwnProperty.call(message, "playbook")) + $root.google.cloud.dialogflow.cx.v3.Playbook.encode(message.playbook, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreatePlaybookRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreatePlaybookRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.CreatePlaybookRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.ICreatePlaybookRequest} message CreatePlaybookRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreatePlaybookRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreatePlaybookRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.CreatePlaybookRequest + * @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.CreatePlaybookRequest} CreatePlaybookRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreatePlaybookRequest.decode = function decode(reader, length, error) { + 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.CreatePlaybookRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; } - if (message.clientId != null && message.hasOwnProperty("clientId")) - object.clientId = message.clientId; - if (message.clientSecret != null && message.hasOwnProperty("clientSecret")) - object.clientSecret = message.clientSecret; - if (message.tokenEndpoint != null && message.hasOwnProperty("tokenEndpoint")) - object.tokenEndpoint = message.tokenEndpoint; - if (message.scopes && message.scopes.length) { - object.scopes = []; - for (var j = 0; j < message.scopes.length; ++j) - object.scopes[j] = message.scopes[j]; + case 2: { + message.playbook = $root.google.cloud.dialogflow.cx.v3.Playbook.decode(reader, reader.uint32()); + break; } - return object; - }; - - /** - * Converts this OAuthConfig to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig - * @instance - * @returns {Object.} JSON object - */ - OAuthConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Gets the default type url for OAuthConfig - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OAuthConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.OAuthConfig"; - }; + /** + * Decodes a CreatePlaybookRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.CreatePlaybookRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.CreatePlaybookRequest} CreatePlaybookRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreatePlaybookRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - return OAuthConfig; - })(); + /** + * Verifies a CreatePlaybookRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.CreatePlaybookRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreatePlaybookRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.playbook != null && message.hasOwnProperty("playbook")) { + var error = $root.google.cloud.dialogflow.cx.v3.Playbook.verify(message.playbook); + if (error) + return "playbook." + error; + } + return null; + }; - /** - * ServiceAgentAuth enum. - * @name google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.ServiceAgentAuth - * @enum {number} - * @property {number} SERVICE_AGENT_AUTH_UNSPECIFIED=0 SERVICE_AGENT_AUTH_UNSPECIFIED value - * @property {number} NONE=1 NONE value - * @property {number} ID_TOKEN=2 ID_TOKEN value - * @property {number} ACCESS_TOKEN=3 ACCESS_TOKEN value - */ - GenericWebService.ServiceAgentAuth = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SERVICE_AGENT_AUTH_UNSPECIFIED"] = 0; - values[valuesById[1] = "NONE"] = 1; - values[valuesById[2] = "ID_TOKEN"] = 2; - values[valuesById[3] = "ACCESS_TOKEN"] = 3; - return values; - })(); + /** + * Creates a CreatePlaybookRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.CreatePlaybookRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.CreatePlaybookRequest} CreatePlaybookRequest + */ + CreatePlaybookRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.CreatePlaybookRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.CreatePlaybookRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.playbook != null) { + if (typeof object.playbook !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.CreatePlaybookRequest.playbook: object expected"); + message.playbook = $root.google.cloud.dialogflow.cx.v3.Playbook.fromObject(object.playbook); + } + return message; + }; - /** - * WebhookType enum. - * @name google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.WebhookType - * @enum {number} - * @property {number} WEBHOOK_TYPE_UNSPECIFIED=0 WEBHOOK_TYPE_UNSPECIFIED value - * @property {number} STANDARD=1 STANDARD value - * @property {number} FLEXIBLE=2 FLEXIBLE value - */ - GenericWebService.WebhookType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "WEBHOOK_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "STANDARD"] = 1; - values[valuesById[2] = "FLEXIBLE"] = 2; - return values; - })(); + /** + * Creates a plain object from a CreatePlaybookRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.CreatePlaybookRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.CreatePlaybookRequest} message CreatePlaybookRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreatePlaybookRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.playbook = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.playbook != null && message.hasOwnProperty("playbook")) + object.playbook = $root.google.cloud.dialogflow.cx.v3.Playbook.toObject(message.playbook, options); + return object; + }; - /** - * HttpMethod enum. - * @name google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.HttpMethod - * @enum {number} - * @property {number} HTTP_METHOD_UNSPECIFIED=0 HTTP_METHOD_UNSPECIFIED value - * @property {number} POST=1 POST value - * @property {number} GET=2 GET value - * @property {number} HEAD=3 HEAD value - * @property {number} PUT=4 PUT value - * @property {number} DELETE=5 DELETE value - * @property {number} PATCH=6 PATCH value - * @property {number} OPTIONS=7 OPTIONS value - */ - GenericWebService.HttpMethod = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "HTTP_METHOD_UNSPECIFIED"] = 0; - values[valuesById[1] = "POST"] = 1; - values[valuesById[2] = "GET"] = 2; - values[valuesById[3] = "HEAD"] = 3; - values[valuesById[4] = "PUT"] = 4; - values[valuesById[5] = "DELETE"] = 5; - values[valuesById[6] = "PATCH"] = 6; - values[valuesById[7] = "OPTIONS"] = 7; - return values; - })(); + /** + * Converts this CreatePlaybookRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.CreatePlaybookRequest + * @instance + * @returns {Object.} JSON object + */ + CreatePlaybookRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return GenericWebService; - })(); + /** + * Gets the default type url for CreatePlaybookRequest + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.CreatePlaybookRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreatePlaybookRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.CreatePlaybookRequest"; + }; - Webhook.ServiceDirectoryConfig = (function() { + return CreatePlaybookRequest; + })(); - /** - * Properties of a ServiceDirectoryConfig. - * @memberof google.cloud.dialogflow.cx.v3.Webhook - * @interface IServiceDirectoryConfig - * @property {string|null} [service] ServiceDirectoryConfig service - * @property {google.cloud.dialogflow.cx.v3.Webhook.IGenericWebService|null} [genericWebService] ServiceDirectoryConfig genericWebService - */ + v3.DeletePlaybookRequest = (function() { - /** - * Constructs a new ServiceDirectoryConfig. - * @memberof google.cloud.dialogflow.cx.v3.Webhook - * @classdesc Represents a ServiceDirectoryConfig. - * @implements IServiceDirectoryConfig - * @constructor - * @param {google.cloud.dialogflow.cx.v3.Webhook.IServiceDirectoryConfig=} [properties] Properties to set - */ - function ServiceDirectoryConfig(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]]; - } + /** + * Properties of a DeletePlaybookRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IDeletePlaybookRequest + * @property {string|null} [name] DeletePlaybookRequest name + */ - /** - * ServiceDirectoryConfig service. - * @member {string} service - * @memberof google.cloud.dialogflow.cx.v3.Webhook.ServiceDirectoryConfig - * @instance - */ - ServiceDirectoryConfig.prototype.service = ""; + /** + * Constructs a new DeletePlaybookRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a DeletePlaybookRequest. + * @implements IDeletePlaybookRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IDeletePlaybookRequest=} [properties] Properties to set + */ + function DeletePlaybookRequest(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]]; + } - /** - * ServiceDirectoryConfig genericWebService. - * @member {google.cloud.dialogflow.cx.v3.Webhook.IGenericWebService|null|undefined} genericWebService - * @memberof google.cloud.dialogflow.cx.v3.Webhook.ServiceDirectoryConfig - * @instance - */ - ServiceDirectoryConfig.prototype.genericWebService = null; + /** + * DeletePlaybookRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.DeletePlaybookRequest + * @instance + */ + DeletePlaybookRequest.prototype.name = ""; - /** - * Creates a new ServiceDirectoryConfig instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.Webhook.ServiceDirectoryConfig - * @static - * @param {google.cloud.dialogflow.cx.v3.Webhook.IServiceDirectoryConfig=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.Webhook.ServiceDirectoryConfig} ServiceDirectoryConfig instance - */ - ServiceDirectoryConfig.create = function create(properties) { - return new ServiceDirectoryConfig(properties); - }; + /** + * Creates a new DeletePlaybookRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.DeletePlaybookRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IDeletePlaybookRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.DeletePlaybookRequest} DeletePlaybookRequest instance + */ + DeletePlaybookRequest.create = function create(properties) { + return new DeletePlaybookRequest(properties); + }; - /** - * Encodes the specified ServiceDirectoryConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Webhook.ServiceDirectoryConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.Webhook.ServiceDirectoryConfig - * @static - * @param {google.cloud.dialogflow.cx.v3.Webhook.IServiceDirectoryConfig} message ServiceDirectoryConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceDirectoryConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.service != null && Object.hasOwnProperty.call(message, "service")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.service); - if (message.genericWebService != null && Object.hasOwnProperty.call(message, "genericWebService")) - $root.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.encode(message.genericWebService, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; + /** + * Encodes the specified DeletePlaybookRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeletePlaybookRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.DeletePlaybookRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IDeletePlaybookRequest} message DeletePlaybookRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeletePlaybookRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; - /** - * Encodes the specified ServiceDirectoryConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Webhook.ServiceDirectoryConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Webhook.ServiceDirectoryConfig - * @static - * @param {google.cloud.dialogflow.cx.v3.Webhook.IServiceDirectoryConfig} message ServiceDirectoryConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceDirectoryConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified DeletePlaybookRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeletePlaybookRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.DeletePlaybookRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IDeletePlaybookRequest} message DeletePlaybookRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeletePlaybookRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a ServiceDirectoryConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.Webhook.ServiceDirectoryConfig - * @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.Webhook.ServiceDirectoryConfig} ServiceDirectoryConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceDirectoryConfig.decode = function decode(reader, length, error) { - 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.Webhook.ServiceDirectoryConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.service = reader.string(); - break; - } - case 2: { - message.genericWebService = $root.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); + /** + * Decodes a DeletePlaybookRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.DeletePlaybookRequest + * @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.DeletePlaybookRequest} DeletePlaybookRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeletePlaybookRequest.decode = function decode(reader, length, error) { + 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.DeletePlaybookRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); break; } + default: + reader.skipType(tag & 7); + break; } - return message; - }; - - /** - * Decodes a ServiceDirectoryConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Webhook.ServiceDirectoryConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.Webhook.ServiceDirectoryConfig} ServiceDirectoryConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceDirectoryConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + } + return message; + }; - /** - * Verifies a ServiceDirectoryConfig message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.Webhook.ServiceDirectoryConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ServiceDirectoryConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.service != null && message.hasOwnProperty("service")) - if (!$util.isString(message.service)) - return "service: string expected"; - if (message.genericWebService != null && message.hasOwnProperty("genericWebService")) { - var error = $root.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.verify(message.genericWebService); - if (error) - return "genericWebService." + error; - } - return null; - }; + /** + * Decodes a DeletePlaybookRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.DeletePlaybookRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.DeletePlaybookRequest} DeletePlaybookRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeletePlaybookRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a ServiceDirectoryConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.Webhook.ServiceDirectoryConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.Webhook.ServiceDirectoryConfig} ServiceDirectoryConfig - */ - ServiceDirectoryConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.Webhook.ServiceDirectoryConfig) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.Webhook.ServiceDirectoryConfig(); - if (object.service != null) - message.service = String(object.service); - if (object.genericWebService != null) { - if (typeof object.genericWebService !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.Webhook.ServiceDirectoryConfig.genericWebService: object expected"); - message.genericWebService = $root.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.fromObject(object.genericWebService); - } - return message; - }; + /** + * Verifies a DeletePlaybookRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.DeletePlaybookRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeletePlaybookRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; - /** - * Creates a plain object from a ServiceDirectoryConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.Webhook.ServiceDirectoryConfig - * @static - * @param {google.cloud.dialogflow.cx.v3.Webhook.ServiceDirectoryConfig} message ServiceDirectoryConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ServiceDirectoryConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.service = ""; - object.genericWebService = null; - } - if (message.service != null && message.hasOwnProperty("service")) - object.service = message.service; - if (message.genericWebService != null && message.hasOwnProperty("genericWebService")) - object.genericWebService = $root.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService.toObject(message.genericWebService, options); + /** + * Creates a DeletePlaybookRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.DeletePlaybookRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.DeletePlaybookRequest} DeletePlaybookRequest + */ + DeletePlaybookRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.DeletePlaybookRequest) return object; - }; + var message = new $root.google.cloud.dialogflow.cx.v3.DeletePlaybookRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; - /** - * Converts this ServiceDirectoryConfig to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.Webhook.ServiceDirectoryConfig - * @instance - * @returns {Object.} JSON object - */ - ServiceDirectoryConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a DeletePlaybookRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.DeletePlaybookRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.DeletePlaybookRequest} message DeletePlaybookRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeletePlaybookRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; - /** - * Gets the default type url for ServiceDirectoryConfig - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.Webhook.ServiceDirectoryConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ServiceDirectoryConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Webhook.ServiceDirectoryConfig"; - }; + /** + * Converts this DeletePlaybookRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.DeletePlaybookRequest + * @instance + * @returns {Object.} JSON object + */ + DeletePlaybookRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return ServiceDirectoryConfig; - })(); + /** + * Gets the default type url for DeletePlaybookRequest + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.DeletePlaybookRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeletePlaybookRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.DeletePlaybookRequest"; + }; - return Webhook; + return DeletePlaybookRequest; })(); - v3.ListWebhooksRequest = (function() { + v3.ListPlaybooksRequest = (function() { /** - * Properties of a ListWebhooksRequest. + * Properties of a ListPlaybooksRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IListWebhooksRequest - * @property {string|null} [parent] ListWebhooksRequest parent - * @property {number|null} [pageSize] ListWebhooksRequest pageSize - * @property {string|null} [pageToken] ListWebhooksRequest pageToken + * @interface IListPlaybooksRequest + * @property {string|null} [parent] ListPlaybooksRequest parent + * @property {number|null} [pageSize] ListPlaybooksRequest pageSize + * @property {string|null} [pageToken] ListPlaybooksRequest pageToken */ /** - * Constructs a new ListWebhooksRequest. + * Constructs a new ListPlaybooksRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a ListWebhooksRequest. - * @implements IListWebhooksRequest + * @classdesc Represents a ListPlaybooksRequest. + * @implements IListPlaybooksRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IListWebhooksRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IListPlaybooksRequest=} [properties] Properties to set */ - function ListWebhooksRequest(properties) { + function ListPlaybooksRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -74648,51 +98039,51 @@ } /** - * ListWebhooksRequest parent. + * ListPlaybooksRequest parent. * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksRequest + * @memberof google.cloud.dialogflow.cx.v3.ListPlaybooksRequest * @instance */ - ListWebhooksRequest.prototype.parent = ""; + ListPlaybooksRequest.prototype.parent = ""; /** - * ListWebhooksRequest pageSize. + * ListPlaybooksRequest pageSize. * @member {number} pageSize - * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksRequest + * @memberof google.cloud.dialogflow.cx.v3.ListPlaybooksRequest * @instance */ - ListWebhooksRequest.prototype.pageSize = 0; + ListPlaybooksRequest.prototype.pageSize = 0; /** - * ListWebhooksRequest pageToken. + * ListPlaybooksRequest pageToken. * @member {string} pageToken - * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksRequest + * @memberof google.cloud.dialogflow.cx.v3.ListPlaybooksRequest * @instance */ - ListWebhooksRequest.prototype.pageToken = ""; + ListPlaybooksRequest.prototype.pageToken = ""; /** - * Creates a new ListWebhooksRequest instance using the specified properties. + * Creates a new ListPlaybooksRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksRequest + * @memberof google.cloud.dialogflow.cx.v3.ListPlaybooksRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IListWebhooksRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ListWebhooksRequest} ListWebhooksRequest instance + * @param {google.cloud.dialogflow.cx.v3.IListPlaybooksRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ListPlaybooksRequest} ListPlaybooksRequest instance */ - ListWebhooksRequest.create = function create(properties) { - return new ListWebhooksRequest(properties); + ListPlaybooksRequest.create = function create(properties) { + return new ListPlaybooksRequest(properties); }; /** - * Encodes the specified ListWebhooksRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListWebhooksRequest.verify|verify} messages. + * Encodes the specified ListPlaybooksRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListPlaybooksRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksRequest + * @memberof google.cloud.dialogflow.cx.v3.ListPlaybooksRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IListWebhooksRequest} message ListWebhooksRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListPlaybooksRequest} message ListPlaybooksRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListWebhooksRequest.encode = function encode(message, writer) { + ListPlaybooksRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) @@ -74705,33 +98096,33 @@ }; /** - * Encodes the specified ListWebhooksRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListWebhooksRequest.verify|verify} messages. + * Encodes the specified ListPlaybooksRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListPlaybooksRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksRequest + * @memberof google.cloud.dialogflow.cx.v3.ListPlaybooksRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IListWebhooksRequest} message ListWebhooksRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListPlaybooksRequest} message ListPlaybooksRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListWebhooksRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListPlaybooksRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListWebhooksRequest message from the specified reader or buffer. + * Decodes a ListPlaybooksRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksRequest + * @memberof google.cloud.dialogflow.cx.v3.ListPlaybooksRequest * @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.ListWebhooksRequest} ListWebhooksRequest + * @returns {google.cloud.dialogflow.cx.v3.ListPlaybooksRequest} ListPlaybooksRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListWebhooksRequest.decode = function decode(reader, length, error) { + ListPlaybooksRequest.decode = function decode(reader, length, error) { 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.ListWebhooksRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ListPlaybooksRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -74758,141 +98149,595 @@ }; /** - * Decodes a ListWebhooksRequest message from the specified reader or buffer, length delimited. + * Decodes a ListPlaybooksRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.ListPlaybooksRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.ListPlaybooksRequest} ListPlaybooksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPlaybooksRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListPlaybooksRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.ListPlaybooksRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListPlaybooksRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListPlaybooksRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.ListPlaybooksRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.ListPlaybooksRequest} ListPlaybooksRequest + */ + ListPlaybooksRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListPlaybooksRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.ListPlaybooksRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListPlaybooksRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.ListPlaybooksRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.ListPlaybooksRequest} message ListPlaybooksRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListPlaybooksRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListPlaybooksRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.ListPlaybooksRequest + * @instance + * @returns {Object.} JSON object + */ + ListPlaybooksRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListPlaybooksRequest + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.ListPlaybooksRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListPlaybooksRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListPlaybooksRequest"; + }; + + return ListPlaybooksRequest; + })(); + + v3.ListPlaybooksResponse = (function() { + + /** + * Properties of a ListPlaybooksResponse. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IListPlaybooksResponse + * @property {Array.|null} [playbooks] ListPlaybooksResponse playbooks + * @property {string|null} [nextPageToken] ListPlaybooksResponse nextPageToken + */ + + /** + * Constructs a new ListPlaybooksResponse. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a ListPlaybooksResponse. + * @implements IListPlaybooksResponse + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IListPlaybooksResponse=} [properties] Properties to set + */ + function ListPlaybooksResponse(properties) { + this.playbooks = []; + 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]]; + } + + /** + * ListPlaybooksResponse playbooks. + * @member {Array.} playbooks + * @memberof google.cloud.dialogflow.cx.v3.ListPlaybooksResponse + * @instance + */ + ListPlaybooksResponse.prototype.playbooks = $util.emptyArray; + + /** + * ListPlaybooksResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dialogflow.cx.v3.ListPlaybooksResponse + * @instance + */ + ListPlaybooksResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListPlaybooksResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.ListPlaybooksResponse + * @static + * @param {google.cloud.dialogflow.cx.v3.IListPlaybooksResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ListPlaybooksResponse} ListPlaybooksResponse instance + */ + ListPlaybooksResponse.create = function create(properties) { + return new ListPlaybooksResponse(properties); + }; + + /** + * Encodes the specified ListPlaybooksResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListPlaybooksResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.ListPlaybooksResponse + * @static + * @param {google.cloud.dialogflow.cx.v3.IListPlaybooksResponse} message ListPlaybooksResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPlaybooksResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.playbooks != null && message.playbooks.length) + for (var i = 0; i < message.playbooks.length; ++i) + $root.google.cloud.dialogflow.cx.v3.Playbook.encode(message.playbooks[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListPlaybooksResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListPlaybooksResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.ListPlaybooksResponse + * @static + * @param {google.cloud.dialogflow.cx.v3.IListPlaybooksResponse} message ListPlaybooksResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPlaybooksResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListPlaybooksResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.ListPlaybooksResponse + * @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.ListPlaybooksResponse} ListPlaybooksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPlaybooksResponse.decode = function decode(reader, length, error) { + 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.ListPlaybooksResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.playbooks && message.playbooks.length)) + message.playbooks = []; + message.playbooks.push($root.google.cloud.dialogflow.cx.v3.Playbook.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListPlaybooksResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.ListPlaybooksResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.ListPlaybooksResponse} ListPlaybooksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPlaybooksResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListPlaybooksResponse message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.ListPlaybooksResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListPlaybooksResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.playbooks != null && message.hasOwnProperty("playbooks")) { + if (!Array.isArray(message.playbooks)) + return "playbooks: array expected"; + for (var i = 0; i < message.playbooks.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.Playbook.verify(message.playbooks[i]); + if (error) + return "playbooks." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListPlaybooksResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.ListPlaybooksResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.ListPlaybooksResponse} ListPlaybooksResponse + */ + ListPlaybooksResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListPlaybooksResponse) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.ListPlaybooksResponse(); + if (object.playbooks) { + if (!Array.isArray(object.playbooks)) + throw TypeError(".google.cloud.dialogflow.cx.v3.ListPlaybooksResponse.playbooks: array expected"); + message.playbooks = []; + for (var i = 0; i < object.playbooks.length; ++i) { + if (typeof object.playbooks[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.ListPlaybooksResponse.playbooks: object expected"); + message.playbooks[i] = $root.google.cloud.dialogflow.cx.v3.Playbook.fromObject(object.playbooks[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListPlaybooksResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.ListPlaybooksResponse + * @static + * @param {google.cloud.dialogflow.cx.v3.ListPlaybooksResponse} message ListPlaybooksResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListPlaybooksResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.playbooks = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.playbooks && message.playbooks.length) { + object.playbooks = []; + for (var j = 0; j < message.playbooks.length; ++j) + object.playbooks[j] = $root.google.cloud.dialogflow.cx.v3.Playbook.toObject(message.playbooks[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListPlaybooksResponse to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.ListPlaybooksResponse + * @instance + * @returns {Object.} JSON object + */ + ListPlaybooksResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListPlaybooksResponse + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.ListPlaybooksResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListPlaybooksResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListPlaybooksResponse"; + }; + + return ListPlaybooksResponse; + })(); + + v3.GetPlaybookRequest = (function() { + + /** + * Properties of a GetPlaybookRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IGetPlaybookRequest + * @property {string|null} [name] GetPlaybookRequest name + */ + + /** + * Constructs a new GetPlaybookRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a GetPlaybookRequest. + * @implements IGetPlaybookRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IGetPlaybookRequest=} [properties] Properties to set + */ + function GetPlaybookRequest(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]]; + } + + /** + * GetPlaybookRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.GetPlaybookRequest + * @instance + */ + GetPlaybookRequest.prototype.name = ""; + + /** + * Creates a new GetPlaybookRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.GetPlaybookRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IGetPlaybookRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.GetPlaybookRequest} GetPlaybookRequest instance + */ + GetPlaybookRequest.create = function create(properties) { + return new GetPlaybookRequest(properties); + }; + + /** + * Encodes the specified GetPlaybookRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetPlaybookRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.GetPlaybookRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IGetPlaybookRequest} message GetPlaybookRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetPlaybookRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetPlaybookRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetPlaybookRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.GetPlaybookRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IGetPlaybookRequest} message GetPlaybookRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetPlaybookRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetPlaybookRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.GetPlaybookRequest + * @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.GetPlaybookRequest} GetPlaybookRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetPlaybookRequest.decode = function decode(reader, length, error) { + 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.GetPlaybookRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetPlaybookRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksRequest + * @memberof google.cloud.dialogflow.cx.v3.GetPlaybookRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ListWebhooksRequest} ListWebhooksRequest + * @returns {google.cloud.dialogflow.cx.v3.GetPlaybookRequest} GetPlaybookRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListWebhooksRequest.decodeDelimited = function decodeDelimited(reader) { + GetPlaybookRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListWebhooksRequest message. + * Verifies a GetPlaybookRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksRequest + * @memberof google.cloud.dialogflow.cx.v3.GetPlaybookRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListWebhooksRequest.verify = function verify(message) { + GetPlaybookRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a ListWebhooksRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetPlaybookRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksRequest + * @memberof google.cloud.dialogflow.cx.v3.GetPlaybookRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ListWebhooksRequest} ListWebhooksRequest + * @returns {google.cloud.dialogflow.cx.v3.GetPlaybookRequest} GetPlaybookRequest */ - ListWebhooksRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListWebhooksRequest) + GetPlaybookRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.GetPlaybookRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.ListWebhooksRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); + var message = new $root.google.cloud.dialogflow.cx.v3.GetPlaybookRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a ListWebhooksRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetPlaybookRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksRequest + * @memberof google.cloud.dialogflow.cx.v3.GetPlaybookRequest * @static - * @param {google.cloud.dialogflow.cx.v3.ListWebhooksRequest} message ListWebhooksRequest + * @param {google.cloud.dialogflow.cx.v3.GetPlaybookRequest} message GetPlaybookRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListWebhooksRequest.toObject = function toObject(message, options) { + GetPlaybookRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this ListWebhooksRequest to JSON. + * Converts this GetPlaybookRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksRequest + * @memberof google.cloud.dialogflow.cx.v3.GetPlaybookRequest * @instance * @returns {Object.} JSON object */ - ListWebhooksRequest.prototype.toJSON = function toJSON() { + GetPlaybookRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListWebhooksRequest + * Gets the default type url for GetPlaybookRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksRequest + * @memberof google.cloud.dialogflow.cx.v3.GetPlaybookRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListWebhooksRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetPlaybookRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListWebhooksRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.GetPlaybookRequest"; }; - return ListWebhooksRequest; + return GetPlaybookRequest; })(); - v3.ListWebhooksResponse = (function() { + v3.UpdatePlaybookRequest = (function() { /** - * Properties of a ListWebhooksResponse. + * Properties of an UpdatePlaybookRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IListWebhooksResponse - * @property {Array.|null} [webhooks] ListWebhooksResponse webhooks - * @property {string|null} [nextPageToken] ListWebhooksResponse nextPageToken + * @interface IUpdatePlaybookRequest + * @property {google.cloud.dialogflow.cx.v3.IPlaybook|null} [playbook] UpdatePlaybookRequest playbook + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdatePlaybookRequest updateMask */ /** - * Constructs a new ListWebhooksResponse. + * Constructs a new UpdatePlaybookRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a ListWebhooksResponse. - * @implements IListWebhooksResponse + * @classdesc Represents an UpdatePlaybookRequest. + * @implements IUpdatePlaybookRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IListWebhooksResponse=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IUpdatePlaybookRequest=} [properties] Properties to set */ - function ListWebhooksResponse(properties) { - this.webhooks = []; + function UpdatePlaybookRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -74900,94 +98745,91 @@ } /** - * ListWebhooksResponse webhooks. - * @member {Array.} webhooks - * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksResponse + * UpdatePlaybookRequest playbook. + * @member {google.cloud.dialogflow.cx.v3.IPlaybook|null|undefined} playbook + * @memberof google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest * @instance */ - ListWebhooksResponse.prototype.webhooks = $util.emptyArray; + UpdatePlaybookRequest.prototype.playbook = null; /** - * ListWebhooksResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksResponse + * UpdatePlaybookRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest * @instance */ - ListWebhooksResponse.prototype.nextPageToken = ""; + UpdatePlaybookRequest.prototype.updateMask = null; /** - * Creates a new ListWebhooksResponse instance using the specified properties. + * Creates a new UpdatePlaybookRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksResponse + * @memberof google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IListWebhooksResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ListWebhooksResponse} ListWebhooksResponse instance + * @param {google.cloud.dialogflow.cx.v3.IUpdatePlaybookRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest} UpdatePlaybookRequest instance */ - ListWebhooksResponse.create = function create(properties) { - return new ListWebhooksResponse(properties); + UpdatePlaybookRequest.create = function create(properties) { + return new UpdatePlaybookRequest(properties); }; /** - * Encodes the specified ListWebhooksResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListWebhooksResponse.verify|verify} messages. + * Encodes the specified UpdatePlaybookRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksResponse + * @memberof google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IListWebhooksResponse} message ListWebhooksResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IUpdatePlaybookRequest} message UpdatePlaybookRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListWebhooksResponse.encode = function encode(message, writer) { + UpdatePlaybookRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.webhooks != null && message.webhooks.length) - for (var i = 0; i < message.webhooks.length; ++i) - $root.google.cloud.dialogflow.cx.v3.Webhook.encode(message.webhooks[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.playbook != null && Object.hasOwnProperty.call(message, "playbook")) + $root.google.cloud.dialogflow.cx.v3.Playbook.encode(message.playbook, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListWebhooksResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListWebhooksResponse.verify|verify} messages. + * Encodes the specified UpdatePlaybookRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksResponse + * @memberof google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IListWebhooksResponse} message ListWebhooksResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IUpdatePlaybookRequest} message UpdatePlaybookRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListWebhooksResponse.encodeDelimited = function encodeDelimited(message, writer) { + UpdatePlaybookRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListWebhooksResponse message from the specified reader or buffer. + * Decodes an UpdatePlaybookRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksResponse + * @memberof google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest * @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.ListWebhooksResponse} ListWebhooksResponse + * @returns {google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest} UpdatePlaybookRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListWebhooksResponse.decode = function decode(reader, length, error) { + UpdatePlaybookRequest.decode = function decode(reader, length, error) { 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.ListWebhooksResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - if (!(message.webhooks && message.webhooks.length)) - message.webhooks = []; - message.webhooks.push($root.google.cloud.dialogflow.cx.v3.Webhook.decode(reader, reader.uint32())); + message.playbook = $root.google.cloud.dialogflow.cx.v3.Playbook.decode(reader, reader.uint32()); break; } case 2: { - message.nextPageToken = reader.string(); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; } default: @@ -74999,148 +98841,164 @@ }; /** - * Decodes a ListWebhooksResponse message from the specified reader or buffer, length delimited. + * Decodes an UpdatePlaybookRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksResponse + * @memberof google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ListWebhooksResponse} ListWebhooksResponse + * @returns {google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest} UpdatePlaybookRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListWebhooksResponse.decodeDelimited = function decodeDelimited(reader) { + UpdatePlaybookRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListWebhooksResponse message. + * Verifies an UpdatePlaybookRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksResponse + * @memberof google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListWebhooksResponse.verify = function verify(message) { + UpdatePlaybookRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.webhooks != null && message.hasOwnProperty("webhooks")) { - if (!Array.isArray(message.webhooks)) - return "webhooks: array expected"; - for (var i = 0; i < message.webhooks.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.Webhook.verify(message.webhooks[i]); - if (error) - return "webhooks." + error; - } + if (message.playbook != null && message.hasOwnProperty("playbook")) { + var error = $root.google.cloud.dialogflow.cx.v3.Playbook.verify(message.playbook); + if (error) + return "playbook." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; return null; }; /** - * Creates a ListWebhooksResponse message from a plain object. Also converts values to their respective internal types. + * Creates an UpdatePlaybookRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksResponse + * @memberof google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ListWebhooksResponse} ListWebhooksResponse + * @returns {google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest} UpdatePlaybookRequest */ - ListWebhooksResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListWebhooksResponse) + UpdatePlaybookRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.ListWebhooksResponse(); - if (object.webhooks) { - if (!Array.isArray(object.webhooks)) - throw TypeError(".google.cloud.dialogflow.cx.v3.ListWebhooksResponse.webhooks: array expected"); - message.webhooks = []; - for (var i = 0; i < object.webhooks.length; ++i) { - if (typeof object.webhooks[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.ListWebhooksResponse.webhooks: object expected"); - message.webhooks[i] = $root.google.cloud.dialogflow.cx.v3.Webhook.fromObject(object.webhooks[i]); - } + var message = new $root.google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest(); + if (object.playbook != null) { + if (typeof object.playbook !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest.playbook: object expected"); + message.playbook = $root.google.cloud.dialogflow.cx.v3.Playbook.fromObject(object.playbook); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a ListWebhooksResponse message. Also converts values to other types if specified. + * Creates a plain object from an UpdatePlaybookRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksResponse + * @memberof google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest * @static - * @param {google.cloud.dialogflow.cx.v3.ListWebhooksResponse} message ListWebhooksResponse + * @param {google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest} message UpdatePlaybookRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListWebhooksResponse.toObject = function toObject(message, options) { + UpdatePlaybookRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.webhooks = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.webhooks && message.webhooks.length) { - object.webhooks = []; - for (var j = 0; j < message.webhooks.length; ++j) - object.webhooks[j] = $root.google.cloud.dialogflow.cx.v3.Webhook.toObject(message.webhooks[j], options); + if (options.defaults) { + object.playbook = null; + object.updateMask = null; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + if (message.playbook != null && message.hasOwnProperty("playbook")) + object.playbook = $root.google.cloud.dialogflow.cx.v3.Playbook.toObject(message.playbook, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; /** - * Converts this ListWebhooksResponse to JSON. + * Converts this UpdatePlaybookRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksResponse + * @memberof google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest * @instance * @returns {Object.} JSON object */ - ListWebhooksResponse.prototype.toJSON = function toJSON() { + UpdatePlaybookRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListWebhooksResponse + * Gets the default type url for UpdatePlaybookRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.ListWebhooksResponse + * @memberof google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListWebhooksResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UpdatePlaybookRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListWebhooksResponse"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest"; }; - return ListWebhooksResponse; + return UpdatePlaybookRequest; })(); - v3.GetWebhookRequest = (function() { + v3.Playbook = (function() { /** - * Properties of a GetWebhookRequest. + * Properties of a Playbook. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IGetWebhookRequest - * @property {string|null} [name] GetWebhookRequest name + * @interface IPlaybook + * @property {string|null} [name] Playbook name + * @property {string|null} [displayName] Playbook displayName + * @property {string|null} [goal] Playbook goal + * @property {Array.|null} [inputParameterDefinitions] Playbook inputParameterDefinitions + * @property {Array.|null} [outputParameterDefinitions] Playbook outputParameterDefinitions + * @property {google.cloud.dialogflow.cx.v3.Playbook.IInstruction|null} [instruction] Playbook instruction + * @property {number|Long|null} [tokenCount] Playbook tokenCount + * @property {google.protobuf.ITimestamp|null} [createTime] Playbook createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Playbook updateTime + * @property {Array.|null} [referencedPlaybooks] Playbook referencedPlaybooks + * @property {Array.|null} [referencedFlows] Playbook referencedFlows + * @property {Array.|null} [referencedTools] Playbook referencedTools + * @property {Array.|null} [inlineActions] Playbook inlineActions + * @property {google.cloud.dialogflow.cx.v3.ICodeBlock|null} [codeBlock] Playbook codeBlock + * @property {google.cloud.dialogflow.cx.v3.ILlmModelSettings|null} [llmModelSettings] Playbook llmModelSettings + * @property {Array.|null} [handlers] Playbook handlers + * @property {google.cloud.dialogflow.cx.v3.Playbook.PlaybookType|null} [playbookType] Playbook playbookType */ /** - * Constructs a new GetWebhookRequest. + * Constructs a new Playbook. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a GetWebhookRequest. - * @implements IGetWebhookRequest + * @classdesc Represents a Playbook. + * @implements IPlaybook * @constructor - * @param {google.cloud.dialogflow.cx.v3.IGetWebhookRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IPlaybook=} [properties] Properties to set */ - function GetWebhookRequest(properties) { + function Playbook(properties) { + this.inputParameterDefinitions = []; + this.outputParameterDefinitions = []; + this.referencedPlaybooks = []; + this.referencedFlows = []; + this.referencedTools = []; + this.inlineActions = []; + this.handlers = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -75148,70 +99006,237 @@ } /** - * GetWebhookRequest name. + * Playbook name. * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.GetWebhookRequest + * @memberof google.cloud.dialogflow.cx.v3.Playbook * @instance */ - GetWebhookRequest.prototype.name = ""; + Playbook.prototype.name = ""; /** - * Creates a new GetWebhookRequest instance using the specified properties. + * Playbook displayName. + * @member {string} displayName + * @memberof google.cloud.dialogflow.cx.v3.Playbook + * @instance + */ + Playbook.prototype.displayName = ""; + + /** + * Playbook goal. + * @member {string} goal + * @memberof google.cloud.dialogflow.cx.v3.Playbook + * @instance + */ + Playbook.prototype.goal = ""; + + /** + * Playbook inputParameterDefinitions. + * @member {Array.} inputParameterDefinitions + * @memberof google.cloud.dialogflow.cx.v3.Playbook + * @instance + */ + Playbook.prototype.inputParameterDefinitions = $util.emptyArray; + + /** + * Playbook outputParameterDefinitions. + * @member {Array.} outputParameterDefinitions + * @memberof google.cloud.dialogflow.cx.v3.Playbook + * @instance + */ + Playbook.prototype.outputParameterDefinitions = $util.emptyArray; + + /** + * Playbook instruction. + * @member {google.cloud.dialogflow.cx.v3.Playbook.IInstruction|null|undefined} instruction + * @memberof google.cloud.dialogflow.cx.v3.Playbook + * @instance + */ + Playbook.prototype.instruction = null; + + /** + * Playbook tokenCount. + * @member {number|Long} tokenCount + * @memberof google.cloud.dialogflow.cx.v3.Playbook + * @instance + */ + Playbook.prototype.tokenCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Playbook createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.dialogflow.cx.v3.Playbook + * @instance + */ + Playbook.prototype.createTime = null; + + /** + * Playbook updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.dialogflow.cx.v3.Playbook + * @instance + */ + Playbook.prototype.updateTime = null; + + /** + * Playbook referencedPlaybooks. + * @member {Array.} referencedPlaybooks + * @memberof google.cloud.dialogflow.cx.v3.Playbook + * @instance + */ + Playbook.prototype.referencedPlaybooks = $util.emptyArray; + + /** + * Playbook referencedFlows. + * @member {Array.} referencedFlows + * @memberof google.cloud.dialogflow.cx.v3.Playbook + * @instance + */ + Playbook.prototype.referencedFlows = $util.emptyArray; + + /** + * Playbook referencedTools. + * @member {Array.} referencedTools + * @memberof google.cloud.dialogflow.cx.v3.Playbook + * @instance + */ + Playbook.prototype.referencedTools = $util.emptyArray; + + /** + * Playbook inlineActions. + * @member {Array.} inlineActions + * @memberof google.cloud.dialogflow.cx.v3.Playbook + * @instance + */ + Playbook.prototype.inlineActions = $util.emptyArray; + + /** + * Playbook codeBlock. + * @member {google.cloud.dialogflow.cx.v3.ICodeBlock|null|undefined} codeBlock + * @memberof google.cloud.dialogflow.cx.v3.Playbook + * @instance + */ + Playbook.prototype.codeBlock = null; + + /** + * Playbook llmModelSettings. + * @member {google.cloud.dialogflow.cx.v3.ILlmModelSettings|null|undefined} llmModelSettings + * @memberof google.cloud.dialogflow.cx.v3.Playbook + * @instance + */ + Playbook.prototype.llmModelSettings = null; + + /** + * Playbook handlers. + * @member {Array.} handlers + * @memberof google.cloud.dialogflow.cx.v3.Playbook + * @instance + */ + Playbook.prototype.handlers = $util.emptyArray; + + /** + * Playbook playbookType. + * @member {google.cloud.dialogflow.cx.v3.Playbook.PlaybookType} playbookType + * @memberof google.cloud.dialogflow.cx.v3.Playbook + * @instance + */ + Playbook.prototype.playbookType = 0; + + /** + * Creates a new Playbook instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.GetWebhookRequest + * @memberof google.cloud.dialogflow.cx.v3.Playbook * @static - * @param {google.cloud.dialogflow.cx.v3.IGetWebhookRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.GetWebhookRequest} GetWebhookRequest instance + * @param {google.cloud.dialogflow.cx.v3.IPlaybook=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.Playbook} Playbook instance */ - GetWebhookRequest.create = function create(properties) { - return new GetWebhookRequest(properties); + Playbook.create = function create(properties) { + return new Playbook(properties); }; /** - * Encodes the specified GetWebhookRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetWebhookRequest.verify|verify} messages. + * Encodes the specified Playbook message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Playbook.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.GetWebhookRequest + * @memberof google.cloud.dialogflow.cx.v3.Playbook * @static - * @param {google.cloud.dialogflow.cx.v3.IGetWebhookRequest} message GetWebhookRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IPlaybook} message Playbook message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetWebhookRequest.encode = function encode(message, writer) { + Playbook.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.goal != null && Object.hasOwnProperty.call(message, "goal")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.goal); + if (message.inputParameterDefinitions != null && message.inputParameterDefinitions.length) + for (var i = 0; i < message.inputParameterDefinitions.length; ++i) + $root.google.cloud.dialogflow.cx.v3.ParameterDefinition.encode(message.inputParameterDefinitions[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.outputParameterDefinitions != null && message.outputParameterDefinitions.length) + for (var i = 0; i < message.outputParameterDefinitions.length; ++i) + $root.google.cloud.dialogflow.cx.v3.ParameterDefinition.encode(message.outputParameterDefinitions[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.tokenCount != null && Object.hasOwnProperty.call(message, "tokenCount")) + writer.uint32(/* id 8, wireType 0 =*/64).int64(message.tokenCount); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.referencedPlaybooks != null && message.referencedPlaybooks.length) + for (var i = 0; i < message.referencedPlaybooks.length; ++i) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.referencedPlaybooks[i]); + if (message.referencedFlows != null && message.referencedFlows.length) + for (var i = 0; i < message.referencedFlows.length; ++i) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.referencedFlows[i]); + if (message.referencedTools != null && message.referencedTools.length) + for (var i = 0; i < message.referencedTools.length; ++i) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.referencedTools[i]); + if (message.llmModelSettings != null && Object.hasOwnProperty.call(message, "llmModelSettings")) + $root.google.cloud.dialogflow.cx.v3.LlmModelSettings.encode(message.llmModelSettings, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.handlers != null && message.handlers.length) + for (var i = 0; i < message.handlers.length; ++i) + $root.google.cloud.dialogflow.cx.v3.Handler.encode(message.handlers[i], writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + if (message.instruction != null && Object.hasOwnProperty.call(message, "instruction")) + $root.google.cloud.dialogflow.cx.v3.Playbook.Instruction.encode(message.instruction, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + if (message.playbookType != null && Object.hasOwnProperty.call(message, "playbookType")) + writer.uint32(/* id 19, wireType 0 =*/152).int32(message.playbookType); + if (message.codeBlock != null && Object.hasOwnProperty.call(message, "codeBlock")) + $root.google.cloud.dialogflow.cx.v3.CodeBlock.encode(message.codeBlock, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.inlineActions != null && message.inlineActions.length) + for (var i = 0; i < message.inlineActions.length; ++i) + writer.uint32(/* id 22, wireType 2 =*/178).string(message.inlineActions[i]); return writer; }; /** - * Encodes the specified GetWebhookRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetWebhookRequest.verify|verify} messages. + * Encodes the specified Playbook message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Playbook.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.GetWebhookRequest + * @memberof google.cloud.dialogflow.cx.v3.Playbook * @static - * @param {google.cloud.dialogflow.cx.v3.IGetWebhookRequest} message GetWebhookRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IPlaybook} message Playbook message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetWebhookRequest.encodeDelimited = function encodeDelimited(message, writer) { + Playbook.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetWebhookRequest message from the specified reader or buffer. + * Decodes a Playbook message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.GetWebhookRequest + * @memberof google.cloud.dialogflow.cx.v3.Playbook * @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.GetWebhookRequest} GetWebhookRequest + * @returns {google.cloud.dialogflow.cx.v3.Playbook} Playbook * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetWebhookRequest.decode = function decode(reader, length, error) { + Playbook.decode = function decode(reader, length, error) { 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.GetWebhookRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.Playbook(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -75221,6 +99246,84 @@ message.name = reader.string(); break; } + case 2: { + message.displayName = reader.string(); + break; + } + case 3: { + message.goal = reader.string(); + break; + } + case 5: { + if (!(message.inputParameterDefinitions && message.inputParameterDefinitions.length)) + message.inputParameterDefinitions = []; + message.inputParameterDefinitions.push($root.google.cloud.dialogflow.cx.v3.ParameterDefinition.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.outputParameterDefinitions && message.outputParameterDefinitions.length)) + message.outputParameterDefinitions = []; + message.outputParameterDefinitions.push($root.google.cloud.dialogflow.cx.v3.ParameterDefinition.decode(reader, reader.uint32())); + break; + } + case 17: { + message.instruction = $root.google.cloud.dialogflow.cx.v3.Playbook.Instruction.decode(reader, reader.uint32()); + break; + } + case 8: { + message.tokenCount = reader.int64(); + break; + } + case 9: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 10: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 11: { + if (!(message.referencedPlaybooks && message.referencedPlaybooks.length)) + message.referencedPlaybooks = []; + message.referencedPlaybooks.push(reader.string()); + break; + } + case 12: { + if (!(message.referencedFlows && message.referencedFlows.length)) + message.referencedFlows = []; + message.referencedFlows.push(reader.string()); + break; + } + case 13: { + if (!(message.referencedTools && message.referencedTools.length)) + message.referencedTools = []; + message.referencedTools.push(reader.string()); + break; + } + case 22: { + if (!(message.inlineActions && message.inlineActions.length)) + message.inlineActions = []; + message.inlineActions.push(reader.string()); + break; + } + case 21: { + message.codeBlock = $root.google.cloud.dialogflow.cx.v3.CodeBlock.decode(reader, reader.uint32()); + break; + } + case 14: { + message.llmModelSettings = $root.google.cloud.dialogflow.cx.v3.LlmModelSettings.decode(reader, reader.uint32()); + break; + } + case 16: { + if (!(message.handlers && message.handlers.length)) + message.handlers = []; + message.handlers.push($root.google.cloud.dialogflow.cx.v3.Handler.decode(reader, reader.uint32())); + break; + } + case 19: { + message.playbookType = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -75230,596 +99333,950 @@ }; /** - * Decodes a GetWebhookRequest message from the specified reader or buffer, length delimited. + * Decodes a Playbook message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.GetWebhookRequest + * @memberof google.cloud.dialogflow.cx.v3.Playbook * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.GetWebhookRequest} GetWebhookRequest + * @returns {google.cloud.dialogflow.cx.v3.Playbook} Playbook * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetWebhookRequest.decodeDelimited = function decodeDelimited(reader) { + Playbook.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetWebhookRequest message. + * Verifies a Playbook message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.GetWebhookRequest + * @memberof google.cloud.dialogflow.cx.v3.Playbook * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetWebhookRequest.verify = function verify(message) { + Playbook.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.goal != null && message.hasOwnProperty("goal")) + if (!$util.isString(message.goal)) + return "goal: string expected"; + if (message.inputParameterDefinitions != null && message.hasOwnProperty("inputParameterDefinitions")) { + if (!Array.isArray(message.inputParameterDefinitions)) + return "inputParameterDefinitions: array expected"; + for (var i = 0; i < message.inputParameterDefinitions.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.ParameterDefinition.verify(message.inputParameterDefinitions[i]); + if (error) + return "inputParameterDefinitions." + error; + } + } + if (message.outputParameterDefinitions != null && message.hasOwnProperty("outputParameterDefinitions")) { + if (!Array.isArray(message.outputParameterDefinitions)) + return "outputParameterDefinitions: array expected"; + for (var i = 0; i < message.outputParameterDefinitions.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.ParameterDefinition.verify(message.outputParameterDefinitions[i]); + if (error) + return "outputParameterDefinitions." + error; + } + } + if (message.instruction != null && message.hasOwnProperty("instruction")) { + var error = $root.google.cloud.dialogflow.cx.v3.Playbook.Instruction.verify(message.instruction); + if (error) + return "instruction." + error; + } + if (message.tokenCount != null && message.hasOwnProperty("tokenCount")) + if (!$util.isInteger(message.tokenCount) && !(message.tokenCount && $util.isInteger(message.tokenCount.low) && $util.isInteger(message.tokenCount.high))) + return "tokenCount: integer|Long expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.referencedPlaybooks != null && message.hasOwnProperty("referencedPlaybooks")) { + if (!Array.isArray(message.referencedPlaybooks)) + return "referencedPlaybooks: array expected"; + for (var i = 0; i < message.referencedPlaybooks.length; ++i) + if (!$util.isString(message.referencedPlaybooks[i])) + return "referencedPlaybooks: string[] expected"; + } + if (message.referencedFlows != null && message.hasOwnProperty("referencedFlows")) { + if (!Array.isArray(message.referencedFlows)) + return "referencedFlows: array expected"; + for (var i = 0; i < message.referencedFlows.length; ++i) + if (!$util.isString(message.referencedFlows[i])) + return "referencedFlows: string[] expected"; + } + if (message.referencedTools != null && message.hasOwnProperty("referencedTools")) { + if (!Array.isArray(message.referencedTools)) + return "referencedTools: array expected"; + for (var i = 0; i < message.referencedTools.length; ++i) + if (!$util.isString(message.referencedTools[i])) + return "referencedTools: string[] expected"; + } + if (message.inlineActions != null && message.hasOwnProperty("inlineActions")) { + if (!Array.isArray(message.inlineActions)) + return "inlineActions: array expected"; + for (var i = 0; i < message.inlineActions.length; ++i) + if (!$util.isString(message.inlineActions[i])) + return "inlineActions: string[] expected"; + } + if (message.codeBlock != null && message.hasOwnProperty("codeBlock")) { + var error = $root.google.cloud.dialogflow.cx.v3.CodeBlock.verify(message.codeBlock); + if (error) + return "codeBlock." + error; + } + if (message.llmModelSettings != null && message.hasOwnProperty("llmModelSettings")) { + var error = $root.google.cloud.dialogflow.cx.v3.LlmModelSettings.verify(message.llmModelSettings); + if (error) + return "llmModelSettings." + error; + } + if (message.handlers != null && message.hasOwnProperty("handlers")) { + if (!Array.isArray(message.handlers)) + return "handlers: array expected"; + for (var i = 0; i < message.handlers.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.Handler.verify(message.handlers[i]); + if (error) + return "handlers." + error; + } + } + if (message.playbookType != null && message.hasOwnProperty("playbookType")) + switch (message.playbookType) { + default: + return "playbookType: enum value expected"; + case 0: + case 1: + case 3: + break; + } return null; }; /** - * Creates a GetWebhookRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Playbook message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.GetWebhookRequest + * @memberof google.cloud.dialogflow.cx.v3.Playbook * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.GetWebhookRequest} GetWebhookRequest + * @returns {google.cloud.dialogflow.cx.v3.Playbook} Playbook */ - GetWebhookRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.GetWebhookRequest) + Playbook.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.Playbook) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.GetWebhookRequest(); + var message = new $root.google.cloud.dialogflow.cx.v3.Playbook(); if (object.name != null) message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.goal != null) + message.goal = String(object.goal); + if (object.inputParameterDefinitions) { + if (!Array.isArray(object.inputParameterDefinitions)) + throw TypeError(".google.cloud.dialogflow.cx.v3.Playbook.inputParameterDefinitions: array expected"); + message.inputParameterDefinitions = []; + for (var i = 0; i < object.inputParameterDefinitions.length; ++i) { + if (typeof object.inputParameterDefinitions[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Playbook.inputParameterDefinitions: object expected"); + message.inputParameterDefinitions[i] = $root.google.cloud.dialogflow.cx.v3.ParameterDefinition.fromObject(object.inputParameterDefinitions[i]); + } + } + if (object.outputParameterDefinitions) { + if (!Array.isArray(object.outputParameterDefinitions)) + throw TypeError(".google.cloud.dialogflow.cx.v3.Playbook.outputParameterDefinitions: array expected"); + message.outputParameterDefinitions = []; + for (var i = 0; i < object.outputParameterDefinitions.length; ++i) { + if (typeof object.outputParameterDefinitions[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Playbook.outputParameterDefinitions: object expected"); + message.outputParameterDefinitions[i] = $root.google.cloud.dialogflow.cx.v3.ParameterDefinition.fromObject(object.outputParameterDefinitions[i]); + } + } + if (object.instruction != null) { + if (typeof object.instruction !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Playbook.instruction: object expected"); + message.instruction = $root.google.cloud.dialogflow.cx.v3.Playbook.Instruction.fromObject(object.instruction); + } + if (object.tokenCount != null) + if ($util.Long) + (message.tokenCount = $util.Long.fromValue(object.tokenCount)).unsigned = false; + else if (typeof object.tokenCount === "string") + message.tokenCount = parseInt(object.tokenCount, 10); + else if (typeof object.tokenCount === "number") + message.tokenCount = object.tokenCount; + else if (typeof object.tokenCount === "object") + message.tokenCount = new $util.LongBits(object.tokenCount.low >>> 0, object.tokenCount.high >>> 0).toNumber(); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Playbook.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Playbook.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.referencedPlaybooks) { + if (!Array.isArray(object.referencedPlaybooks)) + throw TypeError(".google.cloud.dialogflow.cx.v3.Playbook.referencedPlaybooks: array expected"); + message.referencedPlaybooks = []; + for (var i = 0; i < object.referencedPlaybooks.length; ++i) + message.referencedPlaybooks[i] = String(object.referencedPlaybooks[i]); + } + if (object.referencedFlows) { + if (!Array.isArray(object.referencedFlows)) + throw TypeError(".google.cloud.dialogflow.cx.v3.Playbook.referencedFlows: array expected"); + message.referencedFlows = []; + for (var i = 0; i < object.referencedFlows.length; ++i) + message.referencedFlows[i] = String(object.referencedFlows[i]); + } + if (object.referencedTools) { + if (!Array.isArray(object.referencedTools)) + throw TypeError(".google.cloud.dialogflow.cx.v3.Playbook.referencedTools: array expected"); + message.referencedTools = []; + for (var i = 0; i < object.referencedTools.length; ++i) + message.referencedTools[i] = String(object.referencedTools[i]); + } + if (object.inlineActions) { + if (!Array.isArray(object.inlineActions)) + throw TypeError(".google.cloud.dialogflow.cx.v3.Playbook.inlineActions: array expected"); + message.inlineActions = []; + for (var i = 0; i < object.inlineActions.length; ++i) + message.inlineActions[i] = String(object.inlineActions[i]); + } + if (object.codeBlock != null) { + if (typeof object.codeBlock !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Playbook.codeBlock: object expected"); + message.codeBlock = $root.google.cloud.dialogflow.cx.v3.CodeBlock.fromObject(object.codeBlock); + } + if (object.llmModelSettings != null) { + if (typeof object.llmModelSettings !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Playbook.llmModelSettings: object expected"); + message.llmModelSettings = $root.google.cloud.dialogflow.cx.v3.LlmModelSettings.fromObject(object.llmModelSettings); + } + if (object.handlers) { + if (!Array.isArray(object.handlers)) + throw TypeError(".google.cloud.dialogflow.cx.v3.Playbook.handlers: array expected"); + message.handlers = []; + for (var i = 0; i < object.handlers.length; ++i) { + if (typeof object.handlers[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Playbook.handlers: object expected"); + message.handlers[i] = $root.google.cloud.dialogflow.cx.v3.Handler.fromObject(object.handlers[i]); + } + } + switch (object.playbookType) { + default: + if (typeof object.playbookType === "number") { + message.playbookType = object.playbookType; + break; + } + break; + case "PLAYBOOK_TYPE_UNSPECIFIED": + case 0: + message.playbookType = 0; + break; + case "TASK": + case 1: + message.playbookType = 1; + break; + case "ROUTINE": + case 3: + message.playbookType = 3; + break; + } return message; }; /** - * Creates a plain object from a GetWebhookRequest message. Also converts values to other types if specified. + * Creates a plain object from a Playbook message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.GetWebhookRequest + * @memberof google.cloud.dialogflow.cx.v3.Playbook * @static - * @param {google.cloud.dialogflow.cx.v3.GetWebhookRequest} message GetWebhookRequest + * @param {google.cloud.dialogflow.cx.v3.Playbook} message Playbook * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetWebhookRequest.toObject = function toObject(message, options) { + Playbook.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.arrays || options.defaults) { + object.inputParameterDefinitions = []; + object.outputParameterDefinitions = []; + object.referencedPlaybooks = []; + object.referencedFlows = []; + object.referencedTools = []; + object.handlers = []; + object.inlineActions = []; + } + if (options.defaults) { object.name = ""; + object.displayName = ""; + object.goal = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.tokenCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.tokenCount = options.longs === String ? "0" : 0; + object.createTime = null; + object.updateTime = null; + object.llmModelSettings = null; + object.instruction = null; + object.playbookType = options.enums === String ? "PLAYBOOK_TYPE_UNSPECIFIED" : 0; + object.codeBlock = null; + } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.goal != null && message.hasOwnProperty("goal")) + object.goal = message.goal; + if (message.inputParameterDefinitions && message.inputParameterDefinitions.length) { + object.inputParameterDefinitions = []; + for (var j = 0; j < message.inputParameterDefinitions.length; ++j) + object.inputParameterDefinitions[j] = $root.google.cloud.dialogflow.cx.v3.ParameterDefinition.toObject(message.inputParameterDefinitions[j], options); + } + if (message.outputParameterDefinitions && message.outputParameterDefinitions.length) { + object.outputParameterDefinitions = []; + for (var j = 0; j < message.outputParameterDefinitions.length; ++j) + object.outputParameterDefinitions[j] = $root.google.cloud.dialogflow.cx.v3.ParameterDefinition.toObject(message.outputParameterDefinitions[j], options); + } + if (message.tokenCount != null && message.hasOwnProperty("tokenCount")) + if (typeof message.tokenCount === "number") + object.tokenCount = options.longs === String ? String(message.tokenCount) : message.tokenCount; + else + object.tokenCount = options.longs === String ? $util.Long.prototype.toString.call(message.tokenCount) : options.longs === Number ? new $util.LongBits(message.tokenCount.low >>> 0, message.tokenCount.high >>> 0).toNumber() : message.tokenCount; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.referencedPlaybooks && message.referencedPlaybooks.length) { + object.referencedPlaybooks = []; + for (var j = 0; j < message.referencedPlaybooks.length; ++j) + object.referencedPlaybooks[j] = message.referencedPlaybooks[j]; + } + if (message.referencedFlows && message.referencedFlows.length) { + object.referencedFlows = []; + for (var j = 0; j < message.referencedFlows.length; ++j) + object.referencedFlows[j] = message.referencedFlows[j]; + } + if (message.referencedTools && message.referencedTools.length) { + object.referencedTools = []; + for (var j = 0; j < message.referencedTools.length; ++j) + object.referencedTools[j] = message.referencedTools[j]; + } + if (message.llmModelSettings != null && message.hasOwnProperty("llmModelSettings")) + object.llmModelSettings = $root.google.cloud.dialogflow.cx.v3.LlmModelSettings.toObject(message.llmModelSettings, options); + if (message.handlers && message.handlers.length) { + object.handlers = []; + for (var j = 0; j < message.handlers.length; ++j) + object.handlers[j] = $root.google.cloud.dialogflow.cx.v3.Handler.toObject(message.handlers[j], options); + } + if (message.instruction != null && message.hasOwnProperty("instruction")) + object.instruction = $root.google.cloud.dialogflow.cx.v3.Playbook.Instruction.toObject(message.instruction, options); + if (message.playbookType != null && message.hasOwnProperty("playbookType")) + object.playbookType = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.Playbook.PlaybookType[message.playbookType] === undefined ? message.playbookType : $root.google.cloud.dialogflow.cx.v3.Playbook.PlaybookType[message.playbookType] : message.playbookType; + if (message.codeBlock != null && message.hasOwnProperty("codeBlock")) + object.codeBlock = $root.google.cloud.dialogflow.cx.v3.CodeBlock.toObject(message.codeBlock, options); + if (message.inlineActions && message.inlineActions.length) { + object.inlineActions = []; + for (var j = 0; j < message.inlineActions.length; ++j) + object.inlineActions[j] = message.inlineActions[j]; + } return object; }; /** - * Converts this GetWebhookRequest to JSON. + * Converts this Playbook to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.GetWebhookRequest + * @memberof google.cloud.dialogflow.cx.v3.Playbook * @instance * @returns {Object.} JSON object */ - GetWebhookRequest.prototype.toJSON = function toJSON() { + Playbook.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetWebhookRequest + * Gets the default type url for Playbook * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.GetWebhookRequest + * @memberof google.cloud.dialogflow.cx.v3.Playbook * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetWebhookRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Playbook.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.GetWebhookRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Playbook"; }; - return GetWebhookRequest; - })(); + Playbook.Step = (function() { - v3.CreateWebhookRequest = (function() { + /** + * Properties of a Step. + * @memberof google.cloud.dialogflow.cx.v3.Playbook + * @interface IStep + * @property {string|null} [text] Step text + * @property {Array.|null} [steps] Step steps + */ - /** - * Properties of a CreateWebhookRequest. - * @memberof google.cloud.dialogflow.cx.v3 - * @interface ICreateWebhookRequest - * @property {string|null} [parent] CreateWebhookRequest parent - * @property {google.cloud.dialogflow.cx.v3.IWebhook|null} [webhook] CreateWebhookRequest webhook - */ + /** + * Constructs a new Step. + * @memberof google.cloud.dialogflow.cx.v3.Playbook + * @classdesc Represents a Step. + * @implements IStep + * @constructor + * @param {google.cloud.dialogflow.cx.v3.Playbook.IStep=} [properties] Properties to set + */ + function Step(properties) { + this.steps = []; + 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]]; + } - /** - * Constructs a new CreateWebhookRequest. - * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a CreateWebhookRequest. - * @implements ICreateWebhookRequest - * @constructor - * @param {google.cloud.dialogflow.cx.v3.ICreateWebhookRequest=} [properties] Properties to set - */ - function CreateWebhookRequest(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]]; - } + /** + * Step text. + * @member {string|null|undefined} text + * @memberof google.cloud.dialogflow.cx.v3.Playbook.Step + * @instance + */ + Step.prototype.text = null; - /** - * CreateWebhookRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3.CreateWebhookRequest - * @instance - */ - CreateWebhookRequest.prototype.parent = ""; + /** + * Step steps. + * @member {Array.} steps + * @memberof google.cloud.dialogflow.cx.v3.Playbook.Step + * @instance + */ + Step.prototype.steps = $util.emptyArray; - /** - * CreateWebhookRequest webhook. - * @member {google.cloud.dialogflow.cx.v3.IWebhook|null|undefined} webhook - * @memberof google.cloud.dialogflow.cx.v3.CreateWebhookRequest - * @instance - */ - CreateWebhookRequest.prototype.webhook = null; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * Creates a new CreateWebhookRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.CreateWebhookRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.ICreateWebhookRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.CreateWebhookRequest} CreateWebhookRequest instance - */ - CreateWebhookRequest.create = function create(properties) { - return new CreateWebhookRequest(properties); - }; + /** + * Step instruction. + * @member {"text"|undefined} instruction + * @memberof google.cloud.dialogflow.cx.v3.Playbook.Step + * @instance + */ + Object.defineProperty(Step.prototype, "instruction", { + get: $util.oneOfGetter($oneOfFields = ["text"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Encodes the specified CreateWebhookRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateWebhookRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.CreateWebhookRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.ICreateWebhookRequest} message CreateWebhookRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateWebhookRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.webhook != null && Object.hasOwnProperty.call(message, "webhook")) - $root.google.cloud.dialogflow.cx.v3.Webhook.encode(message.webhook, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; + /** + * Creates a new Step instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.Playbook.Step + * @static + * @param {google.cloud.dialogflow.cx.v3.Playbook.IStep=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.Playbook.Step} Step instance + */ + Step.create = function create(properties) { + return new Step(properties); + }; - /** - * Encodes the specified CreateWebhookRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateWebhookRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.CreateWebhookRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.ICreateWebhookRequest} message CreateWebhookRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateWebhookRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified Step message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Playbook.Step.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.Playbook.Step + * @static + * @param {google.cloud.dialogflow.cx.v3.Playbook.IStep} message Step message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Step.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.text != null && Object.hasOwnProperty.call(message, "text")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.text); + if (message.steps != null && message.steps.length) + for (var i = 0; i < message.steps.length; ++i) + $root.google.cloud.dialogflow.cx.v3.Playbook.Step.encode(message.steps[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; - /** - * Decodes a CreateWebhookRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.CreateWebhookRequest - * @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.CreateWebhookRequest} CreateWebhookRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateWebhookRequest.decode = function decode(reader, length, error) { - 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.CreateWebhookRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); + /** + * Encodes the specified Step message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Playbook.Step.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Playbook.Step + * @static + * @param {google.cloud.dialogflow.cx.v3.Playbook.IStep} message Step message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Step.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Step message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.Playbook.Step + * @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.Playbook.Step} Step + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Step.decode = function decode(reader, length, error) { + 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.Playbook.Step(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - } - case 2: { - message.webhook = $root.google.cloud.dialogflow.cx.v3.Webhook.decode(reader, reader.uint32()); + switch (tag >>> 3) { + case 1: { + message.text = reader.string(); + break; + } + case 2: { + if (!(message.steps && message.steps.length)) + message.steps = []; + message.steps.push($root.google.cloud.dialogflow.cx.v3.Playbook.Step.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); break; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; - - /** - * Decodes a CreateWebhookRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.CreateWebhookRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.CreateWebhookRequest} CreateWebhookRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateWebhookRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + return message; + }; + + /** + * Decodes a Step message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Playbook.Step + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.Playbook.Step} Step + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Step.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Step message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.Playbook.Step + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Step.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.text != null && message.hasOwnProperty("text")) { + properties.instruction = 1; + if (!$util.isString(message.text)) + return "text: string expected"; + } + if (message.steps != null && message.hasOwnProperty("steps")) { + if (!Array.isArray(message.steps)) + return "steps: array expected"; + for (var i = 0; i < message.steps.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.Playbook.Step.verify(message.steps[i]); + if (error) + return "steps." + error; + } + } + return null; + }; - /** - * Verifies a CreateWebhookRequest message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.CreateWebhookRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateWebhookRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.webhook != null && message.hasOwnProperty("webhook")) { - var error = $root.google.cloud.dialogflow.cx.v3.Webhook.verify(message.webhook); - if (error) - return "webhook." + error; - } - return null; - }; + /** + * Creates a Step message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.Playbook.Step + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.Playbook.Step} Step + */ + Step.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.Playbook.Step) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.Playbook.Step(); + if (object.text != null) + message.text = String(object.text); + if (object.steps) { + if (!Array.isArray(object.steps)) + throw TypeError(".google.cloud.dialogflow.cx.v3.Playbook.Step.steps: array expected"); + message.steps = []; + for (var i = 0; i < object.steps.length; ++i) { + if (typeof object.steps[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Playbook.Step.steps: object expected"); + message.steps[i] = $root.google.cloud.dialogflow.cx.v3.Playbook.Step.fromObject(object.steps[i]); + } + } + return message; + }; - /** - * Creates a CreateWebhookRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.CreateWebhookRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.CreateWebhookRequest} CreateWebhookRequest - */ - CreateWebhookRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.CreateWebhookRequest) + /** + * Creates a plain object from a Step message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.Playbook.Step + * @static + * @param {google.cloud.dialogflow.cx.v3.Playbook.Step} message Step + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Step.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.steps = []; + if (message.text != null && message.hasOwnProperty("text")) { + object.text = message.text; + if (options.oneofs) + object.instruction = "text"; + } + if (message.steps && message.steps.length) { + object.steps = []; + for (var j = 0; j < message.steps.length; ++j) + object.steps[j] = $root.google.cloud.dialogflow.cx.v3.Playbook.Step.toObject(message.steps[j], options); + } return object; - var message = new $root.google.cloud.dialogflow.cx.v3.CreateWebhookRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.webhook != null) { - if (typeof object.webhook !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.CreateWebhookRequest.webhook: object expected"); - message.webhook = $root.google.cloud.dialogflow.cx.v3.Webhook.fromObject(object.webhook); - } - return message; - }; - - /** - * Creates a plain object from a CreateWebhookRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.CreateWebhookRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.CreateWebhookRequest} message CreateWebhookRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateWebhookRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.webhook = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.webhook != null && message.hasOwnProperty("webhook")) - object.webhook = $root.google.cloud.dialogflow.cx.v3.Webhook.toObject(message.webhook, options); - return object; - }; + }; - /** - * Converts this CreateWebhookRequest to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.CreateWebhookRequest - * @instance - * @returns {Object.} JSON object - */ - CreateWebhookRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this Step to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.Playbook.Step + * @instance + * @returns {Object.} JSON object + */ + Step.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Gets the default type url for CreateWebhookRequest - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.CreateWebhookRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateWebhookRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.CreateWebhookRequest"; - }; + /** + * Gets the default type url for Step + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.Playbook.Step + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Step.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Playbook.Step"; + }; - return CreateWebhookRequest; - })(); + return Step; + })(); - v3.UpdateWebhookRequest = (function() { + Playbook.Instruction = (function() { - /** - * Properties of an UpdateWebhookRequest. - * @memberof google.cloud.dialogflow.cx.v3 - * @interface IUpdateWebhookRequest - * @property {google.cloud.dialogflow.cx.v3.IWebhook|null} [webhook] UpdateWebhookRequest webhook - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateWebhookRequest updateMask - */ + /** + * Properties of an Instruction. + * @memberof google.cloud.dialogflow.cx.v3.Playbook + * @interface IInstruction + * @property {string|null} [guidelines] Instruction guidelines + * @property {Array.|null} [steps] Instruction steps + */ - /** - * Constructs a new UpdateWebhookRequest. - * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents an UpdateWebhookRequest. - * @implements IUpdateWebhookRequest - * @constructor - * @param {google.cloud.dialogflow.cx.v3.IUpdateWebhookRequest=} [properties] Properties to set - */ - function UpdateWebhookRequest(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]]; - } + /** + * Constructs a new Instruction. + * @memberof google.cloud.dialogflow.cx.v3.Playbook + * @classdesc Represents an Instruction. + * @implements IInstruction + * @constructor + * @param {google.cloud.dialogflow.cx.v3.Playbook.IInstruction=} [properties] Properties to set + */ + function Instruction(properties) { + this.steps = []; + 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]]; + } - /** - * UpdateWebhookRequest webhook. - * @member {google.cloud.dialogflow.cx.v3.IWebhook|null|undefined} webhook - * @memberof google.cloud.dialogflow.cx.v3.UpdateWebhookRequest - * @instance - */ - UpdateWebhookRequest.prototype.webhook = null; + /** + * Instruction guidelines. + * @member {string} guidelines + * @memberof google.cloud.dialogflow.cx.v3.Playbook.Instruction + * @instance + */ + Instruction.prototype.guidelines = ""; - /** - * UpdateWebhookRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.dialogflow.cx.v3.UpdateWebhookRequest - * @instance - */ - UpdateWebhookRequest.prototype.updateMask = null; + /** + * Instruction steps. + * @member {Array.} steps + * @memberof google.cloud.dialogflow.cx.v3.Playbook.Instruction + * @instance + */ + Instruction.prototype.steps = $util.emptyArray; - /** - * Creates a new UpdateWebhookRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.UpdateWebhookRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.IUpdateWebhookRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.UpdateWebhookRequest} UpdateWebhookRequest instance - */ - UpdateWebhookRequest.create = function create(properties) { - return new UpdateWebhookRequest(properties); - }; + /** + * Creates a new Instruction instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.Playbook.Instruction + * @static + * @param {google.cloud.dialogflow.cx.v3.Playbook.IInstruction=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.Playbook.Instruction} Instruction instance + */ + Instruction.create = function create(properties) { + return new Instruction(properties); + }; - /** - * Encodes the specified UpdateWebhookRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateWebhookRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.UpdateWebhookRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.IUpdateWebhookRequest} message UpdateWebhookRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateWebhookRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.webhook != null && Object.hasOwnProperty.call(message, "webhook")) - $root.google.cloud.dialogflow.cx.v3.Webhook.encode(message.webhook, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; + /** + * Encodes the specified Instruction message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Playbook.Instruction.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.Playbook.Instruction + * @static + * @param {google.cloud.dialogflow.cx.v3.Playbook.IInstruction} message Instruction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Instruction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.guidelines != null && Object.hasOwnProperty.call(message, "guidelines")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.guidelines); + if (message.steps != null && message.steps.length) + for (var i = 0; i < message.steps.length; ++i) + $root.google.cloud.dialogflow.cx.v3.Playbook.Step.encode(message.steps[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; - /** - * Encodes the specified UpdateWebhookRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateWebhookRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.UpdateWebhookRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.IUpdateWebhookRequest} message UpdateWebhookRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateWebhookRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified Instruction message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Playbook.Instruction.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Playbook.Instruction + * @static + * @param {google.cloud.dialogflow.cx.v3.Playbook.IInstruction} message Instruction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Instruction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes an UpdateWebhookRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.UpdateWebhookRequest - * @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.UpdateWebhookRequest} UpdateWebhookRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateWebhookRequest.decode = function decode(reader, length, error) { - 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.UpdateWebhookRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.webhook = $root.google.cloud.dialogflow.cx.v3.Webhook.decode(reader, reader.uint32()); + /** + * Decodes an Instruction message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.Playbook.Instruction + * @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.Playbook.Instruction} Instruction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Instruction.decode = function decode(reader, length, error) { + 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.Playbook.Instruction(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - } - case 2: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + switch (tag >>> 3) { + case 1: { + message.guidelines = reader.string(); + break; + } + case 2: { + if (!(message.steps && message.steps.length)) + message.steps = []; + message.steps.push($root.google.cloud.dialogflow.cx.v3.Playbook.Step.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); break; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; + return message; + }; - /** - * Decodes an UpdateWebhookRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.UpdateWebhookRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.UpdateWebhookRequest} UpdateWebhookRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateWebhookRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes an Instruction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Playbook.Instruction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.Playbook.Instruction} Instruction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Instruction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies an UpdateWebhookRequest message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.UpdateWebhookRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateWebhookRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.webhook != null && message.hasOwnProperty("webhook")) { - var error = $root.google.cloud.dialogflow.cx.v3.Webhook.verify(message.webhook); - if (error) - return "webhook." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - return null; - }; + /** + * Verifies an Instruction message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.Playbook.Instruction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Instruction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.guidelines != null && message.hasOwnProperty("guidelines")) + if (!$util.isString(message.guidelines)) + return "guidelines: string expected"; + if (message.steps != null && message.hasOwnProperty("steps")) { + if (!Array.isArray(message.steps)) + return "steps: array expected"; + for (var i = 0; i < message.steps.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.Playbook.Step.verify(message.steps[i]); + if (error) + return "steps." + error; + } + } + return null; + }; - /** - * Creates an UpdateWebhookRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.UpdateWebhookRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.UpdateWebhookRequest} UpdateWebhookRequest - */ - UpdateWebhookRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.UpdateWebhookRequest) + /** + * Creates an Instruction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.Playbook.Instruction + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.Playbook.Instruction} Instruction + */ + Instruction.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.Playbook.Instruction) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.Playbook.Instruction(); + if (object.guidelines != null) + message.guidelines = String(object.guidelines); + if (object.steps) { + if (!Array.isArray(object.steps)) + throw TypeError(".google.cloud.dialogflow.cx.v3.Playbook.Instruction.steps: array expected"); + message.steps = []; + for (var i = 0; i < object.steps.length; ++i) { + if (typeof object.steps[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Playbook.Instruction.steps: object expected"); + message.steps[i] = $root.google.cloud.dialogflow.cx.v3.Playbook.Step.fromObject(object.steps[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an Instruction message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.Playbook.Instruction + * @static + * @param {google.cloud.dialogflow.cx.v3.Playbook.Instruction} message Instruction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Instruction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.steps = []; + if (options.defaults) + object.guidelines = ""; + if (message.guidelines != null && message.hasOwnProperty("guidelines")) + object.guidelines = message.guidelines; + if (message.steps && message.steps.length) { + object.steps = []; + for (var j = 0; j < message.steps.length; ++j) + object.steps[j] = $root.google.cloud.dialogflow.cx.v3.Playbook.Step.toObject(message.steps[j], options); + } return object; - var message = new $root.google.cloud.dialogflow.cx.v3.UpdateWebhookRequest(); - if (object.webhook != null) { - if (typeof object.webhook !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.UpdateWebhookRequest.webhook: object expected"); - message.webhook = $root.google.cloud.dialogflow.cx.v3.Webhook.fromObject(object.webhook); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.UpdateWebhookRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - return message; - }; + }; - /** - * Creates a plain object from an UpdateWebhookRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.UpdateWebhookRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.UpdateWebhookRequest} message UpdateWebhookRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateWebhookRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.webhook = null; - object.updateMask = null; - } - if (message.webhook != null && message.hasOwnProperty("webhook")) - object.webhook = $root.google.cloud.dialogflow.cx.v3.Webhook.toObject(message.webhook, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - return object; - }; + /** + * Converts this Instruction to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.Playbook.Instruction + * @instance + * @returns {Object.} JSON object + */ + Instruction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this UpdateWebhookRequest to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.UpdateWebhookRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateWebhookRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Gets the default type url for Instruction + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.Playbook.Instruction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Instruction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Playbook.Instruction"; + }; + + return Instruction; + })(); /** - * Gets the default type url for UpdateWebhookRequest - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.UpdateWebhookRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * PlaybookType enum. + * @name google.cloud.dialogflow.cx.v3.Playbook.PlaybookType + * @enum {number} + * @property {number} PLAYBOOK_TYPE_UNSPECIFIED=0 PLAYBOOK_TYPE_UNSPECIFIED value + * @property {number} TASK=1 TASK value + * @property {number} ROUTINE=3 ROUTINE value */ - UpdateWebhookRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.UpdateWebhookRequest"; - }; + Playbook.PlaybookType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PLAYBOOK_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "TASK"] = 1; + values[valuesById[3] = "ROUTINE"] = 3; + return values; + })(); - return UpdateWebhookRequest; + return Playbook; })(); - v3.DeleteWebhookRequest = (function() { + v3.CreatePlaybookVersionRequest = (function() { /** - * Properties of a DeleteWebhookRequest. + * Properties of a CreatePlaybookVersionRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IDeleteWebhookRequest - * @property {string|null} [name] DeleteWebhookRequest name - * @property {boolean|null} [force] DeleteWebhookRequest force + * @interface ICreatePlaybookVersionRequest + * @property {string|null} [parent] CreatePlaybookVersionRequest parent + * @property {google.cloud.dialogflow.cx.v3.IPlaybookVersion|null} [playbookVersion] CreatePlaybookVersionRequest playbookVersion */ /** - * Constructs a new DeleteWebhookRequest. + * Constructs a new CreatePlaybookVersionRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a DeleteWebhookRequest. - * @implements IDeleteWebhookRequest + * @classdesc Represents a CreatePlaybookVersionRequest. + * @implements ICreatePlaybookVersionRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IDeleteWebhookRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.ICreatePlaybookVersionRequest=} [properties] Properties to set */ - function DeleteWebhookRequest(properties) { + function CreatePlaybookVersionRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -75827,91 +100284,91 @@ } /** - * DeleteWebhookRequest name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.DeleteWebhookRequest + * CreatePlaybookVersionRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest * @instance */ - DeleteWebhookRequest.prototype.name = ""; + CreatePlaybookVersionRequest.prototype.parent = ""; /** - * DeleteWebhookRequest force. - * @member {boolean} force - * @memberof google.cloud.dialogflow.cx.v3.DeleteWebhookRequest + * CreatePlaybookVersionRequest playbookVersion. + * @member {google.cloud.dialogflow.cx.v3.IPlaybookVersion|null|undefined} playbookVersion + * @memberof google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest * @instance */ - DeleteWebhookRequest.prototype.force = false; + CreatePlaybookVersionRequest.prototype.playbookVersion = null; /** - * Creates a new DeleteWebhookRequest instance using the specified properties. + * Creates a new CreatePlaybookVersionRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.DeleteWebhookRequest + * @memberof google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IDeleteWebhookRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.DeleteWebhookRequest} DeleteWebhookRequest instance + * @param {google.cloud.dialogflow.cx.v3.ICreatePlaybookVersionRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest} CreatePlaybookVersionRequest instance */ - DeleteWebhookRequest.create = function create(properties) { - return new DeleteWebhookRequest(properties); + CreatePlaybookVersionRequest.create = function create(properties) { + return new CreatePlaybookVersionRequest(properties); }; /** - * Encodes the specified DeleteWebhookRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteWebhookRequest.verify|verify} messages. + * Encodes the specified CreatePlaybookVersionRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.DeleteWebhookRequest + * @memberof google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IDeleteWebhookRequest} message DeleteWebhookRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ICreatePlaybookVersionRequest} message CreatePlaybookVersionRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteWebhookRequest.encode = function encode(message, writer) { + CreatePlaybookVersionRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.force != null && Object.hasOwnProperty.call(message, "force")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.force); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.playbookVersion != null && Object.hasOwnProperty.call(message, "playbookVersion")) + $root.google.cloud.dialogflow.cx.v3.PlaybookVersion.encode(message.playbookVersion, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified DeleteWebhookRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteWebhookRequest.verify|verify} messages. + * Encodes the specified CreatePlaybookVersionRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.DeleteWebhookRequest + * @memberof google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IDeleteWebhookRequest} message DeleteWebhookRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ICreatePlaybookVersionRequest} message CreatePlaybookVersionRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteWebhookRequest.encodeDelimited = function encodeDelimited(message, writer) { + CreatePlaybookVersionRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteWebhookRequest message from the specified reader or buffer. + * Decodes a CreatePlaybookVersionRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.DeleteWebhookRequest + * @memberof google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest * @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.DeleteWebhookRequest} DeleteWebhookRequest + * @returns {google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest} CreatePlaybookVersionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteWebhookRequest.decode = function decode(reader, length, error) { + CreatePlaybookVersionRequest.decode = function decode(reader, length, error) { 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.DeleteWebhookRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.parent = reader.string(); break; } case 2: { - message.force = reader.bool(); + message.playbookVersion = $root.google.cloud.dialogflow.cx.v3.PlaybookVersion.decode(reader, reader.uint32()); break; } default: @@ -75923,146 +100380,141 @@ }; /** - * Decodes a DeleteWebhookRequest message from the specified reader or buffer, length delimited. + * Decodes a CreatePlaybookVersionRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.DeleteWebhookRequest + * @memberof google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.DeleteWebhookRequest} DeleteWebhookRequest + * @returns {google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest} CreatePlaybookVersionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteWebhookRequest.decodeDelimited = function decodeDelimited(reader) { + CreatePlaybookVersionRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteWebhookRequest message. + * Verifies a CreatePlaybookVersionRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.DeleteWebhookRequest + * @memberof google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteWebhookRequest.verify = function verify(message) { + CreatePlaybookVersionRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.force != null && message.hasOwnProperty("force")) - if (typeof message.force !== "boolean") - return "force: boolean expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.playbookVersion != null && message.hasOwnProperty("playbookVersion")) { + var error = $root.google.cloud.dialogflow.cx.v3.PlaybookVersion.verify(message.playbookVersion); + if (error) + return "playbookVersion." + error; + } return null; }; /** - * Creates a DeleteWebhookRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreatePlaybookVersionRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.DeleteWebhookRequest + * @memberof google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.DeleteWebhookRequest} DeleteWebhookRequest + * @returns {google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest} CreatePlaybookVersionRequest */ - DeleteWebhookRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.DeleteWebhookRequest) + CreatePlaybookVersionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.DeleteWebhookRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.force != null) - message.force = Boolean(object.force); + var message = new $root.google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.playbookVersion != null) { + if (typeof object.playbookVersion !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest.playbookVersion: object expected"); + message.playbookVersion = $root.google.cloud.dialogflow.cx.v3.PlaybookVersion.fromObject(object.playbookVersion); + } return message; }; /** - * Creates a plain object from a DeleteWebhookRequest message. Also converts values to other types if specified. + * Creates a plain object from a CreatePlaybookVersionRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.DeleteWebhookRequest + * @memberof google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest * @static - * @param {google.cloud.dialogflow.cx.v3.DeleteWebhookRequest} message DeleteWebhookRequest + * @param {google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest} message CreatePlaybookVersionRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteWebhookRequest.toObject = function toObject(message, options) { + CreatePlaybookVersionRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; - object.force = false; + object.parent = ""; + object.playbookVersion = null; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.force != null && message.hasOwnProperty("force")) - object.force = message.force; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.playbookVersion != null && message.hasOwnProperty("playbookVersion")) + object.playbookVersion = $root.google.cloud.dialogflow.cx.v3.PlaybookVersion.toObject(message.playbookVersion, options); return object; }; /** - * Converts this DeleteWebhookRequest to JSON. + * Converts this CreatePlaybookVersionRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.DeleteWebhookRequest + * @memberof google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest * @instance * @returns {Object.} JSON object */ - DeleteWebhookRequest.prototype.toJSON = function toJSON() { + CreatePlaybookVersionRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeleteWebhookRequest + * Gets the default type url for CreatePlaybookVersionRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.DeleteWebhookRequest + * @memberof google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeleteWebhookRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreatePlaybookVersionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.DeleteWebhookRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest"; }; - return DeleteWebhookRequest; + return CreatePlaybookVersionRequest; })(); - v3.WebhookRequest = (function() { + v3.PlaybookVersion = (function() { /** - * Properties of a WebhookRequest. + * Properties of a PlaybookVersion. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IWebhookRequest - * @property {string|null} [detectIntentResponseId] WebhookRequest detectIntentResponseId - * @property {string|null} [text] WebhookRequest text - * @property {string|null} [triggerIntent] WebhookRequest triggerIntent - * @property {string|null} [transcript] WebhookRequest transcript - * @property {string|null} [triggerEvent] WebhookRequest triggerEvent - * @property {string|null} [dtmfDigits] WebhookRequest dtmfDigits - * @property {string|null} [languageCode] WebhookRequest languageCode - * @property {google.cloud.dialogflow.cx.v3.WebhookRequest.IFulfillmentInfo|null} [fulfillmentInfo] WebhookRequest fulfillmentInfo - * @property {google.cloud.dialogflow.cx.v3.WebhookRequest.IIntentInfo|null} [intentInfo] WebhookRequest intentInfo - * @property {google.cloud.dialogflow.cx.v3.IPageInfo|null} [pageInfo] WebhookRequest pageInfo - * @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 - * @property {google.cloud.dialogflow.cx.v3.ILanguageInfo|null} [languageInfo] WebhookRequest languageInfo + * @interface IPlaybookVersion + * @property {string|null} [name] PlaybookVersion name + * @property {string|null} [description] PlaybookVersion description + * @property {google.cloud.dialogflow.cx.v3.IPlaybook|null} [playbook] PlaybookVersion playbook + * @property {Array.|null} [examples] PlaybookVersion examples + * @property {google.protobuf.ITimestamp|null} [updateTime] PlaybookVersion updateTime */ /** - * Constructs a new WebhookRequest. + * Constructs a new PlaybookVersion. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a WebhookRequest. - * @implements IWebhookRequest + * @classdesc Represents a PlaybookVersion. + * @implements IPlaybookVersion * @constructor - * @param {google.cloud.dialogflow.cx.v3.IWebhookRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IPlaybookVersion=} [properties] Properties to set */ - function WebhookRequest(properties) { - this.messages = []; + function PlaybookVersion(properties) { + this.examples = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -76070,290 +100522,136 @@ } /** - * WebhookRequest detectIntentResponseId. - * @member {string} detectIntentResponseId - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest - * @instance - */ - WebhookRequest.prototype.detectIntentResponseId = ""; - - /** - * WebhookRequest text. - * @member {string|null|undefined} text - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest - * @instance - */ - WebhookRequest.prototype.text = null; - - /** - * WebhookRequest triggerIntent. - * @member {string|null|undefined} triggerIntent - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest - * @instance - */ - WebhookRequest.prototype.triggerIntent = null; - - /** - * WebhookRequest transcript. - * @member {string|null|undefined} transcript - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest - * @instance - */ - WebhookRequest.prototype.transcript = null; - - /** - * WebhookRequest triggerEvent. - * @member {string|null|undefined} triggerEvent - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest - * @instance - */ - WebhookRequest.prototype.triggerEvent = null; - - /** - * WebhookRequest dtmfDigits. - * @member {string|null|undefined} dtmfDigits - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest - * @instance - */ - WebhookRequest.prototype.dtmfDigits = null; - - /** - * WebhookRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest - * @instance - */ - WebhookRequest.prototype.languageCode = ""; - - /** - * WebhookRequest fulfillmentInfo. - * @member {google.cloud.dialogflow.cx.v3.WebhookRequest.IFulfillmentInfo|null|undefined} fulfillmentInfo - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest - * @instance - */ - WebhookRequest.prototype.fulfillmentInfo = null; - - /** - * WebhookRequest intentInfo. - * @member {google.cloud.dialogflow.cx.v3.WebhookRequest.IIntentInfo|null|undefined} intentInfo - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest - * @instance - */ - WebhookRequest.prototype.intentInfo = null; - - /** - * WebhookRequest pageInfo. - * @member {google.cloud.dialogflow.cx.v3.IPageInfo|null|undefined} pageInfo - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest - * @instance - */ - WebhookRequest.prototype.pageInfo = null; - - /** - * WebhookRequest sessionInfo. - * @member {google.cloud.dialogflow.cx.v3.ISessionInfo|null|undefined} sessionInfo - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest - * @instance - */ - WebhookRequest.prototype.sessionInfo = null; - - /** - * WebhookRequest messages. - * @member {Array.} messages - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest + * PlaybookVersion name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.PlaybookVersion * @instance */ - WebhookRequest.prototype.messages = $util.emptyArray; + PlaybookVersion.prototype.name = ""; /** - * WebhookRequest payload. - * @member {google.protobuf.IStruct|null|undefined} payload - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest + * PlaybookVersion description. + * @member {string} description + * @memberof google.cloud.dialogflow.cx.v3.PlaybookVersion * @instance */ - WebhookRequest.prototype.payload = null; + PlaybookVersion.prototype.description = ""; /** - * WebhookRequest sentimentAnalysisResult. - * @member {google.cloud.dialogflow.cx.v3.WebhookRequest.ISentimentAnalysisResult|null|undefined} sentimentAnalysisResult - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest + * PlaybookVersion playbook. + * @member {google.cloud.dialogflow.cx.v3.IPlaybook|null|undefined} playbook + * @memberof google.cloud.dialogflow.cx.v3.PlaybookVersion * @instance */ - WebhookRequest.prototype.sentimentAnalysisResult = null; + PlaybookVersion.prototype.playbook = null; /** - * WebhookRequest languageInfo. - * @member {google.cloud.dialogflow.cx.v3.ILanguageInfo|null|undefined} languageInfo - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest + * PlaybookVersion examples. + * @member {Array.} examples + * @memberof google.cloud.dialogflow.cx.v3.PlaybookVersion * @instance */ - WebhookRequest.prototype.languageInfo = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + PlaybookVersion.prototype.examples = $util.emptyArray; /** - * WebhookRequest query. - * @member {"text"|"triggerIntent"|"transcript"|"triggerEvent"|"dtmfDigits"|undefined} query - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest + * PlaybookVersion updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.dialogflow.cx.v3.PlaybookVersion * @instance */ - Object.defineProperty(WebhookRequest.prototype, "query", { - get: $util.oneOfGetter($oneOfFields = ["text", "triggerIntent", "transcript", "triggerEvent", "dtmfDigits"]), - set: $util.oneOfSetter($oneOfFields) - }); + PlaybookVersion.prototype.updateTime = null; /** - * Creates a new WebhookRequest instance using the specified properties. + * Creates a new PlaybookVersion instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest + * @memberof google.cloud.dialogflow.cx.v3.PlaybookVersion * @static - * @param {google.cloud.dialogflow.cx.v3.IWebhookRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.WebhookRequest} WebhookRequest instance + * @param {google.cloud.dialogflow.cx.v3.IPlaybookVersion=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.PlaybookVersion} PlaybookVersion instance */ - WebhookRequest.create = function create(properties) { - return new WebhookRequest(properties); + PlaybookVersion.create = function create(properties) { + return new PlaybookVersion(properties); }; /** - * Encodes the specified WebhookRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.WebhookRequest.verify|verify} messages. + * Encodes the specified PlaybookVersion message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.PlaybookVersion.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest + * @memberof google.cloud.dialogflow.cx.v3.PlaybookVersion * @static - * @param {google.cloud.dialogflow.cx.v3.IWebhookRequest} message WebhookRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IPlaybookVersion} message PlaybookVersion message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - WebhookRequest.encode = function encode(message, writer) { + PlaybookVersion.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.detectIntentResponseId != null && Object.hasOwnProperty.call(message, "detectIntentResponseId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.detectIntentResponseId); - if (message.intentInfo != null && Object.hasOwnProperty.call(message, "intentInfo")) - $root.google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.encode(message.intentInfo, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.pageInfo != null && Object.hasOwnProperty.call(message, "pageInfo")) - $root.google.cloud.dialogflow.cx.v3.PageInfo.encode(message.pageInfo, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.sessionInfo != null && Object.hasOwnProperty.call(message, "sessionInfo")) - $root.google.cloud.dialogflow.cx.v3.SessionInfo.encode(message.sessionInfo, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.fulfillmentInfo != null && Object.hasOwnProperty.call(message, "fulfillmentInfo")) - $root.google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo.encode(message.fulfillmentInfo, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.messages != null && message.messages.length) - for (var i = 0; i < message.messages.length; ++i) - $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(); - if (message.text != null && Object.hasOwnProperty.call(message, "text")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.text); - if (message.triggerIntent != null && Object.hasOwnProperty.call(message, "triggerIntent")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.triggerIntent); - if (message.transcript != null && Object.hasOwnProperty.call(message, "transcript")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.transcript); - if (message.triggerEvent != null && Object.hasOwnProperty.call(message, "triggerEvent")) - writer.uint32(/* id 14, wireType 2 =*/114).string(message.triggerEvent); - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 15, wireType 2 =*/122).string(message.languageCode); - if (message.dtmfDigits != null && Object.hasOwnProperty.call(message, "dtmfDigits")) - writer.uint32(/* id 17, wireType 2 =*/138).string(message.dtmfDigits); - if (message.languageInfo != null && Object.hasOwnProperty.call(message, "languageInfo")) - $root.google.cloud.dialogflow.cx.v3.LanguageInfo.encode(message.languageInfo, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.playbook != null && Object.hasOwnProperty.call(message, "playbook")) + $root.google.cloud.dialogflow.cx.v3.Playbook.encode(message.playbook, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.examples != null && message.examples.length) + for (var i = 0; i < message.examples.length; ++i) + $root.google.cloud.dialogflow.cx.v3.Example.encode(message.examples[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; /** - * Encodes the specified WebhookRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.WebhookRequest.verify|verify} messages. + * Encodes the specified PlaybookVersion message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.PlaybookVersion.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest + * @memberof google.cloud.dialogflow.cx.v3.PlaybookVersion * @static - * @param {google.cloud.dialogflow.cx.v3.IWebhookRequest} message WebhookRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IPlaybookVersion} message PlaybookVersion message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - WebhookRequest.encodeDelimited = function encodeDelimited(message, writer) { + PlaybookVersion.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a WebhookRequest message from the specified reader or buffer. + * Decodes a PlaybookVersion message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest + * @memberof google.cloud.dialogflow.cx.v3.PlaybookVersion * @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} WebhookRequest + * @returns {google.cloud.dialogflow.cx.v3.PlaybookVersion} PlaybookVersion * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - WebhookRequest.decode = function decode(reader, length, error) { + PlaybookVersion.decode = function decode(reader, length, error) { 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(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.PlaybookVersion(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.detectIntentResponseId = reader.string(); - break; - } - case 10: { - message.text = reader.string(); - break; - } - case 11: { - message.triggerIntent = reader.string(); - break; - } - case 12: { - message.transcript = reader.string(); - break; - } - case 14: { - message.triggerEvent = reader.string(); - break; - } - case 17: { - message.dtmfDigits = reader.string(); - break; - } - case 15: { - message.languageCode = reader.string(); + message.name = reader.string(); break; } - case 6: { - message.fulfillmentInfo = $root.google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo.decode(reader, reader.uint32()); + case 2: { + message.description = reader.string(); break; } case 3: { - message.intentInfo = $root.google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.decode(reader, reader.uint32()); + message.playbook = $root.google.cloud.dialogflow.cx.v3.Playbook.decode(reader, reader.uint32()); break; } case 4: { - message.pageInfo = $root.google.cloud.dialogflow.cx.v3.PageInfo.decode(reader, reader.uint32()); + if (!(message.examples && message.examples.length)) + message.examples = []; + message.examples.push($root.google.cloud.dialogflow.cx.v3.Example.decode(reader, reader.uint32())); break; } case 5: { - message.sessionInfo = $root.google.cloud.dialogflow.cx.v3.SessionInfo.decode(reader, reader.uint32()); - break; - } - case 7: { - if (!(message.messages && message.messages.length)) - message.messages = []; - message.messages.push($root.google.cloud.dialogflow.cx.v3.ResponseMessage.decode(reader, reader.uint32())); - break; - } - 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; - } - case 18: { - message.languageInfo = $root.google.cloud.dialogflow.cx.v3.LanguageInfo.decode(reader, reader.uint32()); + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } default: @@ -76365,1308 +100663,805 @@ }; /** - * Decodes a WebhookRequest message from the specified reader or buffer, length delimited. + * Decodes a PlaybookVersion message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest + * @memberof google.cloud.dialogflow.cx.v3.PlaybookVersion * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.WebhookRequest} WebhookRequest + * @returns {google.cloud.dialogflow.cx.v3.PlaybookVersion} PlaybookVersion * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - WebhookRequest.decodeDelimited = function decodeDelimited(reader) { + PlaybookVersion.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a WebhookRequest message. + * Verifies a PlaybookVersion message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest + * @memberof google.cloud.dialogflow.cx.v3.PlaybookVersion * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - WebhookRequest.verify = function verify(message) { + PlaybookVersion.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.detectIntentResponseId != null && message.hasOwnProperty("detectIntentResponseId")) - if (!$util.isString(message.detectIntentResponseId)) - return "detectIntentResponseId: string expected"; - if (message.text != null && message.hasOwnProperty("text")) { - properties.query = 1; - if (!$util.isString(message.text)) - return "text: string expected"; - } - if (message.triggerIntent != null && message.hasOwnProperty("triggerIntent")) { - if (properties.query === 1) - return "query: multiple values"; - properties.query = 1; - if (!$util.isString(message.triggerIntent)) - return "triggerIntent: string expected"; - } - if (message.transcript != null && message.hasOwnProperty("transcript")) { - if (properties.query === 1) - return "query: multiple values"; - properties.query = 1; - if (!$util.isString(message.transcript)) - return "transcript: string expected"; - } - if (message.triggerEvent != null && message.hasOwnProperty("triggerEvent")) { - if (properties.query === 1) - return "query: multiple values"; - properties.query = 1; - if (!$util.isString(message.triggerEvent)) - return "triggerEvent: string expected"; - } - if (message.dtmfDigits != null && message.hasOwnProperty("dtmfDigits")) { - if (properties.query === 1) - return "query: multiple values"; - properties.query = 1; - if (!$util.isString(message.dtmfDigits)) - return "dtmfDigits: string expected"; - } - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; - if (message.fulfillmentInfo != null && message.hasOwnProperty("fulfillmentInfo")) { - var error = $root.google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo.verify(message.fulfillmentInfo); - if (error) - return "fulfillmentInfo." + error; - } - if (message.intentInfo != null && message.hasOwnProperty("intentInfo")) { - var error = $root.google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.verify(message.intentInfo); - if (error) - return "intentInfo." + error; - } - if (message.pageInfo != null && message.hasOwnProperty("pageInfo")) { - var error = $root.google.cloud.dialogflow.cx.v3.PageInfo.verify(message.pageInfo); - if (error) - return "pageInfo." + error; - } - if (message.sessionInfo != null && message.hasOwnProperty("sessionInfo")) { - var error = $root.google.cloud.dialogflow.cx.v3.SessionInfo.verify(message.sessionInfo); + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.playbook != null && message.hasOwnProperty("playbook")) { + var error = $root.google.cloud.dialogflow.cx.v3.Playbook.verify(message.playbook); if (error) - return "sessionInfo." + error; + return "playbook." + error; } - if (message.messages != null && message.hasOwnProperty("messages")) { - if (!Array.isArray(message.messages)) - return "messages: array expected"; - for (var i = 0; i < message.messages.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.verify(message.messages[i]); + if (message.examples != null && message.hasOwnProperty("examples")) { + if (!Array.isArray(message.examples)) + return "examples: array expected"; + for (var i = 0; i < message.examples.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.Example.verify(message.examples[i]); if (error) - return "messages." + error; + return "examples." + error; } } - if (message.payload != null && message.hasOwnProperty("payload")) { - var error = $root.google.protobuf.Struct.verify(message.payload); - 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; - } - if (message.languageInfo != null && message.hasOwnProperty("languageInfo")) { - var error = $root.google.cloud.dialogflow.cx.v3.LanguageInfo.verify(message.languageInfo); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); if (error) - return "languageInfo." + error; + return "updateTime." + error; } return null; }; /** - * Creates a WebhookRequest message from a plain object. Also converts values to their respective internal types. + * Creates a PlaybookVersion message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest + * @memberof google.cloud.dialogflow.cx.v3.PlaybookVersion * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.WebhookRequest} WebhookRequest + * @returns {google.cloud.dialogflow.cx.v3.PlaybookVersion} PlaybookVersion */ - WebhookRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.WebhookRequest) + PlaybookVersion.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.PlaybookVersion) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.WebhookRequest(); - if (object.detectIntentResponseId != null) - message.detectIntentResponseId = String(object.detectIntentResponseId); - if (object.text != null) - message.text = String(object.text); - if (object.triggerIntent != null) - message.triggerIntent = String(object.triggerIntent); - if (object.transcript != null) - message.transcript = String(object.transcript); - if (object.triggerEvent != null) - message.triggerEvent = String(object.triggerEvent); - if (object.dtmfDigits != null) - message.dtmfDigits = String(object.dtmfDigits); - if (object.languageCode != null) - message.languageCode = String(object.languageCode); - if (object.fulfillmentInfo != null) { - if (typeof object.fulfillmentInfo !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.WebhookRequest.fulfillmentInfo: object expected"); - message.fulfillmentInfo = $root.google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo.fromObject(object.fulfillmentInfo); - } - if (object.intentInfo != null) { - if (typeof object.intentInfo !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.WebhookRequest.intentInfo: object expected"); - message.intentInfo = $root.google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.fromObject(object.intentInfo); - } - if (object.pageInfo != null) { - if (typeof object.pageInfo !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.WebhookRequest.pageInfo: object expected"); - message.pageInfo = $root.google.cloud.dialogflow.cx.v3.PageInfo.fromObject(object.pageInfo); - } - if (object.sessionInfo != null) { - if (typeof object.sessionInfo !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.WebhookRequest.sessionInfo: object expected"); - message.sessionInfo = $root.google.cloud.dialogflow.cx.v3.SessionInfo.fromObject(object.sessionInfo); + var message = new $root.google.cloud.dialogflow.cx.v3.PlaybookVersion(); + if (object.name != null) + message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); + if (object.playbook != null) { + if (typeof object.playbook !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.PlaybookVersion.playbook: object expected"); + message.playbook = $root.google.cloud.dialogflow.cx.v3.Playbook.fromObject(object.playbook); } - if (object.messages) { - if (!Array.isArray(object.messages)) - throw TypeError(".google.cloud.dialogflow.cx.v3.WebhookRequest.messages: array expected"); - message.messages = []; - for (var i = 0; i < object.messages.length; ++i) { - if (typeof object.messages[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.WebhookRequest.messages: object expected"); - message.messages[i] = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.fromObject(object.messages[i]); + if (object.examples) { + if (!Array.isArray(object.examples)) + throw TypeError(".google.cloud.dialogflow.cx.v3.PlaybookVersion.examples: array expected"); + message.examples = []; + for (var i = 0; i < object.examples.length; ++i) { + if (typeof object.examples[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.PlaybookVersion.examples: object expected"); + message.examples[i] = $root.google.cloud.dialogflow.cx.v3.Example.fromObject(object.examples[i]); } } - if (object.payload != null) { - if (typeof object.payload !== "object") - 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); - } - if (object.languageInfo != null) { - if (typeof object.languageInfo !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.WebhookRequest.languageInfo: object expected"); - message.languageInfo = $root.google.cloud.dialogflow.cx.v3.LanguageInfo.fromObject(object.languageInfo); + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.PlaybookVersion.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); } return message; }; /** - * Creates a plain object from a WebhookRequest message. Also converts values to other types if specified. + * Creates a plain object from a PlaybookVersion message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest + * @memberof google.cloud.dialogflow.cx.v3.PlaybookVersion * @static - * @param {google.cloud.dialogflow.cx.v3.WebhookRequest} message WebhookRequest + * @param {google.cloud.dialogflow.cx.v3.PlaybookVersion} message PlaybookVersion * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - WebhookRequest.toObject = function toObject(message, options) { + PlaybookVersion.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.messages = []; + object.examples = []; if (options.defaults) { - object.detectIntentResponseId = ""; - object.intentInfo = null; - object.pageInfo = null; - object.sessionInfo = null; - object.fulfillmentInfo = null; - object.payload = null; - object.sentimentAnalysisResult = null; - object.languageCode = ""; - object.languageInfo = null; - } - if (message.detectIntentResponseId != null && message.hasOwnProperty("detectIntentResponseId")) - object.detectIntentResponseId = message.detectIntentResponseId; - if (message.intentInfo != null && message.hasOwnProperty("intentInfo")) - object.intentInfo = $root.google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.toObject(message.intentInfo, options); - if (message.pageInfo != null && message.hasOwnProperty("pageInfo")) - object.pageInfo = $root.google.cloud.dialogflow.cx.v3.PageInfo.toObject(message.pageInfo, options); - if (message.sessionInfo != null && message.hasOwnProperty("sessionInfo")) - object.sessionInfo = $root.google.cloud.dialogflow.cx.v3.SessionInfo.toObject(message.sessionInfo, options); - if (message.fulfillmentInfo != null && message.hasOwnProperty("fulfillmentInfo")) - object.fulfillmentInfo = $root.google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo.toObject(message.fulfillmentInfo, options); - if (message.messages && message.messages.length) { - object.messages = []; - for (var j = 0; j < message.messages.length; ++j) - object.messages[j] = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.toObject(message.messages[j], options); - } - 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); - if (message.text != null && message.hasOwnProperty("text")) { - object.text = message.text; - if (options.oneofs) - object.query = "text"; - } - if (message.triggerIntent != null && message.hasOwnProperty("triggerIntent")) { - object.triggerIntent = message.triggerIntent; - if (options.oneofs) - object.query = "triggerIntent"; - } - if (message.transcript != null && message.hasOwnProperty("transcript")) { - object.transcript = message.transcript; - if (options.oneofs) - object.query = "transcript"; - } - if (message.triggerEvent != null && message.hasOwnProperty("triggerEvent")) { - object.triggerEvent = message.triggerEvent; - if (options.oneofs) - object.query = "triggerEvent"; - } - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; - if (message.dtmfDigits != null && message.hasOwnProperty("dtmfDigits")) { - object.dtmfDigits = message.dtmfDigits; - if (options.oneofs) - object.query = "dtmfDigits"; - } - if (message.languageInfo != null && message.hasOwnProperty("languageInfo")) - object.languageInfo = $root.google.cloud.dialogflow.cx.v3.LanguageInfo.toObject(message.languageInfo, options); - return object; - }; - - /** - * Converts this WebhookRequest to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest - * @instance - * @returns {Object.} JSON object - */ - WebhookRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for WebhookRequest - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - WebhookRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.WebhookRequest"; - }; - - WebhookRequest.FulfillmentInfo = (function() { - - /** - * Properties of a FulfillmentInfo. - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest - * @interface IFulfillmentInfo - * @property {string|null} [tag] FulfillmentInfo tag - */ - - /** - * Constructs a new FulfillmentInfo. - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest - * @classdesc Represents a FulfillmentInfo. - * @implements IFulfillmentInfo - * @constructor - * @param {google.cloud.dialogflow.cx.v3.WebhookRequest.IFulfillmentInfo=} [properties] Properties to set - */ - function FulfillmentInfo(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]]; + object.name = ""; + object.description = ""; + object.playbook = null; + object.updateTime = null; } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.playbook != null && message.hasOwnProperty("playbook")) + object.playbook = $root.google.cloud.dialogflow.cx.v3.Playbook.toObject(message.playbook, options); + if (message.examples && message.examples.length) { + object.examples = []; + for (var j = 0; j < message.examples.length; ++j) + object.examples[j] = $root.google.cloud.dialogflow.cx.v3.Example.toObject(message.examples[j], options); + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + return object; + }; - /** - * FulfillmentInfo tag. - * @member {string} tag - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo - * @instance - */ - FulfillmentInfo.prototype.tag = ""; - - /** - * Creates a new FulfillmentInfo instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo - * @static - * @param {google.cloud.dialogflow.cx.v3.WebhookRequest.IFulfillmentInfo=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo} FulfillmentInfo instance - */ - FulfillmentInfo.create = function create(properties) { - return new FulfillmentInfo(properties); - }; - - /** - * Encodes the specified FulfillmentInfo message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo - * @static - * @param {google.cloud.dialogflow.cx.v3.WebhookRequest.IFulfillmentInfo} message FulfillmentInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FulfillmentInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.tag != null && Object.hasOwnProperty.call(message, "tag")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.tag); - return writer; - }; - - /** - * Encodes the specified FulfillmentInfo message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo - * @static - * @param {google.cloud.dialogflow.cx.v3.WebhookRequest.IFulfillmentInfo} message FulfillmentInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FulfillmentInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FulfillmentInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo - * @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.FulfillmentInfo} FulfillmentInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FulfillmentInfo.decode = function decode(reader, length, error) { - 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.FulfillmentInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.tag = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FulfillmentInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo} FulfillmentInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FulfillmentInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FulfillmentInfo message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FulfillmentInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.tag != null && message.hasOwnProperty("tag")) - if (!$util.isString(message.tag)) - return "tag: string expected"; - return null; - }; - - /** - * Creates a FulfillmentInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo} FulfillmentInfo - */ - FulfillmentInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo(); - if (object.tag != null) - message.tag = String(object.tag); - return message; - }; - - /** - * Creates a plain object from a FulfillmentInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo - * @static - * @param {google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo} message FulfillmentInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FulfillmentInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.tag = ""; - if (message.tag != null && message.hasOwnProperty("tag")) - object.tag = message.tag; - return object; - }; - - /** - * Converts this FulfillmentInfo to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo - * @instance - * @returns {Object.} JSON object - */ - FulfillmentInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FulfillmentInfo - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FulfillmentInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo"; - }; - - return FulfillmentInfo; - })(); - - WebhookRequest.IntentInfo = (function() { - - /** - * Properties of an IntentInfo. - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest - * @interface IIntentInfo - * @property {string|null} [lastMatchedIntent] IntentInfo lastMatchedIntent - * @property {string|null} [displayName] IntentInfo displayName - * @property {Object.|null} [parameters] IntentInfo parameters - * @property {number|null} [confidence] IntentInfo confidence - */ + /** + * Converts this PlaybookVersion to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.PlaybookVersion + * @instance + * @returns {Object.} JSON object + */ + PlaybookVersion.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Constructs a new IntentInfo. - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest - * @classdesc Represents an IntentInfo. - * @implements IIntentInfo - * @constructor - * @param {google.cloud.dialogflow.cx.v3.WebhookRequest.IIntentInfo=} [properties] Properties to set - */ - function IntentInfo(properties) { - this.parameters = {}; - 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]]; + /** + * Gets the default type url for PlaybookVersion + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.PlaybookVersion + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PlaybookVersion.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.PlaybookVersion"; + }; - /** - * IntentInfo lastMatchedIntent. - * @member {string} lastMatchedIntent - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo - * @instance - */ - IntentInfo.prototype.lastMatchedIntent = ""; + return PlaybookVersion; + })(); - /** - * IntentInfo displayName. - * @member {string} displayName - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo - * @instance - */ - IntentInfo.prototype.displayName = ""; + v3.GetPlaybookVersionRequest = (function() { - /** - * IntentInfo parameters. - * @member {Object.} parameters - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo - * @instance - */ - IntentInfo.prototype.parameters = $util.emptyObject; + /** + * Properties of a GetPlaybookVersionRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IGetPlaybookVersionRequest + * @property {string|null} [name] GetPlaybookVersionRequest name + */ - /** - * IntentInfo confidence. - * @member {number} confidence - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo - * @instance - */ - IntentInfo.prototype.confidence = 0; + /** + * Constructs a new GetPlaybookVersionRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a GetPlaybookVersionRequest. + * @implements IGetPlaybookVersionRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IGetPlaybookVersionRequest=} [properties] Properties to set + */ + function GetPlaybookVersionRequest(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]]; + } - /** - * Creates a new IntentInfo instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo - * @static - * @param {google.cloud.dialogflow.cx.v3.WebhookRequest.IIntentInfo=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo} IntentInfo instance - */ - IntentInfo.create = function create(properties) { - return new IntentInfo(properties); - }; + /** + * GetPlaybookVersionRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest + * @instance + */ + GetPlaybookVersionRequest.prototype.name = ""; - /** - * Encodes the specified IntentInfo message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo - * @static - * @param {google.cloud.dialogflow.cx.v3.WebhookRequest.IIntentInfo} message IntentInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IntentInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.lastMatchedIntent != null && Object.hasOwnProperty.call(message, "lastMatchedIntent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.lastMatchedIntent); - if (message.parameters != null && Object.hasOwnProperty.call(message, "parameters")) - for (var keys = Object.keys(message.parameters), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue.encode(message.parameters[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.displayName); - if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) - writer.uint32(/* id 4, wireType 5 =*/37).float(message.confidence); - return writer; - }; + /** + * Creates a new GetPlaybookVersionRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IGetPlaybookVersionRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest} GetPlaybookVersionRequest instance + */ + GetPlaybookVersionRequest.create = function create(properties) { + return new GetPlaybookVersionRequest(properties); + }; - /** - * Encodes the specified IntentInfo message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo - * @static - * @param {google.cloud.dialogflow.cx.v3.WebhookRequest.IIntentInfo} message IntentInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IntentInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified GetPlaybookVersionRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IGetPlaybookVersionRequest} message GetPlaybookVersionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetPlaybookVersionRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; - /** - * Decodes an IntentInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo - * @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.IntentInfo} IntentInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IntentInfo.decode = function decode(reader, length, error) { - 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.IntentInfo(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.lastMatchedIntent = reader.string(); - break; - } - case 3: { - message.displayName = reader.string(); - break; - } - case 2: { - if (message.parameters === $util.emptyObject) - message.parameters = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.parameters[key] = value; - break; - } - case 4: { - message.confidence = reader.float(); - break; - } - default: - reader.skipType(tag & 7); + /** + * Encodes the specified GetPlaybookVersionRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IGetPlaybookVersionRequest} message GetPlaybookVersionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetPlaybookVersionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetPlaybookVersionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest + * @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.GetPlaybookVersionRequest} GetPlaybookVersionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetPlaybookVersionRequest.decode = function decode(reader, length, error) { + 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.GetPlaybookVersionRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); break; } + default: + reader.skipType(tag & 7); + break; } - return message; - }; - - /** - * Decodes an IntentInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo} IntentInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IntentInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + } + return message; + }; - /** - * Verifies an IntentInfo message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - IntentInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.lastMatchedIntent != null && message.hasOwnProperty("lastMatchedIntent")) - if (!$util.isString(message.lastMatchedIntent)) - return "lastMatchedIntent: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.parameters != null && message.hasOwnProperty("parameters")) { - if (!$util.isObject(message.parameters)) - return "parameters: object expected"; - var key = Object.keys(message.parameters); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue.verify(message.parameters[key[i]]); - if (error) - return "parameters." + error; - } - } - if (message.confidence != null && message.hasOwnProperty("confidence")) - if (typeof message.confidence !== "number") - return "confidence: number expected"; - return null; - }; + /** + * Decodes a GetPlaybookVersionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest} GetPlaybookVersionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetPlaybookVersionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates an IntentInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo} IntentInfo - */ - IntentInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo(); - if (object.lastMatchedIntent != null) - message.lastMatchedIntent = String(object.lastMatchedIntent); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.parameters) { - if (typeof object.parameters !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.parameters: object expected"); - message.parameters = {}; - for (var keys = Object.keys(object.parameters), i = 0; i < keys.length; ++i) { - if (typeof object.parameters[keys[i]] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.parameters: object expected"); - message.parameters[keys[i]] = $root.google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue.fromObject(object.parameters[keys[i]]); - } - } - if (object.confidence != null) - message.confidence = Number(object.confidence); - return message; - }; + /** + * Verifies a GetPlaybookVersionRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetPlaybookVersionRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; - /** - * Creates a plain object from an IntentInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo - * @static - * @param {google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo} message IntentInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - IntentInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.parameters = {}; - if (options.defaults) { - object.lastMatchedIntent = ""; - object.displayName = ""; - object.confidence = 0; - } - if (message.lastMatchedIntent != null && message.hasOwnProperty("lastMatchedIntent")) - object.lastMatchedIntent = message.lastMatchedIntent; - var keys2; - if (message.parameters && (keys2 = Object.keys(message.parameters)).length) { - object.parameters = {}; - for (var j = 0; j < keys2.length; ++j) - object.parameters[keys2[j]] = $root.google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue.toObject(message.parameters[keys2[j]], options); - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.confidence != null && message.hasOwnProperty("confidence")) - object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence; + /** + * Creates a GetPlaybookVersionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest} GetPlaybookVersionRequest + */ + GetPlaybookVersionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest) return object; - }; - - /** - * Converts this IntentInfo to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo - * @instance - * @returns {Object.} JSON object - */ - IntentInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for IntentInfo - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - IntentInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo"; - }; - - IntentInfo.IntentParameterValue = (function() { + var message = new $root.google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; - /** - * Properties of an IntentParameterValue. - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo - * @interface IIntentParameterValue - * @property {string|null} [originalValue] IntentParameterValue originalValue - * @property {google.protobuf.IValue|null} [resolvedValue] IntentParameterValue resolvedValue - */ + /** + * Creates a plain object from a GetPlaybookVersionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest} message GetPlaybookVersionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetPlaybookVersionRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; - /** - * Constructs a new IntentParameterValue. - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo - * @classdesc Represents an IntentParameterValue. - * @implements IIntentParameterValue - * @constructor - * @param {google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IIntentParameterValue=} [properties] Properties to set - */ - function IntentParameterValue(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]]; - } + /** + * Converts this GetPlaybookVersionRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest + * @instance + * @returns {Object.} JSON object + */ + GetPlaybookVersionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * IntentParameterValue originalValue. - * @member {string} originalValue - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue - * @instance - */ - IntentParameterValue.prototype.originalValue = ""; + /** + * Gets the default type url for GetPlaybookVersionRequest + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetPlaybookVersionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest"; + }; - /** - * IntentParameterValue resolvedValue. - * @member {google.protobuf.IValue|null|undefined} resolvedValue - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue - * @instance - */ - IntentParameterValue.prototype.resolvedValue = null; + return GetPlaybookVersionRequest; + })(); - /** - * Creates a new IntentParameterValue instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue - * @static - * @param {google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IIntentParameterValue=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue} IntentParameterValue instance - */ - IntentParameterValue.create = function create(properties) { - return new IntentParameterValue(properties); - }; + v3.RestorePlaybookVersionRequest = (function() { - /** - * Encodes the specified IntentParameterValue message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue - * @static - * @param {google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IIntentParameterValue} message IntentParameterValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IntentParameterValue.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.originalValue != null && Object.hasOwnProperty.call(message, "originalValue")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.originalValue); - if (message.resolvedValue != null && Object.hasOwnProperty.call(message, "resolvedValue")) - $root.google.protobuf.Value.encode(message.resolvedValue, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; + /** + * Properties of a RestorePlaybookVersionRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IRestorePlaybookVersionRequest + * @property {string|null} [name] RestorePlaybookVersionRequest name + */ - /** - * Encodes the specified IntentParameterValue message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue - * @static - * @param {google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IIntentParameterValue} message IntentParameterValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IntentParameterValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Constructs a new RestorePlaybookVersionRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a RestorePlaybookVersionRequest. + * @implements IRestorePlaybookVersionRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IRestorePlaybookVersionRequest=} [properties] Properties to set + */ + function RestorePlaybookVersionRequest(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]]; + } - /** - * Decodes an IntentParameterValue message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue - * @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.IntentInfo.IntentParameterValue} IntentParameterValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IntentParameterValue.decode = function decode(reader, length, error) { - 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.IntentInfo.IntentParameterValue(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.originalValue = reader.string(); - break; - } - case 2: { - message.resolvedValue = $root.google.protobuf.Value.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * RestorePlaybookVersionRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest + * @instance + */ + RestorePlaybookVersionRequest.prototype.name = ""; - /** - * Decodes an IntentParameterValue message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue} IntentParameterValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IntentParameterValue.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a new RestorePlaybookVersionRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IRestorePlaybookVersionRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest} RestorePlaybookVersionRequest instance + */ + RestorePlaybookVersionRequest.create = function create(properties) { + return new RestorePlaybookVersionRequest(properties); + }; - /** - * Verifies an IntentParameterValue message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - IntentParameterValue.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.originalValue != null && message.hasOwnProperty("originalValue")) - if (!$util.isString(message.originalValue)) - return "originalValue: string expected"; - if (message.resolvedValue != null && message.hasOwnProperty("resolvedValue")) { - var error = $root.google.protobuf.Value.verify(message.resolvedValue); - if (error) - return "resolvedValue." + error; - } - return null; - }; + /** + * Encodes the specified RestorePlaybookVersionRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IRestorePlaybookVersionRequest} message RestorePlaybookVersionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RestorePlaybookVersionRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; - /** - * Creates an IntentParameterValue message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue} IntentParameterValue - */ - IntentParameterValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue(); - if (object.originalValue != null) - message.originalValue = String(object.originalValue); - if (object.resolvedValue != null) { - if (typeof object.resolvedValue !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue.resolvedValue: object expected"); - message.resolvedValue = $root.google.protobuf.Value.fromObject(object.resolvedValue); - } - return message; - }; + /** + * Encodes the specified RestorePlaybookVersionRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IRestorePlaybookVersionRequest} message RestorePlaybookVersionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RestorePlaybookVersionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates a plain object from an IntentParameterValue message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue - * @static - * @param {google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue} message IntentParameterValue - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - IntentParameterValue.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.originalValue = ""; - object.resolvedValue = null; + /** + * Decodes a RestorePlaybookVersionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest + * @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.RestorePlaybookVersionRequest} RestorePlaybookVersionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RestorePlaybookVersionRequest.decode = function decode(reader, length, error) { + 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.RestorePlaybookVersionRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; } - if (message.originalValue != null && message.hasOwnProperty("originalValue")) - object.originalValue = message.originalValue; - if (message.resolvedValue != null && message.hasOwnProperty("resolvedValue")) - object.resolvedValue = $root.google.protobuf.Value.toObject(message.resolvedValue, options); - return object; - }; - - /** - * Converts this IntentParameterValue to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue - * @instance - * @returns {Object.} JSON object - */ - IntentParameterValue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Gets the default type url for IntentParameterValue - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - IntentParameterValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo.IntentParameterValue"; - }; + /** + * Decodes a RestorePlaybookVersionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest} RestorePlaybookVersionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RestorePlaybookVersionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - return IntentParameterValue; - })(); + /** + * Verifies a RestorePlaybookVersionRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RestorePlaybookVersionRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; - return IntentInfo; - })(); + /** + * Creates a RestorePlaybookVersionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest} RestorePlaybookVersionRequest + */ + RestorePlaybookVersionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; - WebhookRequest.SentimentAnalysisResult = (function() { + /** + * Creates a plain object from a RestorePlaybookVersionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest} message RestorePlaybookVersionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RestorePlaybookVersionRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; - /** - * 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 - */ + /** + * Converts this RestorePlaybookVersionRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest + * @instance + * @returns {Object.} JSON object + */ + RestorePlaybookVersionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * 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]]; + /** + * Gets the default type url for RestorePlaybookVersionRequest + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RestorePlaybookVersionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest"; + }; - /** - * SentimentAnalysisResult score. - * @member {number} score - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult - * @instance - */ - SentimentAnalysisResult.prototype.score = 0; + return RestorePlaybookVersionRequest; + })(); - /** - * SentimentAnalysisResult magnitude. - * @member {number} magnitude - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult - * @instance - */ - SentimentAnalysisResult.prototype.magnitude = 0; + v3.RestorePlaybookVersionResponse = (function() { - /** - * 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); - }; + /** + * Properties of a RestorePlaybookVersionResponse. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IRestorePlaybookVersionResponse + * @property {google.cloud.dialogflow.cx.v3.IPlaybook|null} [playbook] RestorePlaybookVersionResponse playbook + */ - /** - * 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; - }; + /** + * Constructs a new RestorePlaybookVersionResponse. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a RestorePlaybookVersionResponse. + * @implements IRestorePlaybookVersionResponse + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IRestorePlaybookVersionResponse=} [properties] Properties to set + */ + function RestorePlaybookVersionResponse(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]]; + } - /** - * 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(); - }; + /** + * RestorePlaybookVersionResponse playbook. + * @member {google.cloud.dialogflow.cx.v3.IPlaybook|null|undefined} playbook + * @memberof google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse + * @instance + */ + RestorePlaybookVersionResponse.prototype.playbook = null; - /** - * 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, error) { - 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(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.score = reader.float(); - break; - } - case 2: { - message.magnitude = reader.float(); - break; - } - default: - reader.skipType(tag & 7); + /** + * Creates a new RestorePlaybookVersionResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse + * @static + * @param {google.cloud.dialogflow.cx.v3.IRestorePlaybookVersionResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse} RestorePlaybookVersionResponse instance + */ + RestorePlaybookVersionResponse.create = function create(properties) { + return new RestorePlaybookVersionResponse(properties); + }; + + /** + * Encodes the specified RestorePlaybookVersionResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse + * @static + * @param {google.cloud.dialogflow.cx.v3.IRestorePlaybookVersionResponse} message RestorePlaybookVersionResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RestorePlaybookVersionResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.playbook != null && Object.hasOwnProperty.call(message, "playbook")) + $root.google.cloud.dialogflow.cx.v3.Playbook.encode(message.playbook, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RestorePlaybookVersionResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse + * @static + * @param {google.cloud.dialogflow.cx.v3.IRestorePlaybookVersionResponse} message RestorePlaybookVersionResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RestorePlaybookVersionResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RestorePlaybookVersionResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse + * @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.RestorePlaybookVersionResponse} RestorePlaybookVersionResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RestorePlaybookVersionResponse.decode = function decode(reader, length, error) { + 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.RestorePlaybookVersionResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + message.playbook = $root.google.cloud.dialogflow.cx.v3.Playbook.decode(reader, reader.uint32()); 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()); - }; + } + return message; + }; - /** - * 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; - }; + /** + * Decodes a RestorePlaybookVersionResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse} RestorePlaybookVersionResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RestorePlaybookVersionResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * 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; - }; + /** + * Verifies a RestorePlaybookVersionResponse message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RestorePlaybookVersionResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.playbook != null && message.hasOwnProperty("playbook")) { + var error = $root.google.cloud.dialogflow.cx.v3.Playbook.verify(message.playbook); + if (error) + return "playbook." + error; + } + return null; + }; - /** - * 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; + /** + * Creates a RestorePlaybookVersionResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse} RestorePlaybookVersionResponse + */ + RestorePlaybookVersionResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse) return object; - }; + var message = new $root.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse(); + if (object.playbook != null) { + if (typeof object.playbook !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse.playbook: object expected"); + message.playbook = $root.google.cloud.dialogflow.cx.v3.Playbook.fromObject(object.playbook); + } + return message; + }; - /** - * 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); - }; + /** + * Creates a plain object from a RestorePlaybookVersionResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse + * @static + * @param {google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse} message RestorePlaybookVersionResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RestorePlaybookVersionResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.playbook = null; + if (message.playbook != null && message.hasOwnProperty("playbook")) + object.playbook = $root.google.cloud.dialogflow.cx.v3.Playbook.toObject(message.playbook, options); + return object; + }; - /** - * Gets the default type url for SentimentAnalysisResult - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SentimentAnalysisResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult"; - }; + /** + * Converts this RestorePlaybookVersionResponse to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse + * @instance + * @returns {Object.} JSON object + */ + RestorePlaybookVersionResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return SentimentAnalysisResult; - })(); + /** + * Gets the default type url for RestorePlaybookVersionResponse + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RestorePlaybookVersionResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse"; + }; - return WebhookRequest; + return RestorePlaybookVersionResponse; })(); - v3.WebhookResponse = (function() { + v3.ListPlaybookVersionsRequest = (function() { /** - * Properties of a WebhookResponse. + * Properties of a ListPlaybookVersionsRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IWebhookResponse - * @property {google.cloud.dialogflow.cx.v3.WebhookResponse.IFulfillmentResponse|null} [fulfillmentResponse] WebhookResponse fulfillmentResponse - * @property {google.cloud.dialogflow.cx.v3.IPageInfo|null} [pageInfo] WebhookResponse pageInfo - * @property {google.cloud.dialogflow.cx.v3.ISessionInfo|null} [sessionInfo] WebhookResponse sessionInfo - * @property {google.protobuf.IStruct|null} [payload] WebhookResponse payload - * @property {string|null} [targetPage] WebhookResponse targetPage - * @property {string|null} [targetFlow] WebhookResponse targetFlow + * @interface IListPlaybookVersionsRequest + * @property {string|null} [parent] ListPlaybookVersionsRequest parent + * @property {number|null} [pageSize] ListPlaybookVersionsRequest pageSize + * @property {string|null} [pageToken] ListPlaybookVersionsRequest pageToken */ /** - * Constructs a new WebhookResponse. + * Constructs a new ListPlaybookVersionsRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a WebhookResponse. - * @implements IWebhookResponse + * @classdesc Represents a ListPlaybookVersionsRequest. + * @implements IListPlaybookVersionsRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IWebhookResponse=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IListPlaybookVersionsRequest=} [properties] Properties to set */ - function WebhookResponse(properties) { + function ListPlaybookVersionsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -77674,161 +101469,346 @@ } /** - * WebhookResponse fulfillmentResponse. - * @member {google.cloud.dialogflow.cx.v3.WebhookResponse.IFulfillmentResponse|null|undefined} fulfillmentResponse - * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse + * ListPlaybookVersionsRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest * @instance */ - WebhookResponse.prototype.fulfillmentResponse = null; + ListPlaybookVersionsRequest.prototype.parent = ""; /** - * WebhookResponse pageInfo. - * @member {google.cloud.dialogflow.cx.v3.IPageInfo|null|undefined} pageInfo - * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse + * ListPlaybookVersionsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest * @instance */ - WebhookResponse.prototype.pageInfo = null; + ListPlaybookVersionsRequest.prototype.pageSize = 0; /** - * WebhookResponse sessionInfo. - * @member {google.cloud.dialogflow.cx.v3.ISessionInfo|null|undefined} sessionInfo - * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse + * ListPlaybookVersionsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest * @instance */ - WebhookResponse.prototype.sessionInfo = null; + ListPlaybookVersionsRequest.prototype.pageToken = ""; /** - * WebhookResponse payload. - * @member {google.protobuf.IStruct|null|undefined} payload - * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse - * @instance + * Creates a new ListPlaybookVersionsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IListPlaybookVersionsRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest} ListPlaybookVersionsRequest instance */ - WebhookResponse.prototype.payload = null; + ListPlaybookVersionsRequest.create = function create(properties) { + return new ListPlaybookVersionsRequest(properties); + }; /** - * WebhookResponse targetPage. - * @member {string|null|undefined} targetPage - * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse - * @instance + * Encodes the specified ListPlaybookVersionsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IListPlaybookVersionsRequest} message ListPlaybookVersionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - WebhookResponse.prototype.targetPage = null; + ListPlaybookVersionsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; /** - * WebhookResponse targetFlow. - * @member {string|null|undefined} targetFlow - * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse + * Encodes the specified ListPlaybookVersionsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IListPlaybookVersionsRequest} message ListPlaybookVersionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPlaybookVersionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListPlaybookVersionsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest + * @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.ListPlaybookVersionsRequest} ListPlaybookVersionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPlaybookVersionsRequest.decode = function decode(reader, length, error) { + 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.ListPlaybookVersionsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListPlaybookVersionsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest} ListPlaybookVersionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPlaybookVersionsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListPlaybookVersionsRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListPlaybookVersionsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListPlaybookVersionsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest} ListPlaybookVersionsRequest + */ + ListPlaybookVersionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListPlaybookVersionsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest} message ListPlaybookVersionsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListPlaybookVersionsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListPlaybookVersionsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest * @instance + * @returns {Object.} JSON object */ - WebhookResponse.prototype.targetFlow = null; + ListPlaybookVersionsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Gets the default type url for ListPlaybookVersionsRequest + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListPlaybookVersionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest"; + }; + + return ListPlaybookVersionsRequest; + })(); + + v3.ListPlaybookVersionsResponse = (function() { /** - * WebhookResponse transition. - * @member {"targetPage"|"targetFlow"|undefined} transition - * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse + * Properties of a ListPlaybookVersionsResponse. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IListPlaybookVersionsResponse + * @property {Array.|null} [playbookVersions] ListPlaybookVersionsResponse playbookVersions + * @property {string|null} [nextPageToken] ListPlaybookVersionsResponse nextPageToken + */ + + /** + * Constructs a new ListPlaybookVersionsResponse. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a ListPlaybookVersionsResponse. + * @implements IListPlaybookVersionsResponse + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IListPlaybookVersionsResponse=} [properties] Properties to set + */ + function ListPlaybookVersionsResponse(properties) { + this.playbookVersions = []; + 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]]; + } + + /** + * ListPlaybookVersionsResponse playbookVersions. + * @member {Array.} playbookVersions + * @memberof google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponse * @instance */ - Object.defineProperty(WebhookResponse.prototype, "transition", { - get: $util.oneOfGetter($oneOfFields = ["targetPage", "targetFlow"]), - set: $util.oneOfSetter($oneOfFields) - }); + ListPlaybookVersionsResponse.prototype.playbookVersions = $util.emptyArray; /** - * Creates a new WebhookResponse instance using the specified properties. + * ListPlaybookVersionsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponse + * @instance + */ + ListPlaybookVersionsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListPlaybookVersionsResponse instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse + * @memberof google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IWebhookResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.WebhookResponse} WebhookResponse instance + * @param {google.cloud.dialogflow.cx.v3.IListPlaybookVersionsResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponse} ListPlaybookVersionsResponse instance */ - WebhookResponse.create = function create(properties) { - return new WebhookResponse(properties); + ListPlaybookVersionsResponse.create = function create(properties) { + return new ListPlaybookVersionsResponse(properties); }; /** - * Encodes the specified WebhookResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.WebhookResponse.verify|verify} messages. + * Encodes the specified ListPlaybookVersionsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse + * @memberof google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IWebhookResponse} message WebhookResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListPlaybookVersionsResponse} message ListPlaybookVersionsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - WebhookResponse.encode = function encode(message, writer) { + ListPlaybookVersionsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.fulfillmentResponse != null && Object.hasOwnProperty.call(message, "fulfillmentResponse")) - $root.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.encode(message.fulfillmentResponse, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.pageInfo != null && Object.hasOwnProperty.call(message, "pageInfo")) - $root.google.cloud.dialogflow.cx.v3.PageInfo.encode(message.pageInfo, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.sessionInfo != null && Object.hasOwnProperty.call(message, "sessionInfo")) - $root.google.cloud.dialogflow.cx.v3.SessionInfo.encode(message.sessionInfo, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.payload != null && Object.hasOwnProperty.call(message, "payload")) - $root.google.protobuf.Struct.encode(message.payload, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.targetPage != null && Object.hasOwnProperty.call(message, "targetPage")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.targetPage); - if (message.targetFlow != null && Object.hasOwnProperty.call(message, "targetFlow")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.targetFlow); + if (message.playbookVersions != null && message.playbookVersions.length) + for (var i = 0; i < message.playbookVersions.length; ++i) + $root.google.cloud.dialogflow.cx.v3.PlaybookVersion.encode(message.playbookVersions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; /** - * Encodes the specified WebhookResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.WebhookResponse.verify|verify} messages. + * Encodes the specified ListPlaybookVersionsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse + * @memberof google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IWebhookResponse} message WebhookResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListPlaybookVersionsResponse} message ListPlaybookVersionsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - WebhookResponse.encodeDelimited = function encodeDelimited(message, writer) { + ListPlaybookVersionsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a WebhookResponse message from the specified reader or buffer. + * Decodes a ListPlaybookVersionsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse + * @memberof google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponse * @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.WebhookResponse} WebhookResponse + * @returns {google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponse} ListPlaybookVersionsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - WebhookResponse.decode = function decode(reader, length, error) { + ListPlaybookVersionsResponse.decode = function decode(reader, length, error) { 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.WebhookResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponse(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.fulfillmentResponse = $root.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.decode(reader, reader.uint32()); + if (!(message.playbookVersions && message.playbookVersions.length)) + message.playbookVersions = []; + message.playbookVersions.push($root.google.cloud.dialogflow.cx.v3.PlaybookVersion.decode(reader, reader.uint32())); break; } case 2: { - message.pageInfo = $root.google.cloud.dialogflow.cx.v3.PageInfo.decode(reader, reader.uint32()); - break; - } - case 3: { - message.sessionInfo = $root.google.cloud.dialogflow.cx.v3.SessionInfo.decode(reader, reader.uint32()); - break; - } - case 4: { - message.payload = $root.google.protobuf.Struct.decode(reader, reader.uint32()); - break; - } - case 5: { - message.targetPage = reader.string(); - break; - } - case 6: { - message.targetFlow = reader.string(); + message.nextPageToken = reader.string(); break; } default: @@ -77840,486 +101820,355 @@ }; /** - * Decodes a WebhookResponse message from the specified reader or buffer, length delimited. + * Decodes a ListPlaybookVersionsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse + * @memberof google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.WebhookResponse} WebhookResponse + * @returns {google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponse} ListPlaybookVersionsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - WebhookResponse.decodeDelimited = function decodeDelimited(reader) { + ListPlaybookVersionsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a WebhookResponse message. + * Verifies a ListPlaybookVersionsResponse message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse + * @memberof google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - WebhookResponse.verify = function verify(message) { + ListPlaybookVersionsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.fulfillmentResponse != null && message.hasOwnProperty("fulfillmentResponse")) { - var error = $root.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.verify(message.fulfillmentResponse); - if (error) - return "fulfillmentResponse." + error; - } - if (message.pageInfo != null && message.hasOwnProperty("pageInfo")) { - var error = $root.google.cloud.dialogflow.cx.v3.PageInfo.verify(message.pageInfo); - if (error) - return "pageInfo." + error; - } - if (message.sessionInfo != null && message.hasOwnProperty("sessionInfo")) { - var error = $root.google.cloud.dialogflow.cx.v3.SessionInfo.verify(message.sessionInfo); - if (error) - return "sessionInfo." + error; - } - if (message.payload != null && message.hasOwnProperty("payload")) { - var error = $root.google.protobuf.Struct.verify(message.payload); - if (error) - return "payload." + error; - } - if (message.targetPage != null && message.hasOwnProperty("targetPage")) { - properties.transition = 1; - if (!$util.isString(message.targetPage)) - return "targetPage: string expected"; - } - if (message.targetFlow != null && message.hasOwnProperty("targetFlow")) { - if (properties.transition === 1) - return "transition: multiple values"; - properties.transition = 1; - if (!$util.isString(message.targetFlow)) - return "targetFlow: string expected"; + if (message.playbookVersions != null && message.hasOwnProperty("playbookVersions")) { + if (!Array.isArray(message.playbookVersions)) + return "playbookVersions: array expected"; + for (var i = 0; i < message.playbookVersions.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.PlaybookVersion.verify(message.playbookVersions[i]); + if (error) + return "playbookVersions." + error; + } } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a WebhookResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListPlaybookVersionsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse + * @memberof google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.WebhookResponse} WebhookResponse + * @returns {google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponse} ListPlaybookVersionsResponse */ - WebhookResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.WebhookResponse) + ListPlaybookVersionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponse) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.WebhookResponse(); - if (object.fulfillmentResponse != null) { - if (typeof object.fulfillmentResponse !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.WebhookResponse.fulfillmentResponse: object expected"); - message.fulfillmentResponse = $root.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.fromObject(object.fulfillmentResponse); - } - if (object.pageInfo != null) { - if (typeof object.pageInfo !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.WebhookResponse.pageInfo: object expected"); - message.pageInfo = $root.google.cloud.dialogflow.cx.v3.PageInfo.fromObject(object.pageInfo); - } - if (object.sessionInfo != null) { - if (typeof object.sessionInfo !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.WebhookResponse.sessionInfo: object expected"); - message.sessionInfo = $root.google.cloud.dialogflow.cx.v3.SessionInfo.fromObject(object.sessionInfo); - } - if (object.payload != null) { - if (typeof object.payload !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.WebhookResponse.payload: object expected"); - message.payload = $root.google.protobuf.Struct.fromObject(object.payload); + var message = new $root.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponse(); + if (object.playbookVersions) { + if (!Array.isArray(object.playbookVersions)) + throw TypeError(".google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponse.playbookVersions: array expected"); + message.playbookVersions = []; + for (var i = 0; i < object.playbookVersions.length; ++i) { + if (typeof object.playbookVersions[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponse.playbookVersions: object expected"); + message.playbookVersions[i] = $root.google.cloud.dialogflow.cx.v3.PlaybookVersion.fromObject(object.playbookVersions[i]); + } } - if (object.targetPage != null) - message.targetPage = String(object.targetPage); - if (object.targetFlow != null) - message.targetFlow = String(object.targetFlow); + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a WebhookResponse message. Also converts values to other types if specified. + * Creates a plain object from a ListPlaybookVersionsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse + * @memberof google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponse * @static - * @param {google.cloud.dialogflow.cx.v3.WebhookResponse} message WebhookResponse + * @param {google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponse} message ListPlaybookVersionsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - WebhookResponse.toObject = function toObject(message, options) { + ListPlaybookVersionsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.fulfillmentResponse = null; - object.pageInfo = null; - object.sessionInfo = null; - object.payload = null; - } - if (message.fulfillmentResponse != null && message.hasOwnProperty("fulfillmentResponse")) - object.fulfillmentResponse = $root.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.toObject(message.fulfillmentResponse, options); - if (message.pageInfo != null && message.hasOwnProperty("pageInfo")) - object.pageInfo = $root.google.cloud.dialogflow.cx.v3.PageInfo.toObject(message.pageInfo, options); - if (message.sessionInfo != null && message.hasOwnProperty("sessionInfo")) - object.sessionInfo = $root.google.cloud.dialogflow.cx.v3.SessionInfo.toObject(message.sessionInfo, options); - if (message.payload != null && message.hasOwnProperty("payload")) - object.payload = $root.google.protobuf.Struct.toObject(message.payload, options); - if (message.targetPage != null && message.hasOwnProperty("targetPage")) { - object.targetPage = message.targetPage; - if (options.oneofs) - object.transition = "targetPage"; - } - if (message.targetFlow != null && message.hasOwnProperty("targetFlow")) { - object.targetFlow = message.targetFlow; - if (options.oneofs) - object.transition = "targetFlow"; + if (options.arrays || options.defaults) + object.playbookVersions = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.playbookVersions && message.playbookVersions.length) { + object.playbookVersions = []; + for (var j = 0; j < message.playbookVersions.length; ++j) + object.playbookVersions[j] = $root.google.cloud.dialogflow.cx.v3.PlaybookVersion.toObject(message.playbookVersions[j], options); } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this WebhookResponse to JSON. + * Converts this ListPlaybookVersionsResponse to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse + * @memberof google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponse * @instance * @returns {Object.} JSON object */ - WebhookResponse.prototype.toJSON = function toJSON() { + ListPlaybookVersionsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for WebhookResponse + * Gets the default type url for ListPlaybookVersionsResponse * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse + * @memberof google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - WebhookResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListPlaybookVersionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.WebhookResponse"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponse"; }; - WebhookResponse.FulfillmentResponse = (function() { - - /** - * Properties of a FulfillmentResponse. - * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse - * @interface IFulfillmentResponse - * @property {Array.|null} [messages] FulfillmentResponse messages - * @property {google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.MergeBehavior|null} [mergeBehavior] FulfillmentResponse mergeBehavior - */ - - /** - * Constructs a new FulfillmentResponse. - * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse - * @classdesc Represents a FulfillmentResponse. - * @implements IFulfillmentResponse - * @constructor - * @param {google.cloud.dialogflow.cx.v3.WebhookResponse.IFulfillmentResponse=} [properties] Properties to set - */ - function FulfillmentResponse(properties) { - this.messages = []; - 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]]; - } + return ListPlaybookVersionsResponse; + })(); - /** - * FulfillmentResponse messages. - * @member {Array.} messages - * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse - * @instance - */ - FulfillmentResponse.prototype.messages = $util.emptyArray; + v3.DeletePlaybookVersionRequest = (function() { - /** - * FulfillmentResponse mergeBehavior. - * @member {google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.MergeBehavior} mergeBehavior - * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse - * @instance - */ - FulfillmentResponse.prototype.mergeBehavior = 0; + /** + * Properties of a DeletePlaybookVersionRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IDeletePlaybookVersionRequest + * @property {string|null} [name] DeletePlaybookVersionRequest name + */ - /** - * Creates a new FulfillmentResponse instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse - * @static - * @param {google.cloud.dialogflow.cx.v3.WebhookResponse.IFulfillmentResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse} FulfillmentResponse instance - */ - FulfillmentResponse.create = function create(properties) { - return new FulfillmentResponse(properties); - }; + /** + * Constructs a new DeletePlaybookVersionRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a DeletePlaybookVersionRequest. + * @implements IDeletePlaybookVersionRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IDeletePlaybookVersionRequest=} [properties] Properties to set + */ + function DeletePlaybookVersionRequest(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]]; + } - /** - * Encodes the specified FulfillmentResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse - * @static - * @param {google.cloud.dialogflow.cx.v3.WebhookResponse.IFulfillmentResponse} message FulfillmentResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FulfillmentResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.messages != null && message.messages.length) - for (var i = 0; i < message.messages.length; ++i) - $root.google.cloud.dialogflow.cx.v3.ResponseMessage.encode(message.messages[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.mergeBehavior != null && Object.hasOwnProperty.call(message, "mergeBehavior")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.mergeBehavior); - return writer; - }; + /** + * DeletePlaybookVersionRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest + * @instance + */ + DeletePlaybookVersionRequest.prototype.name = ""; - /** - * Encodes the specified FulfillmentResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse - * @static - * @param {google.cloud.dialogflow.cx.v3.WebhookResponse.IFulfillmentResponse} message FulfillmentResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FulfillmentResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a new DeletePlaybookVersionRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IDeletePlaybookVersionRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest} DeletePlaybookVersionRequest instance + */ + DeletePlaybookVersionRequest.create = function create(properties) { + return new DeletePlaybookVersionRequest(properties); + }; - /** - * Decodes a FulfillmentResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse - * @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.WebhookResponse.FulfillmentResponse} FulfillmentResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FulfillmentResponse.decode = function decode(reader, length, error) { - 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.WebhookResponse.FulfillmentResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.messages && message.messages.length)) - message.messages = []; - message.messages.push($root.google.cloud.dialogflow.cx.v3.ResponseMessage.decode(reader, reader.uint32())); - break; - } - case 2: { - message.mergeBehavior = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Encodes the specified DeletePlaybookVersionRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IDeletePlaybookVersionRequest} message DeletePlaybookVersionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeletePlaybookVersionRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; - /** - * Decodes a FulfillmentResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse} FulfillmentResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FulfillmentResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Encodes the specified DeletePlaybookVersionRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IDeletePlaybookVersionRequest} message DeletePlaybookVersionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeletePlaybookVersionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Verifies a FulfillmentResponse message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FulfillmentResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.messages != null && message.hasOwnProperty("messages")) { - if (!Array.isArray(message.messages)) - return "messages: array expected"; - for (var i = 0; i < message.messages.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.verify(message.messages[i]); - if (error) - return "messages." + error; - } - } - if (message.mergeBehavior != null && message.hasOwnProperty("mergeBehavior")) - switch (message.mergeBehavior) { - default: - return "mergeBehavior: enum value expected"; - case 0: - case 1: - case 2: + /** + * Decodes a DeletePlaybookVersionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest + * @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.DeletePlaybookVersionRequest} DeletePlaybookVersionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeletePlaybookVersionRequest.decode = function decode(reader, length, error) { + 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.DeletePlaybookVersionRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); break; } - return null; - }; - - /** - * Creates a FulfillmentResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse} FulfillmentResponse - */ - FulfillmentResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse(); - if (object.messages) { - if (!Array.isArray(object.messages)) - throw TypeError(".google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.messages: array expected"); - message.messages = []; - for (var i = 0; i < object.messages.length; ++i) { - if (typeof object.messages[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.messages: object expected"); - message.messages[i] = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.fromObject(object.messages[i]); - } - } - switch (object.mergeBehavior) { default: - if (typeof object.mergeBehavior === "number") { - message.mergeBehavior = object.mergeBehavior; - break; - } - break; - case "MERGE_BEHAVIOR_UNSPECIFIED": - case 0: - message.mergeBehavior = 0; - break; - case "APPEND": - case 1: - message.mergeBehavior = 1; - break; - case "REPLACE": - case 2: - message.mergeBehavior = 2; + reader.skipType(tag & 7); break; } - return message; - }; + } + return message; + }; - /** - * Creates a plain object from a FulfillmentResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse - * @static - * @param {google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse} message FulfillmentResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FulfillmentResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.messages = []; - if (options.defaults) - object.mergeBehavior = options.enums === String ? "MERGE_BEHAVIOR_UNSPECIFIED" : 0; - if (message.messages && message.messages.length) { - object.messages = []; - for (var j = 0; j < message.messages.length; ++j) - object.messages[j] = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.toObject(message.messages[j], options); - } - if (message.mergeBehavior != null && message.hasOwnProperty("mergeBehavior")) - object.mergeBehavior = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.MergeBehavior[message.mergeBehavior] === undefined ? message.mergeBehavior : $root.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.MergeBehavior[message.mergeBehavior] : message.mergeBehavior; + /** + * Decodes a DeletePlaybookVersionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest} DeletePlaybookVersionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeletePlaybookVersionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeletePlaybookVersionRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeletePlaybookVersionRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeletePlaybookVersionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest} DeletePlaybookVersionRequest + */ + DeletePlaybookVersionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest) return object; - }; - - /** - * Converts this FulfillmentResponse to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse - * @instance - * @returns {Object.} JSON object - */ - FulfillmentResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + var message = new $root.google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; - /** - * Gets the default type url for FulfillmentResponse - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FulfillmentResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse"; - }; + /** + * Creates a plain object from a DeletePlaybookVersionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest} message DeletePlaybookVersionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeletePlaybookVersionRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; - /** - * MergeBehavior enum. - * @name google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.MergeBehavior - * @enum {number} - * @property {number} MERGE_BEHAVIOR_UNSPECIFIED=0 MERGE_BEHAVIOR_UNSPECIFIED value - * @property {number} APPEND=1 APPEND value - * @property {number} REPLACE=2 REPLACE value - */ - FulfillmentResponse.MergeBehavior = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MERGE_BEHAVIOR_UNSPECIFIED"] = 0; - values[valuesById[1] = "APPEND"] = 1; - values[valuesById[2] = "REPLACE"] = 2; - return values; - })(); + /** + * Converts this DeletePlaybookVersionRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest + * @instance + * @returns {Object.} JSON object + */ + DeletePlaybookVersionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return FulfillmentResponse; - })(); + /** + * Gets the default type url for DeletePlaybookVersionRequest + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeletePlaybookVersionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest"; + }; - return WebhookResponse; + return DeletePlaybookVersionRequest; })(); - v3.PageInfo = (function() { + v3.ExportPlaybookRequest = (function() { /** - * Properties of a PageInfo. + * Properties of an ExportPlaybookRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IPageInfo - * @property {string|null} [currentPage] PageInfo currentPage - * @property {string|null} [displayName] PageInfo displayName - * @property {google.cloud.dialogflow.cx.v3.PageInfo.IFormInfo|null} [formInfo] PageInfo formInfo + * @interface IExportPlaybookRequest + * @property {string|null} [name] ExportPlaybookRequest name + * @property {string|null} [playbookUri] ExportPlaybookRequest playbookUri + * @property {google.cloud.dialogflow.cx.v3.ExportPlaybookRequest.DataFormat|null} [dataFormat] ExportPlaybookRequest dataFormat */ /** - * Constructs a new PageInfo. + * Constructs a new ExportPlaybookRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a PageInfo. - * @implements IPageInfo + * @classdesc Represents an ExportPlaybookRequest. + * @implements IExportPlaybookRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IPageInfo=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IExportPlaybookRequest=} [properties] Properties to set */ - function PageInfo(properties) { + function ExportPlaybookRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -78327,105 +102176,105 @@ } /** - * PageInfo currentPage. - * @member {string} currentPage - * @memberof google.cloud.dialogflow.cx.v3.PageInfo + * ExportPlaybookRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.ExportPlaybookRequest * @instance */ - PageInfo.prototype.currentPage = ""; + ExportPlaybookRequest.prototype.name = ""; /** - * PageInfo displayName. - * @member {string} displayName - * @memberof google.cloud.dialogflow.cx.v3.PageInfo + * ExportPlaybookRequest playbookUri. + * @member {string} playbookUri + * @memberof google.cloud.dialogflow.cx.v3.ExportPlaybookRequest * @instance */ - PageInfo.prototype.displayName = ""; + ExportPlaybookRequest.prototype.playbookUri = ""; /** - * PageInfo formInfo. - * @member {google.cloud.dialogflow.cx.v3.PageInfo.IFormInfo|null|undefined} formInfo - * @memberof google.cloud.dialogflow.cx.v3.PageInfo + * ExportPlaybookRequest dataFormat. + * @member {google.cloud.dialogflow.cx.v3.ExportPlaybookRequest.DataFormat} dataFormat + * @memberof google.cloud.dialogflow.cx.v3.ExportPlaybookRequest * @instance */ - PageInfo.prototype.formInfo = null; + ExportPlaybookRequest.prototype.dataFormat = 0; /** - * Creates a new PageInfo instance using the specified properties. + * Creates a new ExportPlaybookRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.PageInfo + * @memberof google.cloud.dialogflow.cx.v3.ExportPlaybookRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IPageInfo=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.PageInfo} PageInfo instance + * @param {google.cloud.dialogflow.cx.v3.IExportPlaybookRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ExportPlaybookRequest} ExportPlaybookRequest instance */ - PageInfo.create = function create(properties) { - return new PageInfo(properties); + ExportPlaybookRequest.create = function create(properties) { + return new ExportPlaybookRequest(properties); }; /** - * Encodes the specified PageInfo message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.PageInfo.verify|verify} messages. + * Encodes the specified ExportPlaybookRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ExportPlaybookRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.PageInfo + * @memberof google.cloud.dialogflow.cx.v3.ExportPlaybookRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IPageInfo} message PageInfo message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IExportPlaybookRequest} message ExportPlaybookRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PageInfo.encode = function encode(message, writer) { + ExportPlaybookRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.currentPage != null && Object.hasOwnProperty.call(message, "currentPage")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.currentPage); - if (message.formInfo != null && Object.hasOwnProperty.call(message, "formInfo")) - $root.google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.encode(message.formInfo, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.displayName); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.playbookUri != null && Object.hasOwnProperty.call(message, "playbookUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.playbookUri); + if (message.dataFormat != null && Object.hasOwnProperty.call(message, "dataFormat")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.dataFormat); return writer; }; /** - * Encodes the specified PageInfo message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.PageInfo.verify|verify} messages. + * Encodes the specified ExportPlaybookRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ExportPlaybookRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.PageInfo + * @memberof google.cloud.dialogflow.cx.v3.ExportPlaybookRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IPageInfo} message PageInfo message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IExportPlaybookRequest} message ExportPlaybookRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PageInfo.encodeDelimited = function encodeDelimited(message, writer) { + ExportPlaybookRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PageInfo message from the specified reader or buffer. + * Decodes an ExportPlaybookRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.PageInfo + * @memberof google.cloud.dialogflow.cx.v3.ExportPlaybookRequest * @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.PageInfo} PageInfo + * @returns {google.cloud.dialogflow.cx.v3.ExportPlaybookRequest} ExportPlaybookRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PageInfo.decode = function decode(reader, length, error) { + ExportPlaybookRequest.decode = function decode(reader, length, error) { 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.PageInfo(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ExportPlaybookRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.currentPage = reader.string(); + message.name = reader.string(); break; } - case 4: { - message.displayName = reader.string(); + case 2: { + message.playbookUri = reader.string(); break; } case 3: { - message.formInfo = $root.google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.decode(reader, reader.uint32()); + message.dataFormat = reader.int32(); break; } default: @@ -78437,722 +102286,489 @@ }; /** - * Decodes a PageInfo message from the specified reader or buffer, length delimited. + * Decodes an ExportPlaybookRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.PageInfo + * @memberof google.cloud.dialogflow.cx.v3.ExportPlaybookRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.PageInfo} PageInfo + * @returns {google.cloud.dialogflow.cx.v3.ExportPlaybookRequest} ExportPlaybookRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PageInfo.decodeDelimited = function decodeDelimited(reader) { + ExportPlaybookRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PageInfo message. + * Verifies an ExportPlaybookRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.PageInfo + * @memberof google.cloud.dialogflow.cx.v3.ExportPlaybookRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PageInfo.verify = function verify(message) { + ExportPlaybookRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.currentPage != null && message.hasOwnProperty("currentPage")) - if (!$util.isString(message.currentPage)) - return "currentPage: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.formInfo != null && message.hasOwnProperty("formInfo")) { - var error = $root.google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.verify(message.formInfo); - if (error) - return "formInfo." + error; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.playbookUri != null && message.hasOwnProperty("playbookUri")) + if (!$util.isString(message.playbookUri)) + return "playbookUri: string expected"; + if (message.dataFormat != null && message.hasOwnProperty("dataFormat")) + switch (message.dataFormat) { + default: + return "dataFormat: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; /** - * Creates a PageInfo message from a plain object. Also converts values to their respective internal types. + * Creates an ExportPlaybookRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.PageInfo + * @memberof google.cloud.dialogflow.cx.v3.ExportPlaybookRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.PageInfo} PageInfo + * @returns {google.cloud.dialogflow.cx.v3.ExportPlaybookRequest} ExportPlaybookRequest */ - PageInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.PageInfo) + ExportPlaybookRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ExportPlaybookRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.PageInfo(); - if (object.currentPage != null) - message.currentPage = String(object.currentPage); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.formInfo != null) { - if (typeof object.formInfo !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.PageInfo.formInfo: object expected"); - message.formInfo = $root.google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.fromObject(object.formInfo); + var message = new $root.google.cloud.dialogflow.cx.v3.ExportPlaybookRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.playbookUri != null) + message.playbookUri = String(object.playbookUri); + switch (object.dataFormat) { + default: + if (typeof object.dataFormat === "number") { + message.dataFormat = object.dataFormat; + break; + } + break; + case "DATA_FORMAT_UNSPECIFIED": + case 0: + message.dataFormat = 0; + break; + case "BLOB": + case 1: + message.dataFormat = 1; + break; + case "JSON": + case 2: + message.dataFormat = 2; + break; } return message; }; /** - * Creates a plain object from a PageInfo message. Also converts values to other types if specified. + * Creates a plain object from an ExportPlaybookRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.PageInfo + * @memberof google.cloud.dialogflow.cx.v3.ExportPlaybookRequest * @static - * @param {google.cloud.dialogflow.cx.v3.PageInfo} message PageInfo + * @param {google.cloud.dialogflow.cx.v3.ExportPlaybookRequest} message ExportPlaybookRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PageInfo.toObject = function toObject(message, options) { + ExportPlaybookRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.currentPage = ""; - object.formInfo = null; - object.displayName = ""; + object.name = ""; + object.playbookUri = ""; + object.dataFormat = options.enums === String ? "DATA_FORMAT_UNSPECIFIED" : 0; } - if (message.currentPage != null && message.hasOwnProperty("currentPage")) - object.currentPage = message.currentPage; - if (message.formInfo != null && message.hasOwnProperty("formInfo")) - object.formInfo = $root.google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.toObject(message.formInfo, options); - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.playbookUri != null && message.hasOwnProperty("playbookUri")) + object.playbookUri = message.playbookUri; + if (message.dataFormat != null && message.hasOwnProperty("dataFormat")) + object.dataFormat = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.ExportPlaybookRequest.DataFormat[message.dataFormat] === undefined ? message.dataFormat : $root.google.cloud.dialogflow.cx.v3.ExportPlaybookRequest.DataFormat[message.dataFormat] : message.dataFormat; return object; }; /** - * Converts this PageInfo to JSON. + * Converts this ExportPlaybookRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.PageInfo + * @memberof google.cloud.dialogflow.cx.v3.ExportPlaybookRequest * @instance * @returns {Object.} JSON object */ - PageInfo.prototype.toJSON = function toJSON() { + ExportPlaybookRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for PageInfo + * Gets the default type url for ExportPlaybookRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.PageInfo + * @memberof google.cloud.dialogflow.cx.v3.ExportPlaybookRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - PageInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ExportPlaybookRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.PageInfo"; - }; - - PageInfo.FormInfo = (function() { - - /** - * Properties of a FormInfo. - * @memberof google.cloud.dialogflow.cx.v3.PageInfo - * @interface IFormInfo - * @property {Array.|null} [parameterInfo] FormInfo parameterInfo - */ - - /** - * Constructs a new FormInfo. - * @memberof google.cloud.dialogflow.cx.v3.PageInfo - * @classdesc Represents a FormInfo. - * @implements IFormInfo - * @constructor - * @param {google.cloud.dialogflow.cx.v3.PageInfo.IFormInfo=} [properties] Properties to set - */ - function FormInfo(properties) { - this.parameterInfo = []; - 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]]; - } - - /** - * FormInfo parameterInfo. - * @member {Array.} parameterInfo - * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo - * @instance - */ - FormInfo.prototype.parameterInfo = $util.emptyArray; - - /** - * Creates a new FormInfo instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo - * @static - * @param {google.cloud.dialogflow.cx.v3.PageInfo.IFormInfo=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.PageInfo.FormInfo} FormInfo instance - */ - FormInfo.create = function create(properties) { - return new FormInfo(properties); - }; - - /** - * Encodes the specified FormInfo message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo - * @static - * @param {google.cloud.dialogflow.cx.v3.PageInfo.IFormInfo} message FormInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FormInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parameterInfo != null && message.parameterInfo.length) - for (var i = 0; i < message.parameterInfo.length; ++i) - $root.google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo.encode(message.parameterInfo[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FormInfo message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo - * @static - * @param {google.cloud.dialogflow.cx.v3.PageInfo.IFormInfo} message FormInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FormInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FormInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo - * @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.PageInfo.FormInfo} FormInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FormInfo.decode = function decode(reader, length, error) { - 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.PageInfo.FormInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 2: { - if (!(message.parameterInfo && message.parameterInfo.length)) - message.parameterInfo = []; - message.parameterInfo.push($root.google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FormInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.PageInfo.FormInfo} FormInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FormInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FormInfo message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FormInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parameterInfo != null && message.hasOwnProperty("parameterInfo")) { - if (!Array.isArray(message.parameterInfo)) - return "parameterInfo: array expected"; - for (var i = 0; i < message.parameterInfo.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo.verify(message.parameterInfo[i]); - if (error) - return "parameterInfo." + error; - } - } - return null; - }; - - /** - * Creates a FormInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.PageInfo.FormInfo} FormInfo - */ - FormInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.PageInfo.FormInfo) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.PageInfo.FormInfo(); - if (object.parameterInfo) { - if (!Array.isArray(object.parameterInfo)) - throw TypeError(".google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.parameterInfo: array expected"); - message.parameterInfo = []; - for (var i = 0; i < object.parameterInfo.length; ++i) { - if (typeof object.parameterInfo[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.parameterInfo: object expected"); - message.parameterInfo[i] = $root.google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo.fromObject(object.parameterInfo[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a FormInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo - * @static - * @param {google.cloud.dialogflow.cx.v3.PageInfo.FormInfo} message FormInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FormInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.parameterInfo = []; - if (message.parameterInfo && message.parameterInfo.length) { - object.parameterInfo = []; - for (var j = 0; j < message.parameterInfo.length; ++j) - object.parameterInfo[j] = $root.google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo.toObject(message.parameterInfo[j], options); - } - return object; - }; - - /** - * Converts this FormInfo to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo - * @instance - * @returns {Object.} JSON object - */ - FormInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FormInfo - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FormInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.PageInfo.FormInfo"; - }; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ExportPlaybookRequest"; + }; - FormInfo.ParameterInfo = (function() { + /** + * DataFormat enum. + * @name google.cloud.dialogflow.cx.v3.ExportPlaybookRequest.DataFormat + * @enum {number} + * @property {number} DATA_FORMAT_UNSPECIFIED=0 DATA_FORMAT_UNSPECIFIED value + * @property {number} BLOB=1 BLOB value + * @property {number} JSON=2 JSON value + */ + ExportPlaybookRequest.DataFormat = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DATA_FORMAT_UNSPECIFIED"] = 0; + values[valuesById[1] = "BLOB"] = 1; + values[valuesById[2] = "JSON"] = 2; + return values; + })(); - /** - * Properties of a ParameterInfo. - * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo - * @interface IParameterInfo - * @property {string|null} [displayName] ParameterInfo displayName - * @property {boolean|null} [required] ParameterInfo required - * @property {google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo.ParameterState|null} [state] ParameterInfo state - * @property {google.protobuf.IValue|null} [value] ParameterInfo value - * @property {boolean|null} [justCollected] ParameterInfo justCollected - */ + return ExportPlaybookRequest; + })(); - /** - * Constructs a new ParameterInfo. - * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo - * @classdesc Represents a ParameterInfo. - * @implements IParameterInfo - * @constructor - * @param {google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.IParameterInfo=} [properties] Properties to set - */ - function ParameterInfo(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]]; - } + v3.ImportPlaybookRequest = (function() { - /** - * ParameterInfo displayName. - * @member {string} displayName - * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo - * @instance - */ - ParameterInfo.prototype.displayName = ""; + /** + * Properties of an ImportPlaybookRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IImportPlaybookRequest + * @property {string|null} [parent] ImportPlaybookRequest parent + * @property {string|null} [playbookUri] ImportPlaybookRequest playbookUri + * @property {Uint8Array|null} [playbookContent] ImportPlaybookRequest playbookContent + * @property {google.cloud.dialogflow.cx.v3.IPlaybookImportStrategy|null} [importStrategy] ImportPlaybookRequest importStrategy + */ - /** - * ParameterInfo required. - * @member {boolean} required - * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo - * @instance - */ - ParameterInfo.prototype.required = false; + /** + * Constructs a new ImportPlaybookRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents an ImportPlaybookRequest. + * @implements IImportPlaybookRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IImportPlaybookRequest=} [properties] Properties to set + */ + function ImportPlaybookRequest(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]]; + } - /** - * ParameterInfo state. - * @member {google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo.ParameterState} state - * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo - * @instance - */ - ParameterInfo.prototype.state = 0; + /** + * ImportPlaybookRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.cx.v3.ImportPlaybookRequest + * @instance + */ + ImportPlaybookRequest.prototype.parent = ""; - /** - * ParameterInfo value. - * @member {google.protobuf.IValue|null|undefined} value - * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo - * @instance - */ - ParameterInfo.prototype.value = null; + /** + * ImportPlaybookRequest playbookUri. + * @member {string|null|undefined} playbookUri + * @memberof google.cloud.dialogflow.cx.v3.ImportPlaybookRequest + * @instance + */ + ImportPlaybookRequest.prototype.playbookUri = null; - /** - * ParameterInfo justCollected. - * @member {boolean} justCollected - * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo - * @instance - */ - ParameterInfo.prototype.justCollected = false; + /** + * ImportPlaybookRequest playbookContent. + * @member {Uint8Array|null|undefined} playbookContent + * @memberof google.cloud.dialogflow.cx.v3.ImportPlaybookRequest + * @instance + */ + ImportPlaybookRequest.prototype.playbookContent = null; - /** - * Creates a new ParameterInfo instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo - * @static - * @param {google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.IParameterInfo=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo} ParameterInfo instance - */ - ParameterInfo.create = function create(properties) { - return new ParameterInfo(properties); - }; + /** + * ImportPlaybookRequest importStrategy. + * @member {google.cloud.dialogflow.cx.v3.IPlaybookImportStrategy|null|undefined} importStrategy + * @memberof google.cloud.dialogflow.cx.v3.ImportPlaybookRequest + * @instance + */ + ImportPlaybookRequest.prototype.importStrategy = null; - /** - * Encodes the specified ParameterInfo message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo - * @static - * @param {google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.IParameterInfo} message ParameterInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ParameterInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); - if (message.required != null && Object.hasOwnProperty.call(message, "required")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.required); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.state); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - $root.google.protobuf.Value.encode(message.value, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.justCollected != null && Object.hasOwnProperty.call(message, "justCollected")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.justCollected); - return writer; - }; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * Encodes the specified ParameterInfo message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo - * @static - * @param {google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.IParameterInfo} message ParameterInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ParameterInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * ImportPlaybookRequest playbook. + * @member {"playbookUri"|"playbookContent"|undefined} playbook + * @memberof google.cloud.dialogflow.cx.v3.ImportPlaybookRequest + * @instance + */ + Object.defineProperty(ImportPlaybookRequest.prototype, "playbook", { + get: $util.oneOfGetter($oneOfFields = ["playbookUri", "playbookContent"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Decodes a ParameterInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo - * @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.PageInfo.FormInfo.ParameterInfo} ParameterInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ParameterInfo.decode = function decode(reader, length, error) { - 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.PageInfo.FormInfo.ParameterInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.displayName = reader.string(); - break; - } - case 2: { - message.required = reader.bool(); - break; - } - case 3: { - message.state = reader.int32(); - break; - } - case 4: { - message.value = $root.google.protobuf.Value.decode(reader, reader.uint32()); - break; - } - case 5: { - message.justCollected = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Creates a new ImportPlaybookRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.ImportPlaybookRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IImportPlaybookRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ImportPlaybookRequest} ImportPlaybookRequest instance + */ + ImportPlaybookRequest.create = function create(properties) { + return new ImportPlaybookRequest(properties); + }; - /** - * Decodes a ParameterInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo} ParameterInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ParameterInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Encodes the specified ImportPlaybookRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportPlaybookRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.ImportPlaybookRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IImportPlaybookRequest} message ImportPlaybookRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImportPlaybookRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.playbookUri != null && Object.hasOwnProperty.call(message, "playbookUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.playbookUri); + if (message.playbookContent != null && Object.hasOwnProperty.call(message, "playbookContent")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.playbookContent); + if (message.importStrategy != null && Object.hasOwnProperty.call(message, "importStrategy")) + $root.google.cloud.dialogflow.cx.v3.PlaybookImportStrategy.encode(message.importStrategy, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; - /** - * Verifies a ParameterInfo message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ParameterInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.required != null && message.hasOwnProperty("required")) - if (typeof message.required !== "boolean") - return "required: boolean expected"; - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.value != null && message.hasOwnProperty("value")) { - var error = $root.google.protobuf.Value.verify(message.value); - if (error) - return "value." + error; - } - if (message.justCollected != null && message.hasOwnProperty("justCollected")) - if (typeof message.justCollected !== "boolean") - return "justCollected: boolean expected"; - return null; - }; + /** + * Encodes the specified ImportPlaybookRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportPlaybookRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.ImportPlaybookRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IImportPlaybookRequest} message ImportPlaybookRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImportPlaybookRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates a ParameterInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo} ParameterInfo - */ - ParameterInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.required != null) - message.required = Boolean(object.required); - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; - } - break; - case "PARAMETER_STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "EMPTY": - case 1: - message.state = 1; + /** + * Decodes an ImportPlaybookRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.ImportPlaybookRequest + * @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.ImportPlaybookRequest} ImportPlaybookRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImportPlaybookRequest.decode = function decode(reader, length, error) { + 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.ImportPlaybookRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); break; - case "INVALID": - case 2: - message.state = 2; + } + case 2: { + message.playbookUri = reader.string(); break; - case "FILLED": - case 3: - message.state = 3; + } + case 3: { + message.playbookContent = reader.bytes(); break; } - if (object.value != null) { - if (typeof object.value !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo.value: object expected"); - message.value = $root.google.protobuf.Value.fromObject(object.value); + case 4: { + message.importStrategy = $root.google.cloud.dialogflow.cx.v3.PlaybookImportStrategy.decode(reader, reader.uint32()); + break; } - if (object.justCollected != null) - message.justCollected = Boolean(object.justCollected); - return message; - }; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Creates a plain object from a ParameterInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo - * @static - * @param {google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo} message ParameterInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ParameterInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.displayName = ""; - object.required = false; - object.state = options.enums === String ? "PARAMETER_STATE_UNSPECIFIED" : 0; - object.value = null; - object.justCollected = false; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.required != null && message.hasOwnProperty("required")) - object.required = message.required; - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo.ParameterState[message.state] === undefined ? message.state : $root.google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo.ParameterState[message.state] : message.state; - if (message.value != null && message.hasOwnProperty("value")) - object.value = $root.google.protobuf.Value.toObject(message.value, options); - if (message.justCollected != null && message.hasOwnProperty("justCollected")) - object.justCollected = message.justCollected; - return object; - }; + /** + * Decodes an ImportPlaybookRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.ImportPlaybookRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.ImportPlaybookRequest} ImportPlaybookRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImportPlaybookRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Converts this ParameterInfo to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo - * @instance - * @returns {Object.} JSON object - */ - ParameterInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Verifies an ImportPlaybookRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.ImportPlaybookRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ImportPlaybookRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.playbookUri != null && message.hasOwnProperty("playbookUri")) { + properties.playbook = 1; + if (!$util.isString(message.playbookUri)) + return "playbookUri: string expected"; + } + if (message.playbookContent != null && message.hasOwnProperty("playbookContent")) { + if (properties.playbook === 1) + return "playbook: multiple values"; + properties.playbook = 1; + if (!(message.playbookContent && typeof message.playbookContent.length === "number" || $util.isString(message.playbookContent))) + return "playbookContent: buffer expected"; + } + if (message.importStrategy != null && message.hasOwnProperty("importStrategy")) { + var error = $root.google.cloud.dialogflow.cx.v3.PlaybookImportStrategy.verify(message.importStrategy); + if (error) + return "importStrategy." + error; + } + return null; + }; - /** - * Gets the default type url for ParameterInfo - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ParameterInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo"; - }; + /** + * Creates an ImportPlaybookRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.ImportPlaybookRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.ImportPlaybookRequest} ImportPlaybookRequest + */ + ImportPlaybookRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ImportPlaybookRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.ImportPlaybookRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.playbookUri != null) + message.playbookUri = String(object.playbookUri); + if (object.playbookContent != null) + if (typeof object.playbookContent === "string") + $util.base64.decode(object.playbookContent, message.playbookContent = $util.newBuffer($util.base64.length(object.playbookContent)), 0); + else if (object.playbookContent.length >= 0) + message.playbookContent = object.playbookContent; + if (object.importStrategy != null) { + if (typeof object.importStrategy !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.ImportPlaybookRequest.importStrategy: object expected"); + message.importStrategy = $root.google.cloud.dialogflow.cx.v3.PlaybookImportStrategy.fromObject(object.importStrategy); + } + return message; + }; - /** - * ParameterState enum. - * @name google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo.ParameterState - * @enum {number} - * @property {number} PARAMETER_STATE_UNSPECIFIED=0 PARAMETER_STATE_UNSPECIFIED value - * @property {number} EMPTY=1 EMPTY value - * @property {number} INVALID=2 INVALID value - * @property {number} FILLED=3 FILLED value - */ - ParameterInfo.ParameterState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PARAMETER_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "EMPTY"] = 1; - values[valuesById[2] = "INVALID"] = 2; - values[valuesById[3] = "FILLED"] = 3; - return values; - })(); + /** + * Creates a plain object from an ImportPlaybookRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.ImportPlaybookRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.ImportPlaybookRequest} message ImportPlaybookRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ImportPlaybookRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.importStrategy = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.playbookUri != null && message.hasOwnProperty("playbookUri")) { + object.playbookUri = message.playbookUri; + if (options.oneofs) + object.playbook = "playbookUri"; + } + if (message.playbookContent != null && message.hasOwnProperty("playbookContent")) { + object.playbookContent = options.bytes === String ? $util.base64.encode(message.playbookContent, 0, message.playbookContent.length) : options.bytes === Array ? Array.prototype.slice.call(message.playbookContent) : message.playbookContent; + if (options.oneofs) + object.playbook = "playbookContent"; + } + if (message.importStrategy != null && message.hasOwnProperty("importStrategy")) + object.importStrategy = $root.google.cloud.dialogflow.cx.v3.PlaybookImportStrategy.toObject(message.importStrategy, options); + return object; + }; - return ParameterInfo; - })(); + /** + * Converts this ImportPlaybookRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.ImportPlaybookRequest + * @instance + * @returns {Object.} JSON object + */ + ImportPlaybookRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return FormInfo; - })(); + /** + * Gets the default type url for ImportPlaybookRequest + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.ImportPlaybookRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ImportPlaybookRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ImportPlaybookRequest"; + }; - return PageInfo; + return ImportPlaybookRequest; })(); - v3.SessionInfo = (function() { + v3.PlaybookImportStrategy = (function() { /** - * Properties of a SessionInfo. + * Properties of a PlaybookImportStrategy. * @memberof google.cloud.dialogflow.cx.v3 - * @interface ISessionInfo - * @property {string|null} [session] SessionInfo session - * @property {Object.|null} [parameters] SessionInfo parameters + * @interface IPlaybookImportStrategy + * @property {google.cloud.dialogflow.cx.v3.ImportStrategy|null} [mainPlaybookImportStrategy] PlaybookImportStrategy mainPlaybookImportStrategy + * @property {google.cloud.dialogflow.cx.v3.ImportStrategy|null} [nestedResourceImportStrategy] PlaybookImportStrategy nestedResourceImportStrategy + * @property {google.cloud.dialogflow.cx.v3.ImportStrategy|null} [toolImportStrategy] PlaybookImportStrategy toolImportStrategy */ /** - * Constructs a new SessionInfo. + * Constructs a new PlaybookImportStrategy. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a SessionInfo. - * @implements ISessionInfo + * @classdesc Represents a PlaybookImportStrategy. + * @implements IPlaybookImportStrategy * @constructor - * @param {google.cloud.dialogflow.cx.v3.ISessionInfo=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IPlaybookImportStrategy=} [properties] Properties to set */ - function SessionInfo(properties) { - this.parameters = {}; + function PlaybookImportStrategy(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -79160,113 +102776,105 @@ } /** - * SessionInfo session. - * @member {string} session - * @memberof google.cloud.dialogflow.cx.v3.SessionInfo + * PlaybookImportStrategy mainPlaybookImportStrategy. + * @member {google.cloud.dialogflow.cx.v3.ImportStrategy} mainPlaybookImportStrategy + * @memberof google.cloud.dialogflow.cx.v3.PlaybookImportStrategy * @instance */ - SessionInfo.prototype.session = ""; + PlaybookImportStrategy.prototype.mainPlaybookImportStrategy = 0; /** - * SessionInfo parameters. - * @member {Object.} parameters - * @memberof google.cloud.dialogflow.cx.v3.SessionInfo + * PlaybookImportStrategy nestedResourceImportStrategy. + * @member {google.cloud.dialogflow.cx.v3.ImportStrategy} nestedResourceImportStrategy + * @memberof google.cloud.dialogflow.cx.v3.PlaybookImportStrategy * @instance */ - SessionInfo.prototype.parameters = $util.emptyObject; + PlaybookImportStrategy.prototype.nestedResourceImportStrategy = 0; /** - * Creates a new SessionInfo instance using the specified properties. + * PlaybookImportStrategy toolImportStrategy. + * @member {google.cloud.dialogflow.cx.v3.ImportStrategy} toolImportStrategy + * @memberof google.cloud.dialogflow.cx.v3.PlaybookImportStrategy + * @instance + */ + PlaybookImportStrategy.prototype.toolImportStrategy = 0; + + /** + * Creates a new PlaybookImportStrategy instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.SessionInfo + * @memberof google.cloud.dialogflow.cx.v3.PlaybookImportStrategy * @static - * @param {google.cloud.dialogflow.cx.v3.ISessionInfo=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.SessionInfo} SessionInfo instance + * @param {google.cloud.dialogflow.cx.v3.IPlaybookImportStrategy=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.PlaybookImportStrategy} PlaybookImportStrategy instance */ - SessionInfo.create = function create(properties) { - return new SessionInfo(properties); + PlaybookImportStrategy.create = function create(properties) { + return new PlaybookImportStrategy(properties); }; /** - * Encodes the specified SessionInfo message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SessionInfo.verify|verify} messages. + * Encodes the specified PlaybookImportStrategy message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.PlaybookImportStrategy.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.SessionInfo + * @memberof google.cloud.dialogflow.cx.v3.PlaybookImportStrategy * @static - * @param {google.cloud.dialogflow.cx.v3.ISessionInfo} message SessionInfo message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IPlaybookImportStrategy} message PlaybookImportStrategy message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SessionInfo.encode = function encode(message, writer) { + PlaybookImportStrategy.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.session != null && Object.hasOwnProperty.call(message, "session")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.session); - if (message.parameters != null && Object.hasOwnProperty.call(message, "parameters")) - for (var keys = Object.keys(message.parameters), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.protobuf.Value.encode(message.parameters[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } + if (message.mainPlaybookImportStrategy != null && Object.hasOwnProperty.call(message, "mainPlaybookImportStrategy")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.mainPlaybookImportStrategy); + if (message.nestedResourceImportStrategy != null && Object.hasOwnProperty.call(message, "nestedResourceImportStrategy")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.nestedResourceImportStrategy); + if (message.toolImportStrategy != null && Object.hasOwnProperty.call(message, "toolImportStrategy")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.toolImportStrategy); return writer; }; /** - * Encodes the specified SessionInfo message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SessionInfo.verify|verify} messages. + * Encodes the specified PlaybookImportStrategy message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.PlaybookImportStrategy.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.SessionInfo + * @memberof google.cloud.dialogflow.cx.v3.PlaybookImportStrategy * @static - * @param {google.cloud.dialogflow.cx.v3.ISessionInfo} message SessionInfo message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IPlaybookImportStrategy} message PlaybookImportStrategy message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SessionInfo.encodeDelimited = function encodeDelimited(message, writer) { + PlaybookImportStrategy.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SessionInfo message from the specified reader or buffer. + * Decodes a PlaybookImportStrategy message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.SessionInfo + * @memberof google.cloud.dialogflow.cx.v3.PlaybookImportStrategy * @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.SessionInfo} SessionInfo + * @returns {google.cloud.dialogflow.cx.v3.PlaybookImportStrategy} PlaybookImportStrategy * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SessionInfo.decode = function decode(reader, length, error) { + PlaybookImportStrategy.decode = function decode(reader, length, error) { 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.SessionInfo(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.PlaybookImportStrategy(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { - case 1: { - message.session = reader.string(); + case 4: { + message.mainPlaybookImportStrategy = reader.int32(); break; } - case 2: { - if (message.parameters === $util.emptyObject) - message.parameters = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.google.protobuf.Value.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.parameters[key] = value; + case 5: { + message.nestedResourceImportStrategy = reader.int32(); + break; + } + case 6: { + message.toolImportStrategy = reader.int32(); break; } default: @@ -79278,152 +102886,257 @@ }; /** - * Decodes a SessionInfo message from the specified reader or buffer, length delimited. + * Decodes a PlaybookImportStrategy message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.SessionInfo + * @memberof google.cloud.dialogflow.cx.v3.PlaybookImportStrategy * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.SessionInfo} SessionInfo + * @returns {google.cloud.dialogflow.cx.v3.PlaybookImportStrategy} PlaybookImportStrategy * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SessionInfo.decodeDelimited = function decodeDelimited(reader) { + PlaybookImportStrategy.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SessionInfo message. + * Verifies a PlaybookImportStrategy message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.SessionInfo + * @memberof google.cloud.dialogflow.cx.v3.PlaybookImportStrategy * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SessionInfo.verify = function verify(message) { + PlaybookImportStrategy.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.session != null && message.hasOwnProperty("session")) - if (!$util.isString(message.session)) - return "session: string expected"; - if (message.parameters != null && message.hasOwnProperty("parameters")) { - if (!$util.isObject(message.parameters)) - return "parameters: object expected"; - var key = Object.keys(message.parameters); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.protobuf.Value.verify(message.parameters[key[i]]); - if (error) - return "parameters." + error; + if (message.mainPlaybookImportStrategy != null && message.hasOwnProperty("mainPlaybookImportStrategy")) + switch (message.mainPlaybookImportStrategy) { + default: + return "mainPlaybookImportStrategy: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.nestedResourceImportStrategy != null && message.hasOwnProperty("nestedResourceImportStrategy")) + switch (message.nestedResourceImportStrategy) { + default: + return "nestedResourceImportStrategy: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.toolImportStrategy != null && message.hasOwnProperty("toolImportStrategy")) + switch (message.toolImportStrategy) { + default: + return "toolImportStrategy: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; } - } return null; }; /** - * Creates a SessionInfo message from a plain object. Also converts values to their respective internal types. + * Creates a PlaybookImportStrategy message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.SessionInfo + * @memberof google.cloud.dialogflow.cx.v3.PlaybookImportStrategy * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.SessionInfo} SessionInfo + * @returns {google.cloud.dialogflow.cx.v3.PlaybookImportStrategy} PlaybookImportStrategy */ - SessionInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.SessionInfo) + PlaybookImportStrategy.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.PlaybookImportStrategy) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.SessionInfo(); - if (object.session != null) - message.session = String(object.session); - if (object.parameters) { - if (typeof object.parameters !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.SessionInfo.parameters: object expected"); - message.parameters = {}; - for (var keys = Object.keys(object.parameters), i = 0; i < keys.length; ++i) { - if (typeof object.parameters[keys[i]] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.SessionInfo.parameters: object expected"); - message.parameters[keys[i]] = $root.google.protobuf.Value.fromObject(object.parameters[keys[i]]); + var message = new $root.google.cloud.dialogflow.cx.v3.PlaybookImportStrategy(); + switch (object.mainPlaybookImportStrategy) { + default: + if (typeof object.mainPlaybookImportStrategy === "number") { + message.mainPlaybookImportStrategy = object.mainPlaybookImportStrategy; + break; + } + break; + case "IMPORT_STRATEGY_UNSPECIFIED": + case 0: + message.mainPlaybookImportStrategy = 0; + break; + case "IMPORT_STRATEGY_CREATE_NEW": + case 1: + message.mainPlaybookImportStrategy = 1; + break; + case "IMPORT_STRATEGY_REPLACE": + case 2: + message.mainPlaybookImportStrategy = 2; + break; + case "IMPORT_STRATEGY_KEEP": + case 3: + message.mainPlaybookImportStrategy = 3; + break; + case "IMPORT_STRATEGY_MERGE": + case 4: + message.mainPlaybookImportStrategy = 4; + break; + case "IMPORT_STRATEGY_THROW_ERROR": + case 5: + message.mainPlaybookImportStrategy = 5; + break; + } + switch (object.nestedResourceImportStrategy) { + default: + if (typeof object.nestedResourceImportStrategy === "number") { + message.nestedResourceImportStrategy = object.nestedResourceImportStrategy; + break; + } + break; + case "IMPORT_STRATEGY_UNSPECIFIED": + case 0: + message.nestedResourceImportStrategy = 0; + break; + case "IMPORT_STRATEGY_CREATE_NEW": + case 1: + message.nestedResourceImportStrategy = 1; + break; + case "IMPORT_STRATEGY_REPLACE": + case 2: + message.nestedResourceImportStrategy = 2; + break; + case "IMPORT_STRATEGY_KEEP": + case 3: + message.nestedResourceImportStrategy = 3; + break; + case "IMPORT_STRATEGY_MERGE": + case 4: + message.nestedResourceImportStrategy = 4; + break; + case "IMPORT_STRATEGY_THROW_ERROR": + case 5: + message.nestedResourceImportStrategy = 5; + break; + } + switch (object.toolImportStrategy) { + default: + if (typeof object.toolImportStrategy === "number") { + message.toolImportStrategy = object.toolImportStrategy; + break; } + break; + case "IMPORT_STRATEGY_UNSPECIFIED": + case 0: + message.toolImportStrategy = 0; + break; + case "IMPORT_STRATEGY_CREATE_NEW": + case 1: + message.toolImportStrategy = 1; + break; + case "IMPORT_STRATEGY_REPLACE": + case 2: + message.toolImportStrategy = 2; + break; + case "IMPORT_STRATEGY_KEEP": + case 3: + message.toolImportStrategy = 3; + break; + case "IMPORT_STRATEGY_MERGE": + case 4: + message.toolImportStrategy = 4; + break; + case "IMPORT_STRATEGY_THROW_ERROR": + case 5: + message.toolImportStrategy = 5; + break; } return message; }; /** - * Creates a plain object from a SessionInfo message. Also converts values to other types if specified. + * Creates a plain object from a PlaybookImportStrategy message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.SessionInfo + * @memberof google.cloud.dialogflow.cx.v3.PlaybookImportStrategy * @static - * @param {google.cloud.dialogflow.cx.v3.SessionInfo} message SessionInfo + * @param {google.cloud.dialogflow.cx.v3.PlaybookImportStrategy} message PlaybookImportStrategy * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SessionInfo.toObject = function toObject(message, options) { + PlaybookImportStrategy.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.parameters = {}; - if (options.defaults) - object.session = ""; - if (message.session != null && message.hasOwnProperty("session")) - object.session = message.session; - var keys2; - if (message.parameters && (keys2 = Object.keys(message.parameters)).length) { - object.parameters = {}; - for (var j = 0; j < keys2.length; ++j) - object.parameters[keys2[j]] = $root.google.protobuf.Value.toObject(message.parameters[keys2[j]], options); + if (options.defaults) { + object.mainPlaybookImportStrategy = options.enums === String ? "IMPORT_STRATEGY_UNSPECIFIED" : 0; + object.nestedResourceImportStrategy = options.enums === String ? "IMPORT_STRATEGY_UNSPECIFIED" : 0; + object.toolImportStrategy = options.enums === String ? "IMPORT_STRATEGY_UNSPECIFIED" : 0; } + if (message.mainPlaybookImportStrategy != null && message.hasOwnProperty("mainPlaybookImportStrategy")) + object.mainPlaybookImportStrategy = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.ImportStrategy[message.mainPlaybookImportStrategy] === undefined ? message.mainPlaybookImportStrategy : $root.google.cloud.dialogflow.cx.v3.ImportStrategy[message.mainPlaybookImportStrategy] : message.mainPlaybookImportStrategy; + if (message.nestedResourceImportStrategy != null && message.hasOwnProperty("nestedResourceImportStrategy")) + object.nestedResourceImportStrategy = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.ImportStrategy[message.nestedResourceImportStrategy] === undefined ? message.nestedResourceImportStrategy : $root.google.cloud.dialogflow.cx.v3.ImportStrategy[message.nestedResourceImportStrategy] : message.nestedResourceImportStrategy; + if (message.toolImportStrategy != null && message.hasOwnProperty("toolImportStrategy")) + object.toolImportStrategy = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.ImportStrategy[message.toolImportStrategy] === undefined ? message.toolImportStrategy : $root.google.cloud.dialogflow.cx.v3.ImportStrategy[message.toolImportStrategy] : message.toolImportStrategy; return object; }; /** - * Converts this SessionInfo to JSON. + * Converts this PlaybookImportStrategy to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.SessionInfo + * @memberof google.cloud.dialogflow.cx.v3.PlaybookImportStrategy * @instance * @returns {Object.} JSON object */ - SessionInfo.prototype.toJSON = function toJSON() { + PlaybookImportStrategy.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SessionInfo + * Gets the default type url for PlaybookImportStrategy * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.SessionInfo + * @memberof google.cloud.dialogflow.cx.v3.PlaybookImportStrategy * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SessionInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + PlaybookImportStrategy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.SessionInfo"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.PlaybookImportStrategy"; }; - return SessionInfo; + return PlaybookImportStrategy; })(); - v3.LanguageInfo = (function() { + v3.ImportPlaybookResponse = (function() { /** - * Properties of a LanguageInfo. + * Properties of an ImportPlaybookResponse. * @memberof google.cloud.dialogflow.cx.v3 - * @interface ILanguageInfo - * @property {string|null} [inputLanguageCode] LanguageInfo inputLanguageCode - * @property {string|null} [resolvedLanguageCode] LanguageInfo resolvedLanguageCode - * @property {number|null} [confidenceScore] LanguageInfo confidenceScore + * @interface IImportPlaybookResponse + * @property {string|null} [playbook] ImportPlaybookResponse playbook + * @property {google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.IConflictingResources|null} [conflictingResources] ImportPlaybookResponse conflictingResources */ /** - * Constructs a new LanguageInfo. + * Constructs a new ImportPlaybookResponse. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a LanguageInfo. - * @implements ILanguageInfo + * @classdesc Represents an ImportPlaybookResponse. + * @implements IImportPlaybookResponse * @constructor - * @param {google.cloud.dialogflow.cx.v3.ILanguageInfo=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IImportPlaybookResponse=} [properties] Properties to set */ - function LanguageInfo(properties) { + function ImportPlaybookResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -79431,105 +103144,91 @@ } /** - * LanguageInfo inputLanguageCode. - * @member {string} inputLanguageCode - * @memberof google.cloud.dialogflow.cx.v3.LanguageInfo - * @instance - */ - LanguageInfo.prototype.inputLanguageCode = ""; - - /** - * LanguageInfo resolvedLanguageCode. - * @member {string} resolvedLanguageCode - * @memberof google.cloud.dialogflow.cx.v3.LanguageInfo + * ImportPlaybookResponse playbook. + * @member {string} playbook + * @memberof google.cloud.dialogflow.cx.v3.ImportPlaybookResponse * @instance */ - LanguageInfo.prototype.resolvedLanguageCode = ""; + ImportPlaybookResponse.prototype.playbook = ""; /** - * LanguageInfo confidenceScore. - * @member {number} confidenceScore - * @memberof google.cloud.dialogflow.cx.v3.LanguageInfo + * ImportPlaybookResponse conflictingResources. + * @member {google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.IConflictingResources|null|undefined} conflictingResources + * @memberof google.cloud.dialogflow.cx.v3.ImportPlaybookResponse * @instance */ - LanguageInfo.prototype.confidenceScore = 0; + ImportPlaybookResponse.prototype.conflictingResources = null; /** - * Creates a new LanguageInfo instance using the specified properties. + * Creates a new ImportPlaybookResponse instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.LanguageInfo + * @memberof google.cloud.dialogflow.cx.v3.ImportPlaybookResponse * @static - * @param {google.cloud.dialogflow.cx.v3.ILanguageInfo=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.LanguageInfo} LanguageInfo instance + * @param {google.cloud.dialogflow.cx.v3.IImportPlaybookResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ImportPlaybookResponse} ImportPlaybookResponse instance */ - LanguageInfo.create = function create(properties) { - return new LanguageInfo(properties); + ImportPlaybookResponse.create = function create(properties) { + return new ImportPlaybookResponse(properties); }; /** - * Encodes the specified LanguageInfo message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.LanguageInfo.verify|verify} messages. + * Encodes the specified ImportPlaybookResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.LanguageInfo + * @memberof google.cloud.dialogflow.cx.v3.ImportPlaybookResponse * @static - * @param {google.cloud.dialogflow.cx.v3.ILanguageInfo} message LanguageInfo message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IImportPlaybookResponse} message ImportPlaybookResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LanguageInfo.encode = function encode(message, writer) { + ImportPlaybookResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.inputLanguageCode != null && Object.hasOwnProperty.call(message, "inputLanguageCode")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.inputLanguageCode); - if (message.resolvedLanguageCode != null && Object.hasOwnProperty.call(message, "resolvedLanguageCode")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.resolvedLanguageCode); - if (message.confidenceScore != null && Object.hasOwnProperty.call(message, "confidenceScore")) - writer.uint32(/* id 3, wireType 5 =*/29).float(message.confidenceScore); + if (message.playbook != null && Object.hasOwnProperty.call(message, "playbook")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.playbook); + if (message.conflictingResources != null && Object.hasOwnProperty.call(message, "conflictingResources")) + $root.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources.encode(message.conflictingResources, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified LanguageInfo message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.LanguageInfo.verify|verify} messages. + * Encodes the specified ImportPlaybookResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.LanguageInfo + * @memberof google.cloud.dialogflow.cx.v3.ImportPlaybookResponse * @static - * @param {google.cloud.dialogflow.cx.v3.ILanguageInfo} message LanguageInfo message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IImportPlaybookResponse} message ImportPlaybookResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LanguageInfo.encodeDelimited = function encodeDelimited(message, writer) { + ImportPlaybookResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a LanguageInfo message from the specified reader or buffer. + * Decodes an ImportPlaybookResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.LanguageInfo + * @memberof google.cloud.dialogflow.cx.v3.ImportPlaybookResponse * @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.LanguageInfo} LanguageInfo + * @returns {google.cloud.dialogflow.cx.v3.ImportPlaybookResponse} ImportPlaybookResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LanguageInfo.decode = function decode(reader, length, error) { + ImportPlaybookResponse.decode = function decode(reader, length, error) { 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.LanguageInfo(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.inputLanguageCode = reader.string(); + message.playbook = reader.string(); break; } case 2: { - message.resolvedLanguageCode = reader.string(); - break; - } - case 3: { - message.confidenceScore = reader.float(); + message.conflictingResources = $root.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources.decode(reader, reader.uint32()); break; } default: @@ -79541,420 +103240,422 @@ }; /** - * Decodes a LanguageInfo message from the specified reader or buffer, length delimited. + * Decodes an ImportPlaybookResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.LanguageInfo + * @memberof google.cloud.dialogflow.cx.v3.ImportPlaybookResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.LanguageInfo} LanguageInfo + * @returns {google.cloud.dialogflow.cx.v3.ImportPlaybookResponse} ImportPlaybookResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LanguageInfo.decodeDelimited = function decodeDelimited(reader) { + ImportPlaybookResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a LanguageInfo message. + * Verifies an ImportPlaybookResponse message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.LanguageInfo + * @memberof google.cloud.dialogflow.cx.v3.ImportPlaybookResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - LanguageInfo.verify = function verify(message) { + ImportPlaybookResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.inputLanguageCode != null && message.hasOwnProperty("inputLanguageCode")) - if (!$util.isString(message.inputLanguageCode)) - return "inputLanguageCode: string expected"; - if (message.resolvedLanguageCode != null && message.hasOwnProperty("resolvedLanguageCode")) - if (!$util.isString(message.resolvedLanguageCode)) - return "resolvedLanguageCode: string expected"; - if (message.confidenceScore != null && message.hasOwnProperty("confidenceScore")) - if (typeof message.confidenceScore !== "number") - return "confidenceScore: number expected"; + if (message.playbook != null && message.hasOwnProperty("playbook")) + if (!$util.isString(message.playbook)) + return "playbook: string expected"; + if (message.conflictingResources != null && message.hasOwnProperty("conflictingResources")) { + var error = $root.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources.verify(message.conflictingResources); + if (error) + return "conflictingResources." + error; + } return null; }; /** - * Creates a LanguageInfo message from a plain object. Also converts values to their respective internal types. + * Creates an ImportPlaybookResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.LanguageInfo + * @memberof google.cloud.dialogflow.cx.v3.ImportPlaybookResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.LanguageInfo} LanguageInfo + * @returns {google.cloud.dialogflow.cx.v3.ImportPlaybookResponse} ImportPlaybookResponse */ - LanguageInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.LanguageInfo) + ImportPlaybookResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.LanguageInfo(); - if (object.inputLanguageCode != null) - message.inputLanguageCode = String(object.inputLanguageCode); - if (object.resolvedLanguageCode != null) - message.resolvedLanguageCode = String(object.resolvedLanguageCode); - if (object.confidenceScore != null) - message.confidenceScore = Number(object.confidenceScore); + var message = new $root.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse(); + if (object.playbook != null) + message.playbook = String(object.playbook); + if (object.conflictingResources != null) { + if (typeof object.conflictingResources !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.conflictingResources: object expected"); + message.conflictingResources = $root.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources.fromObject(object.conflictingResources); + } return message; }; /** - * Creates a plain object from a LanguageInfo message. Also converts values to other types if specified. + * Creates a plain object from an ImportPlaybookResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.LanguageInfo + * @memberof google.cloud.dialogflow.cx.v3.ImportPlaybookResponse * @static - * @param {google.cloud.dialogflow.cx.v3.LanguageInfo} message LanguageInfo + * @param {google.cloud.dialogflow.cx.v3.ImportPlaybookResponse} message ImportPlaybookResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LanguageInfo.toObject = function toObject(message, options) { + ImportPlaybookResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.inputLanguageCode = ""; - object.resolvedLanguageCode = ""; - object.confidenceScore = 0; + object.playbook = ""; + object.conflictingResources = null; } - if (message.inputLanguageCode != null && message.hasOwnProperty("inputLanguageCode")) - object.inputLanguageCode = message.inputLanguageCode; - if (message.resolvedLanguageCode != null && message.hasOwnProperty("resolvedLanguageCode")) - object.resolvedLanguageCode = message.resolvedLanguageCode; - if (message.confidenceScore != null && message.hasOwnProperty("confidenceScore")) - object.confidenceScore = options.json && !isFinite(message.confidenceScore) ? String(message.confidenceScore) : message.confidenceScore; + if (message.playbook != null && message.hasOwnProperty("playbook")) + object.playbook = message.playbook; + if (message.conflictingResources != null && message.hasOwnProperty("conflictingResources")) + object.conflictingResources = $root.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources.toObject(message.conflictingResources, options); return object; }; /** - * Converts this LanguageInfo to JSON. + * Converts this ImportPlaybookResponse to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.LanguageInfo + * @memberof google.cloud.dialogflow.cx.v3.ImportPlaybookResponse * @instance * @returns {Object.} JSON object */ - LanguageInfo.prototype.toJSON = function toJSON() { + ImportPlaybookResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for LanguageInfo + * Gets the default type url for ImportPlaybookResponse * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.LanguageInfo + * @memberof google.cloud.dialogflow.cx.v3.ImportPlaybookResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - LanguageInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ImportPlaybookResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.LanguageInfo"; - }; - - return LanguageInfo; - })(); - - v3.Experiments = (function() { - - /** - * Constructs a new Experiments service. - * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents an Experiments - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function Experiments(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (Experiments.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Experiments; - - /** - * Creates new Experiments service using the specified rpc implementation. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.Experiments - * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {Experiments} RPC service. Useful where requests and/or responses are streamed. - */ - Experiments.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ImportPlaybookResponse"; }; - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Experiments|listExperiments}. - * @memberof google.cloud.dialogflow.cx.v3.Experiments - * @typedef ListExperimentsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.ListExperimentsResponse} [response] ListExperimentsResponse - */ - - /** - * Calls ListExperiments. - * @function listExperiments - * @memberof google.cloud.dialogflow.cx.v3.Experiments - * @instance - * @param {google.cloud.dialogflow.cx.v3.IListExperimentsRequest} request ListExperimentsRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Experiments.ListExperimentsCallback} callback Node-style callback called with the error, if any, and ListExperimentsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Experiments.prototype.listExperiments = function listExperiments(request, callback) { - return this.rpcCall(listExperiments, $root.google.cloud.dialogflow.cx.v3.ListExperimentsRequest, $root.google.cloud.dialogflow.cx.v3.ListExperimentsResponse, request, callback); - }, "name", { value: "ListExperiments" }); - - /** - * Calls ListExperiments. - * @function listExperiments - * @memberof google.cloud.dialogflow.cx.v3.Experiments - * @instance - * @param {google.cloud.dialogflow.cx.v3.IListExperimentsRequest} request ListExperimentsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Experiments|getExperiment}. - * @memberof google.cloud.dialogflow.cx.v3.Experiments - * @typedef GetExperimentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.Experiment} [response] Experiment - */ - - /** - * Calls GetExperiment. - * @function getExperiment - * @memberof google.cloud.dialogflow.cx.v3.Experiments - * @instance - * @param {google.cloud.dialogflow.cx.v3.IGetExperimentRequest} request GetExperimentRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Experiments.GetExperimentCallback} callback Node-style callback called with the error, if any, and Experiment - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Experiments.prototype.getExperiment = function getExperiment(request, callback) { - return this.rpcCall(getExperiment, $root.google.cloud.dialogflow.cx.v3.GetExperimentRequest, $root.google.cloud.dialogflow.cx.v3.Experiment, request, callback); - }, "name", { value: "GetExperiment" }); - - /** - * Calls GetExperiment. - * @function getExperiment - * @memberof google.cloud.dialogflow.cx.v3.Experiments - * @instance - * @param {google.cloud.dialogflow.cx.v3.IGetExperimentRequest} request GetExperimentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + ImportPlaybookResponse.ConflictingResources = (function() { - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Experiments|createExperiment}. - * @memberof google.cloud.dialogflow.cx.v3.Experiments - * @typedef CreateExperimentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.Experiment} [response] Experiment - */ + /** + * Properties of a ConflictingResources. + * @memberof google.cloud.dialogflow.cx.v3.ImportPlaybookResponse + * @interface IConflictingResources + * @property {string|null} [mainPlaybookDisplayName] ConflictingResources mainPlaybookDisplayName + * @property {Array.|null} [nestedPlaybookDisplayNames] ConflictingResources nestedPlaybookDisplayNames + * @property {Array.|null} [toolDisplayNames] ConflictingResources toolDisplayNames + */ - /** - * Calls CreateExperiment. - * @function createExperiment - * @memberof google.cloud.dialogflow.cx.v3.Experiments - * @instance - * @param {google.cloud.dialogflow.cx.v3.ICreateExperimentRequest} request CreateExperimentRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Experiments.CreateExperimentCallback} callback Node-style callback called with the error, if any, and Experiment - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Experiments.prototype.createExperiment = function createExperiment(request, callback) { - return this.rpcCall(createExperiment, $root.google.cloud.dialogflow.cx.v3.CreateExperimentRequest, $root.google.cloud.dialogflow.cx.v3.Experiment, request, callback); - }, "name", { value: "CreateExperiment" }); + /** + * Constructs a new ConflictingResources. + * @memberof google.cloud.dialogflow.cx.v3.ImportPlaybookResponse + * @classdesc Represents a ConflictingResources. + * @implements IConflictingResources + * @constructor + * @param {google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.IConflictingResources=} [properties] Properties to set + */ + function ConflictingResources(properties) { + this.nestedPlaybookDisplayNames = []; + this.toolDisplayNames = []; + 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]]; + } - /** - * Calls CreateExperiment. - * @function createExperiment - * @memberof google.cloud.dialogflow.cx.v3.Experiments - * @instance - * @param {google.cloud.dialogflow.cx.v3.ICreateExperimentRequest} request CreateExperimentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * ConflictingResources mainPlaybookDisplayName. + * @member {string} mainPlaybookDisplayName + * @memberof google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources + * @instance + */ + ConflictingResources.prototype.mainPlaybookDisplayName = ""; - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Experiments|updateExperiment}. - * @memberof google.cloud.dialogflow.cx.v3.Experiments - * @typedef UpdateExperimentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.Experiment} [response] Experiment - */ + /** + * ConflictingResources nestedPlaybookDisplayNames. + * @member {Array.} nestedPlaybookDisplayNames + * @memberof google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources + * @instance + */ + ConflictingResources.prototype.nestedPlaybookDisplayNames = $util.emptyArray; - /** - * Calls UpdateExperiment. - * @function updateExperiment - * @memberof google.cloud.dialogflow.cx.v3.Experiments - * @instance - * @param {google.cloud.dialogflow.cx.v3.IUpdateExperimentRequest} request UpdateExperimentRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Experiments.UpdateExperimentCallback} callback Node-style callback called with the error, if any, and Experiment - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Experiments.prototype.updateExperiment = function updateExperiment(request, callback) { - return this.rpcCall(updateExperiment, $root.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest, $root.google.cloud.dialogflow.cx.v3.Experiment, request, callback); - }, "name", { value: "UpdateExperiment" }); + /** + * ConflictingResources toolDisplayNames. + * @member {Array.} toolDisplayNames + * @memberof google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources + * @instance + */ + ConflictingResources.prototype.toolDisplayNames = $util.emptyArray; - /** - * Calls UpdateExperiment. - * @function updateExperiment - * @memberof google.cloud.dialogflow.cx.v3.Experiments - * @instance - * @param {google.cloud.dialogflow.cx.v3.IUpdateExperimentRequest} request UpdateExperimentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Creates a new ConflictingResources instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources + * @static + * @param {google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.IConflictingResources=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources} ConflictingResources instance + */ + ConflictingResources.create = function create(properties) { + return new ConflictingResources(properties); + }; - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Experiments|deleteExperiment}. - * @memberof google.cloud.dialogflow.cx.v3.Experiments - * @typedef DeleteExperimentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ + /** + * Encodes the specified ConflictingResources message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources + * @static + * @param {google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.IConflictingResources} message ConflictingResources message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConflictingResources.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.mainPlaybookDisplayName != null && Object.hasOwnProperty.call(message, "mainPlaybookDisplayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.mainPlaybookDisplayName); + if (message.nestedPlaybookDisplayNames != null && message.nestedPlaybookDisplayNames.length) + for (var i = 0; i < message.nestedPlaybookDisplayNames.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nestedPlaybookDisplayNames[i]); + if (message.toolDisplayNames != null && message.toolDisplayNames.length) + for (var i = 0; i < message.toolDisplayNames.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.toolDisplayNames[i]); + return writer; + }; - /** - * Calls DeleteExperiment. - * @function deleteExperiment - * @memberof google.cloud.dialogflow.cx.v3.Experiments - * @instance - * @param {google.cloud.dialogflow.cx.v3.IDeleteExperimentRequest} request DeleteExperimentRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Experiments.DeleteExperimentCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Experiments.prototype.deleteExperiment = function deleteExperiment(request, callback) { - return this.rpcCall(deleteExperiment, $root.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteExperiment" }); + /** + * Encodes the specified ConflictingResources message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources + * @static + * @param {google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.IConflictingResources} message ConflictingResources message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConflictingResources.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Calls DeleteExperiment. - * @function deleteExperiment - * @memberof google.cloud.dialogflow.cx.v3.Experiments - * @instance - * @param {google.cloud.dialogflow.cx.v3.IDeleteExperimentRequest} request DeleteExperimentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Decodes a ConflictingResources message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources + * @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.ImportPlaybookResponse.ConflictingResources} ConflictingResources + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConflictingResources.decode = function decode(reader, length, error) { + 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.ImportPlaybookResponse.ConflictingResources(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.mainPlaybookDisplayName = reader.string(); + break; + } + case 2: { + if (!(message.nestedPlaybookDisplayNames && message.nestedPlaybookDisplayNames.length)) + message.nestedPlaybookDisplayNames = []; + message.nestedPlaybookDisplayNames.push(reader.string()); + break; + } + case 3: { + if (!(message.toolDisplayNames && message.toolDisplayNames.length)) + message.toolDisplayNames = []; + message.toolDisplayNames.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Experiments|startExperiment}. - * @memberof google.cloud.dialogflow.cx.v3.Experiments - * @typedef StartExperimentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.Experiment} [response] Experiment - */ + /** + * Decodes a ConflictingResources message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources} ConflictingResources + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConflictingResources.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Calls StartExperiment. - * @function startExperiment - * @memberof google.cloud.dialogflow.cx.v3.Experiments - * @instance - * @param {google.cloud.dialogflow.cx.v3.IStartExperimentRequest} request StartExperimentRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Experiments.StartExperimentCallback} callback Node-style callback called with the error, if any, and Experiment - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Experiments.prototype.startExperiment = function startExperiment(request, callback) { - return this.rpcCall(startExperiment, $root.google.cloud.dialogflow.cx.v3.StartExperimentRequest, $root.google.cloud.dialogflow.cx.v3.Experiment, request, callback); - }, "name", { value: "StartExperiment" }); + /** + * Verifies a ConflictingResources message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConflictingResources.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.mainPlaybookDisplayName != null && message.hasOwnProperty("mainPlaybookDisplayName")) + if (!$util.isString(message.mainPlaybookDisplayName)) + return "mainPlaybookDisplayName: string expected"; + if (message.nestedPlaybookDisplayNames != null && message.hasOwnProperty("nestedPlaybookDisplayNames")) { + if (!Array.isArray(message.nestedPlaybookDisplayNames)) + return "nestedPlaybookDisplayNames: array expected"; + for (var i = 0; i < message.nestedPlaybookDisplayNames.length; ++i) + if (!$util.isString(message.nestedPlaybookDisplayNames[i])) + return "nestedPlaybookDisplayNames: string[] expected"; + } + if (message.toolDisplayNames != null && message.hasOwnProperty("toolDisplayNames")) { + if (!Array.isArray(message.toolDisplayNames)) + return "toolDisplayNames: array expected"; + for (var i = 0; i < message.toolDisplayNames.length; ++i) + if (!$util.isString(message.toolDisplayNames[i])) + return "toolDisplayNames: string[] expected"; + } + return null; + }; - /** - * Calls StartExperiment. - * @function startExperiment - * @memberof google.cloud.dialogflow.cx.v3.Experiments - * @instance - * @param {google.cloud.dialogflow.cx.v3.IStartExperimentRequest} request StartExperimentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Creates a ConflictingResources message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources} ConflictingResources + */ + ConflictingResources.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources(); + if (object.mainPlaybookDisplayName != null) + message.mainPlaybookDisplayName = String(object.mainPlaybookDisplayName); + if (object.nestedPlaybookDisplayNames) { + if (!Array.isArray(object.nestedPlaybookDisplayNames)) + throw TypeError(".google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources.nestedPlaybookDisplayNames: array expected"); + message.nestedPlaybookDisplayNames = []; + for (var i = 0; i < object.nestedPlaybookDisplayNames.length; ++i) + message.nestedPlaybookDisplayNames[i] = String(object.nestedPlaybookDisplayNames[i]); + } + if (object.toolDisplayNames) { + if (!Array.isArray(object.toolDisplayNames)) + throw TypeError(".google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources.toolDisplayNames: array expected"); + message.toolDisplayNames = []; + for (var i = 0; i < object.toolDisplayNames.length; ++i) + message.toolDisplayNames[i] = String(object.toolDisplayNames[i]); + } + return message; + }; - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Experiments|stopExperiment}. - * @memberof google.cloud.dialogflow.cx.v3.Experiments - * @typedef StopExperimentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.Experiment} [response] Experiment - */ + /** + * Creates a plain object from a ConflictingResources message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources + * @static + * @param {google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources} message ConflictingResources + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConflictingResources.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.nestedPlaybookDisplayNames = []; + object.toolDisplayNames = []; + } + if (options.defaults) + object.mainPlaybookDisplayName = ""; + if (message.mainPlaybookDisplayName != null && message.hasOwnProperty("mainPlaybookDisplayName")) + object.mainPlaybookDisplayName = message.mainPlaybookDisplayName; + if (message.nestedPlaybookDisplayNames && message.nestedPlaybookDisplayNames.length) { + object.nestedPlaybookDisplayNames = []; + for (var j = 0; j < message.nestedPlaybookDisplayNames.length; ++j) + object.nestedPlaybookDisplayNames[j] = message.nestedPlaybookDisplayNames[j]; + } + if (message.toolDisplayNames && message.toolDisplayNames.length) { + object.toolDisplayNames = []; + for (var j = 0; j < message.toolDisplayNames.length; ++j) + object.toolDisplayNames[j] = message.toolDisplayNames[j]; + } + return object; + }; - /** - * Calls StopExperiment. - * @function stopExperiment - * @memberof google.cloud.dialogflow.cx.v3.Experiments - * @instance - * @param {google.cloud.dialogflow.cx.v3.IStopExperimentRequest} request StopExperimentRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Experiments.StopExperimentCallback} callback Node-style callback called with the error, if any, and Experiment - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Experiments.prototype.stopExperiment = function stopExperiment(request, callback) { - return this.rpcCall(stopExperiment, $root.google.cloud.dialogflow.cx.v3.StopExperimentRequest, $root.google.cloud.dialogflow.cx.v3.Experiment, request, callback); - }, "name", { value: "StopExperiment" }); + /** + * Converts this ConflictingResources to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources + * @instance + * @returns {Object.} JSON object + */ + ConflictingResources.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Calls StopExperiment. - * @function stopExperiment - * @memberof google.cloud.dialogflow.cx.v3.Experiments - * @instance - * @param {google.cloud.dialogflow.cx.v3.IStopExperimentRequest} request StopExperimentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Gets the default type url for ConflictingResources + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ConflictingResources.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ImportPlaybookResponse.ConflictingResources"; + }; - return Experiments; + return ConflictingResources; + })(); + + return ImportPlaybookResponse; })(); - v3.Experiment = (function() { + v3.ExportPlaybookResponse = (function() { /** - * Properties of an Experiment. + * Properties of an ExportPlaybookResponse. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IExperiment - * @property {string|null} [name] Experiment name - * @property {string|null} [displayName] Experiment displayName - * @property {string|null} [description] Experiment description - * @property {google.cloud.dialogflow.cx.v3.Experiment.State|null} [state] Experiment state - * @property {google.cloud.dialogflow.cx.v3.Experiment.IDefinition|null} [definition] Experiment definition - * @property {google.cloud.dialogflow.cx.v3.IRolloutConfig|null} [rolloutConfig] Experiment rolloutConfig - * @property {google.cloud.dialogflow.cx.v3.IRolloutState|null} [rolloutState] Experiment rolloutState - * @property {string|null} [rolloutFailureReason] Experiment rolloutFailureReason - * @property {google.cloud.dialogflow.cx.v3.Experiment.IResult|null} [result] Experiment result - * @property {google.protobuf.ITimestamp|null} [createTime] Experiment createTime - * @property {google.protobuf.ITimestamp|null} [startTime] Experiment startTime - * @property {google.protobuf.ITimestamp|null} [endTime] Experiment endTime - * @property {google.protobuf.ITimestamp|null} [lastUpdateTime] Experiment lastUpdateTime - * @property {google.protobuf.IDuration|null} [experimentLength] Experiment experimentLength - * @property {Array.|null} [variantsHistory] Experiment variantsHistory + * @interface IExportPlaybookResponse + * @property {string|null} [playbookUri] ExportPlaybookResponse playbookUri + * @property {Uint8Array|null} [playbookContent] ExportPlaybookResponse playbookContent */ /** - * Constructs a new Experiment. + * Constructs a new ExportPlaybookResponse. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents an Experiment. - * @implements IExperiment + * @classdesc Represents an ExportPlaybookResponse. + * @implements IExportPlaybookResponse * @constructor - * @param {google.cloud.dialogflow.cx.v3.IExperiment=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IExportPlaybookResponse=} [properties] Properties to set */ - function Experiment(properties) { - this.variantsHistory = []; + function ExportPlaybookResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -79962,276 +103663,360 @@ } /** - * Experiment name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.Experiment + * ExportPlaybookResponse playbookUri. + * @member {string|null|undefined} playbookUri + * @memberof google.cloud.dialogflow.cx.v3.ExportPlaybookResponse * @instance */ - Experiment.prototype.name = ""; + ExportPlaybookResponse.prototype.playbookUri = null; /** - * Experiment displayName. - * @member {string} displayName - * @memberof google.cloud.dialogflow.cx.v3.Experiment + * ExportPlaybookResponse playbookContent. + * @member {Uint8Array|null|undefined} playbookContent + * @memberof google.cloud.dialogflow.cx.v3.ExportPlaybookResponse * @instance */ - Experiment.prototype.displayName = ""; + ExportPlaybookResponse.prototype.playbookContent = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * Experiment description. - * @member {string} description - * @memberof google.cloud.dialogflow.cx.v3.Experiment + * ExportPlaybookResponse playbook. + * @member {"playbookUri"|"playbookContent"|undefined} playbook + * @memberof google.cloud.dialogflow.cx.v3.ExportPlaybookResponse * @instance */ - Experiment.prototype.description = ""; + Object.defineProperty(ExportPlaybookResponse.prototype, "playbook", { + get: $util.oneOfGetter($oneOfFields = ["playbookUri", "playbookContent"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Experiment state. - * @member {google.cloud.dialogflow.cx.v3.Experiment.State} state - * @memberof google.cloud.dialogflow.cx.v3.Experiment - * @instance + * Creates a new ExportPlaybookResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.ExportPlaybookResponse + * @static + * @param {google.cloud.dialogflow.cx.v3.IExportPlaybookResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ExportPlaybookResponse} ExportPlaybookResponse instance */ - Experiment.prototype.state = 0; + ExportPlaybookResponse.create = function create(properties) { + return new ExportPlaybookResponse(properties); + }; /** - * Experiment definition. - * @member {google.cloud.dialogflow.cx.v3.Experiment.IDefinition|null|undefined} definition - * @memberof google.cloud.dialogflow.cx.v3.Experiment - * @instance + * Encodes the specified ExportPlaybookResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ExportPlaybookResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.ExportPlaybookResponse + * @static + * @param {google.cloud.dialogflow.cx.v3.IExportPlaybookResponse} message ExportPlaybookResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Experiment.prototype.definition = null; + ExportPlaybookResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.playbookUri != null && Object.hasOwnProperty.call(message, "playbookUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.playbookUri); + if (message.playbookContent != null && Object.hasOwnProperty.call(message, "playbookContent")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.playbookContent); + return writer; + }; /** - * Experiment rolloutConfig. - * @member {google.cloud.dialogflow.cx.v3.IRolloutConfig|null|undefined} rolloutConfig - * @memberof google.cloud.dialogflow.cx.v3.Experiment - * @instance + * Encodes the specified ExportPlaybookResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ExportPlaybookResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.ExportPlaybookResponse + * @static + * @param {google.cloud.dialogflow.cx.v3.IExportPlaybookResponse} message ExportPlaybookResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Experiment.prototype.rolloutConfig = null; + ExportPlaybookResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Experiment rolloutState. - * @member {google.cloud.dialogflow.cx.v3.IRolloutState|null|undefined} rolloutState - * @memberof google.cloud.dialogflow.cx.v3.Experiment - * @instance + * Decodes an ExportPlaybookResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.ExportPlaybookResponse + * @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.ExportPlaybookResponse} ExportPlaybookResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Experiment.prototype.rolloutState = null; + ExportPlaybookResponse.decode = function decode(reader, length, error) { + 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.ExportPlaybookResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.playbookUri = reader.string(); + break; + } + case 2: { + message.playbookContent = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Experiment rolloutFailureReason. - * @member {string} rolloutFailureReason - * @memberof google.cloud.dialogflow.cx.v3.Experiment - * @instance + * Decodes an ExportPlaybookResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.ExportPlaybookResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.ExportPlaybookResponse} ExportPlaybookResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Experiment.prototype.rolloutFailureReason = ""; + ExportPlaybookResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Experiment result. - * @member {google.cloud.dialogflow.cx.v3.Experiment.IResult|null|undefined} result - * @memberof google.cloud.dialogflow.cx.v3.Experiment - * @instance + * Verifies an ExportPlaybookResponse message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.ExportPlaybookResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Experiment.prototype.result = null; + ExportPlaybookResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.playbookUri != null && message.hasOwnProperty("playbookUri")) { + properties.playbook = 1; + if (!$util.isString(message.playbookUri)) + return "playbookUri: string expected"; + } + if (message.playbookContent != null && message.hasOwnProperty("playbookContent")) { + if (properties.playbook === 1) + return "playbook: multiple values"; + properties.playbook = 1; + if (!(message.playbookContent && typeof message.playbookContent.length === "number" || $util.isString(message.playbookContent))) + return "playbookContent: buffer expected"; + } + return null; + }; /** - * Experiment createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.dialogflow.cx.v3.Experiment - * @instance + * Creates an ExportPlaybookResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.ExportPlaybookResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.ExportPlaybookResponse} ExportPlaybookResponse */ - Experiment.prototype.createTime = null; + ExportPlaybookResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ExportPlaybookResponse) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.ExportPlaybookResponse(); + if (object.playbookUri != null) + message.playbookUri = String(object.playbookUri); + if (object.playbookContent != null) + if (typeof object.playbookContent === "string") + $util.base64.decode(object.playbookContent, message.playbookContent = $util.newBuffer($util.base64.length(object.playbookContent)), 0); + else if (object.playbookContent.length >= 0) + message.playbookContent = object.playbookContent; + return message; + }; /** - * Experiment startTime. - * @member {google.protobuf.ITimestamp|null|undefined} startTime - * @memberof google.cloud.dialogflow.cx.v3.Experiment - * @instance + * Creates a plain object from an ExportPlaybookResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.ExportPlaybookResponse + * @static + * @param {google.cloud.dialogflow.cx.v3.ExportPlaybookResponse} message ExportPlaybookResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Experiment.prototype.startTime = null; + ExportPlaybookResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.playbookUri != null && message.hasOwnProperty("playbookUri")) { + object.playbookUri = message.playbookUri; + if (options.oneofs) + object.playbook = "playbookUri"; + } + if (message.playbookContent != null && message.hasOwnProperty("playbookContent")) { + object.playbookContent = options.bytes === String ? $util.base64.encode(message.playbookContent, 0, message.playbookContent.length) : options.bytes === Array ? Array.prototype.slice.call(message.playbookContent) : message.playbookContent; + if (options.oneofs) + object.playbook = "playbookContent"; + } + return object; + }; /** - * Experiment endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.cloud.dialogflow.cx.v3.Experiment + * Converts this ExportPlaybookResponse to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.ExportPlaybookResponse * @instance + * @returns {Object.} JSON object */ - Experiment.prototype.endTime = null; + ExportPlaybookResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Experiment lastUpdateTime. - * @member {google.protobuf.ITimestamp|null|undefined} lastUpdateTime - * @memberof google.cloud.dialogflow.cx.v3.Experiment + * Gets the default type url for ExportPlaybookResponse + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.ExportPlaybookResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExportPlaybookResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ExportPlaybookResponse"; + }; + + return ExportPlaybookResponse; + })(); + + v3.Handler = (function() { + + /** + * Properties of a Handler. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IHandler + * @property {google.cloud.dialogflow.cx.v3.Handler.IEventHandler|null} [eventHandler] Handler eventHandler + * @property {google.cloud.dialogflow.cx.v3.Handler.ILifecycleHandler|null} [lifecycleHandler] Handler lifecycleHandler + */ + + /** + * Constructs a new Handler. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a Handler. + * @implements IHandler + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IHandler=} [properties] Properties to set + */ + function Handler(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]]; + } + + /** + * Handler eventHandler. + * @member {google.cloud.dialogflow.cx.v3.Handler.IEventHandler|null|undefined} eventHandler + * @memberof google.cloud.dialogflow.cx.v3.Handler * @instance */ - Experiment.prototype.lastUpdateTime = null; + Handler.prototype.eventHandler = null; /** - * Experiment experimentLength. - * @member {google.protobuf.IDuration|null|undefined} experimentLength - * @memberof google.cloud.dialogflow.cx.v3.Experiment + * Handler lifecycleHandler. + * @member {google.cloud.dialogflow.cx.v3.Handler.ILifecycleHandler|null|undefined} lifecycleHandler + * @memberof google.cloud.dialogflow.cx.v3.Handler * @instance */ - Experiment.prototype.experimentLength = null; + Handler.prototype.lifecycleHandler = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * Experiment variantsHistory. - * @member {Array.} variantsHistory - * @memberof google.cloud.dialogflow.cx.v3.Experiment + * Handler handler. + * @member {"eventHandler"|"lifecycleHandler"|undefined} handler + * @memberof google.cloud.dialogflow.cx.v3.Handler * @instance */ - Experiment.prototype.variantsHistory = $util.emptyArray; + Object.defineProperty(Handler.prototype, "handler", { + get: $util.oneOfGetter($oneOfFields = ["eventHandler", "lifecycleHandler"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new Experiment instance using the specified properties. + * Creates a new Handler instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.Experiment + * @memberof google.cloud.dialogflow.cx.v3.Handler * @static - * @param {google.cloud.dialogflow.cx.v3.IExperiment=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.Experiment} Experiment instance + * @param {google.cloud.dialogflow.cx.v3.IHandler=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.Handler} Handler instance */ - Experiment.create = function create(properties) { - return new Experiment(properties); + Handler.create = function create(properties) { + return new Handler(properties); }; /** - * Encodes the specified Experiment message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Experiment.verify|verify} messages. + * Encodes the specified Handler message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Handler.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.Experiment + * @memberof google.cloud.dialogflow.cx.v3.Handler * @static - * @param {google.cloud.dialogflow.cx.v3.IExperiment} message Experiment message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IHandler} message Handler message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Experiment.encode = function encode(message, writer) { + Handler.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.state); - if (message.definition != null && Object.hasOwnProperty.call(message, "definition")) - $root.google.cloud.dialogflow.cx.v3.Experiment.Definition.encode(message.definition, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.result != null && Object.hasOwnProperty.call(message, "result")) - $root.google.cloud.dialogflow.cx.v3.Experiment.Result.encode(message.result, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.lastUpdateTime != null && Object.hasOwnProperty.call(message, "lastUpdateTime")) - $root.google.protobuf.Timestamp.encode(message.lastUpdateTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.experimentLength != null && Object.hasOwnProperty.call(message, "experimentLength")) - $root.google.protobuf.Duration.encode(message.experimentLength, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.variantsHistory != null && message.variantsHistory.length) - for (var i = 0; i < message.variantsHistory.length; ++i) - $root.google.cloud.dialogflow.cx.v3.VariantsHistory.encode(message.variantsHistory[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.rolloutConfig != null && Object.hasOwnProperty.call(message, "rolloutConfig")) - $root.google.cloud.dialogflow.cx.v3.RolloutConfig.encode(message.rolloutConfig, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - if (message.rolloutState != null && Object.hasOwnProperty.call(message, "rolloutState")) - $root.google.cloud.dialogflow.cx.v3.RolloutState.encode(message.rolloutState, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); - if (message.rolloutFailureReason != null && Object.hasOwnProperty.call(message, "rolloutFailureReason")) - writer.uint32(/* id 16, wireType 2 =*/130).string(message.rolloutFailureReason); + if (message.eventHandler != null && Object.hasOwnProperty.call(message, "eventHandler")) + $root.google.cloud.dialogflow.cx.v3.Handler.EventHandler.encode(message.eventHandler, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.lifecycleHandler != null && Object.hasOwnProperty.call(message, "lifecycleHandler")) + $root.google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler.encode(message.lifecycleHandler, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified Experiment message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Experiment.verify|verify} messages. + * Encodes the specified Handler message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Handler.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Experiment + * @memberof google.cloud.dialogflow.cx.v3.Handler * @static - * @param {google.cloud.dialogflow.cx.v3.IExperiment} message Experiment message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IHandler} message Handler message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Experiment.encodeDelimited = function encodeDelimited(message, writer) { + Handler.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Experiment message from the specified reader or buffer. + * Decodes a Handler message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.Experiment + * @memberof google.cloud.dialogflow.cx.v3.Handler * @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.Experiment} Experiment + * @returns {google.cloud.dialogflow.cx.v3.Handler} Handler * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Experiment.decode = function decode(reader, length, error) { + Handler.decode = function decode(reader, length, error) { 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.Experiment(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.Handler(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.displayName = reader.string(); + message.eventHandler = $root.google.cloud.dialogflow.cx.v3.Handler.EventHandler.decode(reader, reader.uint32()); break; } case 3: { - message.description = reader.string(); - break; - } - case 4: { - message.state = reader.int32(); - break; - } - case 5: { - message.definition = $root.google.cloud.dialogflow.cx.v3.Experiment.Definition.decode(reader, reader.uint32()); - break; - } - case 14: { - message.rolloutConfig = $root.google.cloud.dialogflow.cx.v3.RolloutConfig.decode(reader, reader.uint32()); - break; - } - case 15: { - message.rolloutState = $root.google.cloud.dialogflow.cx.v3.RolloutState.decode(reader, reader.uint32()); - break; - } - case 16: { - message.rolloutFailureReason = reader.string(); - break; - } - case 6: { - message.result = $root.google.cloud.dialogflow.cx.v3.Experiment.Result.decode(reader, reader.uint32()); - break; - } - case 7: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 8: { - message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 9: { - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 10: { - message.lastUpdateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 11: { - message.experimentLength = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 12: { - if (!(message.variantsHistory && message.variantsHistory.length)) - message.variantsHistory = []; - message.variantsHistory.push($root.google.cloud.dialogflow.cx.v3.VariantsHistory.decode(reader, reader.uint32())); + message.lifecycleHandler = $root.google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler.decode(reader, reader.uint32()); break; } default: @@ -80243,350 +104028,151 @@ }; /** - * Decodes an Experiment message from the specified reader or buffer, length delimited. + * Decodes a Handler message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Experiment + * @memberof google.cloud.dialogflow.cx.v3.Handler * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.Experiment} Experiment + * @returns {google.cloud.dialogflow.cx.v3.Handler} Handler * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Experiment.decodeDelimited = function decodeDelimited(reader) { + Handler.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Experiment message. + * Verifies a Handler message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.Experiment + * @memberof google.cloud.dialogflow.cx.v3.Handler * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Experiment.verify = function verify(message) { + Handler.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.definition != null && message.hasOwnProperty("definition")) { - var error = $root.google.cloud.dialogflow.cx.v3.Experiment.Definition.verify(message.definition); - if (error) - return "definition." + error; - } - if (message.rolloutConfig != null && message.hasOwnProperty("rolloutConfig")) { - var error = $root.google.cloud.dialogflow.cx.v3.RolloutConfig.verify(message.rolloutConfig); - if (error) - return "rolloutConfig." + error; - } - if (message.rolloutState != null && message.hasOwnProperty("rolloutState")) { - var error = $root.google.cloud.dialogflow.cx.v3.RolloutState.verify(message.rolloutState); - if (error) - return "rolloutState." + error; - } - if (message.rolloutFailureReason != null && message.hasOwnProperty("rolloutFailureReason")) - if (!$util.isString(message.rolloutFailureReason)) - return "rolloutFailureReason: string expected"; - if (message.result != null && message.hasOwnProperty("result")) { - var error = $root.google.cloud.dialogflow.cx.v3.Experiment.Result.verify(message.result); - if (error) - return "result." + error; - } - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.startTime != null && message.hasOwnProperty("startTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.startTime); - if (error) - return "startTime." + error; - } - if (message.endTime != null && message.hasOwnProperty("endTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.endTime); - if (error) - return "endTime." + error; - } - if (message.lastUpdateTime != null && message.hasOwnProperty("lastUpdateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.lastUpdateTime); - if (error) - return "lastUpdateTime." + error; - } - if (message.experimentLength != null && message.hasOwnProperty("experimentLength")) { - var error = $root.google.protobuf.Duration.verify(message.experimentLength); - if (error) - return "experimentLength." + error; - } - if (message.variantsHistory != null && message.hasOwnProperty("variantsHistory")) { - if (!Array.isArray(message.variantsHistory)) - return "variantsHistory: array expected"; - for (var i = 0; i < message.variantsHistory.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.VariantsHistory.verify(message.variantsHistory[i]); + var properties = {}; + if (message.eventHandler != null && message.hasOwnProperty("eventHandler")) { + properties.handler = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3.Handler.EventHandler.verify(message.eventHandler); if (error) - return "variantsHistory." + error; + return "eventHandler." + error; + } + } + if (message.lifecycleHandler != null && message.hasOwnProperty("lifecycleHandler")) { + if (properties.handler === 1) + return "handler: multiple values"; + properties.handler = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler.verify(message.lifecycleHandler); + if (error) + return "lifecycleHandler." + error; } } return null; }; /** - * Creates an Experiment message from a plain object. Also converts values to their respective internal types. + * Creates a Handler message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.Experiment + * @memberof google.cloud.dialogflow.cx.v3.Handler * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.Experiment} Experiment + * @returns {google.cloud.dialogflow.cx.v3.Handler} Handler */ - Experiment.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.Experiment) + Handler.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.Handler) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.Experiment(); - if (object.name != null) - message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.description != null) - message.description = String(object.description); - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; - } - break; - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "DRAFT": - case 1: - message.state = 1; - break; - case "RUNNING": - case 2: - message.state = 2; - break; - case "DONE": - case 3: - message.state = 3; - break; - case "ROLLOUT_FAILED": - case 4: - message.state = 4; - break; - } - if (object.definition != null) { - if (typeof object.definition !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.Experiment.definition: object expected"); - message.definition = $root.google.cloud.dialogflow.cx.v3.Experiment.Definition.fromObject(object.definition); - } - if (object.rolloutConfig != null) { - if (typeof object.rolloutConfig !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.Experiment.rolloutConfig: object expected"); - message.rolloutConfig = $root.google.cloud.dialogflow.cx.v3.RolloutConfig.fromObject(object.rolloutConfig); - } - if (object.rolloutState != null) { - if (typeof object.rolloutState !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.Experiment.rolloutState: object expected"); - message.rolloutState = $root.google.cloud.dialogflow.cx.v3.RolloutState.fromObject(object.rolloutState); - } - if (object.rolloutFailureReason != null) - message.rolloutFailureReason = String(object.rolloutFailureReason); - if (object.result != null) { - if (typeof object.result !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.Experiment.result: object expected"); - message.result = $root.google.cloud.dialogflow.cx.v3.Experiment.Result.fromObject(object.result); - } - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.Experiment.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.startTime != null) { - if (typeof object.startTime !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.Experiment.startTime: object expected"); - message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); - } - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.Experiment.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); - } - if (object.lastUpdateTime != null) { - if (typeof object.lastUpdateTime !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.Experiment.lastUpdateTime: object expected"); - message.lastUpdateTime = $root.google.protobuf.Timestamp.fromObject(object.lastUpdateTime); - } - if (object.experimentLength != null) { - if (typeof object.experimentLength !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.Experiment.experimentLength: object expected"); - message.experimentLength = $root.google.protobuf.Duration.fromObject(object.experimentLength); + var message = new $root.google.cloud.dialogflow.cx.v3.Handler(); + if (object.eventHandler != null) { + if (typeof object.eventHandler !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Handler.eventHandler: object expected"); + message.eventHandler = $root.google.cloud.dialogflow.cx.v3.Handler.EventHandler.fromObject(object.eventHandler); } - if (object.variantsHistory) { - if (!Array.isArray(object.variantsHistory)) - throw TypeError(".google.cloud.dialogflow.cx.v3.Experiment.variantsHistory: array expected"); - message.variantsHistory = []; - for (var i = 0; i < object.variantsHistory.length; ++i) { - if (typeof object.variantsHistory[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.Experiment.variantsHistory: object expected"); - message.variantsHistory[i] = $root.google.cloud.dialogflow.cx.v3.VariantsHistory.fromObject(object.variantsHistory[i]); - } + if (object.lifecycleHandler != null) { + if (typeof object.lifecycleHandler !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Handler.lifecycleHandler: object expected"); + message.lifecycleHandler = $root.google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler.fromObject(object.lifecycleHandler); } return message; }; /** - * Creates a plain object from an Experiment message. Also converts values to other types if specified. + * Creates a plain object from a Handler message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.Experiment + * @memberof google.cloud.dialogflow.cx.v3.Handler * @static - * @param {google.cloud.dialogflow.cx.v3.Experiment} message Experiment + * @param {google.cloud.dialogflow.cx.v3.Handler} message Handler * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Experiment.toObject = function toObject(message, options) { + Handler.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.variantsHistory = []; - if (options.defaults) { - object.name = ""; - object.displayName = ""; - object.description = ""; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.definition = null; - object.result = null; - object.createTime = null; - object.startTime = null; - object.endTime = null; - object.lastUpdateTime = null; - object.experimentLength = null; - object.rolloutConfig = null; - object.rolloutState = null; - object.rolloutFailureReason = ""; + if (message.eventHandler != null && message.hasOwnProperty("eventHandler")) { + object.eventHandler = $root.google.cloud.dialogflow.cx.v3.Handler.EventHandler.toObject(message.eventHandler, options); + if (options.oneofs) + object.handler = "eventHandler"; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.Experiment.State[message.state] === undefined ? message.state : $root.google.cloud.dialogflow.cx.v3.Experiment.State[message.state] : message.state; - if (message.definition != null && message.hasOwnProperty("definition")) - object.definition = $root.google.cloud.dialogflow.cx.v3.Experiment.Definition.toObject(message.definition, options); - if (message.result != null && message.hasOwnProperty("result")) - object.result = $root.google.cloud.dialogflow.cx.v3.Experiment.Result.toObject(message.result, options); - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); - if (message.lastUpdateTime != null && message.hasOwnProperty("lastUpdateTime")) - object.lastUpdateTime = $root.google.protobuf.Timestamp.toObject(message.lastUpdateTime, options); - if (message.experimentLength != null && message.hasOwnProperty("experimentLength")) - object.experimentLength = $root.google.protobuf.Duration.toObject(message.experimentLength, options); - if (message.variantsHistory && message.variantsHistory.length) { - object.variantsHistory = []; - for (var j = 0; j < message.variantsHistory.length; ++j) - object.variantsHistory[j] = $root.google.cloud.dialogflow.cx.v3.VariantsHistory.toObject(message.variantsHistory[j], options); + if (message.lifecycleHandler != null && message.hasOwnProperty("lifecycleHandler")) { + object.lifecycleHandler = $root.google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler.toObject(message.lifecycleHandler, options); + if (options.oneofs) + object.handler = "lifecycleHandler"; } - if (message.rolloutConfig != null && message.hasOwnProperty("rolloutConfig")) - object.rolloutConfig = $root.google.cloud.dialogflow.cx.v3.RolloutConfig.toObject(message.rolloutConfig, options); - if (message.rolloutState != null && message.hasOwnProperty("rolloutState")) - object.rolloutState = $root.google.cloud.dialogflow.cx.v3.RolloutState.toObject(message.rolloutState, options); - if (message.rolloutFailureReason != null && message.hasOwnProperty("rolloutFailureReason")) - object.rolloutFailureReason = message.rolloutFailureReason; return object; }; /** - * Converts this Experiment to JSON. + * Converts this Handler to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.Experiment + * @memberof google.cloud.dialogflow.cx.v3.Handler * @instance * @returns {Object.} JSON object */ - Experiment.prototype.toJSON = function toJSON() { + Handler.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Experiment + * Gets the default type url for Handler * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.Experiment + * @memberof google.cloud.dialogflow.cx.v3.Handler * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Experiment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Handler.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Experiment"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Handler"; }; - /** - * State enum. - * @name google.cloud.dialogflow.cx.v3.Experiment.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} DRAFT=1 DRAFT value - * @property {number} RUNNING=2 RUNNING value - * @property {number} DONE=3 DONE value - * @property {number} ROLLOUT_FAILED=4 ROLLOUT_FAILED value - */ - Experiment.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DRAFT"] = 1; - values[valuesById[2] = "RUNNING"] = 2; - values[valuesById[3] = "DONE"] = 3; - values[valuesById[4] = "ROLLOUT_FAILED"] = 4; - return values; - })(); - - Experiment.Definition = (function() { + Handler.EventHandler = (function() { /** - * Properties of a Definition. - * @memberof google.cloud.dialogflow.cx.v3.Experiment - * @interface IDefinition - * @property {string|null} [condition] Definition condition - * @property {google.cloud.dialogflow.cx.v3.IVersionVariants|null} [versionVariants] Definition versionVariants + * Properties of an EventHandler. + * @memberof google.cloud.dialogflow.cx.v3.Handler + * @interface IEventHandler + * @property {string|null} [event] EventHandler event + * @property {string|null} [condition] EventHandler condition + * @property {google.cloud.dialogflow.cx.v3.IFulfillment|null} [fulfillment] EventHandler fulfillment */ /** - * Constructs a new Definition. - * @memberof google.cloud.dialogflow.cx.v3.Experiment - * @classdesc Represents a Definition. - * @implements IDefinition + * Constructs a new EventHandler. + * @memberof google.cloud.dialogflow.cx.v3.Handler + * @classdesc Represents an EventHandler. + * @implements IEventHandler * @constructor - * @param {google.cloud.dialogflow.cx.v3.Experiment.IDefinition=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.Handler.IEventHandler=} [properties] Properties to set */ - function Definition(properties) { + function EventHandler(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -80594,105 +104180,105 @@ } /** - * Definition condition. - * @member {string} condition - * @memberof google.cloud.dialogflow.cx.v3.Experiment.Definition + * EventHandler event. + * @member {string} event + * @memberof google.cloud.dialogflow.cx.v3.Handler.EventHandler * @instance */ - Definition.prototype.condition = ""; + EventHandler.prototype.event = ""; /** - * Definition versionVariants. - * @member {google.cloud.dialogflow.cx.v3.IVersionVariants|null|undefined} versionVariants - * @memberof google.cloud.dialogflow.cx.v3.Experiment.Definition + * EventHandler condition. + * @member {string} condition + * @memberof google.cloud.dialogflow.cx.v3.Handler.EventHandler * @instance */ - Definition.prototype.versionVariants = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + EventHandler.prototype.condition = ""; /** - * Definition variants. - * @member {"versionVariants"|undefined} variants - * @memberof google.cloud.dialogflow.cx.v3.Experiment.Definition + * EventHandler fulfillment. + * @member {google.cloud.dialogflow.cx.v3.IFulfillment|null|undefined} fulfillment + * @memberof google.cloud.dialogflow.cx.v3.Handler.EventHandler * @instance */ - Object.defineProperty(Definition.prototype, "variants", { - get: $util.oneOfGetter($oneOfFields = ["versionVariants"]), - set: $util.oneOfSetter($oneOfFields) - }); + EventHandler.prototype.fulfillment = null; /** - * Creates a new Definition instance using the specified properties. + * Creates a new EventHandler instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.Experiment.Definition + * @memberof google.cloud.dialogflow.cx.v3.Handler.EventHandler * @static - * @param {google.cloud.dialogflow.cx.v3.Experiment.IDefinition=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.Experiment.Definition} Definition instance + * @param {google.cloud.dialogflow.cx.v3.Handler.IEventHandler=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.Handler.EventHandler} EventHandler instance */ - Definition.create = function create(properties) { - return new Definition(properties); + EventHandler.create = function create(properties) { + return new EventHandler(properties); }; /** - * Encodes the specified Definition message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Experiment.Definition.verify|verify} messages. + * Encodes the specified EventHandler message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Handler.EventHandler.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.Experiment.Definition + * @memberof google.cloud.dialogflow.cx.v3.Handler.EventHandler * @static - * @param {google.cloud.dialogflow.cx.v3.Experiment.IDefinition} message Definition message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.Handler.IEventHandler} message EventHandler message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Definition.encode = function encode(message, writer) { + EventHandler.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.event != null && Object.hasOwnProperty.call(message, "event")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.event); + if (message.fulfillment != null && Object.hasOwnProperty.call(message, "fulfillment")) + $root.google.cloud.dialogflow.cx.v3.Fulfillment.encode(message.fulfillment, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.condition); - if (message.versionVariants != null && Object.hasOwnProperty.call(message, "versionVariants")) - $root.google.cloud.dialogflow.cx.v3.VersionVariants.encode(message.versionVariants, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + writer.uint32(/* id 3, wireType 2 =*/26).string(message.condition); return writer; }; /** - * Encodes the specified Definition message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Experiment.Definition.verify|verify} messages. + * Encodes the specified EventHandler message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Handler.EventHandler.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Experiment.Definition + * @memberof google.cloud.dialogflow.cx.v3.Handler.EventHandler * @static - * @param {google.cloud.dialogflow.cx.v3.Experiment.IDefinition} message Definition message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.Handler.IEventHandler} message EventHandler message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Definition.encodeDelimited = function encodeDelimited(message, writer) { + EventHandler.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Definition message from the specified reader or buffer. + * Decodes an EventHandler message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.Experiment.Definition + * @memberof google.cloud.dialogflow.cx.v3.Handler.EventHandler * @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.Experiment.Definition} Definition + * @returns {google.cloud.dialogflow.cx.v3.Handler.EventHandler} EventHandler * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Definition.decode = function decode(reader, length, error) { + EventHandler.decode = function decode(reader, length, error) { 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.Experiment.Definition(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.Handler.EventHandler(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { + message.event = reader.string(); + break; + } + case 3: { message.condition = reader.string(); break; } case 2: { - message.versionVariants = $root.google.cloud.dialogflow.cx.v3.VersionVariants.decode(reader, reader.uint32()); + message.fulfillment = $root.google.cloud.dialogflow.cx.v3.Fulfillment.decode(reader, reader.uint32()); break; } default: @@ -80704,143 +104290,146 @@ }; /** - * Decodes a Definition message from the specified reader or buffer, length delimited. + * Decodes an EventHandler message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Experiment.Definition + * @memberof google.cloud.dialogflow.cx.v3.Handler.EventHandler * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.Experiment.Definition} Definition + * @returns {google.cloud.dialogflow.cx.v3.Handler.EventHandler} EventHandler * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Definition.decodeDelimited = function decodeDelimited(reader) { + EventHandler.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Definition message. + * Verifies an EventHandler message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.Experiment.Definition + * @memberof google.cloud.dialogflow.cx.v3.Handler.EventHandler * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Definition.verify = function verify(message) { + EventHandler.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; + if (message.event != null && message.hasOwnProperty("event")) + if (!$util.isString(message.event)) + return "event: string expected"; if (message.condition != null && message.hasOwnProperty("condition")) if (!$util.isString(message.condition)) return "condition: string expected"; - if (message.versionVariants != null && message.hasOwnProperty("versionVariants")) { - properties.variants = 1; - { - var error = $root.google.cloud.dialogflow.cx.v3.VersionVariants.verify(message.versionVariants); - if (error) - return "versionVariants." + error; - } + if (message.fulfillment != null && message.hasOwnProperty("fulfillment")) { + var error = $root.google.cloud.dialogflow.cx.v3.Fulfillment.verify(message.fulfillment); + if (error) + return "fulfillment." + error; } return null; }; /** - * Creates a Definition message from a plain object. Also converts values to their respective internal types. + * Creates an EventHandler message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.Experiment.Definition + * @memberof google.cloud.dialogflow.cx.v3.Handler.EventHandler * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.Experiment.Definition} Definition + * @returns {google.cloud.dialogflow.cx.v3.Handler.EventHandler} EventHandler */ - Definition.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.Experiment.Definition) + EventHandler.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.Handler.EventHandler) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.Experiment.Definition(); + var message = new $root.google.cloud.dialogflow.cx.v3.Handler.EventHandler(); + if (object.event != null) + message.event = String(object.event); if (object.condition != null) message.condition = String(object.condition); - if (object.versionVariants != null) { - if (typeof object.versionVariants !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.Experiment.Definition.versionVariants: object expected"); - message.versionVariants = $root.google.cloud.dialogflow.cx.v3.VersionVariants.fromObject(object.versionVariants); + if (object.fulfillment != null) { + if (typeof object.fulfillment !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Handler.EventHandler.fulfillment: object expected"); + message.fulfillment = $root.google.cloud.dialogflow.cx.v3.Fulfillment.fromObject(object.fulfillment); } return message; }; /** - * Creates a plain object from a Definition message. Also converts values to other types if specified. + * Creates a plain object from an EventHandler message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.Experiment.Definition + * @memberof google.cloud.dialogflow.cx.v3.Handler.EventHandler * @static - * @param {google.cloud.dialogflow.cx.v3.Experiment.Definition} message Definition + * @param {google.cloud.dialogflow.cx.v3.Handler.EventHandler} message EventHandler * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Definition.toObject = function toObject(message, options) { + EventHandler.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { + object.event = ""; + object.fulfillment = null; object.condition = ""; + } + if (message.event != null && message.hasOwnProperty("event")) + object.event = message.event; + if (message.fulfillment != null && message.hasOwnProperty("fulfillment")) + object.fulfillment = $root.google.cloud.dialogflow.cx.v3.Fulfillment.toObject(message.fulfillment, options); if (message.condition != null && message.hasOwnProperty("condition")) object.condition = message.condition; - if (message.versionVariants != null && message.hasOwnProperty("versionVariants")) { - object.versionVariants = $root.google.cloud.dialogflow.cx.v3.VersionVariants.toObject(message.versionVariants, options); - if (options.oneofs) - object.variants = "versionVariants"; - } return object; }; /** - * Converts this Definition to JSON. + * Converts this EventHandler to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.Experiment.Definition + * @memberof google.cloud.dialogflow.cx.v3.Handler.EventHandler * @instance * @returns {Object.} JSON object */ - Definition.prototype.toJSON = function toJSON() { + EventHandler.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Definition + * Gets the default type url for EventHandler * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.Experiment.Definition + * @memberof google.cloud.dialogflow.cx.v3.Handler.EventHandler * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Definition.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + EventHandler.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Experiment.Definition"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Handler.EventHandler"; }; - return Definition; + return EventHandler; })(); - Experiment.Result = (function() { + Handler.LifecycleHandler = (function() { /** - * Properties of a Result. - * @memberof google.cloud.dialogflow.cx.v3.Experiment - * @interface IResult - * @property {Array.|null} [versionMetrics] Result versionMetrics - * @property {google.protobuf.ITimestamp|null} [lastUpdateTime] Result lastUpdateTime + * Properties of a LifecycleHandler. + * @memberof google.cloud.dialogflow.cx.v3.Handler + * @interface ILifecycleHandler + * @property {string|null} [lifecycleStage] LifecycleHandler lifecycleStage + * @property {string|null} [condition] LifecycleHandler condition + * @property {google.cloud.dialogflow.cx.v3.IFulfillment|null} [fulfillment] LifecycleHandler fulfillment */ /** - * Constructs a new Result. - * @memberof google.cloud.dialogflow.cx.v3.Experiment - * @classdesc Represents a Result. - * @implements IResult + * Constructs a new LifecycleHandler. + * @memberof google.cloud.dialogflow.cx.v3.Handler + * @classdesc Represents a LifecycleHandler. + * @implements ILifecycleHandler * @constructor - * @param {google.cloud.dialogflow.cx.v3.Experiment.IResult=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.Handler.ILifecycleHandler=} [properties] Properties to set */ - function Result(properties) { - this.versionMetrics = []; + function LifecycleHandler(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -80848,94 +104437,105 @@ } /** - * Result versionMetrics. - * @member {Array.} versionMetrics - * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result + * LifecycleHandler lifecycleStage. + * @member {string} lifecycleStage + * @memberof google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler * @instance */ - Result.prototype.versionMetrics = $util.emptyArray; + LifecycleHandler.prototype.lifecycleStage = ""; /** - * Result lastUpdateTime. - * @member {google.protobuf.ITimestamp|null|undefined} lastUpdateTime - * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result + * LifecycleHandler condition. + * @member {string} condition + * @memberof google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler * @instance */ - Result.prototype.lastUpdateTime = null; + LifecycleHandler.prototype.condition = ""; /** - * Creates a new Result instance using the specified properties. + * LifecycleHandler fulfillment. + * @member {google.cloud.dialogflow.cx.v3.IFulfillment|null|undefined} fulfillment + * @memberof google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler + * @instance + */ + LifecycleHandler.prototype.fulfillment = null; + + /** + * Creates a new LifecycleHandler instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result + * @memberof google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler * @static - * @param {google.cloud.dialogflow.cx.v3.Experiment.IResult=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.Experiment.Result} Result instance + * @param {google.cloud.dialogflow.cx.v3.Handler.ILifecycleHandler=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler} LifecycleHandler instance */ - Result.create = function create(properties) { - return new Result(properties); + LifecycleHandler.create = function create(properties) { + return new LifecycleHandler(properties); }; /** - * Encodes the specified Result message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Experiment.Result.verify|verify} messages. + * Encodes the specified LifecycleHandler message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result + * @memberof google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler * @static - * @param {google.cloud.dialogflow.cx.v3.Experiment.IResult} message Result message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.Handler.ILifecycleHandler} message LifecycleHandler message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Result.encode = function encode(message, writer) { + LifecycleHandler.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.versionMetrics != null && message.versionMetrics.length) - for (var i = 0; i < message.versionMetrics.length; ++i) - $root.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics.encode(message.versionMetrics[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.lastUpdateTime != null && Object.hasOwnProperty.call(message, "lastUpdateTime")) - $root.google.protobuf.Timestamp.encode(message.lastUpdateTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.lifecycleStage != null && Object.hasOwnProperty.call(message, "lifecycleStage")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.lifecycleStage); + if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.condition); + if (message.fulfillment != null && Object.hasOwnProperty.call(message, "fulfillment")) + $root.google.cloud.dialogflow.cx.v3.Fulfillment.encode(message.fulfillment, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified Result message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Experiment.Result.verify|verify} messages. + * Encodes the specified LifecycleHandler message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result + * @memberof google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler * @static - * @param {google.cloud.dialogflow.cx.v3.Experiment.IResult} message Result message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.Handler.ILifecycleHandler} message LifecycleHandler message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Result.encodeDelimited = function encodeDelimited(message, writer) { + LifecycleHandler.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Result message from the specified reader or buffer. + * Decodes a LifecycleHandler message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result + * @memberof google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler * @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.Experiment.Result} Result + * @returns {google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler} LifecycleHandler * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Result.decode = function decode(reader, length, error) { + LifecycleHandler.decode = function decode(reader, length, error) { 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.Experiment.Result(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - if (!(message.versionMetrics && message.versionMetrics.length)) - message.versionMetrics = []; - message.versionMetrics.push($root.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics.decode(reader, reader.uint32())); + message.lifecycleStage = reader.string(); break; } case 2: { - message.lastUpdateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.condition = reader.string(); + break; + } + case 3: { + message.fulfillment = $root.google.cloud.dialogflow.cx.v3.Fulfillment.decode(reader, reader.uint32()); break; } default: @@ -80947,1142 +104547,1294 @@ }; /** - * Decodes a Result message from the specified reader or buffer, length delimited. + * Decodes a LifecycleHandler message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result + * @memberof google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.Experiment.Result} Result + * @returns {google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler} LifecycleHandler * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Result.decodeDelimited = function decodeDelimited(reader) { + LifecycleHandler.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Result message. + * Verifies a LifecycleHandler message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result + * @memberof google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Result.verify = function verify(message) { + LifecycleHandler.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.versionMetrics != null && message.hasOwnProperty("versionMetrics")) { - if (!Array.isArray(message.versionMetrics)) - return "versionMetrics: array expected"; - for (var i = 0; i < message.versionMetrics.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics.verify(message.versionMetrics[i]); - if (error) - return "versionMetrics." + error; - } - } - if (message.lastUpdateTime != null && message.hasOwnProperty("lastUpdateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.lastUpdateTime); + if (message.lifecycleStage != null && message.hasOwnProperty("lifecycleStage")) + if (!$util.isString(message.lifecycleStage)) + return "lifecycleStage: string expected"; + if (message.condition != null && message.hasOwnProperty("condition")) + if (!$util.isString(message.condition)) + return "condition: string expected"; + if (message.fulfillment != null && message.hasOwnProperty("fulfillment")) { + var error = $root.google.cloud.dialogflow.cx.v3.Fulfillment.verify(message.fulfillment); if (error) - return "lastUpdateTime." + error; + return "fulfillment." + error; } return null; }; /** - * Creates a Result message from a plain object. Also converts values to their respective internal types. + * Creates a LifecycleHandler message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result + * @memberof google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.Experiment.Result} Result + * @returns {google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler} LifecycleHandler */ - Result.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.Experiment.Result) + LifecycleHandler.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.Experiment.Result(); - if (object.versionMetrics) { - if (!Array.isArray(object.versionMetrics)) - throw TypeError(".google.cloud.dialogflow.cx.v3.Experiment.Result.versionMetrics: array expected"); - message.versionMetrics = []; - for (var i = 0; i < object.versionMetrics.length; ++i) { - if (typeof object.versionMetrics[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.Experiment.Result.versionMetrics: object expected"); - message.versionMetrics[i] = $root.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics.fromObject(object.versionMetrics[i]); - } - } - if (object.lastUpdateTime != null) { - if (typeof object.lastUpdateTime !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.Experiment.Result.lastUpdateTime: object expected"); - message.lastUpdateTime = $root.google.protobuf.Timestamp.fromObject(object.lastUpdateTime); + var message = new $root.google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler(); + if (object.lifecycleStage != null) + message.lifecycleStage = String(object.lifecycleStage); + if (object.condition != null) + message.condition = String(object.condition); + if (object.fulfillment != null) { + if (typeof object.fulfillment !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler.fulfillment: object expected"); + message.fulfillment = $root.google.cloud.dialogflow.cx.v3.Fulfillment.fromObject(object.fulfillment); } return message; }; /** - * Creates a plain object from a Result message. Also converts values to other types if specified. + * Creates a plain object from a LifecycleHandler message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result + * @memberof google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler * @static - * @param {google.cloud.dialogflow.cx.v3.Experiment.Result} message Result + * @param {google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler} message LifecycleHandler * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Result.toObject = function toObject(message, options) { + LifecycleHandler.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.versionMetrics = []; - if (options.defaults) - object.lastUpdateTime = null; - if (message.versionMetrics && message.versionMetrics.length) { - object.versionMetrics = []; - for (var j = 0; j < message.versionMetrics.length; ++j) - object.versionMetrics[j] = $root.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics.toObject(message.versionMetrics[j], options); + if (options.defaults) { + object.lifecycleStage = ""; + object.condition = ""; + object.fulfillment = null; } - if (message.lastUpdateTime != null && message.hasOwnProperty("lastUpdateTime")) - object.lastUpdateTime = $root.google.protobuf.Timestamp.toObject(message.lastUpdateTime, options); + if (message.lifecycleStage != null && message.hasOwnProperty("lifecycleStage")) + object.lifecycleStage = message.lifecycleStage; + if (message.condition != null && message.hasOwnProperty("condition")) + object.condition = message.condition; + if (message.fulfillment != null && message.hasOwnProperty("fulfillment")) + object.fulfillment = $root.google.cloud.dialogflow.cx.v3.Fulfillment.toObject(message.fulfillment, options); return object; }; /** - * Converts this Result to JSON. + * Converts this LifecycleHandler to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result + * @memberof google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler * @instance * @returns {Object.} JSON object */ - Result.prototype.toJSON = function toJSON() { + LifecycleHandler.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Result + * Gets the default type url for LifecycleHandler * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result + * @memberof google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Result.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + LifecycleHandler.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Experiment.Result"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler"; }; - /** - * MetricType enum. - * @name google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType - * @enum {number} - * @property {number} METRIC_UNSPECIFIED=0 METRIC_UNSPECIFIED value - * @property {number} CONTAINED_SESSION_NO_CALLBACK_RATE=1 CONTAINED_SESSION_NO_CALLBACK_RATE value - * @property {number} LIVE_AGENT_HANDOFF_RATE=2 LIVE_AGENT_HANDOFF_RATE value - * @property {number} CALLBACK_SESSION_RATE=3 CALLBACK_SESSION_RATE value - * @property {number} ABANDONED_SESSION_RATE=4 ABANDONED_SESSION_RATE value - * @property {number} SESSION_END_RATE=5 SESSION_END_RATE value - */ - Result.MetricType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "METRIC_UNSPECIFIED"] = 0; - values[valuesById[1] = "CONTAINED_SESSION_NO_CALLBACK_RATE"] = 1; - values[valuesById[2] = "LIVE_AGENT_HANDOFF_RATE"] = 2; - values[valuesById[3] = "CALLBACK_SESSION_RATE"] = 3; - values[valuesById[4] = "ABANDONED_SESSION_RATE"] = 4; - values[valuesById[5] = "SESSION_END_RATE"] = 5; - return values; - })(); + return LifecycleHandler; + })(); - /** - * CountType enum. - * @name google.cloud.dialogflow.cx.v3.Experiment.Result.CountType - * @enum {number} - * @property {number} COUNT_TYPE_UNSPECIFIED=0 COUNT_TYPE_UNSPECIFIED value - * @property {number} TOTAL_NO_MATCH_COUNT=1 TOTAL_NO_MATCH_COUNT value - * @property {number} TOTAL_TURN_COUNT=2 TOTAL_TURN_COUNT value - * @property {number} AVERAGE_TURN_COUNT=3 AVERAGE_TURN_COUNT value - */ - Result.CountType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "COUNT_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "TOTAL_NO_MATCH_COUNT"] = 1; - values[valuesById[2] = "TOTAL_TURN_COUNT"] = 2; - values[valuesById[3] = "AVERAGE_TURN_COUNT"] = 3; - return values; - })(); + return Handler; + })(); - Result.ConfidenceInterval = (function() { + v3.SecuritySettingsService = (function() { - /** - * Properties of a ConfidenceInterval. - * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result - * @interface IConfidenceInterval - * @property {number|null} [confidenceLevel] ConfidenceInterval confidenceLevel - * @property {number|null} [ratio] ConfidenceInterval ratio - * @property {number|null} [lowerBound] ConfidenceInterval lowerBound - * @property {number|null} [upperBound] ConfidenceInterval upperBound - */ + /** + * Constructs a new SecuritySettingsService service. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a SecuritySettingsService + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function SecuritySettingsService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } - /** - * Constructs a new ConfidenceInterval. - * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result - * @classdesc Represents a ConfidenceInterval. - * @implements IConfidenceInterval - * @constructor - * @param {google.cloud.dialogflow.cx.v3.Experiment.Result.IConfidenceInterval=} [properties] Properties to set - */ - function ConfidenceInterval(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]]; - } + (SecuritySettingsService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = SecuritySettingsService; - /** - * ConfidenceInterval confidenceLevel. - * @member {number} confidenceLevel - * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval - * @instance - */ - ConfidenceInterval.prototype.confidenceLevel = 0; + /** + * Creates new SecuritySettingsService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {SecuritySettingsService} RPC service. Useful where requests and/or responses are streamed. + */ + SecuritySettingsService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; - /** - * ConfidenceInterval ratio. - * @member {number} ratio - * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval - * @instance - */ - ConfidenceInterval.prototype.ratio = 0; + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.SecuritySettingsService|createSecuritySettings}. + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService + * @typedef CreateSecuritySettingsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.SecuritySettings} [response] SecuritySettings + */ - /** - * ConfidenceInterval lowerBound. - * @member {number} lowerBound - * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval - * @instance - */ - ConfidenceInterval.prototype.lowerBound = 0; + /** + * Calls CreateSecuritySettings. + * @function createSecuritySettings + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService + * @instance + * @param {google.cloud.dialogflow.cx.v3.ICreateSecuritySettingsRequest} request CreateSecuritySettingsRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.SecuritySettingsService.CreateSecuritySettingsCallback} callback Node-style callback called with the error, if any, and SecuritySettings + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SecuritySettingsService.prototype.createSecuritySettings = function createSecuritySettings(request, callback) { + return this.rpcCall(createSecuritySettings, $root.google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest, $root.google.cloud.dialogflow.cx.v3.SecuritySettings, request, callback); + }, "name", { value: "CreateSecuritySettings" }); - /** - * ConfidenceInterval upperBound. - * @member {number} upperBound - * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval - * @instance - */ - ConfidenceInterval.prototype.upperBound = 0; + /** + * Calls CreateSecuritySettings. + * @function createSecuritySettings + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService + * @instance + * @param {google.cloud.dialogflow.cx.v3.ICreateSecuritySettingsRequest} request CreateSecuritySettingsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Creates a new ConfidenceInterval instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval - * @static - * @param {google.cloud.dialogflow.cx.v3.Experiment.Result.IConfidenceInterval=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval} ConfidenceInterval instance - */ - ConfidenceInterval.create = function create(properties) { - return new ConfidenceInterval(properties); - }; + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.SecuritySettingsService|getSecuritySettings}. + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService + * @typedef GetSecuritySettingsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.SecuritySettings} [response] SecuritySettings + */ - /** - * Encodes the specified ConfidenceInterval message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval - * @static - * @param {google.cloud.dialogflow.cx.v3.Experiment.Result.IConfidenceInterval} message ConfidenceInterval message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConfidenceInterval.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.confidenceLevel != null && Object.hasOwnProperty.call(message, "confidenceLevel")) - writer.uint32(/* id 1, wireType 1 =*/9).double(message.confidenceLevel); - if (message.ratio != null && Object.hasOwnProperty.call(message, "ratio")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.ratio); - if (message.lowerBound != null && Object.hasOwnProperty.call(message, "lowerBound")) - writer.uint32(/* id 3, wireType 1 =*/25).double(message.lowerBound); - if (message.upperBound != null && Object.hasOwnProperty.call(message, "upperBound")) - writer.uint32(/* id 4, wireType 1 =*/33).double(message.upperBound); - return writer; - }; + /** + * Calls GetSecuritySettings. + * @function getSecuritySettings + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService + * @instance + * @param {google.cloud.dialogflow.cx.v3.IGetSecuritySettingsRequest} request GetSecuritySettingsRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.SecuritySettingsService.GetSecuritySettingsCallback} callback Node-style callback called with the error, if any, and SecuritySettings + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SecuritySettingsService.prototype.getSecuritySettings = function getSecuritySettings(request, callback) { + return this.rpcCall(getSecuritySettings, $root.google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest, $root.google.cloud.dialogflow.cx.v3.SecuritySettings, request, callback); + }, "name", { value: "GetSecuritySettings" }); + + /** + * Calls GetSecuritySettings. + * @function getSecuritySettings + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService + * @instance + * @param {google.cloud.dialogflow.cx.v3.IGetSecuritySettingsRequest} request GetSecuritySettingsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.SecuritySettingsService|updateSecuritySettings}. + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService + * @typedef UpdateSecuritySettingsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.SecuritySettings} [response] SecuritySettings + */ + + /** + * Calls UpdateSecuritySettings. + * @function updateSecuritySettings + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService + * @instance + * @param {google.cloud.dialogflow.cx.v3.IUpdateSecuritySettingsRequest} request UpdateSecuritySettingsRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.SecuritySettingsService.UpdateSecuritySettingsCallback} callback Node-style callback called with the error, if any, and SecuritySettings + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SecuritySettingsService.prototype.updateSecuritySettings = function updateSecuritySettings(request, callback) { + return this.rpcCall(updateSecuritySettings, $root.google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest, $root.google.cloud.dialogflow.cx.v3.SecuritySettings, request, callback); + }, "name", { value: "UpdateSecuritySettings" }); + + /** + * Calls UpdateSecuritySettings. + * @function updateSecuritySettings + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService + * @instance + * @param {google.cloud.dialogflow.cx.v3.IUpdateSecuritySettingsRequest} request UpdateSecuritySettingsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.SecuritySettingsService|listSecuritySettings}. + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService + * @typedef ListSecuritySettingsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse} [response] ListSecuritySettingsResponse + */ + + /** + * Calls ListSecuritySettings. + * @function listSecuritySettings + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService + * @instance + * @param {google.cloud.dialogflow.cx.v3.IListSecuritySettingsRequest} request ListSecuritySettingsRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.SecuritySettingsService.ListSecuritySettingsCallback} callback Node-style callback called with the error, if any, and ListSecuritySettingsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SecuritySettingsService.prototype.listSecuritySettings = function listSecuritySettings(request, callback) { + return this.rpcCall(listSecuritySettings, $root.google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest, $root.google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse, request, callback); + }, "name", { value: "ListSecuritySettings" }); + + /** + * Calls ListSecuritySettings. + * @function listSecuritySettings + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService + * @instance + * @param {google.cloud.dialogflow.cx.v3.IListSecuritySettingsRequest} request ListSecuritySettingsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.SecuritySettingsService|deleteSecuritySettings}. + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService + * @typedef DeleteSecuritySettingsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteSecuritySettings. + * @function deleteSecuritySettings + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService + * @instance + * @param {google.cloud.dialogflow.cx.v3.IDeleteSecuritySettingsRequest} request DeleteSecuritySettingsRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.SecuritySettingsService.DeleteSecuritySettingsCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SecuritySettingsService.prototype.deleteSecuritySettings = function deleteSecuritySettings(request, callback) { + return this.rpcCall(deleteSecuritySettings, $root.google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteSecuritySettings" }); + + /** + * Calls DeleteSecuritySettings. + * @function deleteSecuritySettings + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService + * @instance + * @param {google.cloud.dialogflow.cx.v3.IDeleteSecuritySettingsRequest} request DeleteSecuritySettingsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return SecuritySettingsService; + })(); + + v3.GetSecuritySettingsRequest = (function() { + + /** + * Properties of a GetSecuritySettingsRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IGetSecuritySettingsRequest + * @property {string|null} [name] GetSecuritySettingsRequest name + */ + + /** + * Constructs a new GetSecuritySettingsRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a GetSecuritySettingsRequest. + * @implements IGetSecuritySettingsRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IGetSecuritySettingsRequest=} [properties] Properties to set + */ + function GetSecuritySettingsRequest(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]]; + } + + /** + * GetSecuritySettingsRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest + * @instance + */ + GetSecuritySettingsRequest.prototype.name = ""; + + /** + * Creates a new GetSecuritySettingsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IGetSecuritySettingsRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest} GetSecuritySettingsRequest instance + */ + GetSecuritySettingsRequest.create = function create(properties) { + return new GetSecuritySettingsRequest(properties); + }; + + /** + * Encodes the specified GetSecuritySettingsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IGetSecuritySettingsRequest} message GetSecuritySettingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetSecuritySettingsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetSecuritySettingsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IGetSecuritySettingsRequest} message GetSecuritySettingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetSecuritySettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetSecuritySettingsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest + * @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.GetSecuritySettingsRequest} GetSecuritySettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetSecuritySettingsRequest.decode = function decode(reader, length, error) { + 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.GetSecuritySettingsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetSecuritySettingsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest} GetSecuritySettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetSecuritySettingsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetSecuritySettingsRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetSecuritySettingsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetSecuritySettingsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest} GetSecuritySettingsRequest + */ + GetSecuritySettingsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetSecuritySettingsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest} message GetSecuritySettingsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetSecuritySettingsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; - /** - * Encodes the specified ConfidenceInterval message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval - * @static - * @param {google.cloud.dialogflow.cx.v3.Experiment.Result.IConfidenceInterval} message ConfidenceInterval message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConfidenceInterval.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Converts this GetSecuritySettingsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest + * @instance + * @returns {Object.} JSON object + */ + GetSecuritySettingsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Decodes a ConfidenceInterval message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval - * @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.Experiment.Result.ConfidenceInterval} ConfidenceInterval - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConfidenceInterval.decode = function decode(reader, length, error) { - 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.Experiment.Result.ConfidenceInterval(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.confidenceLevel = reader.double(); - break; - } - case 2: { - message.ratio = reader.double(); - break; - } - case 3: { - message.lowerBound = reader.double(); - break; - } - case 4: { - message.upperBound = reader.double(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Gets the default type url for GetSecuritySettingsRequest + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetSecuritySettingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest"; + }; - /** - * Decodes a ConfidenceInterval message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval} ConfidenceInterval - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConfidenceInterval.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + return GetSecuritySettingsRequest; + })(); - /** - * Verifies a ConfidenceInterval message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ConfidenceInterval.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.confidenceLevel != null && message.hasOwnProperty("confidenceLevel")) - if (typeof message.confidenceLevel !== "number") - return "confidenceLevel: number expected"; - if (message.ratio != null && message.hasOwnProperty("ratio")) - if (typeof message.ratio !== "number") - return "ratio: number expected"; - if (message.lowerBound != null && message.hasOwnProperty("lowerBound")) - if (typeof message.lowerBound !== "number") - return "lowerBound: number expected"; - if (message.upperBound != null && message.hasOwnProperty("upperBound")) - if (typeof message.upperBound !== "number") - return "upperBound: number expected"; - return null; - }; + v3.UpdateSecuritySettingsRequest = (function() { - /** - * Creates a ConfidenceInterval message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval} ConfidenceInterval - */ - ConfidenceInterval.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval(); - if (object.confidenceLevel != null) - message.confidenceLevel = Number(object.confidenceLevel); - if (object.ratio != null) - message.ratio = Number(object.ratio); - if (object.lowerBound != null) - message.lowerBound = Number(object.lowerBound); - if (object.upperBound != null) - message.upperBound = Number(object.upperBound); - return message; - }; + /** + * Properties of an UpdateSecuritySettingsRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IUpdateSecuritySettingsRequest + * @property {google.cloud.dialogflow.cx.v3.ISecuritySettings|null} [securitySettings] UpdateSecuritySettingsRequest securitySettings + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateSecuritySettingsRequest updateMask + */ - /** - * Creates a plain object from a ConfidenceInterval message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval - * @static - * @param {google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval} message ConfidenceInterval - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ConfidenceInterval.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.confidenceLevel = 0; - object.ratio = 0; - object.lowerBound = 0; - object.upperBound = 0; - } - if (message.confidenceLevel != null && message.hasOwnProperty("confidenceLevel")) - object.confidenceLevel = options.json && !isFinite(message.confidenceLevel) ? String(message.confidenceLevel) : message.confidenceLevel; - if (message.ratio != null && message.hasOwnProperty("ratio")) - object.ratio = options.json && !isFinite(message.ratio) ? String(message.ratio) : message.ratio; - if (message.lowerBound != null && message.hasOwnProperty("lowerBound")) - object.lowerBound = options.json && !isFinite(message.lowerBound) ? String(message.lowerBound) : message.lowerBound; - if (message.upperBound != null && message.hasOwnProperty("upperBound")) - object.upperBound = options.json && !isFinite(message.upperBound) ? String(message.upperBound) : message.upperBound; - return object; - }; + /** + * Constructs a new UpdateSecuritySettingsRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents an UpdateSecuritySettingsRequest. + * @implements IUpdateSecuritySettingsRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IUpdateSecuritySettingsRequest=} [properties] Properties to set + */ + function UpdateSecuritySettingsRequest(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]]; + } - /** - * Converts this ConfidenceInterval to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval - * @instance - * @returns {Object.} JSON object - */ - ConfidenceInterval.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * UpdateSecuritySettingsRequest securitySettings. + * @member {google.cloud.dialogflow.cx.v3.ISecuritySettings|null|undefined} securitySettings + * @memberof google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest + * @instance + */ + UpdateSecuritySettingsRequest.prototype.securitySettings = null; - /** - * Gets the default type url for ConfidenceInterval - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ConfidenceInterval.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval"; - }; + /** + * UpdateSecuritySettingsRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest + * @instance + */ + UpdateSecuritySettingsRequest.prototype.updateMask = null; - return ConfidenceInterval; - })(); + /** + * Creates a new UpdateSecuritySettingsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IUpdateSecuritySettingsRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest} UpdateSecuritySettingsRequest instance + */ + UpdateSecuritySettingsRequest.create = function create(properties) { + return new UpdateSecuritySettingsRequest(properties); + }; - Result.Metric = (function() { + /** + * Encodes the specified UpdateSecuritySettingsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IUpdateSecuritySettingsRequest} message UpdateSecuritySettingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateSecuritySettingsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.securitySettings != null && Object.hasOwnProperty.call(message, "securitySettings")) + $root.google.cloud.dialogflow.cx.v3.SecuritySettings.encode(message.securitySettings, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; - /** - * Properties of a Metric. - * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result - * @interface IMetric - * @property {google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType|null} [type] Metric type - * @property {google.cloud.dialogflow.cx.v3.Experiment.Result.CountType|null} [countType] Metric countType - * @property {number|null} [ratio] Metric ratio - * @property {number|null} [count] Metric count - * @property {google.cloud.dialogflow.cx.v3.Experiment.Result.IConfidenceInterval|null} [confidenceInterval] Metric confidenceInterval - */ + /** + * Encodes the specified UpdateSecuritySettingsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IUpdateSecuritySettingsRequest} message UpdateSecuritySettingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateSecuritySettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Constructs a new Metric. - * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result - * @classdesc Represents a Metric. - * @implements IMetric - * @constructor - * @param {google.cloud.dialogflow.cx.v3.Experiment.Result.IMetric=} [properties] Properties to set - */ - function Metric(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]]; + /** + * Decodes an UpdateSecuritySettingsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest + * @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.UpdateSecuritySettingsRequest} UpdateSecuritySettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateSecuritySettingsRequest.decode = function decode(reader, length, error) { + 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.UpdateSecuritySettingsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.securitySettings = $root.google.cloud.dialogflow.cx.v3.SecuritySettings.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; } + } + return message; + }; - /** - * Metric type. - * @member {google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType} type - * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.Metric - * @instance - */ - Metric.prototype.type = 0; + /** + * Decodes an UpdateSecuritySettingsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest} UpdateSecuritySettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateSecuritySettingsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Metric countType. - * @member {google.cloud.dialogflow.cx.v3.Experiment.Result.CountType} countType - * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.Metric - * @instance - */ - Metric.prototype.countType = 0; + /** + * Verifies an UpdateSecuritySettingsRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateSecuritySettingsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.securitySettings != null && message.hasOwnProperty("securitySettings")) { + var error = $root.google.cloud.dialogflow.cx.v3.SecuritySettings.verify(message.securitySettings); + if (error) + return "securitySettings." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + return null; + }; - /** - * Metric ratio. - * @member {number|null|undefined} ratio - * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.Metric - * @instance - */ - Metric.prototype.ratio = null; + /** + * Creates an UpdateSecuritySettingsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest} UpdateSecuritySettingsRequest + */ + UpdateSecuritySettingsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest(); + if (object.securitySettings != null) { + if (typeof object.securitySettings !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest.securitySettings: object expected"); + message.securitySettings = $root.google.cloud.dialogflow.cx.v3.SecuritySettings.fromObject(object.securitySettings); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; - /** - * Metric count. - * @member {number|null|undefined} count - * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.Metric - * @instance - */ - Metric.prototype.count = null; + /** + * Creates a plain object from an UpdateSecuritySettingsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest} message UpdateSecuritySettingsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateSecuritySettingsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.securitySettings = null; + object.updateMask = null; + } + if (message.securitySettings != null && message.hasOwnProperty("securitySettings")) + object.securitySettings = $root.google.cloud.dialogflow.cx.v3.SecuritySettings.toObject(message.securitySettings, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; - /** - * Metric confidenceInterval. - * @member {google.cloud.dialogflow.cx.v3.Experiment.Result.IConfidenceInterval|null|undefined} confidenceInterval - * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.Metric - * @instance - */ - Metric.prototype.confidenceInterval = null; + /** + * Converts this UpdateSecuritySettingsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateSecuritySettingsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Gets the default type url for UpdateSecuritySettingsRequest + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateSecuritySettingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest"; + }; - /** - * Metric value. - * @member {"ratio"|"count"|undefined} value - * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.Metric - * @instance - */ - Object.defineProperty(Metric.prototype, "value", { - get: $util.oneOfGetter($oneOfFields = ["ratio", "count"]), - set: $util.oneOfSetter($oneOfFields) - }); + return UpdateSecuritySettingsRequest; + })(); + + v3.ListSecuritySettingsRequest = (function() { + + /** + * Properties of a ListSecuritySettingsRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IListSecuritySettingsRequest + * @property {string|null} [parent] ListSecuritySettingsRequest parent + * @property {number|null} [pageSize] ListSecuritySettingsRequest pageSize + * @property {string|null} [pageToken] ListSecuritySettingsRequest pageToken + */ - /** - * Creates a new Metric instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.Metric - * @static - * @param {google.cloud.dialogflow.cx.v3.Experiment.Result.IMetric=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.Experiment.Result.Metric} Metric instance - */ - Metric.create = function create(properties) { - return new Metric(properties); - }; + /** + * Constructs a new ListSecuritySettingsRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a ListSecuritySettingsRequest. + * @implements IListSecuritySettingsRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IListSecuritySettingsRequest=} [properties] Properties to set + */ + function ListSecuritySettingsRequest(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]]; + } - /** - * Encodes the specified Metric message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Experiment.Result.Metric.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.Metric - * @static - * @param {google.cloud.dialogflow.cx.v3.Experiment.Result.IMetric} message Metric message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Metric.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); - if (message.ratio != null && Object.hasOwnProperty.call(message, "ratio")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.ratio); - if (message.confidenceInterval != null && Object.hasOwnProperty.call(message, "confidenceInterval")) - $root.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval.encode(message.confidenceInterval, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.count != null && Object.hasOwnProperty.call(message, "count")) - writer.uint32(/* id 4, wireType 1 =*/33).double(message.count); - if (message.countType != null && Object.hasOwnProperty.call(message, "countType")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.countType); - return writer; - }; + /** + * ListSecuritySettingsRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest + * @instance + */ + ListSecuritySettingsRequest.prototype.parent = ""; - /** - * Encodes the specified Metric message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Experiment.Result.Metric.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.Metric - * @static - * @param {google.cloud.dialogflow.cx.v3.Experiment.Result.IMetric} message Metric message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Metric.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * ListSecuritySettingsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest + * @instance + */ + ListSecuritySettingsRequest.prototype.pageSize = 0; - /** - * Decodes a Metric message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.Metric - * @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.Experiment.Result.Metric} Metric - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Metric.decode = function decode(reader, length, error) { - 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.Experiment.Result.Metric(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.type = reader.int32(); - break; - } - case 5: { - message.countType = reader.int32(); - break; - } - case 2: { - message.ratio = reader.double(); - break; - } - case 4: { - message.count = reader.double(); - break; - } - case 3: { - message.confidenceInterval = $root.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * ListSecuritySettingsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest + * @instance + */ + ListSecuritySettingsRequest.prototype.pageToken = ""; - /** - * Decodes a Metric message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.Metric - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.Experiment.Result.Metric} Metric - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Metric.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a new ListSecuritySettingsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IListSecuritySettingsRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest} ListSecuritySettingsRequest instance + */ + ListSecuritySettingsRequest.create = function create(properties) { + return new ListSecuritySettingsRequest(properties); + }; - /** - * Verifies a Metric message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.Metric - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Metric.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - if (message.countType != null && message.hasOwnProperty("countType")) - switch (message.countType) { - default: - return "countType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.ratio != null && message.hasOwnProperty("ratio")) { - properties.value = 1; - if (typeof message.ratio !== "number") - return "ratio: number expected"; - } - if (message.count != null && message.hasOwnProperty("count")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - if (typeof message.count !== "number") - return "count: number expected"; - } - if (message.confidenceInterval != null && message.hasOwnProperty("confidenceInterval")) { - var error = $root.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval.verify(message.confidenceInterval); - if (error) - return "confidenceInterval." + error; - } - return null; - }; + /** + * Encodes the specified ListSecuritySettingsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IListSecuritySettingsRequest} message ListSecuritySettingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListSecuritySettingsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; - /** - * Creates a Metric message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.Metric - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.Experiment.Result.Metric} Metric - */ - Metric.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric(); - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "METRIC_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "CONTAINED_SESSION_NO_CALLBACK_RATE": - case 1: - message.type = 1; - break; - case "LIVE_AGENT_HANDOFF_RATE": - case 2: - message.type = 2; - break; - case "CALLBACK_SESSION_RATE": - case 3: - message.type = 3; - break; - case "ABANDONED_SESSION_RATE": - case 4: - message.type = 4; - break; - case "SESSION_END_RATE": - case 5: - message.type = 5; + /** + * Encodes the specified ListSecuritySettingsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IListSecuritySettingsRequest} message ListSecuritySettingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListSecuritySettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListSecuritySettingsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest + * @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.ListSecuritySettingsRequest} ListSecuritySettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListSecuritySettingsRequest.decode = function decode(reader, length, error) { + 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.ListSecuritySettingsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); break; } - switch (object.countType) { - default: - if (typeof object.countType === "number") { - message.countType = object.countType; - break; - } - break; - case "COUNT_TYPE_UNSPECIFIED": - case 0: - message.countType = 0; - break; - case "TOTAL_NO_MATCH_COUNT": - case 1: - message.countType = 1; - break; - case "TOTAL_TURN_COUNT": - case 2: - message.countType = 2; - break; - case "AVERAGE_TURN_COUNT": - case 3: - message.countType = 3; + case 2: { + message.pageSize = reader.int32(); break; } - if (object.ratio != null) - message.ratio = Number(object.ratio); - if (object.count != null) - message.count = Number(object.count); - if (object.confidenceInterval != null) { - if (typeof object.confidenceInterval !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.Experiment.Result.Metric.confidenceInterval: object expected"); - message.confidenceInterval = $root.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval.fromObject(object.confidenceInterval); + case 3: { + message.pageToken = reader.string(); + break; } - return message; - }; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Creates a plain object from a Metric message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.Metric - * @static - * @param {google.cloud.dialogflow.cx.v3.Experiment.Result.Metric} message Metric - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Metric.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.type = options.enums === String ? "METRIC_UNSPECIFIED" : 0; - object.confidenceInterval = null; - object.countType = options.enums === String ? "COUNT_TYPE_UNSPECIFIED" : 0; - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType[message.type] === undefined ? message.type : $root.google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType[message.type] : message.type; - if (message.ratio != null && message.hasOwnProperty("ratio")) { - object.ratio = options.json && !isFinite(message.ratio) ? String(message.ratio) : message.ratio; - if (options.oneofs) - object.value = "ratio"; - } - if (message.confidenceInterval != null && message.hasOwnProperty("confidenceInterval")) - object.confidenceInterval = $root.google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval.toObject(message.confidenceInterval, options); - if (message.count != null && message.hasOwnProperty("count")) { - object.count = options.json && !isFinite(message.count) ? String(message.count) : message.count; - if (options.oneofs) - object.value = "count"; - } - if (message.countType != null && message.hasOwnProperty("countType")) - object.countType = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.Experiment.Result.CountType[message.countType] === undefined ? message.countType : $root.google.cloud.dialogflow.cx.v3.Experiment.Result.CountType[message.countType] : message.countType; - return object; - }; + /** + * Decodes a ListSecuritySettingsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest} ListSecuritySettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListSecuritySettingsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Converts this Metric to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.Metric - * @instance - * @returns {Object.} JSON object - */ - Metric.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Verifies a ListSecuritySettingsRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListSecuritySettingsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; - /** - * Gets the default type url for Metric - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.Metric - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Metric.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Experiment.Result.Metric"; - }; + /** + * Creates a ListSecuritySettingsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest} ListSecuritySettingsRequest + */ + ListSecuritySettingsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; - return Metric; - })(); + /** + * Creates a plain object from a ListSecuritySettingsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest} message ListSecuritySettingsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListSecuritySettingsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListSecuritySettingsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest + * @instance + * @returns {Object.} JSON object + */ + ListSecuritySettingsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListSecuritySettingsRequest + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListSecuritySettingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest"; + }; - Result.VersionMetrics = (function() { + return ListSecuritySettingsRequest; + })(); - /** - * Properties of a VersionMetrics. - * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result - * @interface IVersionMetrics - * @property {string|null} [version] VersionMetrics version - * @property {Array.|null} [metrics] VersionMetrics metrics - * @property {number|null} [sessionCount] VersionMetrics sessionCount - */ + v3.ListSecuritySettingsResponse = (function() { - /** - * Constructs a new VersionMetrics. - * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result - * @classdesc Represents a VersionMetrics. - * @implements IVersionMetrics - * @constructor - * @param {google.cloud.dialogflow.cx.v3.Experiment.Result.IVersionMetrics=} [properties] Properties to set - */ - function VersionMetrics(properties) { - this.metrics = []; - 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]]; - } + /** + * Properties of a ListSecuritySettingsResponse. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IListSecuritySettingsResponse + * @property {Array.|null} [securitySettings] ListSecuritySettingsResponse securitySettings + * @property {string|null} [nextPageToken] ListSecuritySettingsResponse nextPageToken + */ - /** - * VersionMetrics version. - * @member {string} version - * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics - * @instance - */ - VersionMetrics.prototype.version = ""; + /** + * Constructs a new ListSecuritySettingsResponse. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a ListSecuritySettingsResponse. + * @implements IListSecuritySettingsResponse + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IListSecuritySettingsResponse=} [properties] Properties to set + */ + function ListSecuritySettingsResponse(properties) { + this.securitySettings = []; + 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]]; + } - /** - * VersionMetrics metrics. - * @member {Array.} metrics - * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics - * @instance - */ - VersionMetrics.prototype.metrics = $util.emptyArray; + /** + * ListSecuritySettingsResponse securitySettings. + * @member {Array.} securitySettings + * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse + * @instance + */ + ListSecuritySettingsResponse.prototype.securitySettings = $util.emptyArray; - /** - * VersionMetrics sessionCount. - * @member {number} sessionCount - * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics - * @instance - */ - VersionMetrics.prototype.sessionCount = 0; + /** + * ListSecuritySettingsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse + * @instance + */ + ListSecuritySettingsResponse.prototype.nextPageToken = ""; - /** - * Creates a new VersionMetrics instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics - * @static - * @param {google.cloud.dialogflow.cx.v3.Experiment.Result.IVersionMetrics=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics} VersionMetrics instance - */ - VersionMetrics.create = function create(properties) { - return new VersionMetrics(properties); - }; + /** + * Creates a new ListSecuritySettingsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse + * @static + * @param {google.cloud.dialogflow.cx.v3.IListSecuritySettingsResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse} ListSecuritySettingsResponse instance + */ + ListSecuritySettingsResponse.create = function create(properties) { + return new ListSecuritySettingsResponse(properties); + }; - /** - * Encodes the specified VersionMetrics message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics - * @static - * @param {google.cloud.dialogflow.cx.v3.Experiment.Result.IVersionMetrics} message VersionMetrics message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VersionMetrics.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); - if (message.metrics != null && message.metrics.length) - for (var i = 0; i < message.metrics.length; ++i) - $root.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric.encode(message.metrics[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.sessionCount != null && Object.hasOwnProperty.call(message, "sessionCount")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.sessionCount); - return writer; - }; + /** + * Encodes the specified ListSecuritySettingsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse + * @static + * @param {google.cloud.dialogflow.cx.v3.IListSecuritySettingsResponse} message ListSecuritySettingsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListSecuritySettingsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.securitySettings != null && message.securitySettings.length) + for (var i = 0; i < message.securitySettings.length; ++i) + $root.google.cloud.dialogflow.cx.v3.SecuritySettings.encode(message.securitySettings[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; - /** - * Encodes the specified VersionMetrics message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics - * @static - * @param {google.cloud.dialogflow.cx.v3.Experiment.Result.IVersionMetrics} message VersionMetrics message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VersionMetrics.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified ListSecuritySettingsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse + * @static + * @param {google.cloud.dialogflow.cx.v3.IListSecuritySettingsResponse} message ListSecuritySettingsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListSecuritySettingsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a VersionMetrics message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics - * @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.Experiment.Result.VersionMetrics} VersionMetrics - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VersionMetrics.decode = function decode(reader, length, error) { - 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.Experiment.Result.VersionMetrics(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.version = reader.string(); - break; - } - case 2: { - if (!(message.metrics && message.metrics.length)) - message.metrics = []; - message.metrics.push($root.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric.decode(reader, reader.uint32())); - break; - } - case 3: { - message.sessionCount = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } + /** + * Decodes a ListSecuritySettingsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse + * @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.ListSecuritySettingsResponse} ListSecuritySettingsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListSecuritySettingsResponse.decode = function decode(reader, length, error) { + 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.ListSecuritySettingsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.securitySettings && message.securitySettings.length)) + message.securitySettings = []; + message.securitySettings.push($root.google.cloud.dialogflow.cx.v3.SecuritySettings.decode(reader, reader.uint32())); + break; } - return message; - }; - - /** - * Decodes a VersionMetrics message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics} VersionMetrics - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VersionMetrics.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a VersionMetrics message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - VersionMetrics.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.version != null && message.hasOwnProperty("version")) - if (!$util.isString(message.version)) - return "version: string expected"; - if (message.metrics != null && message.hasOwnProperty("metrics")) { - if (!Array.isArray(message.metrics)) - return "metrics: array expected"; - for (var i = 0; i < message.metrics.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric.verify(message.metrics[i]); - if (error) - return "metrics." + error; - } + case 2: { + message.nextPageToken = reader.string(); + break; } - if (message.sessionCount != null && message.hasOwnProperty("sessionCount")) - if (!$util.isInteger(message.sessionCount)) - return "sessionCount: integer expected"; - return null; - }; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Creates a VersionMetrics message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics} VersionMetrics - */ - VersionMetrics.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics(); - if (object.version != null) - message.version = String(object.version); - if (object.metrics) { - if (!Array.isArray(object.metrics)) - throw TypeError(".google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics.metrics: array expected"); - message.metrics = []; - for (var i = 0; i < object.metrics.length; ++i) { - if (typeof object.metrics[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics.metrics: object expected"); - message.metrics[i] = $root.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric.fromObject(object.metrics[i]); - } - } - if (object.sessionCount != null) - message.sessionCount = object.sessionCount | 0; - return message; - }; + /** + * Decodes a ListSecuritySettingsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse} ListSecuritySettingsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListSecuritySettingsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a plain object from a VersionMetrics message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics - * @static - * @param {google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics} message VersionMetrics - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - VersionMetrics.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.metrics = []; - if (options.defaults) { - object.version = ""; - object.sessionCount = 0; - } - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - if (message.metrics && message.metrics.length) { - object.metrics = []; - for (var j = 0; j < message.metrics.length; ++j) - object.metrics[j] = $root.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric.toObject(message.metrics[j], options); - } - if (message.sessionCount != null && message.hasOwnProperty("sessionCount")) - object.sessionCount = message.sessionCount; - return object; - }; + /** + * Verifies a ListSecuritySettingsResponse message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListSecuritySettingsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.securitySettings != null && message.hasOwnProperty("securitySettings")) { + if (!Array.isArray(message.securitySettings)) + return "securitySettings: array expected"; + for (var i = 0; i < message.securitySettings.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.SecuritySettings.verify(message.securitySettings[i]); + if (error) + return "securitySettings." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; - /** - * Converts this VersionMetrics to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics - * @instance - * @returns {Object.} JSON object - */ - VersionMetrics.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a ListSecuritySettingsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse} ListSecuritySettingsResponse + */ + ListSecuritySettingsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse(); + if (object.securitySettings) { + if (!Array.isArray(object.securitySettings)) + throw TypeError(".google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse.securitySettings: array expected"); + message.securitySettings = []; + for (var i = 0; i < object.securitySettings.length; ++i) { + if (typeof object.securitySettings[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse.securitySettings: object expected"); + message.securitySettings[i] = $root.google.cloud.dialogflow.cx.v3.SecuritySettings.fromObject(object.securitySettings[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; - /** - * Gets the default type url for VersionMetrics - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - VersionMetrics.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics"; - }; + /** + * Creates a plain object from a ListSecuritySettingsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse + * @static + * @param {google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse} message ListSecuritySettingsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListSecuritySettingsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.securitySettings = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.securitySettings && message.securitySettings.length) { + object.securitySettings = []; + for (var j = 0; j < message.securitySettings.length; ++j) + object.securitySettings[j] = $root.google.cloud.dialogflow.cx.v3.SecuritySettings.toObject(message.securitySettings[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; - return VersionMetrics; - })(); + /** + * Converts this ListSecuritySettingsResponse to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse + * @instance + * @returns {Object.} JSON object + */ + ListSecuritySettingsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return Result; - })(); + /** + * Gets the default type url for ListSecuritySettingsResponse + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListSecuritySettingsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse"; + }; - return Experiment; + return ListSecuritySettingsResponse; })(); - v3.VersionVariants = (function() { + v3.CreateSecuritySettingsRequest = (function() { /** - * Properties of a VersionVariants. - * @memberof google.cloud.dialogflow.cx.v3 - * @interface IVersionVariants - * @property {Array.|null} [variants] VersionVariants variants + * Properties of a CreateSecuritySettingsRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface ICreateSecuritySettingsRequest + * @property {string|null} [parent] CreateSecuritySettingsRequest parent + * @property {google.cloud.dialogflow.cx.v3.ISecuritySettings|null} [securitySettings] CreateSecuritySettingsRequest securitySettings */ /** - * Constructs a new VersionVariants. + * Constructs a new CreateSecuritySettingsRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a VersionVariants. - * @implements IVersionVariants + * @classdesc Represents a CreateSecuritySettingsRequest. + * @implements ICreateSecuritySettingsRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IVersionVariants=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.ICreateSecuritySettingsRequest=} [properties] Properties to set */ - function VersionVariants(properties) { - this.variants = []; + function CreateSecuritySettingsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -82090,80 +105842,91 @@ } /** - * VersionVariants variants. - * @member {Array.} variants - * @memberof google.cloud.dialogflow.cx.v3.VersionVariants + * CreateSecuritySettingsRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest * @instance */ - VersionVariants.prototype.variants = $util.emptyArray; + CreateSecuritySettingsRequest.prototype.parent = ""; /** - * Creates a new VersionVariants instance using the specified properties. + * CreateSecuritySettingsRequest securitySettings. + * @member {google.cloud.dialogflow.cx.v3.ISecuritySettings|null|undefined} securitySettings + * @memberof google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest + * @instance + */ + CreateSecuritySettingsRequest.prototype.securitySettings = null; + + /** + * Creates a new CreateSecuritySettingsRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.VersionVariants + * @memberof google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IVersionVariants=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.VersionVariants} VersionVariants instance + * @param {google.cloud.dialogflow.cx.v3.ICreateSecuritySettingsRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest} CreateSecuritySettingsRequest instance */ - VersionVariants.create = function create(properties) { - return new VersionVariants(properties); + CreateSecuritySettingsRequest.create = function create(properties) { + return new CreateSecuritySettingsRequest(properties); }; /** - * Encodes the specified VersionVariants message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.VersionVariants.verify|verify} messages. + * Encodes the specified CreateSecuritySettingsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.VersionVariants + * @memberof google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IVersionVariants} message VersionVariants message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ICreateSecuritySettingsRequest} message CreateSecuritySettingsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VersionVariants.encode = function encode(message, writer) { + CreateSecuritySettingsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.variants != null && message.variants.length) - for (var i = 0; i < message.variants.length; ++i) - $root.google.cloud.dialogflow.cx.v3.VersionVariants.Variant.encode(message.variants[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.securitySettings != null && Object.hasOwnProperty.call(message, "securitySettings")) + $root.google.cloud.dialogflow.cx.v3.SecuritySettings.encode(message.securitySettings, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified VersionVariants message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.VersionVariants.verify|verify} messages. + * Encodes the specified CreateSecuritySettingsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.VersionVariants + * @memberof google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IVersionVariants} message VersionVariants message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ICreateSecuritySettingsRequest} message CreateSecuritySettingsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VersionVariants.encodeDelimited = function encodeDelimited(message, writer) { + CreateSecuritySettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a VersionVariants message from the specified reader or buffer. + * Decodes a CreateSecuritySettingsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.VersionVariants + * @memberof google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest * @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.VersionVariants} VersionVariants + * @returns {google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest} CreateSecuritySettingsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VersionVariants.decode = function decode(reader, length, error) { + CreateSecuritySettingsRequest.decode = function decode(reader, length, error) { 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.VersionVariants(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - if (!(message.variants && message.variants.length)) - message.variants = []; - message.variants.push($root.google.cloud.dialogflow.cx.v3.VersionVariants.Variant.decode(reader, reader.uint32())); + message.parent = reader.string(); + break; + } + case 2: { + message.securitySettings = $root.google.cloud.dialogflow.cx.v3.SecuritySettings.decode(reader, reader.uint32()); break; } default: @@ -82175,392 +105938,136 @@ }; /** - * Decodes a VersionVariants message from the specified reader or buffer, length delimited. + * Decodes a CreateSecuritySettingsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.VersionVariants + * @memberof google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.VersionVariants} VersionVariants + * @returns {google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest} CreateSecuritySettingsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VersionVariants.decodeDelimited = function decodeDelimited(reader) { + CreateSecuritySettingsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a VersionVariants message. + * Verifies a CreateSecuritySettingsRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.VersionVariants + * @memberof google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - VersionVariants.verify = function verify(message) { + CreateSecuritySettingsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.variants != null && message.hasOwnProperty("variants")) { - if (!Array.isArray(message.variants)) - return "variants: array expected"; - for (var i = 0; i < message.variants.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.VersionVariants.Variant.verify(message.variants[i]); - if (error) - return "variants." + error; - } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.securitySettings != null && message.hasOwnProperty("securitySettings")) { + var error = $root.google.cloud.dialogflow.cx.v3.SecuritySettings.verify(message.securitySettings); + if (error) + return "securitySettings." + error; } return null; }; /** - * Creates a VersionVariants message from a plain object. Also converts values to their respective internal types. + * Creates a CreateSecuritySettingsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.VersionVariants + * @memberof google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.VersionVariants} VersionVariants + * @returns {google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest} CreateSecuritySettingsRequest */ - VersionVariants.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.VersionVariants) + CreateSecuritySettingsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.VersionVariants(); - if (object.variants) { - if (!Array.isArray(object.variants)) - throw TypeError(".google.cloud.dialogflow.cx.v3.VersionVariants.variants: array expected"); - message.variants = []; - for (var i = 0; i < object.variants.length; ++i) { - if (typeof object.variants[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.VersionVariants.variants: object expected"); - message.variants[i] = $root.google.cloud.dialogflow.cx.v3.VersionVariants.Variant.fromObject(object.variants[i]); - } + var message = new $root.google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.securitySettings != null) { + if (typeof object.securitySettings !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest.securitySettings: object expected"); + message.securitySettings = $root.google.cloud.dialogflow.cx.v3.SecuritySettings.fromObject(object.securitySettings); } return message; }; /** - * Creates a plain object from a VersionVariants message. Also converts values to other types if specified. + * Creates a plain object from a CreateSecuritySettingsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.VersionVariants + * @memberof google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.VersionVariants} message VersionVariants + * @param {google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest} message CreateSecuritySettingsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - VersionVariants.toObject = function toObject(message, options) { + CreateSecuritySettingsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.variants = []; - if (message.variants && message.variants.length) { - object.variants = []; - for (var j = 0; j < message.variants.length; ++j) - object.variants[j] = $root.google.cloud.dialogflow.cx.v3.VersionVariants.Variant.toObject(message.variants[j], options); + if (options.defaults) { + object.parent = ""; + object.securitySettings = null; } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.securitySettings != null && message.hasOwnProperty("securitySettings")) + object.securitySettings = $root.google.cloud.dialogflow.cx.v3.SecuritySettings.toObject(message.securitySettings, options); return object; }; /** - * Converts this VersionVariants to JSON. + * Converts this CreateSecuritySettingsRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.VersionVariants + * @memberof google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest * @instance * @returns {Object.} JSON object */ - VersionVariants.prototype.toJSON = function toJSON() { + CreateSecuritySettingsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for VersionVariants + * Gets the default type url for CreateSecuritySettingsRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.VersionVariants + * @memberof google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - VersionVariants.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateSecuritySettingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.VersionVariants"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest"; }; - VersionVariants.Variant = (function() { - - /** - * Properties of a Variant. - * @memberof google.cloud.dialogflow.cx.v3.VersionVariants - * @interface IVariant - * @property {string|null} [version] Variant version - * @property {number|null} [trafficAllocation] Variant trafficAllocation - * @property {boolean|null} [isControlGroup] Variant isControlGroup - */ - - /** - * Constructs a new Variant. - * @memberof google.cloud.dialogflow.cx.v3.VersionVariants - * @classdesc Represents a Variant. - * @implements IVariant - * @constructor - * @param {google.cloud.dialogflow.cx.v3.VersionVariants.IVariant=} [properties] Properties to set - */ - function Variant(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]]; - } - - /** - * Variant version. - * @member {string} version - * @memberof google.cloud.dialogflow.cx.v3.VersionVariants.Variant - * @instance - */ - Variant.prototype.version = ""; - - /** - * Variant trafficAllocation. - * @member {number} trafficAllocation - * @memberof google.cloud.dialogflow.cx.v3.VersionVariants.Variant - * @instance - */ - Variant.prototype.trafficAllocation = 0; - - /** - * Variant isControlGroup. - * @member {boolean} isControlGroup - * @memberof google.cloud.dialogflow.cx.v3.VersionVariants.Variant - * @instance - */ - Variant.prototype.isControlGroup = false; - - /** - * Creates a new Variant instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.VersionVariants.Variant - * @static - * @param {google.cloud.dialogflow.cx.v3.VersionVariants.IVariant=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.VersionVariants.Variant} Variant instance - */ - Variant.create = function create(properties) { - return new Variant(properties); - }; - - /** - * Encodes the specified Variant message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.VersionVariants.Variant.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.VersionVariants.Variant - * @static - * @param {google.cloud.dialogflow.cx.v3.VersionVariants.IVariant} message Variant message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Variant.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); - if (message.trafficAllocation != null && Object.hasOwnProperty.call(message, "trafficAllocation")) - writer.uint32(/* id 2, wireType 5 =*/21).float(message.trafficAllocation); - if (message.isControlGroup != null && Object.hasOwnProperty.call(message, "isControlGroup")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.isControlGroup); - return writer; - }; - - /** - * Encodes the specified Variant message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.VersionVariants.Variant.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.VersionVariants.Variant - * @static - * @param {google.cloud.dialogflow.cx.v3.VersionVariants.IVariant} message Variant message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Variant.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Variant message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.VersionVariants.Variant - * @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.VersionVariants.Variant} Variant - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Variant.decode = function decode(reader, length, error) { - 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.VersionVariants.Variant(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.version = reader.string(); - break; - } - case 2: { - message.trafficAllocation = reader.float(); - break; - } - case 3: { - message.isControlGroup = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Variant message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.VersionVariants.Variant - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.VersionVariants.Variant} Variant - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Variant.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Variant message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.VersionVariants.Variant - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Variant.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.version != null && message.hasOwnProperty("version")) - if (!$util.isString(message.version)) - return "version: string expected"; - if (message.trafficAllocation != null && message.hasOwnProperty("trafficAllocation")) - if (typeof message.trafficAllocation !== "number") - return "trafficAllocation: number expected"; - if (message.isControlGroup != null && message.hasOwnProperty("isControlGroup")) - if (typeof message.isControlGroup !== "boolean") - return "isControlGroup: boolean expected"; - return null; - }; - - /** - * Creates a Variant message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.VersionVariants.Variant - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.VersionVariants.Variant} Variant - */ - Variant.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.VersionVariants.Variant) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.VersionVariants.Variant(); - if (object.version != null) - message.version = String(object.version); - if (object.trafficAllocation != null) - message.trafficAllocation = Number(object.trafficAllocation); - if (object.isControlGroup != null) - message.isControlGroup = Boolean(object.isControlGroup); - return message; - }; - - /** - * Creates a plain object from a Variant message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.VersionVariants.Variant - * @static - * @param {google.cloud.dialogflow.cx.v3.VersionVariants.Variant} message Variant - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Variant.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.version = ""; - object.trafficAllocation = 0; - object.isControlGroup = false; - } - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - if (message.trafficAllocation != null && message.hasOwnProperty("trafficAllocation")) - object.trafficAllocation = options.json && !isFinite(message.trafficAllocation) ? String(message.trafficAllocation) : message.trafficAllocation; - if (message.isControlGroup != null && message.hasOwnProperty("isControlGroup")) - object.isControlGroup = message.isControlGroup; - return object; - }; - - /** - * Converts this Variant to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.VersionVariants.Variant - * @instance - * @returns {Object.} JSON object - */ - Variant.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Variant - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.VersionVariants.Variant - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Variant.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.VersionVariants.Variant"; - }; - - return Variant; - })(); - - return VersionVariants; + return CreateSecuritySettingsRequest; })(); - v3.VariantsHistory = (function() { + v3.DeleteSecuritySettingsRequest = (function() { /** - * Properties of a VariantsHistory. + * Properties of a DeleteSecuritySettingsRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IVariantsHistory - * @property {google.cloud.dialogflow.cx.v3.IVersionVariants|null} [versionVariants] VariantsHistory versionVariants - * @property {google.protobuf.ITimestamp|null} [updateTime] VariantsHistory updateTime + * @interface IDeleteSecuritySettingsRequest + * @property {string|null} [name] DeleteSecuritySettingsRequest name */ /** - * Constructs a new VariantsHistory. + * Constructs a new DeleteSecuritySettingsRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a VariantsHistory. - * @implements IVariantsHistory + * @classdesc Represents a DeleteSecuritySettingsRequest. + * @implements IDeleteSecuritySettingsRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IVariantsHistory=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IDeleteSecuritySettingsRequest=} [properties] Properties to set */ - function VariantsHistory(properties) { + function DeleteSecuritySettingsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -82568,105 +106075,77 @@ } /** - * VariantsHistory versionVariants. - * @member {google.cloud.dialogflow.cx.v3.IVersionVariants|null|undefined} versionVariants - * @memberof google.cloud.dialogflow.cx.v3.VariantsHistory - * @instance - */ - VariantsHistory.prototype.versionVariants = null; - - /** - * VariantsHistory updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.dialogflow.cx.v3.VariantsHistory - * @instance - */ - VariantsHistory.prototype.updateTime = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * VariantsHistory variants. - * @member {"versionVariants"|undefined} variants - * @memberof google.cloud.dialogflow.cx.v3.VariantsHistory + * DeleteSecuritySettingsRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest * @instance */ - Object.defineProperty(VariantsHistory.prototype, "variants", { - get: $util.oneOfGetter($oneOfFields = ["versionVariants"]), - set: $util.oneOfSetter($oneOfFields) - }); + DeleteSecuritySettingsRequest.prototype.name = ""; /** - * Creates a new VariantsHistory instance using the specified properties. + * Creates a new DeleteSecuritySettingsRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.VariantsHistory + * @memberof google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IVariantsHistory=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.VariantsHistory} VariantsHistory instance + * @param {google.cloud.dialogflow.cx.v3.IDeleteSecuritySettingsRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest} DeleteSecuritySettingsRequest instance */ - VariantsHistory.create = function create(properties) { - return new VariantsHistory(properties); + DeleteSecuritySettingsRequest.create = function create(properties) { + return new DeleteSecuritySettingsRequest(properties); }; /** - * Encodes the specified VariantsHistory message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.VariantsHistory.verify|verify} messages. + * Encodes the specified DeleteSecuritySettingsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.VariantsHistory + * @memberof google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IVariantsHistory} message VariantsHistory message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IDeleteSecuritySettingsRequest} message DeleteSecuritySettingsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VariantsHistory.encode = function encode(message, writer) { + DeleteSecuritySettingsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.versionVariants != null && Object.hasOwnProperty.call(message, "versionVariants")) - $root.google.cloud.dialogflow.cx.v3.VersionVariants.encode(message.versionVariants, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified VariantsHistory message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.VariantsHistory.verify|verify} messages. + * Encodes the specified DeleteSecuritySettingsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.VariantsHistory + * @memberof google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IVariantsHistory} message VariantsHistory message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IDeleteSecuritySettingsRequest} message DeleteSecuritySettingsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VariantsHistory.encodeDelimited = function encodeDelimited(message, writer) { + DeleteSecuritySettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a VariantsHistory message from the specified reader or buffer. + * Decodes a DeleteSecuritySettingsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.VariantsHistory + * @memberof google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest * @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.VariantsHistory} VariantsHistory + * @returns {google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest} DeleteSecuritySettingsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VariantsHistory.decode = function decode(reader, length, error) { + DeleteSecuritySettingsRequest.decode = function decode(reader, length, error) { 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.VariantsHistory(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.versionVariants = $root.google.cloud.dialogflow.cx.v3.VersionVariants.decode(reader, reader.uint32()); - break; - } - case 2: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.name = reader.string(); break; } default: @@ -82678,149 +106157,133 @@ }; /** - * Decodes a VariantsHistory message from the specified reader or buffer, length delimited. + * Decodes a DeleteSecuritySettingsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.VariantsHistory + * @memberof google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.VariantsHistory} VariantsHistory + * @returns {google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest} DeleteSecuritySettingsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VariantsHistory.decodeDelimited = function decodeDelimited(reader) { + DeleteSecuritySettingsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a VariantsHistory message. + * Verifies a DeleteSecuritySettingsRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.VariantsHistory + * @memberof google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - VariantsHistory.verify = function verify(message) { + DeleteSecuritySettingsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.versionVariants != null && message.hasOwnProperty("versionVariants")) { - properties.variants = 1; - { - var error = $root.google.cloud.dialogflow.cx.v3.VersionVariants.verify(message.versionVariants); - if (error) - return "versionVariants." + error; - } - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a VariantsHistory message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteSecuritySettingsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.VariantsHistory + * @memberof google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.VariantsHistory} VariantsHistory + * @returns {google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest} DeleteSecuritySettingsRequest */ - VariantsHistory.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.VariantsHistory) + DeleteSecuritySettingsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.VariantsHistory(); - if (object.versionVariants != null) { - if (typeof object.versionVariants !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.VariantsHistory.versionVariants: object expected"); - message.versionVariants = $root.google.cloud.dialogflow.cx.v3.VersionVariants.fromObject(object.versionVariants); - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.VariantsHistory.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } + var message = new $root.google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a VariantsHistory message. Also converts values to other types if specified. + * Creates a plain object from a DeleteSecuritySettingsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.VariantsHistory + * @memberof google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.VariantsHistory} message VariantsHistory + * @param {google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest} message DeleteSecuritySettingsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - VariantsHistory.toObject = function toObject(message, options) { + DeleteSecuritySettingsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) - object.updateTime = null; - if (message.versionVariants != null && message.hasOwnProperty("versionVariants")) { - object.versionVariants = $root.google.cloud.dialogflow.cx.v3.VersionVariants.toObject(message.versionVariants, options); - if (options.oneofs) - object.variants = "versionVariants"; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this VariantsHistory to JSON. + * Converts this DeleteSecuritySettingsRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.VariantsHistory + * @memberof google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest * @instance * @returns {Object.} JSON object */ - VariantsHistory.prototype.toJSON = function toJSON() { + DeleteSecuritySettingsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for VariantsHistory + * Gets the default type url for DeleteSecuritySettingsRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.VariantsHistory + * @memberof google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - VariantsHistory.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeleteSecuritySettingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.VariantsHistory"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest"; }; - return VariantsHistory; + return DeleteSecuritySettingsRequest; })(); - v3.RolloutConfig = (function() { + v3.SecuritySettings = (function() { /** - * Properties of a RolloutConfig. + * Properties of a SecuritySettings. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IRolloutConfig - * @property {Array.|null} [rolloutSteps] RolloutConfig rolloutSteps - * @property {string|null} [rolloutCondition] RolloutConfig rolloutCondition - * @property {string|null} [failureCondition] RolloutConfig failureCondition + * @interface ISecuritySettings + * @property {string|null} [name] SecuritySettings name + * @property {string|null} [displayName] SecuritySettings displayName + * @property {google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionStrategy|null} [redactionStrategy] SecuritySettings redactionStrategy + * @property {google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionScope|null} [redactionScope] SecuritySettings redactionScope + * @property {string|null} [inspectTemplate] SecuritySettings inspectTemplate + * @property {string|null} [deidentifyTemplate] SecuritySettings deidentifyTemplate + * @property {number|null} [retentionWindowDays] SecuritySettings retentionWindowDays + * @property {google.cloud.dialogflow.cx.v3.SecuritySettings.RetentionStrategy|null} [retentionStrategy] SecuritySettings retentionStrategy + * @property {Array.|null} [purgeDataTypes] SecuritySettings purgeDataTypes + * @property {google.cloud.dialogflow.cx.v3.SecuritySettings.IAudioExportSettings|null} [audioExportSettings] SecuritySettings audioExportSettings + * @property {google.cloud.dialogflow.cx.v3.SecuritySettings.IInsightsExportSettings|null} [insightsExportSettings] SecuritySettings insightsExportSettings */ /** - * Constructs a new RolloutConfig. + * Constructs a new SecuritySettings. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a RolloutConfig. - * @implements IRolloutConfig + * @classdesc Represents a SecuritySettings. + * @implements ISecuritySettings * @constructor - * @param {google.cloud.dialogflow.cx.v3.IRolloutConfig=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.ISecuritySettings=} [properties] Properties to set */ - function RolloutConfig(properties) { - this.rolloutSteps = []; + function SecuritySettings(properties) { + this.purgeDataTypes = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -82828,108 +106291,242 @@ } /** - * RolloutConfig rolloutSteps. - * @member {Array.} rolloutSteps - * @memberof google.cloud.dialogflow.cx.v3.RolloutConfig + * SecuritySettings name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings * @instance */ - RolloutConfig.prototype.rolloutSteps = $util.emptyArray; + SecuritySettings.prototype.name = ""; /** - * RolloutConfig rolloutCondition. - * @member {string} rolloutCondition - * @memberof google.cloud.dialogflow.cx.v3.RolloutConfig + * SecuritySettings displayName. + * @member {string} displayName + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings * @instance */ - RolloutConfig.prototype.rolloutCondition = ""; + SecuritySettings.prototype.displayName = ""; /** - * RolloutConfig failureCondition. - * @member {string} failureCondition - * @memberof google.cloud.dialogflow.cx.v3.RolloutConfig + * SecuritySettings redactionStrategy. + * @member {google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionStrategy} redactionStrategy + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings * @instance */ - RolloutConfig.prototype.failureCondition = ""; + SecuritySettings.prototype.redactionStrategy = 0; /** - * Creates a new RolloutConfig instance using the specified properties. + * SecuritySettings redactionScope. + * @member {google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionScope} redactionScope + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings + * @instance + */ + SecuritySettings.prototype.redactionScope = 0; + + /** + * SecuritySettings inspectTemplate. + * @member {string} inspectTemplate + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings + * @instance + */ + SecuritySettings.prototype.inspectTemplate = ""; + + /** + * SecuritySettings deidentifyTemplate. + * @member {string} deidentifyTemplate + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings + * @instance + */ + SecuritySettings.prototype.deidentifyTemplate = ""; + + /** + * SecuritySettings retentionWindowDays. + * @member {number|null|undefined} retentionWindowDays + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings + * @instance + */ + SecuritySettings.prototype.retentionWindowDays = null; + + /** + * SecuritySettings retentionStrategy. + * @member {google.cloud.dialogflow.cx.v3.SecuritySettings.RetentionStrategy|null|undefined} retentionStrategy + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings + * @instance + */ + SecuritySettings.prototype.retentionStrategy = null; + + /** + * SecuritySettings purgeDataTypes. + * @member {Array.} purgeDataTypes + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings + * @instance + */ + SecuritySettings.prototype.purgeDataTypes = $util.emptyArray; + + /** + * SecuritySettings audioExportSettings. + * @member {google.cloud.dialogflow.cx.v3.SecuritySettings.IAudioExportSettings|null|undefined} audioExportSettings + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings + * @instance + */ + SecuritySettings.prototype.audioExportSettings = null; + + /** + * SecuritySettings insightsExportSettings. + * @member {google.cloud.dialogflow.cx.v3.SecuritySettings.IInsightsExportSettings|null|undefined} insightsExportSettings + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings + * @instance + */ + SecuritySettings.prototype.insightsExportSettings = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SecuritySettings dataRetention. + * @member {"retentionWindowDays"|"retentionStrategy"|undefined} dataRetention + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings + * @instance + */ + Object.defineProperty(SecuritySettings.prototype, "dataRetention", { + get: $util.oneOfGetter($oneOfFields = ["retentionWindowDays", "retentionStrategy"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SecuritySettings instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.RolloutConfig + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings * @static - * @param {google.cloud.dialogflow.cx.v3.IRolloutConfig=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.RolloutConfig} RolloutConfig instance + * @param {google.cloud.dialogflow.cx.v3.ISecuritySettings=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.SecuritySettings} SecuritySettings instance */ - RolloutConfig.create = function create(properties) { - return new RolloutConfig(properties); + SecuritySettings.create = function create(properties) { + return new SecuritySettings(properties); }; /** - * Encodes the specified RolloutConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.RolloutConfig.verify|verify} messages. + * Encodes the specified SecuritySettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SecuritySettings.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.RolloutConfig + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings * @static - * @param {google.cloud.dialogflow.cx.v3.IRolloutConfig} message RolloutConfig message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ISecuritySettings} message SecuritySettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RolloutConfig.encode = function encode(message, writer) { + SecuritySettings.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.rolloutSteps != null && message.rolloutSteps.length) - for (var i = 0; i < message.rolloutSteps.length; ++i) - $root.google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep.encode(message.rolloutSteps[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.rolloutCondition != null && Object.hasOwnProperty.call(message, "rolloutCondition")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.rolloutCondition); - if (message.failureCondition != null && Object.hasOwnProperty.call(message, "failureCondition")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.failureCondition); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.redactionStrategy != null && Object.hasOwnProperty.call(message, "redactionStrategy")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.redactionStrategy); + if (message.redactionScope != null && Object.hasOwnProperty.call(message, "redactionScope")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.redactionScope); + if (message.retentionWindowDays != null && Object.hasOwnProperty.call(message, "retentionWindowDays")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.retentionWindowDays); + if (message.retentionStrategy != null && Object.hasOwnProperty.call(message, "retentionStrategy")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.retentionStrategy); + if (message.purgeDataTypes != null && message.purgeDataTypes.length) { + writer.uint32(/* id 8, wireType 2 =*/66).fork(); + for (var i = 0; i < message.purgeDataTypes.length; ++i) + writer.int32(message.purgeDataTypes[i]); + writer.ldelim(); + } + if (message.inspectTemplate != null && Object.hasOwnProperty.call(message, "inspectTemplate")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.inspectTemplate); + if (message.audioExportSettings != null && Object.hasOwnProperty.call(message, "audioExportSettings")) + $root.google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings.encode(message.audioExportSettings, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.insightsExportSettings != null && Object.hasOwnProperty.call(message, "insightsExportSettings")) + $root.google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings.encode(message.insightsExportSettings, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.deidentifyTemplate != null && Object.hasOwnProperty.call(message, "deidentifyTemplate")) + writer.uint32(/* id 17, wireType 2 =*/138).string(message.deidentifyTemplate); return writer; }; /** - * Encodes the specified RolloutConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.RolloutConfig.verify|verify} messages. + * Encodes the specified SecuritySettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SecuritySettings.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.RolloutConfig + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings * @static - * @param {google.cloud.dialogflow.cx.v3.IRolloutConfig} message RolloutConfig message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ISecuritySettings} message SecuritySettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RolloutConfig.encodeDelimited = function encodeDelimited(message, writer) { + SecuritySettings.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RolloutConfig message from the specified reader or buffer. + * Decodes a SecuritySettings message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.RolloutConfig + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings * @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.RolloutConfig} RolloutConfig + * @returns {google.cloud.dialogflow.cx.v3.SecuritySettings} SecuritySettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RolloutConfig.decode = function decode(reader, length, error) { + SecuritySettings.decode = function decode(reader, length, error) { 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.RolloutConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.SecuritySettings(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - if (!(message.rolloutSteps && message.rolloutSteps.length)) - message.rolloutSteps = []; - message.rolloutSteps.push($root.google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep.decode(reader, reader.uint32())); + message.name = reader.string(); break; } case 2: { - message.rolloutCondition = reader.string(); + message.displayName = reader.string(); break; } case 3: { - message.failureCondition = reader.string(); + message.redactionStrategy = reader.int32(); + break; + } + case 4: { + message.redactionScope = reader.int32(); + break; + } + case 9: { + message.inspectTemplate = reader.string(); + break; + } + case 17: { + message.deidentifyTemplate = reader.string(); + break; + } + case 6: { + message.retentionWindowDays = reader.int32(); + break; + } + case 7: { + message.retentionStrategy = reader.int32(); + break; + } + case 8: { + if (!(message.purgeDataTypes && message.purgeDataTypes.length)) + message.purgeDataTypes = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.purgeDataTypes.push(reader.int32()); + } else + message.purgeDataTypes.push(reader.int32()); + break; + } + case 12: { + message.audioExportSettings = $root.google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings.decode(reader, reader.uint32()); + break; + } + case 13: { + message.insightsExportSettings = $root.google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings.decode(reader, reader.uint32()); break; } default: @@ -82941,156 +106538,711 @@ }; /** - * Decodes a RolloutConfig message from the specified reader or buffer, length delimited. + * Decodes a SecuritySettings message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.RolloutConfig + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.RolloutConfig} RolloutConfig + * @returns {google.cloud.dialogflow.cx.v3.SecuritySettings} SecuritySettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RolloutConfig.decodeDelimited = function decodeDelimited(reader) { + SecuritySettings.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RolloutConfig message. + * Verifies a SecuritySettings message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.RolloutConfig + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RolloutConfig.verify = function verify(message) { + SecuritySettings.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.rolloutSteps != null && message.hasOwnProperty("rolloutSteps")) { - if (!Array.isArray(message.rolloutSteps)) - return "rolloutSteps: array expected"; - for (var i = 0; i < message.rolloutSteps.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep.verify(message.rolloutSteps[i]); - if (error) - return "rolloutSteps." + error; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.redactionStrategy != null && message.hasOwnProperty("redactionStrategy")) + switch (message.redactionStrategy) { + default: + return "redactionStrategy: enum value expected"; + case 0: + case 1: + break; + } + if (message.redactionScope != null && message.hasOwnProperty("redactionScope")) + switch (message.redactionScope) { + default: + return "redactionScope: enum value expected"; + case 0: + case 2: + break; } + if (message.inspectTemplate != null && message.hasOwnProperty("inspectTemplate")) + if (!$util.isString(message.inspectTemplate)) + return "inspectTemplate: string expected"; + if (message.deidentifyTemplate != null && message.hasOwnProperty("deidentifyTemplate")) + if (!$util.isString(message.deidentifyTemplate)) + return "deidentifyTemplate: string expected"; + if (message.retentionWindowDays != null && message.hasOwnProperty("retentionWindowDays")) { + properties.dataRetention = 1; + if (!$util.isInteger(message.retentionWindowDays)) + return "retentionWindowDays: integer expected"; + } + if (message.retentionStrategy != null && message.hasOwnProperty("retentionStrategy")) { + if (properties.dataRetention === 1) + return "dataRetention: multiple values"; + properties.dataRetention = 1; + switch (message.retentionStrategy) { + default: + return "retentionStrategy: enum value expected"; + case 0: + case 1: + break; + } + } + if (message.purgeDataTypes != null && message.hasOwnProperty("purgeDataTypes")) { + if (!Array.isArray(message.purgeDataTypes)) + return "purgeDataTypes: array expected"; + for (var i = 0; i < message.purgeDataTypes.length; ++i) + switch (message.purgeDataTypes[i]) { + default: + return "purgeDataTypes: enum value[] expected"; + case 0: + case 1: + break; + } + } + if (message.audioExportSettings != null && message.hasOwnProperty("audioExportSettings")) { + var error = $root.google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings.verify(message.audioExportSettings); + if (error) + return "audioExportSettings." + error; + } + if (message.insightsExportSettings != null && message.hasOwnProperty("insightsExportSettings")) { + var error = $root.google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings.verify(message.insightsExportSettings); + if (error) + return "insightsExportSettings." + error; } - if (message.rolloutCondition != null && message.hasOwnProperty("rolloutCondition")) - if (!$util.isString(message.rolloutCondition)) - return "rolloutCondition: string expected"; - if (message.failureCondition != null && message.hasOwnProperty("failureCondition")) - if (!$util.isString(message.failureCondition)) - return "failureCondition: string expected"; return null; }; /** - * Creates a RolloutConfig message from a plain object. Also converts values to their respective internal types. + * Creates a SecuritySettings message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.RolloutConfig + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.RolloutConfig} RolloutConfig + * @returns {google.cloud.dialogflow.cx.v3.SecuritySettings} SecuritySettings */ - RolloutConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.RolloutConfig) + SecuritySettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.SecuritySettings) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.RolloutConfig(); - if (object.rolloutSteps) { - if (!Array.isArray(object.rolloutSteps)) - throw TypeError(".google.cloud.dialogflow.cx.v3.RolloutConfig.rolloutSteps: array expected"); - message.rolloutSteps = []; - for (var i = 0; i < object.rolloutSteps.length; ++i) { - if (typeof object.rolloutSteps[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.RolloutConfig.rolloutSteps: object expected"); - message.rolloutSteps[i] = $root.google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep.fromObject(object.rolloutSteps[i]); + var message = new $root.google.cloud.dialogflow.cx.v3.SecuritySettings(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + switch (object.redactionStrategy) { + default: + if (typeof object.redactionStrategy === "number") { + message.redactionStrategy = object.redactionStrategy; + break; + } + break; + case "REDACTION_STRATEGY_UNSPECIFIED": + case 0: + message.redactionStrategy = 0; + break; + case "REDACT_WITH_SERVICE": + case 1: + message.redactionStrategy = 1; + break; + } + switch (object.redactionScope) { + default: + if (typeof object.redactionScope === "number") { + message.redactionScope = object.redactionScope; + break; + } + break; + case "REDACTION_SCOPE_UNSPECIFIED": + case 0: + message.redactionScope = 0; + break; + case "REDACT_DISK_STORAGE": + case 2: + message.redactionScope = 2; + break; + } + if (object.inspectTemplate != null) + message.inspectTemplate = String(object.inspectTemplate); + if (object.deidentifyTemplate != null) + message.deidentifyTemplate = String(object.deidentifyTemplate); + if (object.retentionWindowDays != null) + message.retentionWindowDays = object.retentionWindowDays | 0; + switch (object.retentionStrategy) { + default: + if (typeof object.retentionStrategy === "number") { + message.retentionStrategy = object.retentionStrategy; + break; } + break; + case "RETENTION_STRATEGY_UNSPECIFIED": + case 0: + message.retentionStrategy = 0; + break; + case "REMOVE_AFTER_CONVERSATION": + case 1: + message.retentionStrategy = 1; + break; + } + if (object.purgeDataTypes) { + if (!Array.isArray(object.purgeDataTypes)) + throw TypeError(".google.cloud.dialogflow.cx.v3.SecuritySettings.purgeDataTypes: array expected"); + message.purgeDataTypes = []; + for (var i = 0; i < object.purgeDataTypes.length; ++i) + switch (object.purgeDataTypes[i]) { + default: + if (typeof object.purgeDataTypes[i] === "number") { + message.purgeDataTypes[i] = object.purgeDataTypes[i]; + break; + } + case "PURGE_DATA_TYPE_UNSPECIFIED": + case 0: + message.purgeDataTypes[i] = 0; + break; + case "DIALOGFLOW_HISTORY": + case 1: + message.purgeDataTypes[i] = 1; + break; + } + } + if (object.audioExportSettings != null) { + if (typeof object.audioExportSettings !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.SecuritySettings.audioExportSettings: object expected"); + message.audioExportSettings = $root.google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings.fromObject(object.audioExportSettings); + } + if (object.insightsExportSettings != null) { + if (typeof object.insightsExportSettings !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.SecuritySettings.insightsExportSettings: object expected"); + message.insightsExportSettings = $root.google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings.fromObject(object.insightsExportSettings); } - if (object.rolloutCondition != null) - message.rolloutCondition = String(object.rolloutCondition); - if (object.failureCondition != null) - message.failureCondition = String(object.failureCondition); return message; }; /** - * Creates a plain object from a RolloutConfig message. Also converts values to other types if specified. + * Creates a plain object from a SecuritySettings message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.RolloutConfig + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings * @static - * @param {google.cloud.dialogflow.cx.v3.RolloutConfig} message RolloutConfig + * @param {google.cloud.dialogflow.cx.v3.SecuritySettings} message SecuritySettings * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RolloutConfig.toObject = function toObject(message, options) { + SecuritySettings.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.rolloutSteps = []; + object.purgeDataTypes = []; if (options.defaults) { - object.rolloutCondition = ""; - object.failureCondition = ""; + object.name = ""; + object.displayName = ""; + object.redactionStrategy = options.enums === String ? "REDACTION_STRATEGY_UNSPECIFIED" : 0; + object.redactionScope = options.enums === String ? "REDACTION_SCOPE_UNSPECIFIED" : 0; + object.inspectTemplate = ""; + object.audioExportSettings = null; + object.insightsExportSettings = null; + object.deidentifyTemplate = ""; } - if (message.rolloutSteps && message.rolloutSteps.length) { - object.rolloutSteps = []; - for (var j = 0; j < message.rolloutSteps.length; ++j) - object.rolloutSteps[j] = $root.google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep.toObject(message.rolloutSteps[j], options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.redactionStrategy != null && message.hasOwnProperty("redactionStrategy")) + object.redactionStrategy = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionStrategy[message.redactionStrategy] === undefined ? message.redactionStrategy : $root.google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionStrategy[message.redactionStrategy] : message.redactionStrategy; + if (message.redactionScope != null && message.hasOwnProperty("redactionScope")) + object.redactionScope = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionScope[message.redactionScope] === undefined ? message.redactionScope : $root.google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionScope[message.redactionScope] : message.redactionScope; + if (message.retentionWindowDays != null && message.hasOwnProperty("retentionWindowDays")) { + object.retentionWindowDays = message.retentionWindowDays; + if (options.oneofs) + object.dataRetention = "retentionWindowDays"; } - if (message.rolloutCondition != null && message.hasOwnProperty("rolloutCondition")) - object.rolloutCondition = message.rolloutCondition; - if (message.failureCondition != null && message.hasOwnProperty("failureCondition")) - object.failureCondition = message.failureCondition; + if (message.retentionStrategy != null && message.hasOwnProperty("retentionStrategy")) { + object.retentionStrategy = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.SecuritySettings.RetentionStrategy[message.retentionStrategy] === undefined ? message.retentionStrategy : $root.google.cloud.dialogflow.cx.v3.SecuritySettings.RetentionStrategy[message.retentionStrategy] : message.retentionStrategy; + if (options.oneofs) + object.dataRetention = "retentionStrategy"; + } + if (message.purgeDataTypes && message.purgeDataTypes.length) { + object.purgeDataTypes = []; + for (var j = 0; j < message.purgeDataTypes.length; ++j) + object.purgeDataTypes[j] = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.SecuritySettings.PurgeDataType[message.purgeDataTypes[j]] === undefined ? message.purgeDataTypes[j] : $root.google.cloud.dialogflow.cx.v3.SecuritySettings.PurgeDataType[message.purgeDataTypes[j]] : message.purgeDataTypes[j]; + } + if (message.inspectTemplate != null && message.hasOwnProperty("inspectTemplate")) + object.inspectTemplate = message.inspectTemplate; + if (message.audioExportSettings != null && message.hasOwnProperty("audioExportSettings")) + object.audioExportSettings = $root.google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings.toObject(message.audioExportSettings, options); + if (message.insightsExportSettings != null && message.hasOwnProperty("insightsExportSettings")) + object.insightsExportSettings = $root.google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings.toObject(message.insightsExportSettings, options); + if (message.deidentifyTemplate != null && message.hasOwnProperty("deidentifyTemplate")) + object.deidentifyTemplate = message.deidentifyTemplate; return object; }; /** - * Converts this RolloutConfig to JSON. + * Converts this SecuritySettings to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.RolloutConfig + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings * @instance * @returns {Object.} JSON object */ - RolloutConfig.prototype.toJSON = function toJSON() { + SecuritySettings.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * Gets the default type url for RolloutConfig - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.RolloutConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RolloutConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.RolloutConfig"; - }; + /** + * Gets the default type url for SecuritySettings + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SecuritySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.SecuritySettings"; + }; + + /** + * RedactionStrategy enum. + * @name google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionStrategy + * @enum {number} + * @property {number} REDACTION_STRATEGY_UNSPECIFIED=0 REDACTION_STRATEGY_UNSPECIFIED value + * @property {number} REDACT_WITH_SERVICE=1 REDACT_WITH_SERVICE value + */ + SecuritySettings.RedactionStrategy = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "REDACTION_STRATEGY_UNSPECIFIED"] = 0; + values[valuesById[1] = "REDACT_WITH_SERVICE"] = 1; + return values; + })(); + + /** + * RedactionScope enum. + * @name google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionScope + * @enum {number} + * @property {number} REDACTION_SCOPE_UNSPECIFIED=0 REDACTION_SCOPE_UNSPECIFIED value + * @property {number} REDACT_DISK_STORAGE=2 REDACT_DISK_STORAGE value + */ + SecuritySettings.RedactionScope = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "REDACTION_SCOPE_UNSPECIFIED"] = 0; + values[valuesById[2] = "REDACT_DISK_STORAGE"] = 2; + return values; + })(); + + /** + * RetentionStrategy enum. + * @name google.cloud.dialogflow.cx.v3.SecuritySettings.RetentionStrategy + * @enum {number} + * @property {number} RETENTION_STRATEGY_UNSPECIFIED=0 RETENTION_STRATEGY_UNSPECIFIED value + * @property {number} REMOVE_AFTER_CONVERSATION=1 REMOVE_AFTER_CONVERSATION value + */ + SecuritySettings.RetentionStrategy = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RETENTION_STRATEGY_UNSPECIFIED"] = 0; + values[valuesById[1] = "REMOVE_AFTER_CONVERSATION"] = 1; + return values; + })(); + + /** + * PurgeDataType enum. + * @name google.cloud.dialogflow.cx.v3.SecuritySettings.PurgeDataType + * @enum {number} + * @property {number} PURGE_DATA_TYPE_UNSPECIFIED=0 PURGE_DATA_TYPE_UNSPECIFIED value + * @property {number} DIALOGFLOW_HISTORY=1 DIALOGFLOW_HISTORY value + */ + SecuritySettings.PurgeDataType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PURGE_DATA_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DIALOGFLOW_HISTORY"] = 1; + return values; + })(); + + SecuritySettings.AudioExportSettings = (function() { + + /** + * Properties of an AudioExportSettings. + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings + * @interface IAudioExportSettings + * @property {string|null} [gcsBucket] AudioExportSettings gcsBucket + * @property {string|null} [audioExportPattern] AudioExportSettings audioExportPattern + * @property {boolean|null} [enableAudioRedaction] AudioExportSettings enableAudioRedaction + * @property {google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings.AudioFormat|null} [audioFormat] AudioExportSettings audioFormat + * @property {boolean|null} [storeTtsAudio] AudioExportSettings storeTtsAudio + */ + + /** + * Constructs a new AudioExportSettings. + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings + * @classdesc Represents an AudioExportSettings. + * @implements IAudioExportSettings + * @constructor + * @param {google.cloud.dialogflow.cx.v3.SecuritySettings.IAudioExportSettings=} [properties] Properties to set + */ + function AudioExportSettings(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]]; + } + + /** + * AudioExportSettings gcsBucket. + * @member {string} gcsBucket + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings + * @instance + */ + AudioExportSettings.prototype.gcsBucket = ""; + + /** + * AudioExportSettings audioExportPattern. + * @member {string} audioExportPattern + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings + * @instance + */ + AudioExportSettings.prototype.audioExportPattern = ""; + + /** + * AudioExportSettings enableAudioRedaction. + * @member {boolean} enableAudioRedaction + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings + * @instance + */ + AudioExportSettings.prototype.enableAudioRedaction = false; + + /** + * AudioExportSettings audioFormat. + * @member {google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings.AudioFormat} audioFormat + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings + * @instance + */ + AudioExportSettings.prototype.audioFormat = 0; + + /** + * AudioExportSettings storeTtsAudio. + * @member {boolean} storeTtsAudio + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings + * @instance + */ + AudioExportSettings.prototype.storeTtsAudio = false; + + /** + * Creates a new AudioExportSettings instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings + * @static + * @param {google.cloud.dialogflow.cx.v3.SecuritySettings.IAudioExportSettings=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings} AudioExportSettings instance + */ + AudioExportSettings.create = function create(properties) { + return new AudioExportSettings(properties); + }; + + /** + * Encodes the specified AudioExportSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings + * @static + * @param {google.cloud.dialogflow.cx.v3.SecuritySettings.IAudioExportSettings} message AudioExportSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudioExportSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.gcsBucket != null && Object.hasOwnProperty.call(message, "gcsBucket")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.gcsBucket); + if (message.audioExportPattern != null && Object.hasOwnProperty.call(message, "audioExportPattern")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.audioExportPattern); + if (message.enableAudioRedaction != null && Object.hasOwnProperty.call(message, "enableAudioRedaction")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.enableAudioRedaction); + if (message.audioFormat != null && Object.hasOwnProperty.call(message, "audioFormat")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.audioFormat); + if (message.storeTtsAudio != null && Object.hasOwnProperty.call(message, "storeTtsAudio")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.storeTtsAudio); + return writer; + }; + + /** + * Encodes the specified AudioExportSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings + * @static + * @param {google.cloud.dialogflow.cx.v3.SecuritySettings.IAudioExportSettings} message AudioExportSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudioExportSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AudioExportSettings message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings + * @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.SecuritySettings.AudioExportSettings} AudioExportSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudioExportSettings.decode = function decode(reader, length, error) { + 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.SecuritySettings.AudioExportSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.gcsBucket = reader.string(); + break; + } + case 2: { + message.audioExportPattern = reader.string(); + break; + } + case 3: { + message.enableAudioRedaction = reader.bool(); + break; + } + case 4: { + message.audioFormat = reader.int32(); + break; + } + case 6: { + message.storeTtsAudio = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AudioExportSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings} AudioExportSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudioExportSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AudioExportSettings message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AudioExportSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.gcsBucket != null && message.hasOwnProperty("gcsBucket")) + if (!$util.isString(message.gcsBucket)) + return "gcsBucket: string expected"; + if (message.audioExportPattern != null && message.hasOwnProperty("audioExportPattern")) + if (!$util.isString(message.audioExportPattern)) + return "audioExportPattern: string expected"; + if (message.enableAudioRedaction != null && message.hasOwnProperty("enableAudioRedaction")) + if (typeof message.enableAudioRedaction !== "boolean") + return "enableAudioRedaction: boolean expected"; + if (message.audioFormat != null && message.hasOwnProperty("audioFormat")) + switch (message.audioFormat) { + default: + return "audioFormat: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.storeTtsAudio != null && message.hasOwnProperty("storeTtsAudio")) + if (typeof message.storeTtsAudio !== "boolean") + return "storeTtsAudio: boolean expected"; + return null; + }; + + /** + * Creates an AudioExportSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings} AudioExportSettings + */ + AudioExportSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings(); + if (object.gcsBucket != null) + message.gcsBucket = String(object.gcsBucket); + if (object.audioExportPattern != null) + message.audioExportPattern = String(object.audioExportPattern); + if (object.enableAudioRedaction != null) + message.enableAudioRedaction = Boolean(object.enableAudioRedaction); + switch (object.audioFormat) { + default: + if (typeof object.audioFormat === "number") { + message.audioFormat = object.audioFormat; + break; + } + break; + case "AUDIO_FORMAT_UNSPECIFIED": + case 0: + message.audioFormat = 0; + break; + case "MULAW": + case 1: + message.audioFormat = 1; + break; + case "MP3": + case 2: + message.audioFormat = 2; + break; + case "OGG": + case 3: + message.audioFormat = 3; + break; + } + if (object.storeTtsAudio != null) + message.storeTtsAudio = Boolean(object.storeTtsAudio); + return message; + }; + + /** + * Creates a plain object from an AudioExportSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings + * @static + * @param {google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings} message AudioExportSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AudioExportSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.gcsBucket = ""; + object.audioExportPattern = ""; + object.enableAudioRedaction = false; + object.audioFormat = options.enums === String ? "AUDIO_FORMAT_UNSPECIFIED" : 0; + object.storeTtsAudio = false; + } + if (message.gcsBucket != null && message.hasOwnProperty("gcsBucket")) + object.gcsBucket = message.gcsBucket; + if (message.audioExportPattern != null && message.hasOwnProperty("audioExportPattern")) + object.audioExportPattern = message.audioExportPattern; + if (message.enableAudioRedaction != null && message.hasOwnProperty("enableAudioRedaction")) + object.enableAudioRedaction = message.enableAudioRedaction; + if (message.audioFormat != null && message.hasOwnProperty("audioFormat")) + object.audioFormat = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings.AudioFormat[message.audioFormat] === undefined ? message.audioFormat : $root.google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings.AudioFormat[message.audioFormat] : message.audioFormat; + if (message.storeTtsAudio != null && message.hasOwnProperty("storeTtsAudio")) + object.storeTtsAudio = message.storeTtsAudio; + return object; + }; + + /** + * Converts this AudioExportSettings to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings + * @instance + * @returns {Object.} JSON object + */ + AudioExportSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AudioExportSettings + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AudioExportSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings"; + }; + + /** + * AudioFormat enum. + * @name google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings.AudioFormat + * @enum {number} + * @property {number} AUDIO_FORMAT_UNSPECIFIED=0 AUDIO_FORMAT_UNSPECIFIED value + * @property {number} MULAW=1 MULAW value + * @property {number} MP3=2 MP3 value + * @property {number} OGG=3 OGG value + */ + AudioExportSettings.AudioFormat = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "AUDIO_FORMAT_UNSPECIFIED"] = 0; + values[valuesById[1] = "MULAW"] = 1; + values[valuesById[2] = "MP3"] = 2; + values[valuesById[3] = "OGG"] = 3; + return values; + })(); + + return AudioExportSettings; + })(); - RolloutConfig.RolloutStep = (function() { + SecuritySettings.InsightsExportSettings = (function() { /** - * Properties of a RolloutStep. - * @memberof google.cloud.dialogflow.cx.v3.RolloutConfig - * @interface IRolloutStep - * @property {string|null} [displayName] RolloutStep displayName - * @property {number|null} [trafficPercent] RolloutStep trafficPercent - * @property {google.protobuf.IDuration|null} [minDuration] RolloutStep minDuration + * Properties of an InsightsExportSettings. + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings + * @interface IInsightsExportSettings + * @property {boolean|null} [enableInsightsExport] InsightsExportSettings enableInsightsExport */ /** - * Constructs a new RolloutStep. - * @memberof google.cloud.dialogflow.cx.v3.RolloutConfig - * @classdesc Represents a RolloutStep. - * @implements IRolloutStep + * Constructs a new InsightsExportSettings. + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings + * @classdesc Represents an InsightsExportSettings. + * @implements IInsightsExportSettings * @constructor - * @param {google.cloud.dialogflow.cx.v3.RolloutConfig.IRolloutStep=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.SecuritySettings.IInsightsExportSettings=} [properties] Properties to set */ - function RolloutStep(properties) { + function InsightsExportSettings(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -83098,105 +107250,77 @@ } /** - * RolloutStep displayName. - * @member {string} displayName - * @memberof google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep - * @instance - */ - RolloutStep.prototype.displayName = ""; - - /** - * RolloutStep trafficPercent. - * @member {number} trafficPercent - * @memberof google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep - * @instance - */ - RolloutStep.prototype.trafficPercent = 0; - - /** - * RolloutStep minDuration. - * @member {google.protobuf.IDuration|null|undefined} minDuration - * @memberof google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep + * InsightsExportSettings enableInsightsExport. + * @member {boolean} enableInsightsExport + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings * @instance */ - RolloutStep.prototype.minDuration = null; + InsightsExportSettings.prototype.enableInsightsExport = false; /** - * Creates a new RolloutStep instance using the specified properties. + * Creates a new InsightsExportSettings instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings * @static - * @param {google.cloud.dialogflow.cx.v3.RolloutConfig.IRolloutStep=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep} RolloutStep instance + * @param {google.cloud.dialogflow.cx.v3.SecuritySettings.IInsightsExportSettings=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings} InsightsExportSettings instance */ - RolloutStep.create = function create(properties) { - return new RolloutStep(properties); + InsightsExportSettings.create = function create(properties) { + return new InsightsExportSettings(properties); }; /** - * Encodes the specified RolloutStep message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep.verify|verify} messages. + * Encodes the specified InsightsExportSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings * @static - * @param {google.cloud.dialogflow.cx.v3.RolloutConfig.IRolloutStep} message RolloutStep message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.SecuritySettings.IInsightsExportSettings} message InsightsExportSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RolloutStep.encode = function encode(message, writer) { + InsightsExportSettings.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); - if (message.trafficPercent != null && Object.hasOwnProperty.call(message, "trafficPercent")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.trafficPercent); - if (message.minDuration != null && Object.hasOwnProperty.call(message, "minDuration")) - $root.google.protobuf.Duration.encode(message.minDuration, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.enableInsightsExport != null && Object.hasOwnProperty.call(message, "enableInsightsExport")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enableInsightsExport); return writer; }; /** - * Encodes the specified RolloutStep message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep.verify|verify} messages. + * Encodes the specified InsightsExportSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings * @static - * @param {google.cloud.dialogflow.cx.v3.RolloutConfig.IRolloutStep} message RolloutStep message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.SecuritySettings.IInsightsExportSettings} message InsightsExportSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RolloutStep.encodeDelimited = function encodeDelimited(message, writer) { + InsightsExportSettings.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RolloutStep message from the specified reader or buffer. + * Decodes an InsightsExportSettings message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings * @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.RolloutConfig.RolloutStep} RolloutStep + * @returns {google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings} InsightsExportSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RolloutStep.decode = function decode(reader, length, error) { + InsightsExportSettings.decode = function decode(reader, length, error) { 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.RolloutConfig.RolloutStep(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.displayName = reader.string(); - break; - } - case 2: { - message.trafficPercent = reader.int32(); - break; - } - case 3: { - message.minDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + message.enableInsightsExport = reader.bool(); break; } default: @@ -83208,906 +107332,491 @@ }; /** - * Decodes a RolloutStep message from the specified reader or buffer, length delimited. + * Decodes an InsightsExportSettings message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep} RolloutStep + * @returns {google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings} InsightsExportSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RolloutStep.decodeDelimited = function decodeDelimited(reader) { + InsightsExportSettings.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RolloutStep message. + * Verifies an InsightsExportSettings message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RolloutStep.verify = function verify(message) { + InsightsExportSettings.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.trafficPercent != null && message.hasOwnProperty("trafficPercent")) - if (!$util.isInteger(message.trafficPercent)) - return "trafficPercent: integer expected"; - if (message.minDuration != null && message.hasOwnProperty("minDuration")) { - var error = $root.google.protobuf.Duration.verify(message.minDuration); - if (error) - return "minDuration." + error; - } + if (message.enableInsightsExport != null && message.hasOwnProperty("enableInsightsExport")) + if (typeof message.enableInsightsExport !== "boolean") + return "enableInsightsExport: boolean expected"; return null; }; /** - * Creates a RolloutStep message from a plain object. Also converts values to their respective internal types. + * Creates an InsightsExportSettings message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep} RolloutStep + * @returns {google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings} InsightsExportSettings */ - RolloutStep.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep) + InsightsExportSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.trafficPercent != null) - message.trafficPercent = object.trafficPercent | 0; - if (object.minDuration != null) { - if (typeof object.minDuration !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep.minDuration: object expected"); - message.minDuration = $root.google.protobuf.Duration.fromObject(object.minDuration); - } + var message = new $root.google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings(); + if (object.enableInsightsExport != null) + message.enableInsightsExport = Boolean(object.enableInsightsExport); return message; }; /** - * Creates a plain object from a RolloutStep message. Also converts values to other types if specified. + * Creates a plain object from an InsightsExportSettings message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings * @static - * @param {google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep} message RolloutStep + * @param {google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings} message InsightsExportSettings * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RolloutStep.toObject = function toObject(message, options) { + InsightsExportSettings.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.displayName = ""; - object.trafficPercent = 0; - object.minDuration = null; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.trafficPercent != null && message.hasOwnProperty("trafficPercent")) - object.trafficPercent = message.trafficPercent; - if (message.minDuration != null && message.hasOwnProperty("minDuration")) - object.minDuration = $root.google.protobuf.Duration.toObject(message.minDuration, options); + if (options.defaults) + object.enableInsightsExport = false; + if (message.enableInsightsExport != null && message.hasOwnProperty("enableInsightsExport")) + object.enableInsightsExport = message.enableInsightsExport; return object; }; /** - * Converts this RolloutStep to JSON. + * Converts this InsightsExportSettings to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings * @instance * @returns {Object.} JSON object */ - RolloutStep.prototype.toJSON = function toJSON() { + InsightsExportSettings.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for RolloutStep + * Gets the default type url for InsightsExportSettings * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - RolloutStep.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + InsightsExportSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings"; }; - return RolloutStep; + return InsightsExportSettings; })(); - return RolloutConfig; + return SecuritySettings; })(); - v3.RolloutState = (function() { - - /** - * Properties of a RolloutState. - * @memberof google.cloud.dialogflow.cx.v3 - * @interface IRolloutState - * @property {string|null} [step] RolloutState step - * @property {number|null} [stepIndex] RolloutState stepIndex - * @property {google.protobuf.ITimestamp|null} [startTime] RolloutState startTime - */ + v3.Tools = (function() { /** - * Constructs a new RolloutState. + * Constructs a new Tools service. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a RolloutState. - * @implements IRolloutState + * @classdesc Represents a Tools + * @extends $protobuf.rpc.Service * @constructor - * @param {google.cloud.dialogflow.cx.v3.IRolloutState=} [properties] Properties to set + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited */ - function RolloutState(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]]; + function Tools(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); } - /** - * RolloutState step. - * @member {string} step - * @memberof google.cloud.dialogflow.cx.v3.RolloutState - * @instance - */ - RolloutState.prototype.step = ""; - - /** - * RolloutState stepIndex. - * @member {number} stepIndex - * @memberof google.cloud.dialogflow.cx.v3.RolloutState - * @instance - */ - RolloutState.prototype.stepIndex = 0; - - /** - * RolloutState startTime. - * @member {google.protobuf.ITimestamp|null|undefined} startTime - * @memberof google.cloud.dialogflow.cx.v3.RolloutState - * @instance - */ - RolloutState.prototype.startTime = null; + (Tools.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Tools; /** - * Creates a new RolloutState instance using the specified properties. + * Creates new Tools service using the specified rpc implementation. * @function create - * @memberof google.cloud.dialogflow.cx.v3.RolloutState - * @static - * @param {google.cloud.dialogflow.cx.v3.IRolloutState=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.RolloutState} RolloutState instance - */ - RolloutState.create = function create(properties) { - return new RolloutState(properties); - }; - - /** - * Encodes the specified RolloutState message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.RolloutState.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.RolloutState - * @static - * @param {google.cloud.dialogflow.cx.v3.IRolloutState} message RolloutState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RolloutState.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.step != null && Object.hasOwnProperty.call(message, "step")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.step); - if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.stepIndex != null && Object.hasOwnProperty.call(message, "stepIndex")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.stepIndex); - return writer; - }; - - /** - * Encodes the specified RolloutState message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.RolloutState.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.RolloutState - * @static - * @param {google.cloud.dialogflow.cx.v3.IRolloutState} message RolloutState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RolloutState.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RolloutState message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.RolloutState - * @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.RolloutState} RolloutState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RolloutState.decode = function decode(reader, length, error) { - 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.RolloutState(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.step = reader.string(); - break; - } - case 3: { - message.stepIndex = reader.int32(); - break; - } - case 2: { - message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RolloutState message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.RolloutState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.RolloutState} RolloutState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RolloutState.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RolloutState message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.RolloutState - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RolloutState.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.step != null && message.hasOwnProperty("step")) - if (!$util.isString(message.step)) - return "step: string expected"; - if (message.stepIndex != null && message.hasOwnProperty("stepIndex")) - if (!$util.isInteger(message.stepIndex)) - return "stepIndex: integer expected"; - if (message.startTime != null && message.hasOwnProperty("startTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.startTime); - if (error) - return "startTime." + error; - } - return null; - }; - - /** - * Creates a RolloutState message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.RolloutState + * @memberof google.cloud.dialogflow.cx.v3.Tools * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.RolloutState} RolloutState + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Tools} RPC service. Useful where requests and/or responses are streamed. */ - RolloutState.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.RolloutState) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.RolloutState(); - if (object.step != null) - message.step = String(object.step); - if (object.stepIndex != null) - message.stepIndex = object.stepIndex | 0; - if (object.startTime != null) { - if (typeof object.startTime !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.RolloutState.startTime: object expected"); - message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); - } - return message; + Tools.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); }; /** - * Creates a plain object from a RolloutState message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.RolloutState - * @static - * @param {google.cloud.dialogflow.cx.v3.RolloutState} message RolloutState - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Tools|createTool}. + * @memberof google.cloud.dialogflow.cx.v3.Tools + * @typedef CreateToolCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.Tool} [response] Tool */ - RolloutState.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.step = ""; - object.startTime = null; - object.stepIndex = 0; - } - if (message.step != null && message.hasOwnProperty("step")) - object.step = message.step; - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); - if (message.stepIndex != null && message.hasOwnProperty("stepIndex")) - object.stepIndex = message.stepIndex; - return object; - }; /** - * Converts this RolloutState to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.RolloutState + * Calls CreateTool. + * @function createTool + * @memberof google.cloud.dialogflow.cx.v3.Tools * @instance - * @returns {Object.} JSON object - */ - RolloutState.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RolloutState - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.RolloutState - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RolloutState.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.RolloutState"; - }; - - return RolloutState; - })(); - - v3.ListExperimentsRequest = (function() { - - /** - * Properties of a ListExperimentsRequest. - * @memberof google.cloud.dialogflow.cx.v3 - * @interface IListExperimentsRequest - * @property {string|null} [parent] ListExperimentsRequest parent - * @property {number|null} [pageSize] ListExperimentsRequest pageSize - * @property {string|null} [pageToken] ListExperimentsRequest pageToken - */ - - /** - * Constructs a new ListExperimentsRequest. - * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a ListExperimentsRequest. - * @implements IListExperimentsRequest - * @constructor - * @param {google.cloud.dialogflow.cx.v3.IListExperimentsRequest=} [properties] Properties to set - */ - function ListExperimentsRequest(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]]; - } + * @param {google.cloud.dialogflow.cx.v3.ICreateToolRequest} request CreateToolRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Tools.CreateToolCallback} callback Node-style callback called with the error, if any, and Tool + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Tools.prototype.createTool = function createTool(request, callback) { + return this.rpcCall(createTool, $root.google.cloud.dialogflow.cx.v3.CreateToolRequest, $root.google.cloud.dialogflow.cx.v3.Tool, request, callback); + }, "name", { value: "CreateTool" }); /** - * ListExperimentsRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3.ListExperimentsRequest + * Calls CreateTool. + * @function createTool + * @memberof google.cloud.dialogflow.cx.v3.Tools * @instance + * @param {google.cloud.dialogflow.cx.v3.ICreateToolRequest} request CreateToolRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListExperimentsRequest.prototype.parent = ""; /** - * ListExperimentsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dialogflow.cx.v3.ListExperimentsRequest - * @instance + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Tools|listTools}. + * @memberof google.cloud.dialogflow.cx.v3.Tools + * @typedef ListToolsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.ListToolsResponse} [response] ListToolsResponse */ - ListExperimentsRequest.prototype.pageSize = 0; /** - * ListExperimentsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dialogflow.cx.v3.ListExperimentsRequest + * Calls ListTools. + * @function listTools + * @memberof google.cloud.dialogflow.cx.v3.Tools * @instance + * @param {google.cloud.dialogflow.cx.v3.IListToolsRequest} request ListToolsRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Tools.ListToolsCallback} callback Node-style callback called with the error, if any, and ListToolsResponse + * @returns {undefined} + * @variation 1 */ - ListExperimentsRequest.prototype.pageToken = ""; + Object.defineProperty(Tools.prototype.listTools = function listTools(request, callback) { + return this.rpcCall(listTools, $root.google.cloud.dialogflow.cx.v3.ListToolsRequest, $root.google.cloud.dialogflow.cx.v3.ListToolsResponse, request, callback); + }, "name", { value: "ListTools" }); /** - * Creates a new ListExperimentsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.ListExperimentsRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.IListExperimentsRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ListExperimentsRequest} ListExperimentsRequest instance + * Calls ListTools. + * @function listTools + * @memberof google.cloud.dialogflow.cx.v3.Tools + * @instance + * @param {google.cloud.dialogflow.cx.v3.IListToolsRequest} request ListToolsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListExperimentsRequest.create = function create(properties) { - return new ListExperimentsRequest(properties); - }; /** - * Encodes the specified ListExperimentsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListExperimentsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ListExperimentsRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.IListExperimentsRequest} message ListExperimentsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Tools|getTool}. + * @memberof google.cloud.dialogflow.cx.v3.Tools + * @typedef GetToolCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.Tool} [response] Tool */ - ListExperimentsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - return writer; - }; /** - * Encodes the specified ListExperimentsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListExperimentsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListExperimentsRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.IListExperimentsRequest} message ListExperimentsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls GetTool. + * @function getTool + * @memberof google.cloud.dialogflow.cx.v3.Tools + * @instance + * @param {google.cloud.dialogflow.cx.v3.IGetToolRequest} request GetToolRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Tools.GetToolCallback} callback Node-style callback called with the error, if any, and Tool + * @returns {undefined} + * @variation 1 */ - ListExperimentsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + Object.defineProperty(Tools.prototype.getTool = function getTool(request, callback) { + return this.rpcCall(getTool, $root.google.cloud.dialogflow.cx.v3.GetToolRequest, $root.google.cloud.dialogflow.cx.v3.Tool, request, callback); + }, "name", { value: "GetTool" }); /** - * Decodes a ListExperimentsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ListExperimentsRequest - * @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.ListExperimentsRequest} ListExperimentsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls GetTool. + * @function getTool + * @memberof google.cloud.dialogflow.cx.v3.Tools + * @instance + * @param {google.cloud.dialogflow.cx.v3.IGetToolRequest} request GetToolRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListExperimentsRequest.decode = function decode(reader, length, error) { - 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.ListExperimentsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes a ListExperimentsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListExperimentsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ListExperimentsRequest} ListExperimentsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Tools|updateTool}. + * @memberof google.cloud.dialogflow.cx.v3.Tools + * @typedef UpdateToolCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.Tool} [response] Tool */ - ListExperimentsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; /** - * Verifies a ListExperimentsRequest message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ListExperimentsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls UpdateTool. + * @function updateTool + * @memberof google.cloud.dialogflow.cx.v3.Tools + * @instance + * @param {google.cloud.dialogflow.cx.v3.IUpdateToolRequest} request UpdateToolRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Tools.UpdateToolCallback} callback Node-style callback called with the error, if any, and Tool + * @returns {undefined} + * @variation 1 */ - ListExperimentsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - return null; - }; + Object.defineProperty(Tools.prototype.updateTool = function updateTool(request, callback) { + return this.rpcCall(updateTool, $root.google.cloud.dialogflow.cx.v3.UpdateToolRequest, $root.google.cloud.dialogflow.cx.v3.Tool, request, callback); + }, "name", { value: "UpdateTool" }); /** - * Creates a ListExperimentsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ListExperimentsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ListExperimentsRequest} ListExperimentsRequest + * Calls UpdateTool. + * @function updateTool + * @memberof google.cloud.dialogflow.cx.v3.Tools + * @instance + * @param {google.cloud.dialogflow.cx.v3.IUpdateToolRequest} request UpdateToolRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListExperimentsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListExperimentsRequest) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.ListExperimentsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - return message; - }; /** - * Creates a plain object from a ListExperimentsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ListExperimentsRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.ListExperimentsRequest} message ListExperimentsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Tools|deleteTool}. + * @memberof google.cloud.dialogflow.cx.v3.Tools + * @typedef DeleteToolCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty */ - ListExperimentsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - return object; - }; /** - * Converts this ListExperimentsRequest to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ListExperimentsRequest + * Calls DeleteTool. + * @function deleteTool + * @memberof google.cloud.dialogflow.cx.v3.Tools * @instance - * @returns {Object.} JSON object + * @param {google.cloud.dialogflow.cx.v3.IDeleteToolRequest} request DeleteToolRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Tools.DeleteToolCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 */ - ListExperimentsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + Object.defineProperty(Tools.prototype.deleteTool = function deleteTool(request, callback) { + return this.rpcCall(deleteTool, $root.google.cloud.dialogflow.cx.v3.DeleteToolRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteTool" }); /** - * Gets the default type url for ListExperimentsRequest - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.ListExperimentsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * Calls DeleteTool. + * @function deleteTool + * @memberof google.cloud.dialogflow.cx.v3.Tools + * @instance + * @param {google.cloud.dialogflow.cx.v3.IDeleteToolRequest} request DeleteToolRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListExperimentsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListExperimentsRequest"; - }; - - return ListExperimentsRequest; - })(); - - v3.ListExperimentsResponse = (function() { /** - * Properties of a ListExperimentsResponse. - * @memberof google.cloud.dialogflow.cx.v3 - * @interface IListExperimentsResponse - * @property {Array.|null} [experiments] ListExperimentsResponse experiments - * @property {string|null} [nextPageToken] ListExperimentsResponse nextPageToken + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Tools|listToolVersions}. + * @memberof google.cloud.dialogflow.cx.v3.Tools + * @typedef ListToolVersionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.ListToolVersionsResponse} [response] ListToolVersionsResponse */ /** - * Constructs a new ListExperimentsResponse. - * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a ListExperimentsResponse. - * @implements IListExperimentsResponse - * @constructor - * @param {google.cloud.dialogflow.cx.v3.IListExperimentsResponse=} [properties] Properties to set + * Calls ListToolVersions. + * @function listToolVersions + * @memberof google.cloud.dialogflow.cx.v3.Tools + * @instance + * @param {google.cloud.dialogflow.cx.v3.IListToolVersionsRequest} request ListToolVersionsRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Tools.ListToolVersionsCallback} callback Node-style callback called with the error, if any, and ListToolVersionsResponse + * @returns {undefined} + * @variation 1 */ - function ListExperimentsResponse(properties) { - this.experiments = []; - 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]]; - } + Object.defineProperty(Tools.prototype.listToolVersions = function listToolVersions(request, callback) { + return this.rpcCall(listToolVersions, $root.google.cloud.dialogflow.cx.v3.ListToolVersionsRequest, $root.google.cloud.dialogflow.cx.v3.ListToolVersionsResponse, request, callback); + }, "name", { value: "ListToolVersions" }); /** - * ListExperimentsResponse experiments. - * @member {Array.} experiments - * @memberof google.cloud.dialogflow.cx.v3.ListExperimentsResponse + * Calls ListToolVersions. + * @function listToolVersions + * @memberof google.cloud.dialogflow.cx.v3.Tools * @instance + * @param {google.cloud.dialogflow.cx.v3.IListToolVersionsRequest} request ListToolVersionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListExperimentsResponse.prototype.experiments = $util.emptyArray; /** - * ListExperimentsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dialogflow.cx.v3.ListExperimentsResponse + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Tools|createToolVersion}. + * @memberof google.cloud.dialogflow.cx.v3.Tools + * @typedef CreateToolVersionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.ToolVersion} [response] ToolVersion + */ + + /** + * Calls CreateToolVersion. + * @function createToolVersion + * @memberof google.cloud.dialogflow.cx.v3.Tools * @instance + * @param {google.cloud.dialogflow.cx.v3.ICreateToolVersionRequest} request CreateToolVersionRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Tools.CreateToolVersionCallback} callback Node-style callback called with the error, if any, and ToolVersion + * @returns {undefined} + * @variation 1 */ - ListExperimentsResponse.prototype.nextPageToken = ""; + Object.defineProperty(Tools.prototype.createToolVersion = function createToolVersion(request, callback) { + return this.rpcCall(createToolVersion, $root.google.cloud.dialogflow.cx.v3.CreateToolVersionRequest, $root.google.cloud.dialogflow.cx.v3.ToolVersion, request, callback); + }, "name", { value: "CreateToolVersion" }); /** - * Creates a new ListExperimentsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.ListExperimentsResponse - * @static - * @param {google.cloud.dialogflow.cx.v3.IListExperimentsResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ListExperimentsResponse} ListExperimentsResponse instance + * Calls CreateToolVersion. + * @function createToolVersion + * @memberof google.cloud.dialogflow.cx.v3.Tools + * @instance + * @param {google.cloud.dialogflow.cx.v3.ICreateToolVersionRequest} request CreateToolVersionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListExperimentsResponse.create = function create(properties) { - return new ListExperimentsResponse(properties); - }; /** - * Encodes the specified ListExperimentsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListExperimentsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ListExperimentsResponse - * @static - * @param {google.cloud.dialogflow.cx.v3.IListExperimentsResponse} message ListExperimentsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Tools|getToolVersion}. + * @memberof google.cloud.dialogflow.cx.v3.Tools + * @typedef GetToolVersionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.ToolVersion} [response] ToolVersion */ - ListExperimentsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.experiments != null && message.experiments.length) - for (var i = 0; i < message.experiments.length; ++i) - $root.google.cloud.dialogflow.cx.v3.Experiment.encode(message.experiments[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - return writer; - }; /** - * Encodes the specified ListExperimentsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListExperimentsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListExperimentsResponse - * @static - * @param {google.cloud.dialogflow.cx.v3.IListExperimentsResponse} message ListExperimentsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls GetToolVersion. + * @function getToolVersion + * @memberof google.cloud.dialogflow.cx.v3.Tools + * @instance + * @param {google.cloud.dialogflow.cx.v3.IGetToolVersionRequest} request GetToolVersionRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Tools.GetToolVersionCallback} callback Node-style callback called with the error, if any, and ToolVersion + * @returns {undefined} + * @variation 1 */ - ListExperimentsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + Object.defineProperty(Tools.prototype.getToolVersion = function getToolVersion(request, callback) { + return this.rpcCall(getToolVersion, $root.google.cloud.dialogflow.cx.v3.GetToolVersionRequest, $root.google.cloud.dialogflow.cx.v3.ToolVersion, request, callback); + }, "name", { value: "GetToolVersion" }); /** - * Decodes a ListExperimentsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ListExperimentsResponse - * @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.ListExperimentsResponse} ListExperimentsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls GetToolVersion. + * @function getToolVersion + * @memberof google.cloud.dialogflow.cx.v3.Tools + * @instance + * @param {google.cloud.dialogflow.cx.v3.IGetToolVersionRequest} request GetToolVersionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListExperimentsResponse.decode = function decode(reader, length, error) { - 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.ListExperimentsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.experiments && message.experiments.length)) - message.experiments = []; - message.experiments.push($root.google.cloud.dialogflow.cx.v3.Experiment.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes a ListExperimentsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListExperimentsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ListExperimentsResponse} ListExperimentsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Tools|deleteToolVersion}. + * @memberof google.cloud.dialogflow.cx.v3.Tools + * @typedef DeleteToolVersionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty */ - ListExperimentsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; /** - * Verifies a ListExperimentsResponse message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ListExperimentsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls DeleteToolVersion. + * @function deleteToolVersion + * @memberof google.cloud.dialogflow.cx.v3.Tools + * @instance + * @param {google.cloud.dialogflow.cx.v3.IDeleteToolVersionRequest} request DeleteToolVersionRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Tools.DeleteToolVersionCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 */ - ListExperimentsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.experiments != null && message.hasOwnProperty("experiments")) { - if (!Array.isArray(message.experiments)) - return "experiments: array expected"; - for (var i = 0; i < message.experiments.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.Experiment.verify(message.experiments[i]); - if (error) - return "experiments." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; + Object.defineProperty(Tools.prototype.deleteToolVersion = function deleteToolVersion(request, callback) { + return this.rpcCall(deleteToolVersion, $root.google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteToolVersion" }); /** - * Creates a ListExperimentsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ListExperimentsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ListExperimentsResponse} ListExperimentsResponse + * Calls DeleteToolVersion. + * @function deleteToolVersion + * @memberof google.cloud.dialogflow.cx.v3.Tools + * @instance + * @param {google.cloud.dialogflow.cx.v3.IDeleteToolVersionRequest} request DeleteToolVersionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListExperimentsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListExperimentsResponse) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.ListExperimentsResponse(); - if (object.experiments) { - if (!Array.isArray(object.experiments)) - throw TypeError(".google.cloud.dialogflow.cx.v3.ListExperimentsResponse.experiments: array expected"); - message.experiments = []; - for (var i = 0; i < object.experiments.length; ++i) { - if (typeof object.experiments[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.ListExperimentsResponse.experiments: object expected"); - message.experiments[i] = $root.google.cloud.dialogflow.cx.v3.Experiment.fromObject(object.experiments[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; /** - * Creates a plain object from a ListExperimentsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ListExperimentsResponse - * @static - * @param {google.cloud.dialogflow.cx.v3.ListExperimentsResponse} message ListExperimentsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Tools|restoreToolVersion}. + * @memberof google.cloud.dialogflow.cx.v3.Tools + * @typedef RestoreToolVersionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse} [response] RestoreToolVersionResponse */ - ListExperimentsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.experiments = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.experiments && message.experiments.length) { - object.experiments = []; - for (var j = 0; j < message.experiments.length; ++j) - object.experiments[j] = $root.google.cloud.dialogflow.cx.v3.Experiment.toObject(message.experiments[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; /** - * Converts this ListExperimentsResponse to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ListExperimentsResponse + * Calls RestoreToolVersion. + * @function restoreToolVersion + * @memberof google.cloud.dialogflow.cx.v3.Tools * @instance - * @returns {Object.} JSON object + * @param {google.cloud.dialogflow.cx.v3.IRestoreToolVersionRequest} request RestoreToolVersionRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Tools.RestoreToolVersionCallback} callback Node-style callback called with the error, if any, and RestoreToolVersionResponse + * @returns {undefined} + * @variation 1 */ - ListExperimentsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + Object.defineProperty(Tools.prototype.restoreToolVersion = function restoreToolVersion(request, callback) { + return this.rpcCall(restoreToolVersion, $root.google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest, $root.google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse, request, callback); + }, "name", { value: "RestoreToolVersion" }); - /** - * Gets the default type url for ListExperimentsResponse - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.ListExperimentsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + /** + * Calls RestoreToolVersion. + * @function restoreToolVersion + * @memberof google.cloud.dialogflow.cx.v3.Tools + * @instance + * @param {google.cloud.dialogflow.cx.v3.IRestoreToolVersionRequest} request RestoreToolVersionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListExperimentsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListExperimentsResponse"; - }; - return ListExperimentsResponse; + return Tools; })(); - v3.GetExperimentRequest = (function() { + v3.CreateToolRequest = (function() { /** - * Properties of a GetExperimentRequest. + * Properties of a CreateToolRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IGetExperimentRequest - * @property {string|null} [name] GetExperimentRequest name + * @interface ICreateToolRequest + * @property {string|null} [parent] CreateToolRequest parent + * @property {google.cloud.dialogflow.cx.v3.ITool|null} [tool] CreateToolRequest tool */ /** - * Constructs a new GetExperimentRequest. + * Constructs a new CreateToolRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a GetExperimentRequest. - * @implements IGetExperimentRequest + * @classdesc Represents a CreateToolRequest. + * @implements ICreateToolRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IGetExperimentRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.ICreateToolRequest=} [properties] Properties to set */ - function GetExperimentRequest(properties) { + function CreateToolRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -84115,77 +107824,91 @@ } /** - * GetExperimentRequest name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.GetExperimentRequest + * CreateToolRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.cx.v3.CreateToolRequest * @instance */ - GetExperimentRequest.prototype.name = ""; + CreateToolRequest.prototype.parent = ""; /** - * Creates a new GetExperimentRequest instance using the specified properties. + * CreateToolRequest tool. + * @member {google.cloud.dialogflow.cx.v3.ITool|null|undefined} tool + * @memberof google.cloud.dialogflow.cx.v3.CreateToolRequest + * @instance + */ + CreateToolRequest.prototype.tool = null; + + /** + * Creates a new CreateToolRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.GetExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateToolRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IGetExperimentRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.GetExperimentRequest} GetExperimentRequest instance + * @param {google.cloud.dialogflow.cx.v3.ICreateToolRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.CreateToolRequest} CreateToolRequest instance */ - GetExperimentRequest.create = function create(properties) { - return new GetExperimentRequest(properties); + CreateToolRequest.create = function create(properties) { + return new CreateToolRequest(properties); }; /** - * Encodes the specified GetExperimentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetExperimentRequest.verify|verify} messages. + * Encodes the specified CreateToolRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateToolRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.GetExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateToolRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IGetExperimentRequest} message GetExperimentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ICreateToolRequest} message CreateToolRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetExperimentRequest.encode = function encode(message, writer) { + CreateToolRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.tool != null && Object.hasOwnProperty.call(message, "tool")) + $root.google.cloud.dialogflow.cx.v3.Tool.encode(message.tool, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetExperimentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetExperimentRequest.verify|verify} messages. + * Encodes the specified CreateToolRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateToolRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.GetExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateToolRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IGetExperimentRequest} message GetExperimentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ICreateToolRequest} message CreateToolRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetExperimentRequest.encodeDelimited = function encodeDelimited(message, writer) { + CreateToolRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetExperimentRequest message from the specified reader or buffer. + * Decodes a CreateToolRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.GetExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateToolRequest * @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.GetExperimentRequest} GetExperimentRequest + * @returns {google.cloud.dialogflow.cx.v3.CreateToolRequest} CreateToolRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetExperimentRequest.decode = function decode(reader, length, error) { + CreateToolRequest.decode = function decode(reader, length, error) { 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.GetExperimentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.CreateToolRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.parent = reader.string(); + break; + } + case 2: { + message.tool = $root.google.cloud.dialogflow.cx.v3.Tool.decode(reader, reader.uint32()); break; } default: @@ -84197,123 +107920,138 @@ }; /** - * Decodes a GetExperimentRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateToolRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.GetExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateToolRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.GetExperimentRequest} GetExperimentRequest + * @returns {google.cloud.dialogflow.cx.v3.CreateToolRequest} CreateToolRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetExperimentRequest.decodeDelimited = function decodeDelimited(reader) { + CreateToolRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetExperimentRequest message. + * Verifies a CreateToolRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.GetExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateToolRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetExperimentRequest.verify = function verify(message) { + CreateToolRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.tool != null && message.hasOwnProperty("tool")) { + var error = $root.google.cloud.dialogflow.cx.v3.Tool.verify(message.tool); + if (error) + return "tool." + error; + } return null; }; /** - * Creates a GetExperimentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateToolRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.GetExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateToolRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.GetExperimentRequest} GetExperimentRequest + * @returns {google.cloud.dialogflow.cx.v3.CreateToolRequest} CreateToolRequest */ - GetExperimentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.GetExperimentRequest) + CreateToolRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.CreateToolRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.GetExperimentRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.dialogflow.cx.v3.CreateToolRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.tool != null) { + if (typeof object.tool !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.CreateToolRequest.tool: object expected"); + message.tool = $root.google.cloud.dialogflow.cx.v3.Tool.fromObject(object.tool); + } return message; }; /** - * Creates a plain object from a GetExperimentRequest message. Also converts values to other types if specified. + * Creates a plain object from a CreateToolRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.GetExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateToolRequest * @static - * @param {google.cloud.dialogflow.cx.v3.GetExperimentRequest} message GetExperimentRequest + * @param {google.cloud.dialogflow.cx.v3.CreateToolRequest} message CreateToolRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetExperimentRequest.toObject = function toObject(message, options) { + CreateToolRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (options.defaults) { + object.parent = ""; + object.tool = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.tool != null && message.hasOwnProperty("tool")) + object.tool = $root.google.cloud.dialogflow.cx.v3.Tool.toObject(message.tool, options); return object; }; /** - * Converts this GetExperimentRequest to JSON. + * Converts this CreateToolRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.GetExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateToolRequest * @instance * @returns {Object.} JSON object */ - GetExperimentRequest.prototype.toJSON = function toJSON() { + CreateToolRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetExperimentRequest + * Gets the default type url for CreateToolRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.GetExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateToolRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetExperimentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateToolRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.GetExperimentRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.CreateToolRequest"; }; - return GetExperimentRequest; + return CreateToolRequest; })(); - v3.CreateExperimentRequest = (function() { + v3.ListToolsRequest = (function() { /** - * Properties of a CreateExperimentRequest. + * Properties of a ListToolsRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface ICreateExperimentRequest - * @property {string|null} [parent] CreateExperimentRequest parent - * @property {google.cloud.dialogflow.cx.v3.IExperiment|null} [experiment] CreateExperimentRequest experiment + * @interface IListToolsRequest + * @property {string|null} [parent] ListToolsRequest parent + * @property {number|null} [pageSize] ListToolsRequest pageSize + * @property {string|null} [pageToken] ListToolsRequest pageToken */ /** - * Constructs a new CreateExperimentRequest. + * Constructs a new ListToolsRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a CreateExperimentRequest. - * @implements ICreateExperimentRequest + * @classdesc Represents a ListToolsRequest. + * @implements IListToolsRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.ICreateExperimentRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IListToolsRequest=} [properties] Properties to set */ - function CreateExperimentRequest(properties) { + function ListToolsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -84321,80 +108059,90 @@ } /** - * CreateExperimentRequest parent. + * ListToolsRequest parent. * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3.CreateExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListToolsRequest * @instance */ - CreateExperimentRequest.prototype.parent = ""; + ListToolsRequest.prototype.parent = ""; /** - * CreateExperimentRequest experiment. - * @member {google.cloud.dialogflow.cx.v3.IExperiment|null|undefined} experiment - * @memberof google.cloud.dialogflow.cx.v3.CreateExperimentRequest + * ListToolsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dialogflow.cx.v3.ListToolsRequest * @instance */ - CreateExperimentRequest.prototype.experiment = null; + ListToolsRequest.prototype.pageSize = 0; /** - * Creates a new CreateExperimentRequest instance using the specified properties. + * ListToolsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dialogflow.cx.v3.ListToolsRequest + * @instance + */ + ListToolsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListToolsRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.CreateExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListToolsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.ICreateExperimentRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.CreateExperimentRequest} CreateExperimentRequest instance + * @param {google.cloud.dialogflow.cx.v3.IListToolsRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ListToolsRequest} ListToolsRequest instance */ - CreateExperimentRequest.create = function create(properties) { - return new CreateExperimentRequest(properties); + ListToolsRequest.create = function create(properties) { + return new ListToolsRequest(properties); }; /** - * Encodes the specified CreateExperimentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateExperimentRequest.verify|verify} messages. + * Encodes the specified ListToolsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListToolsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.CreateExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListToolsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.ICreateExperimentRequest} message CreateExperimentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListToolsRequest} message ListToolsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateExperimentRequest.encode = function encode(message, writer) { + ListToolsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.experiment != null && Object.hasOwnProperty.call(message, "experiment")) - $root.google.cloud.dialogflow.cx.v3.Experiment.encode(message.experiment, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); return writer; }; /** - * Encodes the specified CreateExperimentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateExperimentRequest.verify|verify} messages. + * Encodes the specified ListToolsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListToolsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.CreateExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListToolsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.ICreateExperimentRequest} message CreateExperimentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListToolsRequest} message ListToolsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateExperimentRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListToolsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateExperimentRequest message from the specified reader or buffer. + * Decodes a ListToolsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.CreateExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListToolsRequest * @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.CreateExperimentRequest} CreateExperimentRequest + * @returns {google.cloud.dialogflow.cx.v3.ListToolsRequest} ListToolsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateExperimentRequest.decode = function decode(reader, length, error) { + ListToolsRequest.decode = function decode(reader, length, error) { 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.CreateExperimentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ListToolsRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -84405,7 +108153,11 @@ break; } case 2: { - message.experiment = $root.google.cloud.dialogflow.cx.v3.Experiment.decode(reader, reader.uint32()); + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); break; } default: @@ -84417,137 +108169,141 @@ }; /** - * Decodes a CreateExperimentRequest message from the specified reader or buffer, length delimited. + * Decodes a ListToolsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.CreateExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListToolsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.CreateExperimentRequest} CreateExperimentRequest + * @returns {google.cloud.dialogflow.cx.v3.ListToolsRequest} ListToolsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateExperimentRequest.decodeDelimited = function decodeDelimited(reader) { + ListToolsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateExperimentRequest message. + * Verifies a ListToolsRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.CreateExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListToolsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateExperimentRequest.verify = function verify(message) { + ListToolsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.parent != null && message.hasOwnProperty("parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.experiment != null && message.hasOwnProperty("experiment")) { - var error = $root.google.cloud.dialogflow.cx.v3.Experiment.verify(message.experiment); - if (error) - return "experiment." + error; - } + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; return null; }; /** - * Creates a CreateExperimentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListToolsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.CreateExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListToolsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.CreateExperimentRequest} CreateExperimentRequest + * @returns {google.cloud.dialogflow.cx.v3.ListToolsRequest} ListToolsRequest */ - CreateExperimentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.CreateExperimentRequest) + ListToolsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListToolsRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.CreateExperimentRequest(); + var message = new $root.google.cloud.dialogflow.cx.v3.ListToolsRequest(); if (object.parent != null) message.parent = String(object.parent); - if (object.experiment != null) { - if (typeof object.experiment !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.CreateExperimentRequest.experiment: object expected"); - message.experiment = $root.google.cloud.dialogflow.cx.v3.Experiment.fromObject(object.experiment); - } + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); return message; }; /** - * Creates a plain object from a CreateExperimentRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListToolsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.CreateExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListToolsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.CreateExperimentRequest} message CreateExperimentRequest + * @param {google.cloud.dialogflow.cx.v3.ListToolsRequest} message ListToolsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateExperimentRequest.toObject = function toObject(message, options) { + ListToolsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.parent = ""; - object.experiment = null; + object.pageSize = 0; + object.pageToken = ""; } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; - if (message.experiment != null && message.hasOwnProperty("experiment")) - object.experiment = $root.google.cloud.dialogflow.cx.v3.Experiment.toObject(message.experiment, options); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; return object; }; /** - * Converts this CreateExperimentRequest to JSON. + * Converts this ListToolsRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.CreateExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListToolsRequest * @instance * @returns {Object.} JSON object */ - CreateExperimentRequest.prototype.toJSON = function toJSON() { + ListToolsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateExperimentRequest + * Gets the default type url for ListToolsRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.CreateExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListToolsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateExperimentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListToolsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.CreateExperimentRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListToolsRequest"; }; - return CreateExperimentRequest; + return ListToolsRequest; })(); - v3.UpdateExperimentRequest = (function() { + v3.ListToolsResponse = (function() { /** - * Properties of an UpdateExperimentRequest. + * Properties of a ListToolsResponse. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IUpdateExperimentRequest - * @property {google.cloud.dialogflow.cx.v3.IExperiment|null} [experiment] UpdateExperimentRequest experiment - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateExperimentRequest updateMask + * @interface IListToolsResponse + * @property {Array.|null} [tools] ListToolsResponse tools + * @property {string|null} [nextPageToken] ListToolsResponse nextPageToken */ /** - * Constructs a new UpdateExperimentRequest. + * Constructs a new ListToolsResponse. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents an UpdateExperimentRequest. - * @implements IUpdateExperimentRequest + * @classdesc Represents a ListToolsResponse. + * @implements IListToolsResponse * @constructor - * @param {google.cloud.dialogflow.cx.v3.IUpdateExperimentRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IListToolsResponse=} [properties] Properties to set */ - function UpdateExperimentRequest(properties) { + function ListToolsResponse(properties) { + this.tools = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -84555,91 +108311,94 @@ } /** - * UpdateExperimentRequest experiment. - * @member {google.cloud.dialogflow.cx.v3.IExperiment|null|undefined} experiment - * @memberof google.cloud.dialogflow.cx.v3.UpdateExperimentRequest + * ListToolsResponse tools. + * @member {Array.} tools + * @memberof google.cloud.dialogflow.cx.v3.ListToolsResponse * @instance */ - UpdateExperimentRequest.prototype.experiment = null; + ListToolsResponse.prototype.tools = $util.emptyArray; /** - * UpdateExperimentRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.dialogflow.cx.v3.UpdateExperimentRequest + * ListToolsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dialogflow.cx.v3.ListToolsResponse * @instance */ - UpdateExperimentRequest.prototype.updateMask = null; + ListToolsResponse.prototype.nextPageToken = ""; /** - * Creates a new UpdateExperimentRequest instance using the specified properties. + * Creates a new ListToolsResponse instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.UpdateExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListToolsResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IUpdateExperimentRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.UpdateExperimentRequest} UpdateExperimentRequest instance + * @param {google.cloud.dialogflow.cx.v3.IListToolsResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ListToolsResponse} ListToolsResponse instance */ - UpdateExperimentRequest.create = function create(properties) { - return new UpdateExperimentRequest(properties); + ListToolsResponse.create = function create(properties) { + return new ListToolsResponse(properties); }; /** - * Encodes the specified UpdateExperimentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateExperimentRequest.verify|verify} messages. + * Encodes the specified ListToolsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListToolsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.UpdateExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListToolsResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IUpdateExperimentRequest} message UpdateExperimentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListToolsResponse} message ListToolsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateExperimentRequest.encode = function encode(message, writer) { + ListToolsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.experiment != null && Object.hasOwnProperty.call(message, "experiment")) - $root.google.cloud.dialogflow.cx.v3.Experiment.encode(message.experiment, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.tools != null && message.tools.length) + for (var i = 0; i < message.tools.length; ++i) + $root.google.cloud.dialogflow.cx.v3.Tool.encode(message.tools[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; /** - * Encodes the specified UpdateExperimentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateExperimentRequest.verify|verify} messages. + * Encodes the specified ListToolsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListToolsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.UpdateExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListToolsResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IUpdateExperimentRequest} message UpdateExperimentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListToolsResponse} message ListToolsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateExperimentRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListToolsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateExperimentRequest message from the specified reader or buffer. + * Decodes a ListToolsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.UpdateExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListToolsResponse * @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.UpdateExperimentRequest} UpdateExperimentRequest + * @returns {google.cloud.dialogflow.cx.v3.ListToolsResponse} ListToolsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateExperimentRequest.decode = function decode(reader, length, error) { + ListToolsResponse.decode = function decode(reader, length, error) { 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.UpdateExperimentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ListToolsResponse(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.experiment = $root.google.cloud.dialogflow.cx.v3.Experiment.decode(reader, reader.uint32()); + if (!(message.tools && message.tools.length)) + message.tools = []; + message.tools.push($root.google.cloud.dialogflow.cx.v3.Tool.decode(reader, reader.uint32())); break; } case 2: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.nextPageToken = reader.string(); break; } default: @@ -84651,141 +108410,148 @@ }; /** - * Decodes an UpdateExperimentRequest message from the specified reader or buffer, length delimited. + * Decodes a ListToolsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.UpdateExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListToolsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.UpdateExperimentRequest} UpdateExperimentRequest + * @returns {google.cloud.dialogflow.cx.v3.ListToolsResponse} ListToolsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateExperimentRequest.decodeDelimited = function decodeDelimited(reader) { + ListToolsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateExperimentRequest message. + * Verifies a ListToolsResponse message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.UpdateExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListToolsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateExperimentRequest.verify = function verify(message) { + ListToolsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.experiment != null && message.hasOwnProperty("experiment")) { - var error = $root.google.cloud.dialogflow.cx.v3.Experiment.verify(message.experiment); - if (error) - return "experiment." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; + if (message.tools != null && message.hasOwnProperty("tools")) { + if (!Array.isArray(message.tools)) + return "tools: array expected"; + for (var i = 0; i < message.tools.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.Tool.verify(message.tools[i]); + if (error) + return "tools." + error; + } } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates an UpdateExperimentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListToolsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.UpdateExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListToolsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.UpdateExperimentRequest} UpdateExperimentRequest + * @returns {google.cloud.dialogflow.cx.v3.ListToolsResponse} ListToolsResponse */ - UpdateExperimentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest) + ListToolsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListToolsResponse) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest(); - if (object.experiment != null) { - if (typeof object.experiment !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.UpdateExperimentRequest.experiment: object expected"); - message.experiment = $root.google.cloud.dialogflow.cx.v3.Experiment.fromObject(object.experiment); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.UpdateExperimentRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + var message = new $root.google.cloud.dialogflow.cx.v3.ListToolsResponse(); + if (object.tools) { + if (!Array.isArray(object.tools)) + throw TypeError(".google.cloud.dialogflow.cx.v3.ListToolsResponse.tools: array expected"); + message.tools = []; + for (var i = 0; i < object.tools.length; ++i) { + if (typeof object.tools[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.ListToolsResponse.tools: object expected"); + message.tools[i] = $root.google.cloud.dialogflow.cx.v3.Tool.fromObject(object.tools[i]); + } } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from an UpdateExperimentRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListToolsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.UpdateExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListToolsResponse * @static - * @param {google.cloud.dialogflow.cx.v3.UpdateExperimentRequest} message UpdateExperimentRequest + * @param {google.cloud.dialogflow.cx.v3.ListToolsResponse} message ListToolsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateExperimentRequest.toObject = function toObject(message, options) { + ListToolsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.experiment = null; - object.updateMask = null; + if (options.arrays || options.defaults) + object.tools = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.tools && message.tools.length) { + object.tools = []; + for (var j = 0; j < message.tools.length; ++j) + object.tools[j] = $root.google.cloud.dialogflow.cx.v3.Tool.toObject(message.tools[j], options); } - if (message.experiment != null && message.hasOwnProperty("experiment")) - object.experiment = $root.google.cloud.dialogflow.cx.v3.Experiment.toObject(message.experiment, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this UpdateExperimentRequest to JSON. + * Converts this ListToolsResponse to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.UpdateExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListToolsResponse * @instance * @returns {Object.} JSON object */ - UpdateExperimentRequest.prototype.toJSON = function toJSON() { + ListToolsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UpdateExperimentRequest + * Gets the default type url for ListToolsResponse * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.UpdateExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3.ListToolsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UpdateExperimentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListToolsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.UpdateExperimentRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListToolsResponse"; }; - return UpdateExperimentRequest; + return ListToolsResponse; })(); - v3.DeleteExperimentRequest = (function() { + v3.GetToolRequest = (function() { /** - * Properties of a DeleteExperimentRequest. + * Properties of a GetToolRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IDeleteExperimentRequest - * @property {string|null} [name] DeleteExperimentRequest name + * @interface IGetToolRequest + * @property {string|null} [name] GetToolRequest name */ /** - * Constructs a new DeleteExperimentRequest. + * Constructs a new GetToolRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a DeleteExperimentRequest. - * @implements IDeleteExperimentRequest + * @classdesc Represents a GetToolRequest. + * @implements IGetToolRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IDeleteExperimentRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IGetToolRequest=} [properties] Properties to set */ - function DeleteExperimentRequest(properties) { + function GetToolRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -84793,35 +108559,35 @@ } /** - * DeleteExperimentRequest name. + * GetToolRequest name. * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.DeleteExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3.GetToolRequest * @instance */ - DeleteExperimentRequest.prototype.name = ""; + GetToolRequest.prototype.name = ""; /** - * Creates a new DeleteExperimentRequest instance using the specified properties. + * Creates a new GetToolRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.DeleteExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3.GetToolRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IDeleteExperimentRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.DeleteExperimentRequest} DeleteExperimentRequest instance + * @param {google.cloud.dialogflow.cx.v3.IGetToolRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.GetToolRequest} GetToolRequest instance */ - DeleteExperimentRequest.create = function create(properties) { - return new DeleteExperimentRequest(properties); + GetToolRequest.create = function create(properties) { + return new GetToolRequest(properties); }; /** - * Encodes the specified DeleteExperimentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteExperimentRequest.verify|verify} messages. + * Encodes the specified GetToolRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetToolRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.DeleteExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3.GetToolRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IDeleteExperimentRequest} message DeleteExperimentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IGetToolRequest} message GetToolRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteExperimentRequest.encode = function encode(message, writer) { + GetToolRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) @@ -84830,33 +108596,33 @@ }; /** - * Encodes the specified DeleteExperimentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteExperimentRequest.verify|verify} messages. + * Encodes the specified GetToolRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetToolRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.DeleteExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3.GetToolRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IDeleteExperimentRequest} message DeleteExperimentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IGetToolRequest} message GetToolRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteExperimentRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetToolRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteExperimentRequest message from the specified reader or buffer. + * Decodes a GetToolRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.DeleteExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3.GetToolRequest * @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.DeleteExperimentRequest} DeleteExperimentRequest + * @returns {google.cloud.dialogflow.cx.v3.GetToolRequest} GetToolRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteExperimentRequest.decode = function decode(reader, length, error) { + GetToolRequest.decode = function decode(reader, length, error) { 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.DeleteExperimentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.GetToolRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -84875,30 +108641,30 @@ }; /** - * Decodes a DeleteExperimentRequest message from the specified reader or buffer, length delimited. + * Decodes a GetToolRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.DeleteExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3.GetToolRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.DeleteExperimentRequest} DeleteExperimentRequest + * @returns {google.cloud.dialogflow.cx.v3.GetToolRequest} GetToolRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteExperimentRequest.decodeDelimited = function decodeDelimited(reader) { + GetToolRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteExperimentRequest message. + * Verifies a GetToolRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.DeleteExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3.GetToolRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteExperimentRequest.verify = function verify(message) { + GetToolRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) @@ -84908,32 +108674,32 @@ }; /** - * Creates a DeleteExperimentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetToolRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.DeleteExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3.GetToolRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.DeleteExperimentRequest} DeleteExperimentRequest - */ - DeleteExperimentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest) + * @returns {google.cloud.dialogflow.cx.v3.GetToolRequest} GetToolRequest + */ + GetToolRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.GetToolRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest(); + var message = new $root.google.cloud.dialogflow.cx.v3.GetToolRequest(); if (object.name != null) message.name = String(object.name); return message; }; /** - * Creates a plain object from a DeleteExperimentRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetToolRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.DeleteExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3.GetToolRequest * @static - * @param {google.cloud.dialogflow.cx.v3.DeleteExperimentRequest} message DeleteExperimentRequest + * @param {google.cloud.dialogflow.cx.v3.GetToolRequest} message GetToolRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteExperimentRequest.toObject = function toObject(message, options) { + GetToolRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -84945,52 +108711,53 @@ }; /** - * Converts this DeleteExperimentRequest to JSON. + * Converts this GetToolRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.DeleteExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3.GetToolRequest * @instance * @returns {Object.} JSON object */ - DeleteExperimentRequest.prototype.toJSON = function toJSON() { + GetToolRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeleteExperimentRequest + * Gets the default type url for GetToolRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.DeleteExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3.GetToolRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeleteExperimentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetToolRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.DeleteExperimentRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.GetToolRequest"; }; - return DeleteExperimentRequest; + return GetToolRequest; })(); - v3.StartExperimentRequest = (function() { + v3.UpdateToolRequest = (function() { /** - * Properties of a StartExperimentRequest. + * Properties of an UpdateToolRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IStartExperimentRequest - * @property {string|null} [name] StartExperimentRequest name + * @interface IUpdateToolRequest + * @property {google.cloud.dialogflow.cx.v3.ITool|null} [tool] UpdateToolRequest tool + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateToolRequest updateMask */ /** - * Constructs a new StartExperimentRequest. + * Constructs a new UpdateToolRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a StartExperimentRequest. - * @implements IStartExperimentRequest + * @classdesc Represents an UpdateToolRequest. + * @implements IUpdateToolRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IStartExperimentRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IUpdateToolRequest=} [properties] Properties to set */ - function StartExperimentRequest(properties) { + function UpdateToolRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -84998,77 +108765,91 @@ } /** - * StartExperimentRequest name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.StartExperimentRequest + * UpdateToolRequest tool. + * @member {google.cloud.dialogflow.cx.v3.ITool|null|undefined} tool + * @memberof google.cloud.dialogflow.cx.v3.UpdateToolRequest * @instance */ - StartExperimentRequest.prototype.name = ""; + UpdateToolRequest.prototype.tool = null; /** - * Creates a new StartExperimentRequest instance using the specified properties. + * UpdateToolRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dialogflow.cx.v3.UpdateToolRequest + * @instance + */ + UpdateToolRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateToolRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.StartExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3.UpdateToolRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IStartExperimentRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.StartExperimentRequest} StartExperimentRequest instance + * @param {google.cloud.dialogflow.cx.v3.IUpdateToolRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.UpdateToolRequest} UpdateToolRequest instance */ - StartExperimentRequest.create = function create(properties) { - return new StartExperimentRequest(properties); + UpdateToolRequest.create = function create(properties) { + return new UpdateToolRequest(properties); }; /** - * Encodes the specified StartExperimentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.StartExperimentRequest.verify|verify} messages. + * Encodes the specified UpdateToolRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateToolRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.StartExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3.UpdateToolRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IStartExperimentRequest} message StartExperimentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IUpdateToolRequest} message UpdateToolRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StartExperimentRequest.encode = function encode(message, writer) { + UpdateToolRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.tool != null && Object.hasOwnProperty.call(message, "tool")) + $root.google.cloud.dialogflow.cx.v3.Tool.encode(message.tool, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified StartExperimentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.StartExperimentRequest.verify|verify} messages. + * Encodes the specified UpdateToolRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateToolRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.StartExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3.UpdateToolRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IStartExperimentRequest} message StartExperimentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IUpdateToolRequest} message UpdateToolRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StartExperimentRequest.encodeDelimited = function encodeDelimited(message, writer) { + UpdateToolRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a StartExperimentRequest message from the specified reader or buffer. + * Decodes an UpdateToolRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.StartExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3.UpdateToolRequest * @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.StartExperimentRequest} StartExperimentRequest + * @returns {google.cloud.dialogflow.cx.v3.UpdateToolRequest} UpdateToolRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StartExperimentRequest.decode = function decode(reader, length, error) { + UpdateToolRequest.decode = function decode(reader, length, error) { 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.StartExperimentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.UpdateToolRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.tool = $root.google.cloud.dialogflow.cx.v3.Tool.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; } default: @@ -85080,122 +108861,142 @@ }; /** - * Decodes a StartExperimentRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateToolRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.StartExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3.UpdateToolRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.StartExperimentRequest} StartExperimentRequest + * @returns {google.cloud.dialogflow.cx.v3.UpdateToolRequest} UpdateToolRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StartExperimentRequest.decodeDelimited = function decodeDelimited(reader) { + UpdateToolRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a StartExperimentRequest message. + * Verifies an UpdateToolRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.StartExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3.UpdateToolRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - StartExperimentRequest.verify = function verify(message) { + UpdateToolRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.tool != null && message.hasOwnProperty("tool")) { + var error = $root.google.cloud.dialogflow.cx.v3.Tool.verify(message.tool); + if (error) + return "tool." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } return null; }; /** - * Creates a StartExperimentRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateToolRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.StartExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3.UpdateToolRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.StartExperimentRequest} StartExperimentRequest + * @returns {google.cloud.dialogflow.cx.v3.UpdateToolRequest} UpdateToolRequest */ - StartExperimentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.StartExperimentRequest) + UpdateToolRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.UpdateToolRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.StartExperimentRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.dialogflow.cx.v3.UpdateToolRequest(); + if (object.tool != null) { + if (typeof object.tool !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.UpdateToolRequest.tool: object expected"); + message.tool = $root.google.cloud.dialogflow.cx.v3.Tool.fromObject(object.tool); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.UpdateToolRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } return message; }; /** - * Creates a plain object from a StartExperimentRequest message. Also converts values to other types if specified. + * Creates a plain object from an UpdateToolRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.StartExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3.UpdateToolRequest * @static - * @param {google.cloud.dialogflow.cx.v3.StartExperimentRequest} message StartExperimentRequest + * @param {google.cloud.dialogflow.cx.v3.UpdateToolRequest} message UpdateToolRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StartExperimentRequest.toObject = function toObject(message, options) { + UpdateToolRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (options.defaults) { + object.tool = null; + object.updateMask = null; + } + if (message.tool != null && message.hasOwnProperty("tool")) + object.tool = $root.google.cloud.dialogflow.cx.v3.Tool.toObject(message.tool, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; /** - * Converts this StartExperimentRequest to JSON. + * Converts this UpdateToolRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.StartExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3.UpdateToolRequest * @instance * @returns {Object.} JSON object */ - StartExperimentRequest.prototype.toJSON = function toJSON() { + UpdateToolRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for StartExperimentRequest + * Gets the default type url for UpdateToolRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.StartExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3.UpdateToolRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - StartExperimentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UpdateToolRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.StartExperimentRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.UpdateToolRequest"; }; - return StartExperimentRequest; + return UpdateToolRequest; })(); - v3.StopExperimentRequest = (function() { + v3.DeleteToolRequest = (function() { /** - * Properties of a StopExperimentRequest. + * Properties of a DeleteToolRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IStopExperimentRequest - * @property {string|null} [name] StopExperimentRequest name + * @interface IDeleteToolRequest + * @property {string|null} [name] DeleteToolRequest name + * @property {boolean|null} [force] DeleteToolRequest force */ /** - * Constructs a new StopExperimentRequest. + * Constructs a new DeleteToolRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a StopExperimentRequest. - * @implements IStopExperimentRequest + * @classdesc Represents a DeleteToolRequest. + * @implements IDeleteToolRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IStopExperimentRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IDeleteToolRequest=} [properties] Properties to set */ - function StopExperimentRequest(properties) { + function DeleteToolRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -85203,70 +109004,80 @@ } /** - * StopExperimentRequest name. + * DeleteToolRequest name. * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.StopExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteToolRequest * @instance */ - StopExperimentRequest.prototype.name = ""; + DeleteToolRequest.prototype.name = ""; /** - * Creates a new StopExperimentRequest instance using the specified properties. + * DeleteToolRequest force. + * @member {boolean} force + * @memberof google.cloud.dialogflow.cx.v3.DeleteToolRequest + * @instance + */ + DeleteToolRequest.prototype.force = false; + + /** + * Creates a new DeleteToolRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.StopExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteToolRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IStopExperimentRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.StopExperimentRequest} StopExperimentRequest instance + * @param {google.cloud.dialogflow.cx.v3.IDeleteToolRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.DeleteToolRequest} DeleteToolRequest instance */ - StopExperimentRequest.create = function create(properties) { - return new StopExperimentRequest(properties); + DeleteToolRequest.create = function create(properties) { + return new DeleteToolRequest(properties); }; /** - * Encodes the specified StopExperimentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.StopExperimentRequest.verify|verify} messages. + * Encodes the specified DeleteToolRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteToolRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.StopExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteToolRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IStopExperimentRequest} message StopExperimentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IDeleteToolRequest} message DeleteToolRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StopExperimentRequest.encode = function encode(message, writer) { + DeleteToolRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.force != null && Object.hasOwnProperty.call(message, "force")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.force); return writer; }; /** - * Encodes the specified StopExperimentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.StopExperimentRequest.verify|verify} messages. + * Encodes the specified DeleteToolRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteToolRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.StopExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteToolRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IStopExperimentRequest} message StopExperimentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IDeleteToolRequest} message DeleteToolRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StopExperimentRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeleteToolRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a StopExperimentRequest message from the specified reader or buffer. + * Decodes a DeleteToolRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.StopExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteToolRequest * @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.StopExperimentRequest} StopExperimentRequest + * @returns {google.cloud.dialogflow.cx.v3.DeleteToolRequest} DeleteToolRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StopExperimentRequest.decode = function decode(reader, length, error) { + DeleteToolRequest.decode = function decode(reader, length, error) { 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.StopExperimentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.DeleteToolRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -85276,6 +109087,10 @@ message.name = reader.string(); break; } + case 2: { + message.force = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -85285,439 +109100,282 @@ }; /** - * Decodes a StopExperimentRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteToolRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.StopExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteToolRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.StopExperimentRequest} StopExperimentRequest + * @returns {google.cloud.dialogflow.cx.v3.DeleteToolRequest} DeleteToolRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StopExperimentRequest.decodeDelimited = function decodeDelimited(reader) { + DeleteToolRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a StopExperimentRequest message. + * Verifies a DeleteToolRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.StopExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteToolRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - StopExperimentRequest.verify = function verify(message) { + DeleteToolRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; + if (message.force != null && message.hasOwnProperty("force")) + if (typeof message.force !== "boolean") + return "force: boolean expected"; return null; }; /** - * Creates a StopExperimentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteToolRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.StopExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteToolRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.StopExperimentRequest} StopExperimentRequest + * @returns {google.cloud.dialogflow.cx.v3.DeleteToolRequest} DeleteToolRequest */ - StopExperimentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.StopExperimentRequest) + DeleteToolRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.DeleteToolRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.StopExperimentRequest(); + var message = new $root.google.cloud.dialogflow.cx.v3.DeleteToolRequest(); if (object.name != null) message.name = String(object.name); + if (object.force != null) + message.force = Boolean(object.force); return message; }; /** - * Creates a plain object from a StopExperimentRequest message. Also converts values to other types if specified. + * Creates a plain object from a DeleteToolRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.StopExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteToolRequest * @static - * @param {google.cloud.dialogflow.cx.v3.StopExperimentRequest} message StopExperimentRequest + * @param {google.cloud.dialogflow.cx.v3.DeleteToolRequest} message DeleteToolRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StopExperimentRequest.toObject = function toObject(message, options) { + DeleteToolRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { object.name = ""; + object.force = false; + } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; + if (message.force != null && message.hasOwnProperty("force")) + object.force = message.force; return object; }; /** - * Converts this StopExperimentRequest to JSON. + * Converts this DeleteToolRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.StopExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteToolRequest * @instance * @returns {Object.} JSON object */ - StopExperimentRequest.prototype.toJSON = function toJSON() { + DeleteToolRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for StopExperimentRequest + * Gets the default type url for DeleteToolRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.StopExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteToolRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - StopExperimentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeleteToolRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.StopExperimentRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.DeleteToolRequest"; }; - return StopExperimentRequest; + return DeleteToolRequest; })(); - v3.Generators = (function() { + v3.Tool = (function() { /** - * Constructs a new Generators service. + * Properties of a Tool. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a Generators - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function Generators(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (Generators.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Generators; - - /** - * Creates new Generators service using the specified rpc implementation. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.Generators - * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {Generators} RPC service. Useful where requests and/or responses are streamed. - */ - Generators.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Generators|listGenerators}. - * @memberof google.cloud.dialogflow.cx.v3.Generators - * @typedef ListGeneratorsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.ListGeneratorsResponse} [response] ListGeneratorsResponse - */ - - /** - * Calls ListGenerators. - * @function listGenerators - * @memberof google.cloud.dialogflow.cx.v3.Generators - * @instance - * @param {google.cloud.dialogflow.cx.v3.IListGeneratorsRequest} request ListGeneratorsRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Generators.ListGeneratorsCallback} callback Node-style callback called with the error, if any, and ListGeneratorsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Generators.prototype.listGenerators = function listGenerators(request, callback) { - return this.rpcCall(listGenerators, $root.google.cloud.dialogflow.cx.v3.ListGeneratorsRequest, $root.google.cloud.dialogflow.cx.v3.ListGeneratorsResponse, request, callback); - }, "name", { value: "ListGenerators" }); - - /** - * Calls ListGenerators. - * @function listGenerators - * @memberof google.cloud.dialogflow.cx.v3.Generators - * @instance - * @param {google.cloud.dialogflow.cx.v3.IListGeneratorsRequest} request ListGeneratorsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Generators|getGenerator}. - * @memberof google.cloud.dialogflow.cx.v3.Generators - * @typedef GetGeneratorCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.Generator} [response] Generator - */ - - /** - * Calls GetGenerator. - * @function getGenerator - * @memberof google.cloud.dialogflow.cx.v3.Generators - * @instance - * @param {google.cloud.dialogflow.cx.v3.IGetGeneratorRequest} request GetGeneratorRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Generators.GetGeneratorCallback} callback Node-style callback called with the error, if any, and Generator - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Generators.prototype.getGenerator = function getGenerator(request, callback) { - return this.rpcCall(getGenerator, $root.google.cloud.dialogflow.cx.v3.GetGeneratorRequest, $root.google.cloud.dialogflow.cx.v3.Generator, request, callback); - }, "name", { value: "GetGenerator" }); - - /** - * Calls GetGenerator. - * @function getGenerator - * @memberof google.cloud.dialogflow.cx.v3.Generators - * @instance - * @param {google.cloud.dialogflow.cx.v3.IGetGeneratorRequest} request GetGeneratorRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Generators|createGenerator}. - * @memberof google.cloud.dialogflow.cx.v3.Generators - * @typedef CreateGeneratorCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.Generator} [response] Generator - */ - - /** - * Calls CreateGenerator. - * @function createGenerator - * @memberof google.cloud.dialogflow.cx.v3.Generators - * @instance - * @param {google.cloud.dialogflow.cx.v3.ICreateGeneratorRequest} request CreateGeneratorRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Generators.CreateGeneratorCallback} callback Node-style callback called with the error, if any, and Generator - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Generators.prototype.createGenerator = function createGenerator(request, callback) { - return this.rpcCall(createGenerator, $root.google.cloud.dialogflow.cx.v3.CreateGeneratorRequest, $root.google.cloud.dialogflow.cx.v3.Generator, request, callback); - }, "name", { value: "CreateGenerator" }); - - /** - * Calls CreateGenerator. - * @function createGenerator - * @memberof google.cloud.dialogflow.cx.v3.Generators - * @instance - * @param {google.cloud.dialogflow.cx.v3.ICreateGeneratorRequest} request CreateGeneratorRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Generators|updateGenerator}. - * @memberof google.cloud.dialogflow.cx.v3.Generators - * @typedef UpdateGeneratorCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.Generator} [response] Generator + * @interface ITool + * @property {string|null} [name] Tool name + * @property {string|null} [displayName] Tool displayName + * @property {string|null} [description] Tool description + * @property {google.cloud.dialogflow.cx.v3.Tool.IOpenApiTool|null} [openApiSpec] Tool openApiSpec + * @property {google.cloud.dialogflow.cx.v3.Tool.IDataStoreTool|null} [dataStoreSpec] Tool dataStoreSpec + * @property {google.cloud.dialogflow.cx.v3.Tool.IFunctionTool|null} [functionSpec] Tool functionSpec + * @property {google.cloud.dialogflow.cx.v3.Tool.ToolType|null} [toolType] Tool toolType */ /** - * Calls UpdateGenerator. - * @function updateGenerator - * @memberof google.cloud.dialogflow.cx.v3.Generators - * @instance - * @param {google.cloud.dialogflow.cx.v3.IUpdateGeneratorRequest} request UpdateGeneratorRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Generators.UpdateGeneratorCallback} callback Node-style callback called with the error, if any, and Generator - * @returns {undefined} - * @variation 1 + * Constructs a new Tool. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a Tool. + * @implements ITool + * @constructor + * @param {google.cloud.dialogflow.cx.v3.ITool=} [properties] Properties to set */ - Object.defineProperty(Generators.prototype.updateGenerator = function updateGenerator(request, callback) { - return this.rpcCall(updateGenerator, $root.google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest, $root.google.cloud.dialogflow.cx.v3.Generator, request, callback); - }, "name", { value: "UpdateGenerator" }); + function Tool(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]]; + } /** - * Calls UpdateGenerator. - * @function updateGenerator - * @memberof google.cloud.dialogflow.cx.v3.Generators + * Tool name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.Tool * @instance - * @param {google.cloud.dialogflow.cx.v3.IUpdateGeneratorRequest} request UpdateGeneratorRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Generators|deleteGenerator}. - * @memberof google.cloud.dialogflow.cx.v3.Generators - * @typedef DeleteGeneratorCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty */ + Tool.prototype.name = ""; /** - * Calls DeleteGenerator. - * @function deleteGenerator - * @memberof google.cloud.dialogflow.cx.v3.Generators + * Tool displayName. + * @member {string} displayName + * @memberof google.cloud.dialogflow.cx.v3.Tool * @instance - * @param {google.cloud.dialogflow.cx.v3.IDeleteGeneratorRequest} request DeleteGeneratorRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Generators.DeleteGeneratorCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(Generators.prototype.deleteGenerator = function deleteGenerator(request, callback) { - return this.rpcCall(deleteGenerator, $root.google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteGenerator" }); + Tool.prototype.displayName = ""; /** - * Calls DeleteGenerator. - * @function deleteGenerator - * @memberof google.cloud.dialogflow.cx.v3.Generators + * Tool description. + * @member {string} description + * @memberof google.cloud.dialogflow.cx.v3.Tool * @instance - * @param {google.cloud.dialogflow.cx.v3.IDeleteGeneratorRequest} request DeleteGeneratorRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Generators; - })(); - - v3.Generator = (function() { - - /** - * Properties of a Generator. - * @memberof google.cloud.dialogflow.cx.v3 - * @interface IGenerator - * @property {string|null} [name] Generator name - * @property {string|null} [displayName] Generator displayName - * @property {google.cloud.dialogflow.cx.v3.IPhrase|null} [promptText] Generator promptText - * @property {Array.|null} [placeholders] Generator placeholders - * @property {google.cloud.dialogflow.cx.v3.Generator.IModelParameter|null} [modelParameter] Generator modelParameter - */ - - /** - * Constructs a new Generator. - * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a Generator. - * @implements IGenerator - * @constructor - * @param {google.cloud.dialogflow.cx.v3.IGenerator=} [properties] Properties to set */ - function Generator(properties) { - this.placeholders = []; - 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]]; - } + Tool.prototype.description = ""; /** - * Generator name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.Generator + * Tool openApiSpec. + * @member {google.cloud.dialogflow.cx.v3.Tool.IOpenApiTool|null|undefined} openApiSpec + * @memberof google.cloud.dialogflow.cx.v3.Tool * @instance */ - Generator.prototype.name = ""; - - /** - * Generator displayName. - * @member {string} displayName - * @memberof google.cloud.dialogflow.cx.v3.Generator + Tool.prototype.openApiSpec = null; + + /** + * Tool dataStoreSpec. + * @member {google.cloud.dialogflow.cx.v3.Tool.IDataStoreTool|null|undefined} dataStoreSpec + * @memberof google.cloud.dialogflow.cx.v3.Tool * @instance */ - Generator.prototype.displayName = ""; + Tool.prototype.dataStoreSpec = null; /** - * Generator promptText. - * @member {google.cloud.dialogflow.cx.v3.IPhrase|null|undefined} promptText - * @memberof google.cloud.dialogflow.cx.v3.Generator + * Tool functionSpec. + * @member {google.cloud.dialogflow.cx.v3.Tool.IFunctionTool|null|undefined} functionSpec + * @memberof google.cloud.dialogflow.cx.v3.Tool * @instance */ - Generator.prototype.promptText = null; + Tool.prototype.functionSpec = null; /** - * Generator placeholders. - * @member {Array.} placeholders - * @memberof google.cloud.dialogflow.cx.v3.Generator + * Tool toolType. + * @member {google.cloud.dialogflow.cx.v3.Tool.ToolType} toolType + * @memberof google.cloud.dialogflow.cx.v3.Tool * @instance */ - Generator.prototype.placeholders = $util.emptyArray; + Tool.prototype.toolType = 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * Generator modelParameter. - * @member {google.cloud.dialogflow.cx.v3.Generator.IModelParameter|null|undefined} modelParameter - * @memberof google.cloud.dialogflow.cx.v3.Generator + * Tool specification. + * @member {"openApiSpec"|"dataStoreSpec"|"functionSpec"|undefined} specification + * @memberof google.cloud.dialogflow.cx.v3.Tool * @instance */ - Generator.prototype.modelParameter = null; + Object.defineProperty(Tool.prototype, "specification", { + get: $util.oneOfGetter($oneOfFields = ["openApiSpec", "dataStoreSpec", "functionSpec"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new Generator instance using the specified properties. + * Creates a new Tool instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.Generator + * @memberof google.cloud.dialogflow.cx.v3.Tool * @static - * @param {google.cloud.dialogflow.cx.v3.IGenerator=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.Generator} Generator instance + * @param {google.cloud.dialogflow.cx.v3.ITool=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.Tool} Tool instance */ - Generator.create = function create(properties) { - return new Generator(properties); + Tool.create = function create(properties) { + return new Tool(properties); }; /** - * Encodes the specified Generator message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Generator.verify|verify} messages. + * Encodes the specified Tool message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Tool.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.Generator + * @memberof google.cloud.dialogflow.cx.v3.Tool * @static - * @param {google.cloud.dialogflow.cx.v3.IGenerator} message Generator message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ITool} message Tool message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Generator.encode = function encode(message, writer) { + Tool.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.promptText != null && Object.hasOwnProperty.call(message, "promptText")) - $root.google.cloud.dialogflow.cx.v3.Phrase.encode(message.promptText, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.placeholders != null && message.placeholders.length) - for (var i = 0; i < message.placeholders.length; ++i) - $root.google.cloud.dialogflow.cx.v3.Generator.Placeholder.encode(message.placeholders[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.modelParameter != null && Object.hasOwnProperty.call(message, "modelParameter")) - $root.google.cloud.dialogflow.cx.v3.Generator.ModelParameter.encode(message.modelParameter, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.openApiSpec != null && Object.hasOwnProperty.call(message, "openApiSpec")) + $root.google.cloud.dialogflow.cx.v3.Tool.OpenApiTool.encode(message.openApiSpec, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.dataStoreSpec != null && Object.hasOwnProperty.call(message, "dataStoreSpec")) + $root.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.encode(message.dataStoreSpec, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.toolType != null && Object.hasOwnProperty.call(message, "toolType")) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.toolType); + if (message.functionSpec != null && Object.hasOwnProperty.call(message, "functionSpec")) + $root.google.cloud.dialogflow.cx.v3.Tool.FunctionTool.encode(message.functionSpec, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); return writer; }; /** - * Encodes the specified Generator message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Generator.verify|verify} messages. + * Encodes the specified Tool message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Tool.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Generator + * @memberof google.cloud.dialogflow.cx.v3.Tool * @static - * @param {google.cloud.dialogflow.cx.v3.IGenerator} message Generator message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ITool} message Tool message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Generator.encodeDelimited = function encodeDelimited(message, writer) { + Tool.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Generator message from the specified reader or buffer. + * Decodes a Tool message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.Generator + * @memberof google.cloud.dialogflow.cx.v3.Tool * @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.Generator} Generator + * @returns {google.cloud.dialogflow.cx.v3.Tool} Tool * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Generator.decode = function decode(reader, length, error) { + Tool.decode = function decode(reader, length, error) { 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.Generator(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.Tool(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -85732,17 +109390,23 @@ break; } case 3: { - message.promptText = $root.google.cloud.dialogflow.cx.v3.Phrase.decode(reader, reader.uint32()); + message.description = reader.string(); break; } - case 5: { - if (!(message.placeholders && message.placeholders.length)) - message.placeholders = []; - message.placeholders.push($root.google.cloud.dialogflow.cx.v3.Generator.Placeholder.decode(reader, reader.uint32())); + case 4: { + message.openApiSpec = $root.google.cloud.dialogflow.cx.v3.Tool.OpenApiTool.decode(reader, reader.uint32()); break; } case 8: { - message.modelParameter = $root.google.cloud.dialogflow.cx.v3.Generator.ModelParameter.decode(reader, reader.uint32()); + message.dataStoreSpec = $root.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.decode(reader, reader.uint32()); + break; + } + case 13: { + message.functionSpec = $root.google.cloud.dialogflow.cx.v3.Tool.FunctionTool.decode(reader, reader.uint32()); + break; + } + case 12: { + message.toolType = reader.int32(); break; } default: @@ -85754,181 +109418,230 @@ }; /** - * Decodes a Generator message from the specified reader or buffer, length delimited. + * Decodes a Tool message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Generator + * @memberof google.cloud.dialogflow.cx.v3.Tool * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.Generator} Generator + * @returns {google.cloud.dialogflow.cx.v3.Tool} Tool * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Generator.decodeDelimited = function decodeDelimited(reader) { + Tool.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Generator message. + * Verifies a Tool message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.Generator + * @memberof google.cloud.dialogflow.cx.v3.Tool * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Generator.verify = function verify(message) { + Tool.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; if (message.displayName != null && message.hasOwnProperty("displayName")) if (!$util.isString(message.displayName)) return "displayName: string expected"; - if (message.promptText != null && message.hasOwnProperty("promptText")) { - var error = $root.google.cloud.dialogflow.cx.v3.Phrase.verify(message.promptText); - if (error) - return "promptText." + error; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.openApiSpec != null && message.hasOwnProperty("openApiSpec")) { + properties.specification = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3.Tool.OpenApiTool.verify(message.openApiSpec); + if (error) + return "openApiSpec." + error; + } } - if (message.placeholders != null && message.hasOwnProperty("placeholders")) { - if (!Array.isArray(message.placeholders)) - return "placeholders: array expected"; - for (var i = 0; i < message.placeholders.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.Generator.Placeholder.verify(message.placeholders[i]); + if (message.dataStoreSpec != null && message.hasOwnProperty("dataStoreSpec")) { + if (properties.specification === 1) + return "specification: multiple values"; + properties.specification = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.verify(message.dataStoreSpec); if (error) - return "placeholders." + error; + return "dataStoreSpec." + error; } } - if (message.modelParameter != null && message.hasOwnProperty("modelParameter")) { - var error = $root.google.cloud.dialogflow.cx.v3.Generator.ModelParameter.verify(message.modelParameter); - if (error) - return "modelParameter." + error; + if (message.functionSpec != null && message.hasOwnProperty("functionSpec")) { + if (properties.specification === 1) + return "specification: multiple values"; + properties.specification = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3.Tool.FunctionTool.verify(message.functionSpec); + if (error) + return "functionSpec." + error; + } } + if (message.toolType != null && message.hasOwnProperty("toolType")) + switch (message.toolType) { + default: + return "toolType: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; /** - * Creates a Generator message from a plain object. Also converts values to their respective internal types. + * Creates a Tool message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.Generator + * @memberof google.cloud.dialogflow.cx.v3.Tool * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.Generator} Generator + * @returns {google.cloud.dialogflow.cx.v3.Tool} Tool */ - Generator.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.Generator) + Tool.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.Tool) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.Generator(); + var message = new $root.google.cloud.dialogflow.cx.v3.Tool(); if (object.name != null) message.name = String(object.name); if (object.displayName != null) message.displayName = String(object.displayName); - if (object.promptText != null) { - if (typeof object.promptText !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.Generator.promptText: object expected"); - message.promptText = $root.google.cloud.dialogflow.cx.v3.Phrase.fromObject(object.promptText); + if (object.description != null) + message.description = String(object.description); + if (object.openApiSpec != null) { + if (typeof object.openApiSpec !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Tool.openApiSpec: object expected"); + message.openApiSpec = $root.google.cloud.dialogflow.cx.v3.Tool.OpenApiTool.fromObject(object.openApiSpec); } - if (object.placeholders) { - if (!Array.isArray(object.placeholders)) - throw TypeError(".google.cloud.dialogflow.cx.v3.Generator.placeholders: array expected"); - message.placeholders = []; - for (var i = 0; i < object.placeholders.length; ++i) { - if (typeof object.placeholders[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.Generator.placeholders: object expected"); - message.placeholders[i] = $root.google.cloud.dialogflow.cx.v3.Generator.Placeholder.fromObject(object.placeholders[i]); - } + if (object.dataStoreSpec != null) { + if (typeof object.dataStoreSpec !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Tool.dataStoreSpec: object expected"); + message.dataStoreSpec = $root.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.fromObject(object.dataStoreSpec); } - if (object.modelParameter != null) { - if (typeof object.modelParameter !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.Generator.modelParameter: object expected"); - message.modelParameter = $root.google.cloud.dialogflow.cx.v3.Generator.ModelParameter.fromObject(object.modelParameter); + if (object.functionSpec != null) { + if (typeof object.functionSpec !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Tool.functionSpec: object expected"); + message.functionSpec = $root.google.cloud.dialogflow.cx.v3.Tool.FunctionTool.fromObject(object.functionSpec); + } + switch (object.toolType) { + default: + if (typeof object.toolType === "number") { + message.toolType = object.toolType; + break; + } + break; + case "TOOL_TYPE_UNSPECIFIED": + case 0: + message.toolType = 0; + break; + case "CUSTOMIZED_TOOL": + case 1: + message.toolType = 1; + break; + case "BUILTIN_TOOL": + case 2: + message.toolType = 2; + break; } return message; }; /** - * Creates a plain object from a Generator message. Also converts values to other types if specified. + * Creates a plain object from a Tool message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.Generator + * @memberof google.cloud.dialogflow.cx.v3.Tool * @static - * @param {google.cloud.dialogflow.cx.v3.Generator} message Generator + * @param {google.cloud.dialogflow.cx.v3.Tool} message Tool * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Generator.toObject = function toObject(message, options) { + Tool.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.placeholders = []; if (options.defaults) { object.name = ""; object.displayName = ""; - object.promptText = null; - object.modelParameter = null; + object.description = ""; + object.toolType = options.enums === String ? "TOOL_TYPE_UNSPECIFIED" : 0; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; if (message.displayName != null && message.hasOwnProperty("displayName")) object.displayName = message.displayName; - if (message.promptText != null && message.hasOwnProperty("promptText")) - object.promptText = $root.google.cloud.dialogflow.cx.v3.Phrase.toObject(message.promptText, options); - if (message.placeholders && message.placeholders.length) { - object.placeholders = []; - for (var j = 0; j < message.placeholders.length; ++j) - object.placeholders[j] = $root.google.cloud.dialogflow.cx.v3.Generator.Placeholder.toObject(message.placeholders[j], options); + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.openApiSpec != null && message.hasOwnProperty("openApiSpec")) { + object.openApiSpec = $root.google.cloud.dialogflow.cx.v3.Tool.OpenApiTool.toObject(message.openApiSpec, options); + if (options.oneofs) + object.specification = "openApiSpec"; + } + if (message.dataStoreSpec != null && message.hasOwnProperty("dataStoreSpec")) { + object.dataStoreSpec = $root.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.toObject(message.dataStoreSpec, options); + if (options.oneofs) + object.specification = "dataStoreSpec"; + } + if (message.toolType != null && message.hasOwnProperty("toolType")) + object.toolType = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.Tool.ToolType[message.toolType] === undefined ? message.toolType : $root.google.cloud.dialogflow.cx.v3.Tool.ToolType[message.toolType] : message.toolType; + if (message.functionSpec != null && message.hasOwnProperty("functionSpec")) { + object.functionSpec = $root.google.cloud.dialogflow.cx.v3.Tool.FunctionTool.toObject(message.functionSpec, options); + if (options.oneofs) + object.specification = "functionSpec"; } - if (message.modelParameter != null && message.hasOwnProperty("modelParameter")) - object.modelParameter = $root.google.cloud.dialogflow.cx.v3.Generator.ModelParameter.toObject(message.modelParameter, options); return object; }; /** - * Converts this Generator to JSON. + * Converts this Tool to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.Generator + * @memberof google.cloud.dialogflow.cx.v3.Tool * @instance * @returns {Object.} JSON object */ - Generator.prototype.toJSON = function toJSON() { + Tool.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Generator + * Gets the default type url for Tool * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.Generator + * @memberof google.cloud.dialogflow.cx.v3.Tool * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Generator.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Tool.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Generator"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Tool"; }; - Generator.Placeholder = (function() { + Tool.OpenApiTool = (function() { /** - * Properties of a Placeholder. - * @memberof google.cloud.dialogflow.cx.v3.Generator - * @interface IPlaceholder - * @property {string|null} [id] Placeholder id - * @property {string|null} [name] Placeholder name + * Properties of an OpenApiTool. + * @memberof google.cloud.dialogflow.cx.v3.Tool + * @interface IOpenApiTool + * @property {string|null} [textSchema] OpenApiTool textSchema + * @property {google.cloud.dialogflow.cx.v3.Tool.IAuthentication|null} [authentication] OpenApiTool authentication + * @property {google.cloud.dialogflow.cx.v3.Tool.ITLSConfig|null} [tlsConfig] OpenApiTool tlsConfig + * @property {google.cloud.dialogflow.cx.v3.Tool.IServiceDirectoryConfig|null} [serviceDirectoryConfig] OpenApiTool serviceDirectoryConfig */ /** - * Constructs a new Placeholder. - * @memberof google.cloud.dialogflow.cx.v3.Generator - * @classdesc Represents a Placeholder. - * @implements IPlaceholder + * Constructs a new OpenApiTool. + * @memberof google.cloud.dialogflow.cx.v3.Tool + * @classdesc Represents an OpenApiTool. + * @implements IOpenApiTool * @constructor - * @param {google.cloud.dialogflow.cx.v3.Generator.IPlaceholder=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.Tool.IOpenApiTool=} [properties] Properties to set */ - function Placeholder(properties) { + function OpenApiTool(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -85936,91 +109649,133 @@ } /** - * Placeholder id. - * @member {string} id - * @memberof google.cloud.dialogflow.cx.v3.Generator.Placeholder + * OpenApiTool textSchema. + * @member {string|null|undefined} textSchema + * @memberof google.cloud.dialogflow.cx.v3.Tool.OpenApiTool * @instance */ - Placeholder.prototype.id = ""; + OpenApiTool.prototype.textSchema = null; /** - * Placeholder name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.Generator.Placeholder + * OpenApiTool authentication. + * @member {google.cloud.dialogflow.cx.v3.Tool.IAuthentication|null|undefined} authentication + * @memberof google.cloud.dialogflow.cx.v3.Tool.OpenApiTool * @instance */ - Placeholder.prototype.name = ""; + OpenApiTool.prototype.authentication = null; /** - * Creates a new Placeholder instance using the specified properties. + * OpenApiTool tlsConfig. + * @member {google.cloud.dialogflow.cx.v3.Tool.ITLSConfig|null|undefined} tlsConfig + * @memberof google.cloud.dialogflow.cx.v3.Tool.OpenApiTool + * @instance + */ + OpenApiTool.prototype.tlsConfig = null; + + /** + * OpenApiTool serviceDirectoryConfig. + * @member {google.cloud.dialogflow.cx.v3.Tool.IServiceDirectoryConfig|null|undefined} serviceDirectoryConfig + * @memberof google.cloud.dialogflow.cx.v3.Tool.OpenApiTool + * @instance + */ + OpenApiTool.prototype.serviceDirectoryConfig = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * OpenApiTool schema. + * @member {"textSchema"|undefined} schema + * @memberof google.cloud.dialogflow.cx.v3.Tool.OpenApiTool + * @instance + */ + Object.defineProperty(OpenApiTool.prototype, "schema", { + get: $util.oneOfGetter($oneOfFields = ["textSchema"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new OpenApiTool instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.Generator.Placeholder + * @memberof google.cloud.dialogflow.cx.v3.Tool.OpenApiTool * @static - * @param {google.cloud.dialogflow.cx.v3.Generator.IPlaceholder=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.Generator.Placeholder} Placeholder instance + * @param {google.cloud.dialogflow.cx.v3.Tool.IOpenApiTool=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.Tool.OpenApiTool} OpenApiTool instance */ - Placeholder.create = function create(properties) { - return new Placeholder(properties); + OpenApiTool.create = function create(properties) { + return new OpenApiTool(properties); }; /** - * Encodes the specified Placeholder message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Generator.Placeholder.verify|verify} messages. + * Encodes the specified OpenApiTool message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Tool.OpenApiTool.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.Generator.Placeholder + * @memberof google.cloud.dialogflow.cx.v3.Tool.OpenApiTool * @static - * @param {google.cloud.dialogflow.cx.v3.Generator.IPlaceholder} message Placeholder message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.Tool.IOpenApiTool} message OpenApiTool message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Placeholder.encode = function encode(message, writer) { + OpenApiTool.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); + if (message.textSchema != null && Object.hasOwnProperty.call(message, "textSchema")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.textSchema); + if (message.authentication != null && Object.hasOwnProperty.call(message, "authentication")) + $root.google.cloud.dialogflow.cx.v3.Tool.Authentication.encode(message.authentication, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.tlsConfig != null && Object.hasOwnProperty.call(message, "tlsConfig")) + $root.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.encode(message.tlsConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.serviceDirectoryConfig != null && Object.hasOwnProperty.call(message, "serviceDirectoryConfig")) + $root.google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig.encode(message.serviceDirectoryConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified Placeholder message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Generator.Placeholder.verify|verify} messages. + * Encodes the specified OpenApiTool message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Tool.OpenApiTool.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Generator.Placeholder + * @memberof google.cloud.dialogflow.cx.v3.Tool.OpenApiTool * @static - * @param {google.cloud.dialogflow.cx.v3.Generator.IPlaceholder} message Placeholder message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.Tool.IOpenApiTool} message OpenApiTool message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Placeholder.encodeDelimited = function encodeDelimited(message, writer) { + OpenApiTool.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Placeholder message from the specified reader or buffer. + * Decodes an OpenApiTool message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.Generator.Placeholder + * @memberof google.cloud.dialogflow.cx.v3.Tool.OpenApiTool * @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.Generator.Placeholder} Placeholder + * @returns {google.cloud.dialogflow.cx.v3.Tool.OpenApiTool} OpenApiTool * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Placeholder.decode = function decode(reader, length, error) { + OpenApiTool.decode = function decode(reader, length, error) { 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.Generator.Placeholder(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.Tool.OpenApiTool(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.id = reader.string(); + message.textSchema = reader.string(); break; } case 2: { - message.name = reader.string(); + message.authentication = $root.google.cloud.dialogflow.cx.v3.Tool.Authentication.decode(reader, reader.uint32()); + break; + } + case 3: { + message.tlsConfig = $root.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.decode(reader, reader.uint32()); + break; + } + case 4: { + message.serviceDirectoryConfig = $root.google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig.decode(reader, reader.uint32()); break; } default: @@ -86032,134 +109787,169 @@ }; /** - * Decodes a Placeholder message from the specified reader or buffer, length delimited. + * Decodes an OpenApiTool message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Generator.Placeholder + * @memberof google.cloud.dialogflow.cx.v3.Tool.OpenApiTool * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.Generator.Placeholder} Placeholder + * @returns {google.cloud.dialogflow.cx.v3.Tool.OpenApiTool} OpenApiTool * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Placeholder.decodeDelimited = function decodeDelimited(reader) { + OpenApiTool.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Placeholder message. + * Verifies an OpenApiTool message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.Generator.Placeholder + * @memberof google.cloud.dialogflow.cx.v3.Tool.OpenApiTool * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Placeholder.verify = function verify(message) { + OpenApiTool.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isString(message.id)) - return "id: string expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + var properties = {}; + if (message.textSchema != null && message.hasOwnProperty("textSchema")) { + properties.schema = 1; + if (!$util.isString(message.textSchema)) + return "textSchema: string expected"; + } + if (message.authentication != null && message.hasOwnProperty("authentication")) { + var error = $root.google.cloud.dialogflow.cx.v3.Tool.Authentication.verify(message.authentication); + if (error) + return "authentication." + error; + } + if (message.tlsConfig != null && message.hasOwnProperty("tlsConfig")) { + var error = $root.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.verify(message.tlsConfig); + if (error) + return "tlsConfig." + error; + } + if (message.serviceDirectoryConfig != null && message.hasOwnProperty("serviceDirectoryConfig")) { + var error = $root.google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig.verify(message.serviceDirectoryConfig); + if (error) + return "serviceDirectoryConfig." + error; + } return null; }; /** - * Creates a Placeholder message from a plain object. Also converts values to their respective internal types. + * Creates an OpenApiTool message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.Generator.Placeholder + * @memberof google.cloud.dialogflow.cx.v3.Tool.OpenApiTool * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.Generator.Placeholder} Placeholder + * @returns {google.cloud.dialogflow.cx.v3.Tool.OpenApiTool} OpenApiTool */ - Placeholder.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.Generator.Placeholder) + OpenApiTool.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.Tool.OpenApiTool) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.Generator.Placeholder(); - if (object.id != null) - message.id = String(object.id); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.dialogflow.cx.v3.Tool.OpenApiTool(); + if (object.textSchema != null) + message.textSchema = String(object.textSchema); + if (object.authentication != null) { + if (typeof object.authentication !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Tool.OpenApiTool.authentication: object expected"); + message.authentication = $root.google.cloud.dialogflow.cx.v3.Tool.Authentication.fromObject(object.authentication); + } + if (object.tlsConfig != null) { + if (typeof object.tlsConfig !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Tool.OpenApiTool.tlsConfig: object expected"); + message.tlsConfig = $root.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.fromObject(object.tlsConfig); + } + if (object.serviceDirectoryConfig != null) { + if (typeof object.serviceDirectoryConfig !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Tool.OpenApiTool.serviceDirectoryConfig: object expected"); + message.serviceDirectoryConfig = $root.google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig.fromObject(object.serviceDirectoryConfig); + } return message; }; /** - * Creates a plain object from a Placeholder message. Also converts values to other types if specified. + * Creates a plain object from an OpenApiTool message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.Generator.Placeholder + * @memberof google.cloud.dialogflow.cx.v3.Tool.OpenApiTool * @static - * @param {google.cloud.dialogflow.cx.v3.Generator.Placeholder} message Placeholder + * @param {google.cloud.dialogflow.cx.v3.Tool.OpenApiTool} message OpenApiTool * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Placeholder.toObject = function toObject(message, options) { + OpenApiTool.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.id = ""; - object.name = ""; + object.authentication = null; + object.tlsConfig = null; + object.serviceDirectoryConfig = null; } - if (message.id != null && message.hasOwnProperty("id")) - object.id = message.id; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (message.textSchema != null && message.hasOwnProperty("textSchema")) { + object.textSchema = message.textSchema; + if (options.oneofs) + object.schema = "textSchema"; + } + if (message.authentication != null && message.hasOwnProperty("authentication")) + object.authentication = $root.google.cloud.dialogflow.cx.v3.Tool.Authentication.toObject(message.authentication, options); + if (message.tlsConfig != null && message.hasOwnProperty("tlsConfig")) + object.tlsConfig = $root.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.toObject(message.tlsConfig, options); + if (message.serviceDirectoryConfig != null && message.hasOwnProperty("serviceDirectoryConfig")) + object.serviceDirectoryConfig = $root.google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig.toObject(message.serviceDirectoryConfig, options); return object; }; /** - * Converts this Placeholder to JSON. + * Converts this OpenApiTool to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.Generator.Placeholder + * @memberof google.cloud.dialogflow.cx.v3.Tool.OpenApiTool * @instance * @returns {Object.} JSON object */ - Placeholder.prototype.toJSON = function toJSON() { + OpenApiTool.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Placeholder + * Gets the default type url for OpenApiTool * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.Generator.Placeholder + * @memberof google.cloud.dialogflow.cx.v3.Tool.OpenApiTool * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Placeholder.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + OpenApiTool.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Generator.Placeholder"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Tool.OpenApiTool"; }; - return Placeholder; + return OpenApiTool; })(); - Generator.ModelParameter = (function() { + Tool.DataStoreTool = (function() { /** - * Properties of a ModelParameter. - * @memberof google.cloud.dialogflow.cx.v3.Generator - * @interface IModelParameter - * @property {number|null} [temperature] ModelParameter temperature - * @property {number|null} [maxDecodeSteps] ModelParameter maxDecodeSteps - * @property {number|null} [topP] ModelParameter topP - * @property {number|null} [topK] ModelParameter topK + * Properties of a DataStoreTool. + * @memberof google.cloud.dialogflow.cx.v3.Tool + * @interface IDataStoreTool + * @property {Array.|null} [dataStoreConnections] DataStoreTool dataStoreConnections + * @property {google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.IFallbackPrompt|null} [fallbackPrompt] DataStoreTool fallbackPrompt */ /** - * Constructs a new ModelParameter. - * @memberof google.cloud.dialogflow.cx.v3.Generator - * @classdesc Represents a ModelParameter. - * @implements IModelParameter + * Constructs a new DataStoreTool. + * @memberof google.cloud.dialogflow.cx.v3.Tool + * @classdesc Represents a DataStoreTool. + * @implements IDataStoreTool * @constructor - * @param {google.cloud.dialogflow.cx.v3.Generator.IModelParameter=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.Tool.IDataStoreTool=} [properties] Properties to set */ - function ModelParameter(properties) { + function DataStoreTool(properties) { + this.dataStoreConnections = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -86167,146 +109957,94 @@ } /** - * ModelParameter temperature. - * @member {number|null|undefined} temperature - * @memberof google.cloud.dialogflow.cx.v3.Generator.ModelParameter - * @instance - */ - ModelParameter.prototype.temperature = null; - - /** - * ModelParameter maxDecodeSteps. - * @member {number|null|undefined} maxDecodeSteps - * @memberof google.cloud.dialogflow.cx.v3.Generator.ModelParameter - * @instance - */ - ModelParameter.prototype.maxDecodeSteps = null; - - /** - * ModelParameter topP. - * @member {number|null|undefined} topP - * @memberof google.cloud.dialogflow.cx.v3.Generator.ModelParameter + * DataStoreTool dataStoreConnections. + * @member {Array.} dataStoreConnections + * @memberof google.cloud.dialogflow.cx.v3.Tool.DataStoreTool * @instance */ - ModelParameter.prototype.topP = null; + DataStoreTool.prototype.dataStoreConnections = $util.emptyArray; /** - * ModelParameter topK. - * @member {number|null|undefined} topK - * @memberof google.cloud.dialogflow.cx.v3.Generator.ModelParameter + * DataStoreTool fallbackPrompt. + * @member {google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.IFallbackPrompt|null|undefined} fallbackPrompt + * @memberof google.cloud.dialogflow.cx.v3.Tool.DataStoreTool * @instance */ - ModelParameter.prototype.topK = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(ModelParameter.prototype, "_temperature", { - get: $util.oneOfGetter($oneOfFields = ["temperature"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(ModelParameter.prototype, "_maxDecodeSteps", { - get: $util.oneOfGetter($oneOfFields = ["maxDecodeSteps"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(ModelParameter.prototype, "_topP", { - get: $util.oneOfGetter($oneOfFields = ["topP"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(ModelParameter.prototype, "_topK", { - get: $util.oneOfGetter($oneOfFields = ["topK"]), - set: $util.oneOfSetter($oneOfFields) - }); + DataStoreTool.prototype.fallbackPrompt = null; /** - * Creates a new ModelParameter instance using the specified properties. + * Creates a new DataStoreTool instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.Generator.ModelParameter + * @memberof google.cloud.dialogflow.cx.v3.Tool.DataStoreTool * @static - * @param {google.cloud.dialogflow.cx.v3.Generator.IModelParameter=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.Generator.ModelParameter} ModelParameter instance + * @param {google.cloud.dialogflow.cx.v3.Tool.IDataStoreTool=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.Tool.DataStoreTool} DataStoreTool instance */ - ModelParameter.create = function create(properties) { - return new ModelParameter(properties); + DataStoreTool.create = function create(properties) { + return new DataStoreTool(properties); }; /** - * Encodes the specified ModelParameter message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Generator.ModelParameter.verify|verify} messages. + * Encodes the specified DataStoreTool message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.Generator.ModelParameter + * @memberof google.cloud.dialogflow.cx.v3.Tool.DataStoreTool * @static - * @param {google.cloud.dialogflow.cx.v3.Generator.IModelParameter} message ModelParameter message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.Tool.IDataStoreTool} message DataStoreTool message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ModelParameter.encode = function encode(message, writer) { + DataStoreTool.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.temperature != null && Object.hasOwnProperty.call(message, "temperature")) - writer.uint32(/* id 1, wireType 5 =*/13).float(message.temperature); - if (message.maxDecodeSteps != null && Object.hasOwnProperty.call(message, "maxDecodeSteps")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.maxDecodeSteps); - if (message.topP != null && Object.hasOwnProperty.call(message, "topP")) - writer.uint32(/* id 3, wireType 5 =*/29).float(message.topP); - if (message.topK != null && Object.hasOwnProperty.call(message, "topK")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.topK); + if (message.dataStoreConnections != null && message.dataStoreConnections.length) + for (var i = 0; i < message.dataStoreConnections.length; ++i) + $root.google.cloud.dialogflow.cx.v3.DataStoreConnection.encode(message.dataStoreConnections[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.fallbackPrompt != null && Object.hasOwnProperty.call(message, "fallbackPrompt")) + $root.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt.encode(message.fallbackPrompt, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified ModelParameter message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Generator.ModelParameter.verify|verify} messages. + * Encodes the specified DataStoreTool message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Generator.ModelParameter + * @memberof google.cloud.dialogflow.cx.v3.Tool.DataStoreTool * @static - * @param {google.cloud.dialogflow.cx.v3.Generator.IModelParameter} message ModelParameter message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.Tool.IDataStoreTool} message DataStoreTool message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ModelParameter.encodeDelimited = function encodeDelimited(message, writer) { + DataStoreTool.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ModelParameter message from the specified reader or buffer. + * Decodes a DataStoreTool message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.Generator.ModelParameter + * @memberof google.cloud.dialogflow.cx.v3.Tool.DataStoreTool * @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.Generator.ModelParameter} ModelParameter + * @returns {google.cloud.dialogflow.cx.v3.Tool.DataStoreTool} DataStoreTool * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ModelParameter.decode = function decode(reader, length, error) { + DataStoreTool.decode = function decode(reader, length, error) { 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.Generator.ModelParameter(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.temperature = reader.float(); - break; - } - case 2: { - message.maxDecodeSteps = reader.int32(); + if (!(message.dataStoreConnections && message.dataStoreConnections.length)) + message.dataStoreConnections = []; + message.dataStoreConnections.push($root.google.cloud.dialogflow.cx.v3.DataStoreConnection.decode(reader, reader.uint32())); break; } case 3: { - message.topP = reader.float(); - break; - } - case 4: { - message.topK = reader.int32(); + message.fallbackPrompt = $root.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt.decode(reader, reader.uint32()); break; } default: @@ -86318,2518 +110056,2993 @@ }; /** - * Decodes a ModelParameter message from the specified reader or buffer, length delimited. + * Decodes a DataStoreTool message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Generator.ModelParameter + * @memberof google.cloud.dialogflow.cx.v3.Tool.DataStoreTool * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.Generator.ModelParameter} ModelParameter + * @returns {google.cloud.dialogflow.cx.v3.Tool.DataStoreTool} DataStoreTool * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ModelParameter.decodeDelimited = function decodeDelimited(reader) { + DataStoreTool.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ModelParameter message. + * Verifies a DataStoreTool message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.Generator.ModelParameter + * @memberof google.cloud.dialogflow.cx.v3.Tool.DataStoreTool * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ModelParameter.verify = function verify(message) { + DataStoreTool.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.temperature != null && message.hasOwnProperty("temperature")) { - properties._temperature = 1; - if (typeof message.temperature !== "number") - return "temperature: number expected"; - } - if (message.maxDecodeSteps != null && message.hasOwnProperty("maxDecodeSteps")) { - properties._maxDecodeSteps = 1; - if (!$util.isInteger(message.maxDecodeSteps)) - return "maxDecodeSteps: integer expected"; - } - if (message.topP != null && message.hasOwnProperty("topP")) { - properties._topP = 1; - if (typeof message.topP !== "number") - return "topP: number expected"; + if (message.dataStoreConnections != null && message.hasOwnProperty("dataStoreConnections")) { + if (!Array.isArray(message.dataStoreConnections)) + return "dataStoreConnections: array expected"; + for (var i = 0; i < message.dataStoreConnections.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.DataStoreConnection.verify(message.dataStoreConnections[i]); + if (error) + return "dataStoreConnections." + error; + } } - if (message.topK != null && message.hasOwnProperty("topK")) { - properties._topK = 1; - if (!$util.isInteger(message.topK)) - return "topK: integer expected"; + if (message.fallbackPrompt != null && message.hasOwnProperty("fallbackPrompt")) { + var error = $root.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt.verify(message.fallbackPrompt); + if (error) + return "fallbackPrompt." + error; } return null; }; /** - * Creates a ModelParameter message from a plain object. Also converts values to their respective internal types. + * Creates a DataStoreTool message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.Generator.ModelParameter + * @memberof google.cloud.dialogflow.cx.v3.Tool.DataStoreTool * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.Generator.ModelParameter} ModelParameter + * @returns {google.cloud.dialogflow.cx.v3.Tool.DataStoreTool} DataStoreTool */ - ModelParameter.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.Generator.ModelParameter) + DataStoreTool.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.Generator.ModelParameter(); - if (object.temperature != null) - message.temperature = Number(object.temperature); - if (object.maxDecodeSteps != null) - message.maxDecodeSteps = object.maxDecodeSteps | 0; - if (object.topP != null) - message.topP = Number(object.topP); - if (object.topK != null) - message.topK = object.topK | 0; + var message = new $root.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool(); + if (object.dataStoreConnections) { + if (!Array.isArray(object.dataStoreConnections)) + throw TypeError(".google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.dataStoreConnections: array expected"); + message.dataStoreConnections = []; + for (var i = 0; i < object.dataStoreConnections.length; ++i) { + if (typeof object.dataStoreConnections[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.dataStoreConnections: object expected"); + message.dataStoreConnections[i] = $root.google.cloud.dialogflow.cx.v3.DataStoreConnection.fromObject(object.dataStoreConnections[i]); + } + } + if (object.fallbackPrompt != null) { + if (typeof object.fallbackPrompt !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.fallbackPrompt: object expected"); + message.fallbackPrompt = $root.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt.fromObject(object.fallbackPrompt); + } return message; }; /** - * Creates a plain object from a ModelParameter message. Also converts values to other types if specified. + * Creates a plain object from a DataStoreTool message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.Generator.ModelParameter + * @memberof google.cloud.dialogflow.cx.v3.Tool.DataStoreTool * @static - * @param {google.cloud.dialogflow.cx.v3.Generator.ModelParameter} message ModelParameter + * @param {google.cloud.dialogflow.cx.v3.Tool.DataStoreTool} message DataStoreTool * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ModelParameter.toObject = function toObject(message, options) { + DataStoreTool.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.temperature != null && message.hasOwnProperty("temperature")) { - object.temperature = options.json && !isFinite(message.temperature) ? String(message.temperature) : message.temperature; - if (options.oneofs) - object._temperature = "temperature"; - } - if (message.maxDecodeSteps != null && message.hasOwnProperty("maxDecodeSteps")) { - object.maxDecodeSteps = message.maxDecodeSteps; - if (options.oneofs) - object._maxDecodeSteps = "maxDecodeSteps"; - } - if (message.topP != null && message.hasOwnProperty("topP")) { - object.topP = options.json && !isFinite(message.topP) ? String(message.topP) : message.topP; - if (options.oneofs) - object._topP = "topP"; - } - if (message.topK != null && message.hasOwnProperty("topK")) { - object.topK = message.topK; - if (options.oneofs) - object._topK = "topK"; + if (options.arrays || options.defaults) + object.dataStoreConnections = []; + if (options.defaults) + object.fallbackPrompt = null; + if (message.dataStoreConnections && message.dataStoreConnections.length) { + object.dataStoreConnections = []; + for (var j = 0; j < message.dataStoreConnections.length; ++j) + object.dataStoreConnections[j] = $root.google.cloud.dialogflow.cx.v3.DataStoreConnection.toObject(message.dataStoreConnections[j], options); } + if (message.fallbackPrompt != null && message.hasOwnProperty("fallbackPrompt")) + object.fallbackPrompt = $root.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt.toObject(message.fallbackPrompt, options); return object; }; /** - * Converts this ModelParameter to JSON. + * Converts this DataStoreTool to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.Generator.ModelParameter + * @memberof google.cloud.dialogflow.cx.v3.Tool.DataStoreTool * @instance * @returns {Object.} JSON object */ - ModelParameter.prototype.toJSON = function toJSON() { + DataStoreTool.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ModelParameter + * Gets the default type url for DataStoreTool * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.Generator.ModelParameter + * @memberof google.cloud.dialogflow.cx.v3.Tool.DataStoreTool * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ModelParameter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DataStoreTool.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Generator.ModelParameter"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Tool.DataStoreTool"; }; - return ModelParameter; + DataStoreTool.FallbackPrompt = (function() { + + /** + * Properties of a FallbackPrompt. + * @memberof google.cloud.dialogflow.cx.v3.Tool.DataStoreTool + * @interface IFallbackPrompt + */ + + /** + * Constructs a new FallbackPrompt. + * @memberof google.cloud.dialogflow.cx.v3.Tool.DataStoreTool + * @classdesc Represents a FallbackPrompt. + * @implements IFallbackPrompt + * @constructor + * @param {google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.IFallbackPrompt=} [properties] Properties to set + */ + function FallbackPrompt(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]]; + } + + /** + * Creates a new FallbackPrompt instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt + * @static + * @param {google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.IFallbackPrompt=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt} FallbackPrompt instance + */ + FallbackPrompt.create = function create(properties) { + return new FallbackPrompt(properties); + }; + + /** + * Encodes the specified FallbackPrompt message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt + * @static + * @param {google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.IFallbackPrompt} message FallbackPrompt message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FallbackPrompt.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified FallbackPrompt message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt + * @static + * @param {google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.IFallbackPrompt} message FallbackPrompt message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FallbackPrompt.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FallbackPrompt message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt + * @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.Tool.DataStoreTool.FallbackPrompt} FallbackPrompt + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FallbackPrompt.decode = function decode(reader, length, error) { + 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.Tool.DataStoreTool.FallbackPrompt(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FallbackPrompt message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt} FallbackPrompt + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FallbackPrompt.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FallbackPrompt message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FallbackPrompt.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a FallbackPrompt message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt} FallbackPrompt + */ + FallbackPrompt.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt) + return object; + return new $root.google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt(); + }; + + /** + * Creates a plain object from a FallbackPrompt message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt + * @static + * @param {google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt} message FallbackPrompt + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FallbackPrompt.toObject = function toObject() { + return {}; + }; + + /** + * Converts this FallbackPrompt to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt + * @instance + * @returns {Object.} JSON object + */ + FallbackPrompt.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FallbackPrompt + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FallbackPrompt.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Tool.DataStoreTool.FallbackPrompt"; + }; + + return FallbackPrompt; + })(); + + return DataStoreTool; })(); - return Generator; - })(); + Tool.FunctionTool = (function() { - v3.Phrase = (function() { + /** + * Properties of a FunctionTool. + * @memberof google.cloud.dialogflow.cx.v3.Tool + * @interface IFunctionTool + * @property {google.protobuf.IStruct|null} [inputSchema] FunctionTool inputSchema + * @property {google.protobuf.IStruct|null} [outputSchema] FunctionTool outputSchema + */ - /** - * Properties of a Phrase. - * @memberof google.cloud.dialogflow.cx.v3 - * @interface IPhrase - * @property {string|null} [text] Phrase text - */ + /** + * Constructs a new FunctionTool. + * @memberof google.cloud.dialogflow.cx.v3.Tool + * @classdesc Represents a FunctionTool. + * @implements IFunctionTool + * @constructor + * @param {google.cloud.dialogflow.cx.v3.Tool.IFunctionTool=} [properties] Properties to set + */ + function FunctionTool(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]]; + } - /** - * Constructs a new Phrase. - * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a Phrase. - * @implements IPhrase - * @constructor - * @param {google.cloud.dialogflow.cx.v3.IPhrase=} [properties] Properties to set - */ - function Phrase(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]]; - } + /** + * FunctionTool inputSchema. + * @member {google.protobuf.IStruct|null|undefined} inputSchema + * @memberof google.cloud.dialogflow.cx.v3.Tool.FunctionTool + * @instance + */ + FunctionTool.prototype.inputSchema = null; - /** - * Phrase text. - * @member {string} text - * @memberof google.cloud.dialogflow.cx.v3.Phrase - * @instance - */ - Phrase.prototype.text = ""; + /** + * FunctionTool outputSchema. + * @member {google.protobuf.IStruct|null|undefined} outputSchema + * @memberof google.cloud.dialogflow.cx.v3.Tool.FunctionTool + * @instance + */ + FunctionTool.prototype.outputSchema = null; - /** - * Creates a new Phrase instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.Phrase - * @static - * @param {google.cloud.dialogflow.cx.v3.IPhrase=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.Phrase} Phrase instance - */ - Phrase.create = function create(properties) { - return new Phrase(properties); - }; + /** + * Creates a new FunctionTool instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.Tool.FunctionTool + * @static + * @param {google.cloud.dialogflow.cx.v3.Tool.IFunctionTool=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.Tool.FunctionTool} FunctionTool instance + */ + FunctionTool.create = function create(properties) { + return new FunctionTool(properties); + }; - /** - * Encodes the specified Phrase message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Phrase.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.Phrase - * @static - * @param {google.cloud.dialogflow.cx.v3.IPhrase} message Phrase message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Phrase.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.text != null && Object.hasOwnProperty.call(message, "text")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.text); - return writer; - }; + /** + * Encodes the specified FunctionTool message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Tool.FunctionTool.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.Tool.FunctionTool + * @static + * @param {google.cloud.dialogflow.cx.v3.Tool.IFunctionTool} message FunctionTool message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunctionTool.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.inputSchema != null && Object.hasOwnProperty.call(message, "inputSchema")) + $root.google.protobuf.Struct.encode(message.inputSchema, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.outputSchema != null && Object.hasOwnProperty.call(message, "outputSchema")) + $root.google.protobuf.Struct.encode(message.outputSchema, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; - /** - * Encodes the specified Phrase message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Phrase.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Phrase - * @static - * @param {google.cloud.dialogflow.cx.v3.IPhrase} message Phrase message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Phrase.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified FunctionTool message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Tool.FunctionTool.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Tool.FunctionTool + * @static + * @param {google.cloud.dialogflow.cx.v3.Tool.IFunctionTool} message FunctionTool message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunctionTool.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FunctionTool message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.Tool.FunctionTool + * @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.Tool.FunctionTool} FunctionTool + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunctionTool.decode = function decode(reader, length, error) { + 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.Tool.FunctionTool(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.inputSchema = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + } + case 2: { + message.outputSchema = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FunctionTool message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Tool.FunctionTool + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.Tool.FunctionTool} FunctionTool + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunctionTool.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FunctionTool message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.Tool.FunctionTool + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FunctionTool.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.inputSchema != null && message.hasOwnProperty("inputSchema")) { + var error = $root.google.protobuf.Struct.verify(message.inputSchema); + if (error) + return "inputSchema." + error; + } + if (message.outputSchema != null && message.hasOwnProperty("outputSchema")) { + var error = $root.google.protobuf.Struct.verify(message.outputSchema); + if (error) + return "outputSchema." + error; + } + return null; + }; - /** - * Decodes a Phrase message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.Phrase - * @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.Phrase} Phrase - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Phrase.decode = function decode(reader, length, error) { - 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.Phrase(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.text = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; + /** + * Creates a FunctionTool message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.Tool.FunctionTool + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.Tool.FunctionTool} FunctionTool + */ + FunctionTool.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.Tool.FunctionTool) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.Tool.FunctionTool(); + if (object.inputSchema != null) { + if (typeof object.inputSchema !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Tool.FunctionTool.inputSchema: object expected"); + message.inputSchema = $root.google.protobuf.Struct.fromObject(object.inputSchema); } - } - return message; - }; + if (object.outputSchema != null) { + if (typeof object.outputSchema !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Tool.FunctionTool.outputSchema: object expected"); + message.outputSchema = $root.google.protobuf.Struct.fromObject(object.outputSchema); + } + return message; + }; - /** - * Decodes a Phrase message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Phrase - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.Phrase} Phrase - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Phrase.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a plain object from a FunctionTool message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.Tool.FunctionTool + * @static + * @param {google.cloud.dialogflow.cx.v3.Tool.FunctionTool} message FunctionTool + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FunctionTool.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.inputSchema = null; + object.outputSchema = null; + } + if (message.inputSchema != null && message.hasOwnProperty("inputSchema")) + object.inputSchema = $root.google.protobuf.Struct.toObject(message.inputSchema, options); + if (message.outputSchema != null && message.hasOwnProperty("outputSchema")) + object.outputSchema = $root.google.protobuf.Struct.toObject(message.outputSchema, options); + return object; + }; - /** - * Verifies a Phrase message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.Phrase - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Phrase.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.text != null && message.hasOwnProperty("text")) - if (!$util.isString(message.text)) - return "text: string expected"; - return null; - }; + /** + * Converts this FunctionTool to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.Tool.FunctionTool + * @instance + * @returns {Object.} JSON object + */ + FunctionTool.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates a Phrase message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.Phrase - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.Phrase} Phrase - */ - Phrase.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.Phrase) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.Phrase(); - if (object.text != null) - message.text = String(object.text); - return message; - }; + /** + * Gets the default type url for FunctionTool + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.Tool.FunctionTool + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FunctionTool.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Tool.FunctionTool"; + }; - /** - * Creates a plain object from a Phrase message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.Phrase - * @static - * @param {google.cloud.dialogflow.cx.v3.Phrase} message Phrase - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Phrase.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.text = ""; - if (message.text != null && message.hasOwnProperty("text")) - object.text = message.text; - return object; - }; + return FunctionTool; + })(); - /** - * Converts this Phrase to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.Phrase - * @instance - * @returns {Object.} JSON object - */ - Phrase.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + Tool.Authentication = (function() { - /** - * Gets the default type url for Phrase - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.Phrase - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Phrase.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Phrase"; - }; + /** + * Properties of an Authentication. + * @memberof google.cloud.dialogflow.cx.v3.Tool + * @interface IAuthentication + * @property {google.cloud.dialogflow.cx.v3.Tool.Authentication.IApiKeyConfig|null} [apiKeyConfig] Authentication apiKeyConfig + * @property {google.cloud.dialogflow.cx.v3.Tool.Authentication.IOAuthConfig|null} [oauthConfig] Authentication oauthConfig + * @property {google.cloud.dialogflow.cx.v3.Tool.Authentication.IServiceAgentAuthConfig|null} [serviceAgentAuthConfig] Authentication serviceAgentAuthConfig + * @property {google.cloud.dialogflow.cx.v3.Tool.Authentication.IBearerTokenConfig|null} [bearerTokenConfig] Authentication bearerTokenConfig + * @property {google.cloud.dialogflow.cx.v3.Tool.Authentication.IServiceAccountAuthConfig|null} [serviceAccountAuthConfig] Authentication serviceAccountAuthConfig + */ - return Phrase; - })(); + /** + * Constructs a new Authentication. + * @memberof google.cloud.dialogflow.cx.v3.Tool + * @classdesc Represents an Authentication. + * @implements IAuthentication + * @constructor + * @param {google.cloud.dialogflow.cx.v3.Tool.IAuthentication=} [properties] Properties to set + */ + function Authentication(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]]; + } - v3.ListGeneratorsRequest = (function() { + /** + * Authentication apiKeyConfig. + * @member {google.cloud.dialogflow.cx.v3.Tool.Authentication.IApiKeyConfig|null|undefined} apiKeyConfig + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication + * @instance + */ + Authentication.prototype.apiKeyConfig = null; - /** - * Properties of a ListGeneratorsRequest. - * @memberof google.cloud.dialogflow.cx.v3 - * @interface IListGeneratorsRequest - * @property {string|null} [parent] ListGeneratorsRequest parent - * @property {string|null} [languageCode] ListGeneratorsRequest languageCode - * @property {number|null} [pageSize] ListGeneratorsRequest pageSize - * @property {string|null} [pageToken] ListGeneratorsRequest pageToken - */ + /** + * Authentication oauthConfig. + * @member {google.cloud.dialogflow.cx.v3.Tool.Authentication.IOAuthConfig|null|undefined} oauthConfig + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication + * @instance + */ + Authentication.prototype.oauthConfig = null; - /** - * Constructs a new ListGeneratorsRequest. - * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a ListGeneratorsRequest. - * @implements IListGeneratorsRequest - * @constructor - * @param {google.cloud.dialogflow.cx.v3.IListGeneratorsRequest=} [properties] Properties to set - */ - function ListGeneratorsRequest(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]]; - } + /** + * Authentication serviceAgentAuthConfig. + * @member {google.cloud.dialogflow.cx.v3.Tool.Authentication.IServiceAgentAuthConfig|null|undefined} serviceAgentAuthConfig + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication + * @instance + */ + Authentication.prototype.serviceAgentAuthConfig = null; - /** - * ListGeneratorsRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3.ListGeneratorsRequest - * @instance - */ - ListGeneratorsRequest.prototype.parent = ""; + /** + * Authentication bearerTokenConfig. + * @member {google.cloud.dialogflow.cx.v3.Tool.Authentication.IBearerTokenConfig|null|undefined} bearerTokenConfig + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication + * @instance + */ + Authentication.prototype.bearerTokenConfig = null; - /** - * ListGeneratorsRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3.ListGeneratorsRequest - * @instance - */ - ListGeneratorsRequest.prototype.languageCode = ""; + /** + * Authentication serviceAccountAuthConfig. + * @member {google.cloud.dialogflow.cx.v3.Tool.Authentication.IServiceAccountAuthConfig|null|undefined} serviceAccountAuthConfig + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication + * @instance + */ + Authentication.prototype.serviceAccountAuthConfig = null; - /** - * ListGeneratorsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dialogflow.cx.v3.ListGeneratorsRequest - * @instance - */ - ListGeneratorsRequest.prototype.pageSize = 0; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * ListGeneratorsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dialogflow.cx.v3.ListGeneratorsRequest - * @instance - */ - ListGeneratorsRequest.prototype.pageToken = ""; + /** + * Authentication authConfig. + * @member {"apiKeyConfig"|"oauthConfig"|"serviceAgentAuthConfig"|"bearerTokenConfig"|"serviceAccountAuthConfig"|undefined} authConfig + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication + * @instance + */ + Object.defineProperty(Authentication.prototype, "authConfig", { + get: $util.oneOfGetter($oneOfFields = ["apiKeyConfig", "oauthConfig", "serviceAgentAuthConfig", "bearerTokenConfig", "serviceAccountAuthConfig"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Creates a new ListGeneratorsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.ListGeneratorsRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.IListGeneratorsRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ListGeneratorsRequest} ListGeneratorsRequest instance - */ - ListGeneratorsRequest.create = function create(properties) { - return new ListGeneratorsRequest(properties); - }; + /** + * Creates a new Authentication instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication + * @static + * @param {google.cloud.dialogflow.cx.v3.Tool.IAuthentication=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.Tool.Authentication} Authentication instance + */ + Authentication.create = function create(properties) { + return new Authentication(properties); + }; - /** - * Encodes the specified ListGeneratorsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListGeneratorsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ListGeneratorsRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.IListGeneratorsRequest} message ListGeneratorsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListGeneratorsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); - return writer; - }; + /** + * Encodes the specified Authentication message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Tool.Authentication.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication + * @static + * @param {google.cloud.dialogflow.cx.v3.Tool.IAuthentication} message Authentication message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Authentication.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.apiKeyConfig != null && Object.hasOwnProperty.call(message, "apiKeyConfig")) + $root.google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig.encode(message.apiKeyConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.oauthConfig != null && Object.hasOwnProperty.call(message, "oauthConfig")) + $root.google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig.encode(message.oauthConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.serviceAgentAuthConfig != null && Object.hasOwnProperty.call(message, "serviceAgentAuthConfig")) + $root.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig.encode(message.serviceAgentAuthConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.bearerTokenConfig != null && Object.hasOwnProperty.call(message, "bearerTokenConfig")) + $root.google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig.encode(message.bearerTokenConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.serviceAccountAuthConfig != null && Object.hasOwnProperty.call(message, "serviceAccountAuthConfig")) + $root.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig.encode(message.serviceAccountAuthConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; - /** - * Encodes the specified ListGeneratorsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListGeneratorsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListGeneratorsRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.IListGeneratorsRequest} message ListGeneratorsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListGeneratorsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified Authentication message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Tool.Authentication.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication + * @static + * @param {google.cloud.dialogflow.cx.v3.Tool.IAuthentication} message Authentication message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Authentication.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a ListGeneratorsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ListGeneratorsRequest - * @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.ListGeneratorsRequest} ListGeneratorsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListGeneratorsRequest.decode = function decode(reader, length, error) { - 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.ListGeneratorsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); + /** + * Decodes an Authentication message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication + * @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.Tool.Authentication} Authentication + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Authentication.decode = function decode(reader, length, error) { + 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.Tool.Authentication(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - } - case 2: { - message.languageCode = reader.string(); + switch (tag >>> 3) { + case 1: { + message.apiKeyConfig = $root.google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig.decode(reader, reader.uint32()); + break; + } + case 2: { + message.oauthConfig = $root.google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig.decode(reader, reader.uint32()); + break; + } + case 3: { + message.serviceAgentAuthConfig = $root.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig.decode(reader, reader.uint32()); + break; + } + case 4: { + message.bearerTokenConfig = $root.google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig.decode(reader, reader.uint32()); + break; + } + case 5: { + message.serviceAccountAuthConfig = $root.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); break; } - case 3: { - message.pageSize = reader.int32(); - break; + } + return message; + }; + + /** + * Decodes an Authentication message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.Tool.Authentication} Authentication + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Authentication.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Authentication message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Authentication.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.apiKeyConfig != null && message.hasOwnProperty("apiKeyConfig")) { + properties.authConfig = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig.verify(message.apiKeyConfig); + if (error) + return "apiKeyConfig." + error; } - case 4: { - message.pageToken = reader.string(); - break; + } + if (message.oauthConfig != null && message.hasOwnProperty("oauthConfig")) { + if (properties.authConfig === 1) + return "authConfig: multiple values"; + properties.authConfig = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig.verify(message.oauthConfig); + if (error) + return "oauthConfig." + error; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; - - /** - * Decodes a ListGeneratorsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListGeneratorsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ListGeneratorsRequest} ListGeneratorsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListGeneratorsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + if (message.serviceAgentAuthConfig != null && message.hasOwnProperty("serviceAgentAuthConfig")) { + if (properties.authConfig === 1) + return "authConfig: multiple values"; + properties.authConfig = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig.verify(message.serviceAgentAuthConfig); + if (error) + return "serviceAgentAuthConfig." + error; + } + } + if (message.bearerTokenConfig != null && message.hasOwnProperty("bearerTokenConfig")) { + if (properties.authConfig === 1) + return "authConfig: multiple values"; + properties.authConfig = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig.verify(message.bearerTokenConfig); + if (error) + return "bearerTokenConfig." + error; + } + } + if (message.serviceAccountAuthConfig != null && message.hasOwnProperty("serviceAccountAuthConfig")) { + if (properties.authConfig === 1) + return "authConfig: multiple values"; + properties.authConfig = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig.verify(message.serviceAccountAuthConfig); + if (error) + return "serviceAccountAuthConfig." + error; + } + } + return null; + }; - /** - * Verifies a ListGeneratorsRequest message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ListGeneratorsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListGeneratorsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - return null; - }; + /** + * Creates an Authentication message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.Tool.Authentication} Authentication + */ + Authentication.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.Tool.Authentication) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.Tool.Authentication(); + if (object.apiKeyConfig != null) { + if (typeof object.apiKeyConfig !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Tool.Authentication.apiKeyConfig: object expected"); + message.apiKeyConfig = $root.google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig.fromObject(object.apiKeyConfig); + } + if (object.oauthConfig != null) { + if (typeof object.oauthConfig !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Tool.Authentication.oauthConfig: object expected"); + message.oauthConfig = $root.google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig.fromObject(object.oauthConfig); + } + if (object.serviceAgentAuthConfig != null) { + if (typeof object.serviceAgentAuthConfig !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Tool.Authentication.serviceAgentAuthConfig: object expected"); + message.serviceAgentAuthConfig = $root.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig.fromObject(object.serviceAgentAuthConfig); + } + if (object.bearerTokenConfig != null) { + if (typeof object.bearerTokenConfig !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Tool.Authentication.bearerTokenConfig: object expected"); + message.bearerTokenConfig = $root.google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig.fromObject(object.bearerTokenConfig); + } + if (object.serviceAccountAuthConfig != null) { + if (typeof object.serviceAccountAuthConfig !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Tool.Authentication.serviceAccountAuthConfig: object expected"); + message.serviceAccountAuthConfig = $root.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig.fromObject(object.serviceAccountAuthConfig); + } + return message; + }; - /** - * Creates a ListGeneratorsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ListGeneratorsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ListGeneratorsRequest} ListGeneratorsRequest - */ - ListGeneratorsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListGeneratorsRequest) + /** + * Creates a plain object from an Authentication message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication + * @static + * @param {google.cloud.dialogflow.cx.v3.Tool.Authentication} message Authentication + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Authentication.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.apiKeyConfig != null && message.hasOwnProperty("apiKeyConfig")) { + object.apiKeyConfig = $root.google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig.toObject(message.apiKeyConfig, options); + if (options.oneofs) + object.authConfig = "apiKeyConfig"; + } + if (message.oauthConfig != null && message.hasOwnProperty("oauthConfig")) { + object.oauthConfig = $root.google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig.toObject(message.oauthConfig, options); + if (options.oneofs) + object.authConfig = "oauthConfig"; + } + if (message.serviceAgentAuthConfig != null && message.hasOwnProperty("serviceAgentAuthConfig")) { + object.serviceAgentAuthConfig = $root.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig.toObject(message.serviceAgentAuthConfig, options); + if (options.oneofs) + object.authConfig = "serviceAgentAuthConfig"; + } + if (message.bearerTokenConfig != null && message.hasOwnProperty("bearerTokenConfig")) { + object.bearerTokenConfig = $root.google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig.toObject(message.bearerTokenConfig, options); + if (options.oneofs) + object.authConfig = "bearerTokenConfig"; + } + if (message.serviceAccountAuthConfig != null && message.hasOwnProperty("serviceAccountAuthConfig")) { + object.serviceAccountAuthConfig = $root.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig.toObject(message.serviceAccountAuthConfig, options); + if (options.oneofs) + object.authConfig = "serviceAccountAuthConfig"; + } return object; - var message = new $root.google.cloud.dialogflow.cx.v3.ListGeneratorsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.languageCode != null) - message.languageCode = String(object.languageCode); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - return message; - }; + }; - /** - * Creates a plain object from a ListGeneratorsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ListGeneratorsRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.ListGeneratorsRequest} message ListGeneratorsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListGeneratorsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.languageCode = ""; - object.pageSize = 0; - object.pageToken = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - return object; - }; + /** + * Converts this Authentication to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication + * @instance + * @returns {Object.} JSON object + */ + Authentication.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this ListGeneratorsRequest to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ListGeneratorsRequest - * @instance - * @returns {Object.} JSON object - */ - ListGeneratorsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Gets the default type url for Authentication + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Authentication.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Tool.Authentication"; + }; - /** - * Gets the default type url for ListGeneratorsRequest - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.ListGeneratorsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListGeneratorsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListGeneratorsRequest"; - }; + Authentication.ApiKeyConfig = (function() { - return ListGeneratorsRequest; - })(); + /** + * Properties of an ApiKeyConfig. + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication + * @interface IApiKeyConfig + * @property {string|null} [keyName] ApiKeyConfig keyName + * @property {string|null} [apiKey] ApiKeyConfig apiKey + * @property {string|null} [secretVersionForApiKey] ApiKeyConfig secretVersionForApiKey + * @property {google.cloud.dialogflow.cx.v3.Tool.Authentication.RequestLocation|null} [requestLocation] ApiKeyConfig requestLocation + */ - v3.ListGeneratorsResponse = (function() { + /** + * Constructs a new ApiKeyConfig. + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication + * @classdesc Represents an ApiKeyConfig. + * @implements IApiKeyConfig + * @constructor + * @param {google.cloud.dialogflow.cx.v3.Tool.Authentication.IApiKeyConfig=} [properties] Properties to set + */ + function ApiKeyConfig(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]]; + } - /** - * Properties of a ListGeneratorsResponse. - * @memberof google.cloud.dialogflow.cx.v3 - * @interface IListGeneratorsResponse - * @property {Array.|null} [generators] ListGeneratorsResponse generators - * @property {string|null} [nextPageToken] ListGeneratorsResponse nextPageToken - */ + /** + * ApiKeyConfig keyName. + * @member {string} keyName + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig + * @instance + */ + ApiKeyConfig.prototype.keyName = ""; - /** - * Constructs a new ListGeneratorsResponse. - * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a ListGeneratorsResponse. - * @implements IListGeneratorsResponse - * @constructor - * @param {google.cloud.dialogflow.cx.v3.IListGeneratorsResponse=} [properties] Properties to set - */ - function ListGeneratorsResponse(properties) { - this.generators = []; - 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]]; - } + /** + * ApiKeyConfig apiKey. + * @member {string} apiKey + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig + * @instance + */ + ApiKeyConfig.prototype.apiKey = ""; - /** - * ListGeneratorsResponse generators. - * @member {Array.} generators - * @memberof google.cloud.dialogflow.cx.v3.ListGeneratorsResponse - * @instance - */ - ListGeneratorsResponse.prototype.generators = $util.emptyArray; + /** + * ApiKeyConfig secretVersionForApiKey. + * @member {string} secretVersionForApiKey + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig + * @instance + */ + ApiKeyConfig.prototype.secretVersionForApiKey = ""; - /** - * ListGeneratorsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dialogflow.cx.v3.ListGeneratorsResponse - * @instance - */ - ListGeneratorsResponse.prototype.nextPageToken = ""; + /** + * ApiKeyConfig requestLocation. + * @member {google.cloud.dialogflow.cx.v3.Tool.Authentication.RequestLocation} requestLocation + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig + * @instance + */ + ApiKeyConfig.prototype.requestLocation = 0; - /** - * Creates a new ListGeneratorsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.ListGeneratorsResponse - * @static - * @param {google.cloud.dialogflow.cx.v3.IListGeneratorsResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ListGeneratorsResponse} ListGeneratorsResponse instance - */ - ListGeneratorsResponse.create = function create(properties) { - return new ListGeneratorsResponse(properties); - }; + /** + * Creates a new ApiKeyConfig instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig + * @static + * @param {google.cloud.dialogflow.cx.v3.Tool.Authentication.IApiKeyConfig=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig} ApiKeyConfig instance + */ + ApiKeyConfig.create = function create(properties) { + return new ApiKeyConfig(properties); + }; - /** - * Encodes the specified ListGeneratorsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListGeneratorsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ListGeneratorsResponse - * @static - * @param {google.cloud.dialogflow.cx.v3.IListGeneratorsResponse} message ListGeneratorsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListGeneratorsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.generators != null && message.generators.length) - for (var i = 0; i < message.generators.length; ++i) - $root.google.cloud.dialogflow.cx.v3.Generator.encode(message.generators[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - return writer; - }; + /** + * Encodes the specified ApiKeyConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig + * @static + * @param {google.cloud.dialogflow.cx.v3.Tool.Authentication.IApiKeyConfig} message ApiKeyConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ApiKeyConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.keyName != null && Object.hasOwnProperty.call(message, "keyName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyName); + if (message.apiKey != null && Object.hasOwnProperty.call(message, "apiKey")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.apiKey); + if (message.requestLocation != null && Object.hasOwnProperty.call(message, "requestLocation")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.requestLocation); + if (message.secretVersionForApiKey != null && Object.hasOwnProperty.call(message, "secretVersionForApiKey")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.secretVersionForApiKey); + return writer; + }; - /** - * Encodes the specified ListGeneratorsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListGeneratorsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListGeneratorsResponse - * @static - * @param {google.cloud.dialogflow.cx.v3.IListGeneratorsResponse} message ListGeneratorsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListGeneratorsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified ApiKeyConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig + * @static + * @param {google.cloud.dialogflow.cx.v3.Tool.Authentication.IApiKeyConfig} message ApiKeyConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ApiKeyConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a ListGeneratorsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ListGeneratorsResponse - * @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.ListGeneratorsResponse} ListGeneratorsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListGeneratorsResponse.decode = function decode(reader, length, error) { - 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.ListGeneratorsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.generators && message.generators.length)) - message.generators = []; - message.generators.push($root.google.cloud.dialogflow.cx.v3.Generator.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; + /** + * Decodes an ApiKeyConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig + * @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.Tool.Authentication.ApiKeyConfig} ApiKeyConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ApiKeyConfig.decode = function decode(reader, length, error) { + 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.Tool.Authentication.ApiKeyConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.keyName = reader.string(); + break; + } + case 2: { + message.apiKey = reader.string(); + break; + } + case 4: { + message.secretVersionForApiKey = reader.string(); + break; + } + case 3: { + message.requestLocation = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListGeneratorsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListGeneratorsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ListGeneratorsResponse} ListGeneratorsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListGeneratorsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + return message; + }; - /** - * Verifies a ListGeneratorsResponse message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ListGeneratorsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListGeneratorsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.generators != null && message.hasOwnProperty("generators")) { - if (!Array.isArray(message.generators)) - return "generators: array expected"; - for (var i = 0; i < message.generators.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.Generator.verify(message.generators[i]); - if (error) - return "generators." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; + /** + * Decodes an ApiKeyConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig} ApiKeyConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ApiKeyConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a ListGeneratorsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ListGeneratorsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ListGeneratorsResponse} ListGeneratorsResponse - */ - ListGeneratorsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListGeneratorsResponse) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.ListGeneratorsResponse(); - if (object.generators) { - if (!Array.isArray(object.generators)) - throw TypeError(".google.cloud.dialogflow.cx.v3.ListGeneratorsResponse.generators: array expected"); - message.generators = []; - for (var i = 0; i < object.generators.length; ++i) { - if (typeof object.generators[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.ListGeneratorsResponse.generators: object expected"); - message.generators[i] = $root.google.cloud.dialogflow.cx.v3.Generator.fromObject(object.generators[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; + /** + * Verifies an ApiKeyConfig message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ApiKeyConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.keyName != null && message.hasOwnProperty("keyName")) + if (!$util.isString(message.keyName)) + return "keyName: string expected"; + if (message.apiKey != null && message.hasOwnProperty("apiKey")) + if (!$util.isString(message.apiKey)) + return "apiKey: string expected"; + if (message.secretVersionForApiKey != null && message.hasOwnProperty("secretVersionForApiKey")) + if (!$util.isString(message.secretVersionForApiKey)) + return "secretVersionForApiKey: string expected"; + if (message.requestLocation != null && message.hasOwnProperty("requestLocation")) + switch (message.requestLocation) { + default: + return "requestLocation: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; - /** - * Creates a plain object from a ListGeneratorsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ListGeneratorsResponse - * @static - * @param {google.cloud.dialogflow.cx.v3.ListGeneratorsResponse} message ListGeneratorsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListGeneratorsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.generators = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.generators && message.generators.length) { - object.generators = []; - for (var j = 0; j < message.generators.length; ++j) - object.generators[j] = $root.google.cloud.dialogflow.cx.v3.Generator.toObject(message.generators[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; + /** + * Creates an ApiKeyConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig} ApiKeyConfig + */ + ApiKeyConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig(); + if (object.keyName != null) + message.keyName = String(object.keyName); + if (object.apiKey != null) + message.apiKey = String(object.apiKey); + if (object.secretVersionForApiKey != null) + message.secretVersionForApiKey = String(object.secretVersionForApiKey); + switch (object.requestLocation) { + default: + if (typeof object.requestLocation === "number") { + message.requestLocation = object.requestLocation; + break; + } + break; + case "REQUEST_LOCATION_UNSPECIFIED": + case 0: + message.requestLocation = 0; + break; + case "HEADER": + case 1: + message.requestLocation = 1; + break; + case "QUERY_STRING": + case 2: + message.requestLocation = 2; + break; + } + return message; + }; - /** - * Converts this ListGeneratorsResponse to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ListGeneratorsResponse - * @instance - * @returns {Object.} JSON object - */ - ListGeneratorsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from an ApiKeyConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig + * @static + * @param {google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig} message ApiKeyConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ApiKeyConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.keyName = ""; + object.apiKey = ""; + object.requestLocation = options.enums === String ? "REQUEST_LOCATION_UNSPECIFIED" : 0; + object.secretVersionForApiKey = ""; + } + if (message.keyName != null && message.hasOwnProperty("keyName")) + object.keyName = message.keyName; + if (message.apiKey != null && message.hasOwnProperty("apiKey")) + object.apiKey = message.apiKey; + if (message.requestLocation != null && message.hasOwnProperty("requestLocation")) + object.requestLocation = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.Tool.Authentication.RequestLocation[message.requestLocation] === undefined ? message.requestLocation : $root.google.cloud.dialogflow.cx.v3.Tool.Authentication.RequestLocation[message.requestLocation] : message.requestLocation; + if (message.secretVersionForApiKey != null && message.hasOwnProperty("secretVersionForApiKey")) + object.secretVersionForApiKey = message.secretVersionForApiKey; + return object; + }; - /** - * Gets the default type url for ListGeneratorsResponse - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.ListGeneratorsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListGeneratorsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListGeneratorsResponse"; - }; + /** + * Converts this ApiKeyConfig to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig + * @instance + * @returns {Object.} JSON object + */ + ApiKeyConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return ListGeneratorsResponse; - })(); + /** + * Gets the default type url for ApiKeyConfig + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ApiKeyConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Tool.Authentication.ApiKeyConfig"; + }; - v3.GetGeneratorRequest = (function() { + return ApiKeyConfig; + })(); - /** - * Properties of a GetGeneratorRequest. - * @memberof google.cloud.dialogflow.cx.v3 - * @interface IGetGeneratorRequest - * @property {string|null} [name] GetGeneratorRequest name - * @property {string|null} [languageCode] GetGeneratorRequest languageCode - */ + /** + * RequestLocation enum. + * @name google.cloud.dialogflow.cx.v3.Tool.Authentication.RequestLocation + * @enum {number} + * @property {number} REQUEST_LOCATION_UNSPECIFIED=0 REQUEST_LOCATION_UNSPECIFIED value + * @property {number} HEADER=1 HEADER value + * @property {number} QUERY_STRING=2 QUERY_STRING value + */ + Authentication.RequestLocation = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "REQUEST_LOCATION_UNSPECIFIED"] = 0; + values[valuesById[1] = "HEADER"] = 1; + values[valuesById[2] = "QUERY_STRING"] = 2; + return values; + })(); - /** - * Constructs a new GetGeneratorRequest. - * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a GetGeneratorRequest. - * @implements IGetGeneratorRequest - * @constructor - * @param {google.cloud.dialogflow.cx.v3.IGetGeneratorRequest=} [properties] Properties to set - */ - function GetGeneratorRequest(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]]; - } + Authentication.OAuthConfig = (function() { - /** - * GetGeneratorRequest name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.GetGeneratorRequest - * @instance - */ - GetGeneratorRequest.prototype.name = ""; + /** + * Properties of a OAuthConfig. + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication + * @interface IOAuthConfig + * @property {google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig.OauthGrantType|null} [oauthGrantType] OAuthConfig oauthGrantType + * @property {string|null} [clientId] OAuthConfig clientId + * @property {string|null} [clientSecret] OAuthConfig clientSecret + * @property {string|null} [secretVersionForClientSecret] OAuthConfig secretVersionForClientSecret + * @property {string|null} [tokenEndpoint] OAuthConfig tokenEndpoint + * @property {Array.|null} [scopes] OAuthConfig scopes + */ - /** - * GetGeneratorRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3.GetGeneratorRequest - * @instance - */ - GetGeneratorRequest.prototype.languageCode = ""; + /** + * Constructs a new OAuthConfig. + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication + * @classdesc Represents a OAuthConfig. + * @implements IOAuthConfig + * @constructor + * @param {google.cloud.dialogflow.cx.v3.Tool.Authentication.IOAuthConfig=} [properties] Properties to set + */ + function OAuthConfig(properties) { + this.scopes = []; + 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]]; + } - /** - * Creates a new GetGeneratorRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.GetGeneratorRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.IGetGeneratorRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.GetGeneratorRequest} GetGeneratorRequest instance - */ - GetGeneratorRequest.create = function create(properties) { - return new GetGeneratorRequest(properties); - }; + /** + * OAuthConfig oauthGrantType. + * @member {google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig.OauthGrantType} oauthGrantType + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig + * @instance + */ + OAuthConfig.prototype.oauthGrantType = 0; - /** - * Encodes the specified GetGeneratorRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetGeneratorRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.GetGeneratorRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.IGetGeneratorRequest} message GetGeneratorRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetGeneratorRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); - return writer; - }; + /** + * OAuthConfig clientId. + * @member {string} clientId + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig + * @instance + */ + OAuthConfig.prototype.clientId = ""; - /** - * Encodes the specified GetGeneratorRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetGeneratorRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.GetGeneratorRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.IGetGeneratorRequest} message GetGeneratorRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetGeneratorRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * OAuthConfig clientSecret. + * @member {string} clientSecret + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig + * @instance + */ + OAuthConfig.prototype.clientSecret = ""; - /** - * Decodes a GetGeneratorRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.GetGeneratorRequest - * @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.GetGeneratorRequest} GetGeneratorRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetGeneratorRequest.decode = function decode(reader, length, error) { - 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.GetGeneratorRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.languageCode = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * OAuthConfig secretVersionForClientSecret. + * @member {string} secretVersionForClientSecret + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig + * @instance + */ + OAuthConfig.prototype.secretVersionForClientSecret = ""; - /** - * Decodes a GetGeneratorRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.GetGeneratorRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.GetGeneratorRequest} GetGeneratorRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetGeneratorRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * OAuthConfig tokenEndpoint. + * @member {string} tokenEndpoint + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig + * @instance + */ + OAuthConfig.prototype.tokenEndpoint = ""; - /** - * Verifies a GetGeneratorRequest message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.GetGeneratorRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetGeneratorRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; - return null; - }; + /** + * OAuthConfig scopes. + * @member {Array.} scopes + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig + * @instance + */ + OAuthConfig.prototype.scopes = $util.emptyArray; - /** - * Creates a GetGeneratorRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.GetGeneratorRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.GetGeneratorRequest} GetGeneratorRequest - */ - GetGeneratorRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.GetGeneratorRequest) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.GetGeneratorRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.languageCode != null) - message.languageCode = String(object.languageCode); - return message; - }; + /** + * Creates a new OAuthConfig instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig + * @static + * @param {google.cloud.dialogflow.cx.v3.Tool.Authentication.IOAuthConfig=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig} OAuthConfig instance + */ + OAuthConfig.create = function create(properties) { + return new OAuthConfig(properties); + }; - /** - * Creates a plain object from a GetGeneratorRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.GetGeneratorRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.GetGeneratorRequest} message GetGeneratorRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetGeneratorRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.languageCode = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; - return object; - }; + /** + * Encodes the specified OAuthConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig + * @static + * @param {google.cloud.dialogflow.cx.v3.Tool.Authentication.IOAuthConfig} message OAuthConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OAuthConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.oauthGrantType != null && Object.hasOwnProperty.call(message, "oauthGrantType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.oauthGrantType); + if (message.clientId != null && Object.hasOwnProperty.call(message, "clientId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.clientId); + if (message.clientSecret != null && Object.hasOwnProperty.call(message, "clientSecret")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.clientSecret); + if (message.tokenEndpoint != null && Object.hasOwnProperty.call(message, "tokenEndpoint")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.tokenEndpoint); + if (message.scopes != null && message.scopes.length) + for (var i = 0; i < message.scopes.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.scopes[i]); + if (message.secretVersionForClientSecret != null && Object.hasOwnProperty.call(message, "secretVersionForClientSecret")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.secretVersionForClientSecret); + return writer; + }; - /** - * Converts this GetGeneratorRequest to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.GetGeneratorRequest - * @instance - * @returns {Object.} JSON object - */ - GetGeneratorRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Encodes the specified OAuthConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig + * @static + * @param {google.cloud.dialogflow.cx.v3.Tool.Authentication.IOAuthConfig} message OAuthConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OAuthConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Gets the default type url for GetGeneratorRequest - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.GetGeneratorRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetGeneratorRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.GetGeneratorRequest"; - }; + /** + * Decodes a OAuthConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig + * @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.Tool.Authentication.OAuthConfig} OAuthConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OAuthConfig.decode = function decode(reader, length, error) { + 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.Tool.Authentication.OAuthConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.oauthGrantType = reader.int32(); + break; + } + case 2: { + message.clientId = reader.string(); + break; + } + case 3: { + message.clientSecret = reader.string(); + break; + } + case 6: { + message.secretVersionForClientSecret = reader.string(); + break; + } + case 4: { + message.tokenEndpoint = reader.string(); + break; + } + case 5: { + if (!(message.scopes && message.scopes.length)) + message.scopes = []; + message.scopes.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - return GetGeneratorRequest; - })(); + /** + * Decodes a OAuthConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig} OAuthConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OAuthConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - v3.CreateGeneratorRequest = (function() { + /** + * Verifies a OAuthConfig message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OAuthConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.oauthGrantType != null && message.hasOwnProperty("oauthGrantType")) + switch (message.oauthGrantType) { + default: + return "oauthGrantType: enum value expected"; + case 0: + case 1: + break; + } + if (message.clientId != null && message.hasOwnProperty("clientId")) + if (!$util.isString(message.clientId)) + return "clientId: string expected"; + if (message.clientSecret != null && message.hasOwnProperty("clientSecret")) + if (!$util.isString(message.clientSecret)) + return "clientSecret: string expected"; + if (message.secretVersionForClientSecret != null && message.hasOwnProperty("secretVersionForClientSecret")) + if (!$util.isString(message.secretVersionForClientSecret)) + return "secretVersionForClientSecret: string expected"; + if (message.tokenEndpoint != null && message.hasOwnProperty("tokenEndpoint")) + if (!$util.isString(message.tokenEndpoint)) + return "tokenEndpoint: string expected"; + if (message.scopes != null && message.hasOwnProperty("scopes")) { + if (!Array.isArray(message.scopes)) + return "scopes: array expected"; + for (var i = 0; i < message.scopes.length; ++i) + if (!$util.isString(message.scopes[i])) + return "scopes: string[] expected"; + } + return null; + }; - /** - * Properties of a CreateGeneratorRequest. - * @memberof google.cloud.dialogflow.cx.v3 - * @interface ICreateGeneratorRequest - * @property {string|null} [parent] CreateGeneratorRequest parent - * @property {google.cloud.dialogflow.cx.v3.IGenerator|null} [generator] CreateGeneratorRequest generator - * @property {string|null} [languageCode] CreateGeneratorRequest languageCode - */ + /** + * Creates a OAuthConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig} OAuthConfig + */ + OAuthConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig(); + switch (object.oauthGrantType) { + default: + if (typeof object.oauthGrantType === "number") { + message.oauthGrantType = object.oauthGrantType; + break; + } + break; + case "OAUTH_GRANT_TYPE_UNSPECIFIED": + case 0: + message.oauthGrantType = 0; + break; + case "CLIENT_CREDENTIAL": + case 1: + message.oauthGrantType = 1; + break; + } + if (object.clientId != null) + message.clientId = String(object.clientId); + if (object.clientSecret != null) + message.clientSecret = String(object.clientSecret); + if (object.secretVersionForClientSecret != null) + message.secretVersionForClientSecret = String(object.secretVersionForClientSecret); + if (object.tokenEndpoint != null) + message.tokenEndpoint = String(object.tokenEndpoint); + if (object.scopes) { + if (!Array.isArray(object.scopes)) + throw TypeError(".google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig.scopes: array expected"); + message.scopes = []; + for (var i = 0; i < object.scopes.length; ++i) + message.scopes[i] = String(object.scopes[i]); + } + return message; + }; - /** - * Constructs a new CreateGeneratorRequest. - * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a CreateGeneratorRequest. - * @implements ICreateGeneratorRequest - * @constructor - * @param {google.cloud.dialogflow.cx.v3.ICreateGeneratorRequest=} [properties] Properties to set - */ - function CreateGeneratorRequest(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]]; - } + /** + * Creates a plain object from a OAuthConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig + * @static + * @param {google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig} message OAuthConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OAuthConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.scopes = []; + if (options.defaults) { + object.oauthGrantType = options.enums === String ? "OAUTH_GRANT_TYPE_UNSPECIFIED" : 0; + object.clientId = ""; + object.clientSecret = ""; + object.tokenEndpoint = ""; + object.secretVersionForClientSecret = ""; + } + if (message.oauthGrantType != null && message.hasOwnProperty("oauthGrantType")) + object.oauthGrantType = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig.OauthGrantType[message.oauthGrantType] === undefined ? message.oauthGrantType : $root.google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig.OauthGrantType[message.oauthGrantType] : message.oauthGrantType; + if (message.clientId != null && message.hasOwnProperty("clientId")) + object.clientId = message.clientId; + if (message.clientSecret != null && message.hasOwnProperty("clientSecret")) + object.clientSecret = message.clientSecret; + if (message.tokenEndpoint != null && message.hasOwnProperty("tokenEndpoint")) + object.tokenEndpoint = message.tokenEndpoint; + if (message.scopes && message.scopes.length) { + object.scopes = []; + for (var j = 0; j < message.scopes.length; ++j) + object.scopes[j] = message.scopes[j]; + } + if (message.secretVersionForClientSecret != null && message.hasOwnProperty("secretVersionForClientSecret")) + object.secretVersionForClientSecret = message.secretVersionForClientSecret; + return object; + }; - /** - * CreateGeneratorRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3.CreateGeneratorRequest - * @instance - */ - CreateGeneratorRequest.prototype.parent = ""; + /** + * Converts this OAuthConfig to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig + * @instance + * @returns {Object.} JSON object + */ + OAuthConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * CreateGeneratorRequest generator. - * @member {google.cloud.dialogflow.cx.v3.IGenerator|null|undefined} generator - * @memberof google.cloud.dialogflow.cx.v3.CreateGeneratorRequest - * @instance - */ - CreateGeneratorRequest.prototype.generator = null; + /** + * Gets the default type url for OAuthConfig + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OAuthConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig"; + }; - /** - * CreateGeneratorRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3.CreateGeneratorRequest - * @instance - */ - CreateGeneratorRequest.prototype.languageCode = ""; + /** + * OauthGrantType enum. + * @name google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig.OauthGrantType + * @enum {number} + * @property {number} OAUTH_GRANT_TYPE_UNSPECIFIED=0 OAUTH_GRANT_TYPE_UNSPECIFIED value + * @property {number} CLIENT_CREDENTIAL=1 CLIENT_CREDENTIAL value + */ + OAuthConfig.OauthGrantType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "OAUTH_GRANT_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CLIENT_CREDENTIAL"] = 1; + return values; + })(); - /** - * Creates a new CreateGeneratorRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.CreateGeneratorRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.ICreateGeneratorRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.CreateGeneratorRequest} CreateGeneratorRequest instance - */ - CreateGeneratorRequest.create = function create(properties) { - return new CreateGeneratorRequest(properties); - }; + return OAuthConfig; + })(); - /** - * Encodes the specified CreateGeneratorRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateGeneratorRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.CreateGeneratorRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.ICreateGeneratorRequest} message CreateGeneratorRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateGeneratorRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.generator != null && Object.hasOwnProperty.call(message, "generator")) - $root.google.cloud.dialogflow.cx.v3.Generator.encode(message.generator, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.languageCode); - return writer; - }; + Authentication.ServiceAgentAuthConfig = (function() { - /** - * Encodes the specified CreateGeneratorRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateGeneratorRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.CreateGeneratorRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.ICreateGeneratorRequest} message CreateGeneratorRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateGeneratorRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Properties of a ServiceAgentAuthConfig. + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication + * @interface IServiceAgentAuthConfig + * @property {google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig.ServiceAgentAuth|null} [serviceAgentAuth] ServiceAgentAuthConfig serviceAgentAuth + */ - /** - * Decodes a CreateGeneratorRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.CreateGeneratorRequest - * @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.CreateGeneratorRequest} CreateGeneratorRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateGeneratorRequest.decode = function decode(reader, length, error) { - 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.CreateGeneratorRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.generator = $root.google.cloud.dialogflow.cx.v3.Generator.decode(reader, reader.uint32()); - break; - } - case 3: { - message.languageCode = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; + /** + * Constructs a new ServiceAgentAuthConfig. + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication + * @classdesc Represents a ServiceAgentAuthConfig. + * @implements IServiceAgentAuthConfig + * @constructor + * @param {google.cloud.dialogflow.cx.v3.Tool.Authentication.IServiceAgentAuthConfig=} [properties] Properties to set + */ + function ServiceAgentAuthConfig(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]]; } - } - return message; - }; - - /** - * Decodes a CreateGeneratorRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.CreateGeneratorRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.CreateGeneratorRequest} CreateGeneratorRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateGeneratorRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - /** - * Verifies a CreateGeneratorRequest message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.CreateGeneratorRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateGeneratorRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.generator != null && message.hasOwnProperty("generator")) { - var error = $root.google.cloud.dialogflow.cx.v3.Generator.verify(message.generator); - if (error) - return "generator." + error; - } - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; - return null; - }; + /** + * ServiceAgentAuthConfig serviceAgentAuth. + * @member {google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig.ServiceAgentAuth} serviceAgentAuth + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig + * @instance + */ + ServiceAgentAuthConfig.prototype.serviceAgentAuth = 0; - /** - * Creates a CreateGeneratorRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.CreateGeneratorRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.CreateGeneratorRequest} CreateGeneratorRequest - */ - CreateGeneratorRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.CreateGeneratorRequest) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.CreateGeneratorRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.generator != null) { - if (typeof object.generator !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.CreateGeneratorRequest.generator: object expected"); - message.generator = $root.google.cloud.dialogflow.cx.v3.Generator.fromObject(object.generator); - } - if (object.languageCode != null) - message.languageCode = String(object.languageCode); - return message; - }; + /** + * Creates a new ServiceAgentAuthConfig instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig + * @static + * @param {google.cloud.dialogflow.cx.v3.Tool.Authentication.IServiceAgentAuthConfig=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig} ServiceAgentAuthConfig instance + */ + ServiceAgentAuthConfig.create = function create(properties) { + return new ServiceAgentAuthConfig(properties); + }; - /** - * Creates a plain object from a CreateGeneratorRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.CreateGeneratorRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.CreateGeneratorRequest} message CreateGeneratorRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateGeneratorRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.generator = null; - object.languageCode = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.generator != null && message.hasOwnProperty("generator")) - object.generator = $root.google.cloud.dialogflow.cx.v3.Generator.toObject(message.generator, options); - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; - return object; - }; + /** + * Encodes the specified ServiceAgentAuthConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig + * @static + * @param {google.cloud.dialogflow.cx.v3.Tool.Authentication.IServiceAgentAuthConfig} message ServiceAgentAuthConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceAgentAuthConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.serviceAgentAuth != null && Object.hasOwnProperty.call(message, "serviceAgentAuth")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.serviceAgentAuth); + return writer; + }; - /** - * Converts this CreateGeneratorRequest to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.CreateGeneratorRequest - * @instance - * @returns {Object.} JSON object - */ - CreateGeneratorRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Encodes the specified ServiceAgentAuthConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig + * @static + * @param {google.cloud.dialogflow.cx.v3.Tool.Authentication.IServiceAgentAuthConfig} message ServiceAgentAuthConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceAgentAuthConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Gets the default type url for CreateGeneratorRequest - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.CreateGeneratorRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateGeneratorRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.CreateGeneratorRequest"; - }; + /** + * Decodes a ServiceAgentAuthConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig + * @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.Tool.Authentication.ServiceAgentAuthConfig} ServiceAgentAuthConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceAgentAuthConfig.decode = function decode(reader, length, error) { + 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.Tool.Authentication.ServiceAgentAuthConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.serviceAgentAuth = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - return CreateGeneratorRequest; - })(); + /** + * Decodes a ServiceAgentAuthConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig} ServiceAgentAuthConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceAgentAuthConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - v3.UpdateGeneratorRequest = (function() { + /** + * Verifies a ServiceAgentAuthConfig message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceAgentAuthConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.serviceAgentAuth != null && message.hasOwnProperty("serviceAgentAuth")) + switch (message.serviceAgentAuth) { + default: + return "serviceAgentAuth: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; - /** - * Properties of an UpdateGeneratorRequest. - * @memberof google.cloud.dialogflow.cx.v3 - * @interface IUpdateGeneratorRequest - * @property {google.cloud.dialogflow.cx.v3.IGenerator|null} [generator] UpdateGeneratorRequest generator - * @property {string|null} [languageCode] UpdateGeneratorRequest languageCode - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateGeneratorRequest updateMask - */ + /** + * Creates a ServiceAgentAuthConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig} ServiceAgentAuthConfig + */ + ServiceAgentAuthConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig(); + switch (object.serviceAgentAuth) { + default: + if (typeof object.serviceAgentAuth === "number") { + message.serviceAgentAuth = object.serviceAgentAuth; + break; + } + break; + case "SERVICE_AGENT_AUTH_UNSPECIFIED": + case 0: + message.serviceAgentAuth = 0; + break; + case "ID_TOKEN": + case 1: + message.serviceAgentAuth = 1; + break; + case "ACCESS_TOKEN": + case 2: + message.serviceAgentAuth = 2; + break; + } + return message; + }; - /** - * Constructs a new UpdateGeneratorRequest. - * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents an UpdateGeneratorRequest. - * @implements IUpdateGeneratorRequest - * @constructor - * @param {google.cloud.dialogflow.cx.v3.IUpdateGeneratorRequest=} [properties] Properties to set - */ - function UpdateGeneratorRequest(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]]; - } + /** + * Creates a plain object from a ServiceAgentAuthConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig + * @static + * @param {google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig} message ServiceAgentAuthConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceAgentAuthConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.serviceAgentAuth = options.enums === String ? "SERVICE_AGENT_AUTH_UNSPECIFIED" : 0; + if (message.serviceAgentAuth != null && message.hasOwnProperty("serviceAgentAuth")) + object.serviceAgentAuth = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig.ServiceAgentAuth[message.serviceAgentAuth] === undefined ? message.serviceAgentAuth : $root.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig.ServiceAgentAuth[message.serviceAgentAuth] : message.serviceAgentAuth; + return object; + }; - /** - * UpdateGeneratorRequest generator. - * @member {google.cloud.dialogflow.cx.v3.IGenerator|null|undefined} generator - * @memberof google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest - * @instance - */ - UpdateGeneratorRequest.prototype.generator = null; + /** + * Converts this ServiceAgentAuthConfig to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig + * @instance + * @returns {Object.} JSON object + */ + ServiceAgentAuthConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * UpdateGeneratorRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest - * @instance - */ - UpdateGeneratorRequest.prototype.languageCode = ""; + /** + * Gets the default type url for ServiceAgentAuthConfig + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceAgentAuthConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig"; + }; - /** - * UpdateGeneratorRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest - * @instance - */ - UpdateGeneratorRequest.prototype.updateMask = null; + /** + * ServiceAgentAuth enum. + * @name google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAgentAuthConfig.ServiceAgentAuth + * @enum {number} + * @property {number} SERVICE_AGENT_AUTH_UNSPECIFIED=0 SERVICE_AGENT_AUTH_UNSPECIFIED value + * @property {number} ID_TOKEN=1 ID_TOKEN value + * @property {number} ACCESS_TOKEN=2 ACCESS_TOKEN value + */ + ServiceAgentAuthConfig.ServiceAgentAuth = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SERVICE_AGENT_AUTH_UNSPECIFIED"] = 0; + values[valuesById[1] = "ID_TOKEN"] = 1; + values[valuesById[2] = "ACCESS_TOKEN"] = 2; + return values; + })(); - /** - * Creates a new UpdateGeneratorRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.IUpdateGeneratorRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest} UpdateGeneratorRequest instance - */ - UpdateGeneratorRequest.create = function create(properties) { - return new UpdateGeneratorRequest(properties); - }; + return ServiceAgentAuthConfig; + })(); - /** - * Encodes the specified UpdateGeneratorRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.IUpdateGeneratorRequest} message UpdateGeneratorRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateGeneratorRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.generator != null && Object.hasOwnProperty.call(message, "generator")) - $root.google.cloud.dialogflow.cx.v3.Generator.encode(message.generator, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; + Authentication.BearerTokenConfig = (function() { - /** - * Encodes the specified UpdateGeneratorRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.IUpdateGeneratorRequest} message UpdateGeneratorRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateGeneratorRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Properties of a BearerTokenConfig. + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication + * @interface IBearerTokenConfig + * @property {string|null} [token] BearerTokenConfig token + * @property {string|null} [secretVersionForToken] BearerTokenConfig secretVersionForToken + */ - /** - * Decodes an UpdateGeneratorRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest - * @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.UpdateGeneratorRequest} UpdateGeneratorRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateGeneratorRequest.decode = function decode(reader, length, error) { - 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.UpdateGeneratorRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.generator = $root.google.cloud.dialogflow.cx.v3.Generator.decode(reader, reader.uint32()); - break; - } - case 2: { - message.languageCode = reader.string(); - break; - } - case 3: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; + /** + * Constructs a new BearerTokenConfig. + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication + * @classdesc Represents a BearerTokenConfig. + * @implements IBearerTokenConfig + * @constructor + * @param {google.cloud.dialogflow.cx.v3.Tool.Authentication.IBearerTokenConfig=} [properties] Properties to set + */ + function BearerTokenConfig(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]]; } - } - return message; - }; - - /** - * Decodes an UpdateGeneratorRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest} UpdateGeneratorRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateGeneratorRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - /** - * Verifies an UpdateGeneratorRequest message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateGeneratorRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.generator != null && message.hasOwnProperty("generator")) { - var error = $root.google.cloud.dialogflow.cx.v3.Generator.verify(message.generator); - if (error) - return "generator." + error; - } - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - return null; - }; + /** + * BearerTokenConfig token. + * @member {string} token + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig + * @instance + */ + BearerTokenConfig.prototype.token = ""; - /** - * Creates an UpdateGeneratorRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest} UpdateGeneratorRequest - */ - UpdateGeneratorRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest(); - if (object.generator != null) { - if (typeof object.generator !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest.generator: object expected"); - message.generator = $root.google.cloud.dialogflow.cx.v3.Generator.fromObject(object.generator); - } - if (object.languageCode != null) - message.languageCode = String(object.languageCode); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - return message; - }; + /** + * BearerTokenConfig secretVersionForToken. + * @member {string} secretVersionForToken + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig + * @instance + */ + BearerTokenConfig.prototype.secretVersionForToken = ""; - /** - * Creates a plain object from an UpdateGeneratorRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest} message UpdateGeneratorRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateGeneratorRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.generator = null; - object.languageCode = ""; - object.updateMask = null; - } - if (message.generator != null && message.hasOwnProperty("generator")) - object.generator = $root.google.cloud.dialogflow.cx.v3.Generator.toObject(message.generator, options); - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - return object; - }; + /** + * Creates a new BearerTokenConfig instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig + * @static + * @param {google.cloud.dialogflow.cx.v3.Tool.Authentication.IBearerTokenConfig=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig} BearerTokenConfig instance + */ + BearerTokenConfig.create = function create(properties) { + return new BearerTokenConfig(properties); + }; - /** - * Converts this UpdateGeneratorRequest to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateGeneratorRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Encodes the specified BearerTokenConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig + * @static + * @param {google.cloud.dialogflow.cx.v3.Tool.Authentication.IBearerTokenConfig} message BearerTokenConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BearerTokenConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.token != null && Object.hasOwnProperty.call(message, "token")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.token); + if (message.secretVersionForToken != null && Object.hasOwnProperty.call(message, "secretVersionForToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.secretVersionForToken); + return writer; + }; - /** - * Gets the default type url for UpdateGeneratorRequest - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateGeneratorRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest"; - }; + /** + * Encodes the specified BearerTokenConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig + * @static + * @param {google.cloud.dialogflow.cx.v3.Tool.Authentication.IBearerTokenConfig} message BearerTokenConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BearerTokenConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - return UpdateGeneratorRequest; - })(); + /** + * Decodes a BearerTokenConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig + * @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.Tool.Authentication.BearerTokenConfig} BearerTokenConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BearerTokenConfig.decode = function decode(reader, length, error) { + 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.Tool.Authentication.BearerTokenConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.token = reader.string(); + break; + } + case 2: { + message.secretVersionForToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - v3.DeleteGeneratorRequest = (function() { + /** + * Decodes a BearerTokenConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig} BearerTokenConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BearerTokenConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Properties of a DeleteGeneratorRequest. - * @memberof google.cloud.dialogflow.cx.v3 - * @interface IDeleteGeneratorRequest - * @property {string|null} [name] DeleteGeneratorRequest name - * @property {boolean|null} [force] DeleteGeneratorRequest force - */ + /** + * Verifies a BearerTokenConfig message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BearerTokenConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.token != null && message.hasOwnProperty("token")) + if (!$util.isString(message.token)) + return "token: string expected"; + if (message.secretVersionForToken != null && message.hasOwnProperty("secretVersionForToken")) + if (!$util.isString(message.secretVersionForToken)) + return "secretVersionForToken: string expected"; + return null; + }; - /** - * Constructs a new DeleteGeneratorRequest. - * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a DeleteGeneratorRequest. - * @implements IDeleteGeneratorRequest - * @constructor - * @param {google.cloud.dialogflow.cx.v3.IDeleteGeneratorRequest=} [properties] Properties to set - */ - function DeleteGeneratorRequest(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]]; - } + /** + * Creates a BearerTokenConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig} BearerTokenConfig + */ + BearerTokenConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig(); + if (object.token != null) + message.token = String(object.token); + if (object.secretVersionForToken != null) + message.secretVersionForToken = String(object.secretVersionForToken); + return message; + }; - /** - * DeleteGeneratorRequest name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest - * @instance - */ - DeleteGeneratorRequest.prototype.name = ""; + /** + * Creates a plain object from a BearerTokenConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig + * @static + * @param {google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig} message BearerTokenConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BearerTokenConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.token = ""; + object.secretVersionForToken = ""; + } + if (message.token != null && message.hasOwnProperty("token")) + object.token = message.token; + if (message.secretVersionForToken != null && message.hasOwnProperty("secretVersionForToken")) + object.secretVersionForToken = message.secretVersionForToken; + return object; + }; - /** - * DeleteGeneratorRequest force. - * @member {boolean} force - * @memberof google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest - * @instance - */ - DeleteGeneratorRequest.prototype.force = false; + /** + * Converts this BearerTokenConfig to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig + * @instance + * @returns {Object.} JSON object + */ + BearerTokenConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates a new DeleteGeneratorRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.IDeleteGeneratorRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest} DeleteGeneratorRequest instance - */ - DeleteGeneratorRequest.create = function create(properties) { - return new DeleteGeneratorRequest(properties); - }; + /** + * Gets the default type url for BearerTokenConfig + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BearerTokenConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Tool.Authentication.BearerTokenConfig"; + }; - /** - * Encodes the specified DeleteGeneratorRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.IDeleteGeneratorRequest} message DeleteGeneratorRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteGeneratorRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.force != null && Object.hasOwnProperty.call(message, "force")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.force); - return writer; - }; + return BearerTokenConfig; + })(); - /** - * Encodes the specified DeleteGeneratorRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.IDeleteGeneratorRequest} message DeleteGeneratorRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteGeneratorRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + Authentication.ServiceAccountAuthConfig = (function() { - /** - * Decodes a DeleteGeneratorRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest - * @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.DeleteGeneratorRequest} DeleteGeneratorRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteGeneratorRequest.decode = function decode(reader, length, error) { - 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.DeleteGeneratorRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.force = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; + /** + * Properties of a ServiceAccountAuthConfig. + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication + * @interface IServiceAccountAuthConfig + * @property {string|null} [serviceAccount] ServiceAccountAuthConfig serviceAccount + */ + + /** + * Constructs a new ServiceAccountAuthConfig. + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication + * @classdesc Represents a ServiceAccountAuthConfig. + * @implements IServiceAccountAuthConfig + * @constructor + * @param {google.cloud.dialogflow.cx.v3.Tool.Authentication.IServiceAccountAuthConfig=} [properties] Properties to set + */ + function ServiceAccountAuthConfig(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]]; } - } - return message; - }; - /** - * Decodes a DeleteGeneratorRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest} DeleteGeneratorRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteGeneratorRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * ServiceAccountAuthConfig serviceAccount. + * @member {string} serviceAccount + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig + * @instance + */ + ServiceAccountAuthConfig.prototype.serviceAccount = ""; - /** - * Verifies a DeleteGeneratorRequest message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteGeneratorRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.force != null && message.hasOwnProperty("force")) - if (typeof message.force !== "boolean") - return "force: boolean expected"; - return null; - }; + /** + * Creates a new ServiceAccountAuthConfig instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig + * @static + * @param {google.cloud.dialogflow.cx.v3.Tool.Authentication.IServiceAccountAuthConfig=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig} ServiceAccountAuthConfig instance + */ + ServiceAccountAuthConfig.create = function create(properties) { + return new ServiceAccountAuthConfig(properties); + }; - /** - * Creates a DeleteGeneratorRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest} DeleteGeneratorRequest - */ - DeleteGeneratorRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.force != null) - message.force = Boolean(object.force); - return message; - }; + /** + * Encodes the specified ServiceAccountAuthConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig + * @static + * @param {google.cloud.dialogflow.cx.v3.Tool.Authentication.IServiceAccountAuthConfig} message ServiceAccountAuthConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceAccountAuthConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.serviceAccount); + return writer; + }; - /** - * Creates a plain object from a DeleteGeneratorRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest} message DeleteGeneratorRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteGeneratorRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.force = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.force != null && message.hasOwnProperty("force")) - object.force = message.force; - return object; - }; + /** + * Encodes the specified ServiceAccountAuthConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig + * @static + * @param {google.cloud.dialogflow.cx.v3.Tool.Authentication.IServiceAccountAuthConfig} message ServiceAccountAuthConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceAccountAuthConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Converts this DeleteGeneratorRequest to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteGeneratorRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Decodes a ServiceAccountAuthConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig + * @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.Tool.Authentication.ServiceAccountAuthConfig} ServiceAccountAuthConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceAccountAuthConfig.decode = function decode(reader, length, error) { + 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.Tool.Authentication.ServiceAccountAuthConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.serviceAccount = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Gets the default type url for DeleteGeneratorRequest - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteGeneratorRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest"; - }; + /** + * Decodes a ServiceAccountAuthConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig} ServiceAccountAuthConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceAccountAuthConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - return DeleteGeneratorRequest; - })(); + /** + * Verifies a ServiceAccountAuthConfig message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceAccountAuthConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + if (!$util.isString(message.serviceAccount)) + return "serviceAccount: string expected"; + return null; + }; - v3.SecuritySettingsService = (function() { + /** + * Creates a ServiceAccountAuthConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig} ServiceAccountAuthConfig + */ + ServiceAccountAuthConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig(); + if (object.serviceAccount != null) + message.serviceAccount = String(object.serviceAccount); + return message; + }; - /** - * Constructs a new SecuritySettingsService service. - * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a SecuritySettingsService - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function SecuritySettingsService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } + /** + * Creates a plain object from a ServiceAccountAuthConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig + * @static + * @param {google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig} message ServiceAccountAuthConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceAccountAuthConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.serviceAccount = ""; + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + object.serviceAccount = message.serviceAccount; + return object; + }; - (SecuritySettingsService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = SecuritySettingsService; + /** + * Converts this ServiceAccountAuthConfig to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig + * @instance + * @returns {Object.} JSON object + */ + ServiceAccountAuthConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates new SecuritySettingsService service using the specified rpc implementation. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService - * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {SecuritySettingsService} RPC service. Useful where requests and/or responses are streamed. - */ - SecuritySettingsService.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; + /** + * Gets the default type url for ServiceAccountAuthConfig + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceAccountAuthConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Tool.Authentication.ServiceAccountAuthConfig"; + }; - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.SecuritySettingsService|createSecuritySettings}. - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService - * @typedef CreateSecuritySettingsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.SecuritySettings} [response] SecuritySettings - */ + return ServiceAccountAuthConfig; + })(); - /** - * Calls CreateSecuritySettings. - * @function createSecuritySettings - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService - * @instance - * @param {google.cloud.dialogflow.cx.v3.ICreateSecuritySettingsRequest} request CreateSecuritySettingsRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.SecuritySettingsService.CreateSecuritySettingsCallback} callback Node-style callback called with the error, if any, and SecuritySettings - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(SecuritySettingsService.prototype.createSecuritySettings = function createSecuritySettings(request, callback) { - return this.rpcCall(createSecuritySettings, $root.google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest, $root.google.cloud.dialogflow.cx.v3.SecuritySettings, request, callback); - }, "name", { value: "CreateSecuritySettings" }); + return Authentication; + })(); - /** - * Calls CreateSecuritySettings. - * @function createSecuritySettings - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService - * @instance - * @param {google.cloud.dialogflow.cx.v3.ICreateSecuritySettingsRequest} request CreateSecuritySettingsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + Tool.TLSConfig = (function() { - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.SecuritySettingsService|getSecuritySettings}. - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService - * @typedef GetSecuritySettingsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.SecuritySettings} [response] SecuritySettings - */ + /** + * Properties of a TLSConfig. + * @memberof google.cloud.dialogflow.cx.v3.Tool + * @interface ITLSConfig + * @property {Array.|null} [caCerts] TLSConfig caCerts + */ - /** - * Calls GetSecuritySettings. - * @function getSecuritySettings - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService - * @instance - * @param {google.cloud.dialogflow.cx.v3.IGetSecuritySettingsRequest} request GetSecuritySettingsRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.SecuritySettingsService.GetSecuritySettingsCallback} callback Node-style callback called with the error, if any, and SecuritySettings - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(SecuritySettingsService.prototype.getSecuritySettings = function getSecuritySettings(request, callback) { - return this.rpcCall(getSecuritySettings, $root.google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest, $root.google.cloud.dialogflow.cx.v3.SecuritySettings, request, callback); - }, "name", { value: "GetSecuritySettings" }); + /** + * Constructs a new TLSConfig. + * @memberof google.cloud.dialogflow.cx.v3.Tool + * @classdesc Represents a TLSConfig. + * @implements ITLSConfig + * @constructor + * @param {google.cloud.dialogflow.cx.v3.Tool.ITLSConfig=} [properties] Properties to set + */ + function TLSConfig(properties) { + this.caCerts = []; + 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]]; + } - /** - * Calls GetSecuritySettings. - * @function getSecuritySettings - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService - * @instance - * @param {google.cloud.dialogflow.cx.v3.IGetSecuritySettingsRequest} request GetSecuritySettingsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * TLSConfig caCerts. + * @member {Array.} caCerts + * @memberof google.cloud.dialogflow.cx.v3.Tool.TLSConfig + * @instance + */ + TLSConfig.prototype.caCerts = $util.emptyArray; - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.SecuritySettingsService|updateSecuritySettings}. - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService - * @typedef UpdateSecuritySettingsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.SecuritySettings} [response] SecuritySettings - */ + /** + * Creates a new TLSConfig instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.Tool.TLSConfig + * @static + * @param {google.cloud.dialogflow.cx.v3.Tool.ITLSConfig=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.Tool.TLSConfig} TLSConfig instance + */ + TLSConfig.create = function create(properties) { + return new TLSConfig(properties); + }; - /** - * Calls UpdateSecuritySettings. - * @function updateSecuritySettings - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService - * @instance - * @param {google.cloud.dialogflow.cx.v3.IUpdateSecuritySettingsRequest} request UpdateSecuritySettingsRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.SecuritySettingsService.UpdateSecuritySettingsCallback} callback Node-style callback called with the error, if any, and SecuritySettings - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(SecuritySettingsService.prototype.updateSecuritySettings = function updateSecuritySettings(request, callback) { - return this.rpcCall(updateSecuritySettings, $root.google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest, $root.google.cloud.dialogflow.cx.v3.SecuritySettings, request, callback); - }, "name", { value: "UpdateSecuritySettings" }); + /** + * Encodes the specified TLSConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Tool.TLSConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.Tool.TLSConfig + * @static + * @param {google.cloud.dialogflow.cx.v3.Tool.ITLSConfig} message TLSConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TLSConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.caCerts != null && message.caCerts.length) + for (var i = 0; i < message.caCerts.length; ++i) + $root.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert.encode(message.caCerts[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; - /** - * Calls UpdateSecuritySettings. - * @function updateSecuritySettings - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService - * @instance - * @param {google.cloud.dialogflow.cx.v3.IUpdateSecuritySettingsRequest} request UpdateSecuritySettingsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Encodes the specified TLSConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Tool.TLSConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Tool.TLSConfig + * @static + * @param {google.cloud.dialogflow.cx.v3.Tool.ITLSConfig} message TLSConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TLSConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.SecuritySettingsService|listSecuritySettings}. - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService - * @typedef ListSecuritySettingsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse} [response] ListSecuritySettingsResponse - */ + /** + * Decodes a TLSConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.Tool.TLSConfig + * @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.Tool.TLSConfig} TLSConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TLSConfig.decode = function decode(reader, length, error) { + 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.Tool.TLSConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.caCerts && message.caCerts.length)) + message.caCerts = []; + message.caCerts.push($root.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Calls ListSecuritySettings. - * @function listSecuritySettings - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService - * @instance - * @param {google.cloud.dialogflow.cx.v3.IListSecuritySettingsRequest} request ListSecuritySettingsRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.SecuritySettingsService.ListSecuritySettingsCallback} callback Node-style callback called with the error, if any, and ListSecuritySettingsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(SecuritySettingsService.prototype.listSecuritySettings = function listSecuritySettings(request, callback) { - return this.rpcCall(listSecuritySettings, $root.google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest, $root.google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse, request, callback); - }, "name", { value: "ListSecuritySettings" }); + /** + * Decodes a TLSConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Tool.TLSConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.Tool.TLSConfig} TLSConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TLSConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Calls ListSecuritySettings. - * @function listSecuritySettings - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService - * @instance - * @param {google.cloud.dialogflow.cx.v3.IListSecuritySettingsRequest} request ListSecuritySettingsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Verifies a TLSConfig message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.Tool.TLSConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TLSConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.caCerts != null && message.hasOwnProperty("caCerts")) { + if (!Array.isArray(message.caCerts)) + return "caCerts: array expected"; + for (var i = 0; i < message.caCerts.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert.verify(message.caCerts[i]); + if (error) + return "caCerts." + error; + } + } + return null; + }; - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.SecuritySettingsService|deleteSecuritySettings}. - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService - * @typedef DeleteSecuritySettingsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ + /** + * Creates a TLSConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.Tool.TLSConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.Tool.TLSConfig} TLSConfig + */ + TLSConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.Tool.TLSConfig) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.Tool.TLSConfig(); + if (object.caCerts) { + if (!Array.isArray(object.caCerts)) + throw TypeError(".google.cloud.dialogflow.cx.v3.Tool.TLSConfig.caCerts: array expected"); + message.caCerts = []; + for (var i = 0; i < object.caCerts.length; ++i) { + if (typeof object.caCerts[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Tool.TLSConfig.caCerts: object expected"); + message.caCerts[i] = $root.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert.fromObject(object.caCerts[i]); + } + } + return message; + }; - /** - * Calls DeleteSecuritySettings. - * @function deleteSecuritySettings - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService - * @instance - * @param {google.cloud.dialogflow.cx.v3.IDeleteSecuritySettingsRequest} request DeleteSecuritySettingsRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.SecuritySettingsService.DeleteSecuritySettingsCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(SecuritySettingsService.prototype.deleteSecuritySettings = function deleteSecuritySettings(request, callback) { - return this.rpcCall(deleteSecuritySettings, $root.google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteSecuritySettings" }); + /** + * Creates a plain object from a TLSConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.Tool.TLSConfig + * @static + * @param {google.cloud.dialogflow.cx.v3.Tool.TLSConfig} message TLSConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TLSConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.caCerts = []; + if (message.caCerts && message.caCerts.length) { + object.caCerts = []; + for (var j = 0; j < message.caCerts.length; ++j) + object.caCerts[j] = $root.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert.toObject(message.caCerts[j], options); + } + return object; + }; - /** - * Calls DeleteSecuritySettings. - * @function deleteSecuritySettings - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService - * @instance - * @param {google.cloud.dialogflow.cx.v3.IDeleteSecuritySettingsRequest} request DeleteSecuritySettingsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Converts this TLSConfig to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.Tool.TLSConfig + * @instance + * @returns {Object.} JSON object + */ + TLSConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return SecuritySettingsService; - })(); + /** + * Gets the default type url for TLSConfig + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.Tool.TLSConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TLSConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Tool.TLSConfig"; + }; - v3.GetSecuritySettingsRequest = (function() { + TLSConfig.CACert = (function() { - /** - * Properties of a GetSecuritySettingsRequest. - * @memberof google.cloud.dialogflow.cx.v3 - * @interface IGetSecuritySettingsRequest - * @property {string|null} [name] GetSecuritySettingsRequest name - */ + /** + * Properties of a CACert. + * @memberof google.cloud.dialogflow.cx.v3.Tool.TLSConfig + * @interface ICACert + * @property {string|null} [displayName] CACert displayName + * @property {Uint8Array|null} [cert] CACert cert + */ - /** - * Constructs a new GetSecuritySettingsRequest. - * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a GetSecuritySettingsRequest. - * @implements IGetSecuritySettingsRequest - * @constructor - * @param {google.cloud.dialogflow.cx.v3.IGetSecuritySettingsRequest=} [properties] Properties to set - */ - function GetSecuritySettingsRequest(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]]; - } + /** + * Constructs a new CACert. + * @memberof google.cloud.dialogflow.cx.v3.Tool.TLSConfig + * @classdesc Represents a CACert. + * @implements ICACert + * @constructor + * @param {google.cloud.dialogflow.cx.v3.Tool.TLSConfig.ICACert=} [properties] Properties to set + */ + function CACert(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]]; + } - /** - * GetSecuritySettingsRequest name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest - * @instance - */ - GetSecuritySettingsRequest.prototype.name = ""; + /** + * CACert displayName. + * @member {string} displayName + * @memberof google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert + * @instance + */ + CACert.prototype.displayName = ""; - /** - * Creates a new GetSecuritySettingsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.IGetSecuritySettingsRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest} GetSecuritySettingsRequest instance - */ - GetSecuritySettingsRequest.create = function create(properties) { - return new GetSecuritySettingsRequest(properties); - }; + /** + * CACert cert. + * @member {Uint8Array} cert + * @memberof google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert + * @instance + */ + CACert.prototype.cert = $util.newBuffer([]); - /** - * Encodes the specified GetSecuritySettingsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.IGetSecuritySettingsRequest} message GetSecuritySettingsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetSecuritySettingsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; + /** + * Creates a new CACert instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert + * @static + * @param {google.cloud.dialogflow.cx.v3.Tool.TLSConfig.ICACert=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert} CACert instance + */ + CACert.create = function create(properties) { + return new CACert(properties); + }; - /** - * Encodes the specified GetSecuritySettingsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.IGetSecuritySettingsRequest} message GetSecuritySettingsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetSecuritySettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified CACert message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert + * @static + * @param {google.cloud.dialogflow.cx.v3.Tool.TLSConfig.ICACert} message CACert message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CACert.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.cert != null && Object.hasOwnProperty.call(message, "cert")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.cert); + return writer; + }; - /** - * Decodes a GetSecuritySettingsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest - * @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.GetSecuritySettingsRequest} GetSecuritySettingsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetSecuritySettingsRequest.decode = function decode(reader, length, error) { - 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.GetSecuritySettingsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Encodes the specified CACert message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert + * @static + * @param {google.cloud.dialogflow.cx.v3.Tool.TLSConfig.ICACert} message CACert message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CACert.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a GetSecuritySettingsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest} GetSecuritySettingsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetSecuritySettingsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a CACert message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert + * @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.Tool.TLSConfig.CACert} CACert + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CACert.decode = function decode(reader, length, error) { + 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.Tool.TLSConfig.CACert(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.displayName = reader.string(); + break; + } + case 2: { + message.cert = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Verifies a GetSecuritySettingsRequest message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetSecuritySettingsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; + /** + * Decodes a CACert message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert} CACert + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CACert.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a GetSecuritySettingsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest} GetSecuritySettingsRequest - */ - GetSecuritySettingsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; + /** + * Verifies a CACert message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CACert.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.cert != null && message.hasOwnProperty("cert")) + if (!(message.cert && typeof message.cert.length === "number" || $util.isString(message.cert))) + return "cert: buffer expected"; + return null; + }; - /** - * Creates a plain object from a GetSecuritySettingsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest} message GetSecuritySettingsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetSecuritySettingsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; + /** + * Creates a CACert message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert} CACert + */ + CACert.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.cert != null) + if (typeof object.cert === "string") + $util.base64.decode(object.cert, message.cert = $util.newBuffer($util.base64.length(object.cert)), 0); + else if (object.cert.length >= 0) + message.cert = object.cert; + return message; + }; - /** - * Converts this GetSecuritySettingsRequest to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest - * @instance - * @returns {Object.} JSON object - */ - GetSecuritySettingsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a CACert message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert + * @static + * @param {google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert} message CACert + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CACert.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.displayName = ""; + if (options.bytes === String) + object.cert = ""; + else { + object.cert = []; + if (options.bytes !== Array) + object.cert = $util.newBuffer(object.cert); + } + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.cert != null && message.hasOwnProperty("cert")) + object.cert = options.bytes === String ? $util.base64.encode(message.cert, 0, message.cert.length) : options.bytes === Array ? Array.prototype.slice.call(message.cert) : message.cert; + return object; + }; - /** - * Gets the default type url for GetSecuritySettingsRequest - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetSecuritySettingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest"; - }; + /** + * Converts this CACert to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert + * @instance + * @returns {Object.} JSON object + */ + CACert.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return GetSecuritySettingsRequest; - })(); + /** + * Gets the default type url for CACert + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CACert.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Tool.TLSConfig.CACert"; + }; - v3.UpdateSecuritySettingsRequest = (function() { + return CACert; + })(); - /** - * Properties of an UpdateSecuritySettingsRequest. - * @memberof google.cloud.dialogflow.cx.v3 - * @interface IUpdateSecuritySettingsRequest - * @property {google.cloud.dialogflow.cx.v3.ISecuritySettings|null} [securitySettings] UpdateSecuritySettingsRequest securitySettings - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateSecuritySettingsRequest updateMask - */ + return TLSConfig; + })(); - /** - * Constructs a new UpdateSecuritySettingsRequest. - * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents an UpdateSecuritySettingsRequest. - * @implements IUpdateSecuritySettingsRequest - * @constructor - * @param {google.cloud.dialogflow.cx.v3.IUpdateSecuritySettingsRequest=} [properties] Properties to set - */ - function UpdateSecuritySettingsRequest(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]]; - } + Tool.ServiceDirectoryConfig = (function() { - /** - * UpdateSecuritySettingsRequest securitySettings. - * @member {google.cloud.dialogflow.cx.v3.ISecuritySettings|null|undefined} securitySettings - * @memberof google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest - * @instance - */ - UpdateSecuritySettingsRequest.prototype.securitySettings = null; + /** + * Properties of a ServiceDirectoryConfig. + * @memberof google.cloud.dialogflow.cx.v3.Tool + * @interface IServiceDirectoryConfig + * @property {string|null} [service] ServiceDirectoryConfig service + */ - /** - * UpdateSecuritySettingsRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest - * @instance - */ - UpdateSecuritySettingsRequest.prototype.updateMask = null; + /** + * Constructs a new ServiceDirectoryConfig. + * @memberof google.cloud.dialogflow.cx.v3.Tool + * @classdesc Represents a ServiceDirectoryConfig. + * @implements IServiceDirectoryConfig + * @constructor + * @param {google.cloud.dialogflow.cx.v3.Tool.IServiceDirectoryConfig=} [properties] Properties to set + */ + function ServiceDirectoryConfig(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]]; + } - /** - * Creates a new UpdateSecuritySettingsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.IUpdateSecuritySettingsRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest} UpdateSecuritySettingsRequest instance - */ - UpdateSecuritySettingsRequest.create = function create(properties) { - return new UpdateSecuritySettingsRequest(properties); - }; + /** + * ServiceDirectoryConfig service. + * @member {string} service + * @memberof google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig + * @instance + */ + ServiceDirectoryConfig.prototype.service = ""; - /** - * Encodes the specified UpdateSecuritySettingsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.IUpdateSecuritySettingsRequest} message UpdateSecuritySettingsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateSecuritySettingsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.securitySettings != null && Object.hasOwnProperty.call(message, "securitySettings")) - $root.google.cloud.dialogflow.cx.v3.SecuritySettings.encode(message.securitySettings, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; + /** + * Creates a new ServiceDirectoryConfig instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig + * @static + * @param {google.cloud.dialogflow.cx.v3.Tool.IServiceDirectoryConfig=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig} ServiceDirectoryConfig instance + */ + ServiceDirectoryConfig.create = function create(properties) { + return new ServiceDirectoryConfig(properties); + }; - /** - * Encodes the specified UpdateSecuritySettingsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.IUpdateSecuritySettingsRequest} message UpdateSecuritySettingsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateSecuritySettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified ServiceDirectoryConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig + * @static + * @param {google.cloud.dialogflow.cx.v3.Tool.IServiceDirectoryConfig} message ServiceDirectoryConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDirectoryConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.service != null && Object.hasOwnProperty.call(message, "service")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.service); + return writer; + }; - /** - * Decodes an UpdateSecuritySettingsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest - * @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.UpdateSecuritySettingsRequest} UpdateSecuritySettingsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateSecuritySettingsRequest.decode = function decode(reader, length, error) { - 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.UpdateSecuritySettingsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.securitySettings = $root.google.cloud.dialogflow.cx.v3.SecuritySettings.decode(reader, reader.uint32()); + /** + * Encodes the specified ServiceDirectoryConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig + * @static + * @param {google.cloud.dialogflow.cx.v3.Tool.IServiceDirectoryConfig} message ServiceDirectoryConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDirectoryConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceDirectoryConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig + * @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.Tool.ServiceDirectoryConfig} ServiceDirectoryConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDirectoryConfig.decode = function decode(reader, length, error) { + 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.Tool.ServiceDirectoryConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - } - case 2: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + switch (tag >>> 3) { + case 1: { + message.service = reader.string(); + break; + } + default: + reader.skipType(tag & 7); break; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; + return message; + }; - /** - * Decodes an UpdateSecuritySettingsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest} UpdateSecuritySettingsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateSecuritySettingsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a ServiceDirectoryConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig} ServiceDirectoryConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDirectoryConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies an UpdateSecuritySettingsRequest message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateSecuritySettingsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.securitySettings != null && message.hasOwnProperty("securitySettings")) { - var error = $root.google.cloud.dialogflow.cx.v3.SecuritySettings.verify(message.securitySettings); - if (error) - return "securitySettings." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - return null; - }; + /** + * Verifies a ServiceDirectoryConfig message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceDirectoryConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.service != null && message.hasOwnProperty("service")) + if (!$util.isString(message.service)) + return "service: string expected"; + return null; + }; - /** - * Creates an UpdateSecuritySettingsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest} UpdateSecuritySettingsRequest - */ - UpdateSecuritySettingsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest) + /** + * Creates a ServiceDirectoryConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig} ServiceDirectoryConfig + */ + ServiceDirectoryConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig(); + if (object.service != null) + message.service = String(object.service); + return message; + }; + + /** + * Creates a plain object from a ServiceDirectoryConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig + * @static + * @param {google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig} message ServiceDirectoryConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceDirectoryConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.service = ""; + if (message.service != null && message.hasOwnProperty("service")) + object.service = message.service; return object; - var message = new $root.google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest(); - if (object.securitySettings != null) { - if (typeof object.securitySettings !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest.securitySettings: object expected"); - message.securitySettings = $root.google.cloud.dialogflow.cx.v3.SecuritySettings.fromObject(object.securitySettings); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - return message; - }; + }; - /** - * Creates a plain object from an UpdateSecuritySettingsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest} message UpdateSecuritySettingsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateSecuritySettingsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.securitySettings = null; - object.updateMask = null; - } - if (message.securitySettings != null && message.hasOwnProperty("securitySettings")) - object.securitySettings = $root.google.cloud.dialogflow.cx.v3.SecuritySettings.toObject(message.securitySettings, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - return object; - }; + /** + * Converts this ServiceDirectoryConfig to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig + * @instance + * @returns {Object.} JSON object + */ + ServiceDirectoryConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this UpdateSecuritySettingsRequest to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateSecuritySettingsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Gets the default type url for ServiceDirectoryConfig + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceDirectoryConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Tool.ServiceDirectoryConfig"; + }; + + return ServiceDirectoryConfig; + })(); /** - * Gets the default type url for UpdateSecuritySettingsRequest - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * ToolType enum. + * @name google.cloud.dialogflow.cx.v3.Tool.ToolType + * @enum {number} + * @property {number} TOOL_TYPE_UNSPECIFIED=0 TOOL_TYPE_UNSPECIFIED value + * @property {number} CUSTOMIZED_TOOL=1 CUSTOMIZED_TOOL value + * @property {number} BUILTIN_TOOL=2 BUILTIN_TOOL value */ - UpdateSecuritySettingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest"; - }; + Tool.ToolType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TOOL_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CUSTOMIZED_TOOL"] = 1; + values[valuesById[2] = "BUILTIN_TOOL"] = 2; + return values; + })(); - return UpdateSecuritySettingsRequest; + return Tool; })(); - v3.ListSecuritySettingsRequest = (function() { + v3.ListToolVersionsRequest = (function() { /** - * Properties of a ListSecuritySettingsRequest. + * Properties of a ListToolVersionsRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IListSecuritySettingsRequest - * @property {string|null} [parent] ListSecuritySettingsRequest parent - * @property {number|null} [pageSize] ListSecuritySettingsRequest pageSize - * @property {string|null} [pageToken] ListSecuritySettingsRequest pageToken + * @interface IListToolVersionsRequest + * @property {string|null} [parent] ListToolVersionsRequest parent + * @property {number|null} [pageSize] ListToolVersionsRequest pageSize + * @property {string|null} [pageToken] ListToolVersionsRequest pageToken */ /** - * Constructs a new ListSecuritySettingsRequest. + * Constructs a new ListToolVersionsRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a ListSecuritySettingsRequest. - * @implements IListSecuritySettingsRequest + * @classdesc Represents a ListToolVersionsRequest. + * @implements IListToolVersionsRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IListSecuritySettingsRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IListToolVersionsRequest=} [properties] Properties to set */ - function ListSecuritySettingsRequest(properties) { + function ListToolVersionsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -88837,51 +113050,51 @@ } /** - * ListSecuritySettingsRequest parent. + * ListToolVersionsRequest parent. * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListToolVersionsRequest * @instance */ - ListSecuritySettingsRequest.prototype.parent = ""; + ListToolVersionsRequest.prototype.parent = ""; /** - * ListSecuritySettingsRequest pageSize. + * ListToolVersionsRequest pageSize. * @member {number} pageSize - * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListToolVersionsRequest * @instance */ - ListSecuritySettingsRequest.prototype.pageSize = 0; + ListToolVersionsRequest.prototype.pageSize = 0; /** - * ListSecuritySettingsRequest pageToken. + * ListToolVersionsRequest pageToken. * @member {string} pageToken - * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListToolVersionsRequest * @instance */ - ListSecuritySettingsRequest.prototype.pageToken = ""; + ListToolVersionsRequest.prototype.pageToken = ""; /** - * Creates a new ListSecuritySettingsRequest instance using the specified properties. + * Creates a new ListToolVersionsRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListToolVersionsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IListSecuritySettingsRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest} ListSecuritySettingsRequest instance + * @param {google.cloud.dialogflow.cx.v3.IListToolVersionsRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ListToolVersionsRequest} ListToolVersionsRequest instance */ - ListSecuritySettingsRequest.create = function create(properties) { - return new ListSecuritySettingsRequest(properties); + ListToolVersionsRequest.create = function create(properties) { + return new ListToolVersionsRequest(properties); }; /** - * Encodes the specified ListSecuritySettingsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest.verify|verify} messages. + * Encodes the specified ListToolVersionsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListToolVersionsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListToolVersionsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IListSecuritySettingsRequest} message ListSecuritySettingsRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListToolVersionsRequest} message ListToolVersionsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListSecuritySettingsRequest.encode = function encode(message, writer) { + ListToolVersionsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) @@ -88894,33 +113107,33 @@ }; /** - * Encodes the specified ListSecuritySettingsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest.verify|verify} messages. + * Encodes the specified ListToolVersionsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListToolVersionsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListToolVersionsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IListSecuritySettingsRequest} message ListSecuritySettingsRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListToolVersionsRequest} message ListToolVersionsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListSecuritySettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListToolVersionsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListSecuritySettingsRequest message from the specified reader or buffer. + * Decodes a ListToolVersionsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListToolVersionsRequest * @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.ListSecuritySettingsRequest} ListSecuritySettingsRequest + * @returns {google.cloud.dialogflow.cx.v3.ListToolVersionsRequest} ListToolVersionsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListSecuritySettingsRequest.decode = function decode(reader, length, error) { + ListToolVersionsRequest.decode = function decode(reader, length, error) { 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.ListSecuritySettingsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ListToolVersionsRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -88947,30 +113160,30 @@ }; /** - * Decodes a ListSecuritySettingsRequest message from the specified reader or buffer, length delimited. + * Decodes a ListToolVersionsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListToolVersionsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest} ListSecuritySettingsRequest + * @returns {google.cloud.dialogflow.cx.v3.ListToolVersionsRequest} ListToolVersionsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListSecuritySettingsRequest.decodeDelimited = function decodeDelimited(reader) { + ListToolVersionsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListSecuritySettingsRequest message. + * Verifies a ListToolVersionsRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListToolVersionsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListSecuritySettingsRequest.verify = function verify(message) { + ListToolVersionsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.parent != null && message.hasOwnProperty("parent")) @@ -88986,17 +113199,17 @@ }; /** - * Creates a ListSecuritySettingsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListToolVersionsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListToolVersionsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest} ListSecuritySettingsRequest + * @returns {google.cloud.dialogflow.cx.v3.ListToolVersionsRequest} ListToolVersionsRequest */ - ListSecuritySettingsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest) + ListToolVersionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListToolVersionsRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest(); + var message = new $root.google.cloud.dialogflow.cx.v3.ListToolVersionsRequest(); if (object.parent != null) message.parent = String(object.parent); if (object.pageSize != null) @@ -89007,15 +113220,15 @@ }; /** - * Creates a plain object from a ListSecuritySettingsRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListToolVersionsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListToolVersionsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest} message ListSecuritySettingsRequest + * @param {google.cloud.dialogflow.cx.v3.ListToolVersionsRequest} message ListToolVersionsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListSecuritySettingsRequest.toObject = function toObject(message, options) { + ListToolVersionsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -89034,54 +113247,54 @@ }; /** - * Converts this ListSecuritySettingsRequest to JSON. + * Converts this ListToolVersionsRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListToolVersionsRequest * @instance * @returns {Object.} JSON object */ - ListSecuritySettingsRequest.prototype.toJSON = function toJSON() { + ListToolVersionsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListSecuritySettingsRequest + * Gets the default type url for ListToolVersionsRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListToolVersionsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListSecuritySettingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListToolVersionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListToolVersionsRequest"; }; - return ListSecuritySettingsRequest; + return ListToolVersionsRequest; })(); - v3.ListSecuritySettingsResponse = (function() { + v3.ListToolVersionsResponse = (function() { /** - * Properties of a ListSecuritySettingsResponse. + * Properties of a ListToolVersionsResponse. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IListSecuritySettingsResponse - * @property {Array.|null} [securitySettings] ListSecuritySettingsResponse securitySettings - * @property {string|null} [nextPageToken] ListSecuritySettingsResponse nextPageToken + * @interface IListToolVersionsResponse + * @property {Array.|null} [toolVersions] ListToolVersionsResponse toolVersions + * @property {string|null} [nextPageToken] ListToolVersionsResponse nextPageToken */ /** - * Constructs a new ListSecuritySettingsResponse. + * Constructs a new ListToolVersionsResponse. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a ListSecuritySettingsResponse. - * @implements IListSecuritySettingsResponse + * @classdesc Represents a ListToolVersionsResponse. + * @implements IListToolVersionsResponse * @constructor - * @param {google.cloud.dialogflow.cx.v3.IListSecuritySettingsResponse=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IListToolVersionsResponse=} [properties] Properties to set */ - function ListSecuritySettingsResponse(properties) { - this.securitySettings = []; + function ListToolVersionsResponse(properties) { + this.toolVersions = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -89089,90 +113302,90 @@ } /** - * ListSecuritySettingsResponse securitySettings. - * @member {Array.} securitySettings - * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse + * ListToolVersionsResponse toolVersions. + * @member {Array.} toolVersions + * @memberof google.cloud.dialogflow.cx.v3.ListToolVersionsResponse * @instance */ - ListSecuritySettingsResponse.prototype.securitySettings = $util.emptyArray; + ListToolVersionsResponse.prototype.toolVersions = $util.emptyArray; /** - * ListSecuritySettingsResponse nextPageToken. + * ListToolVersionsResponse nextPageToken. * @member {string} nextPageToken - * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse + * @memberof google.cloud.dialogflow.cx.v3.ListToolVersionsResponse * @instance */ - ListSecuritySettingsResponse.prototype.nextPageToken = ""; + ListToolVersionsResponse.prototype.nextPageToken = ""; /** - * Creates a new ListSecuritySettingsResponse instance using the specified properties. + * Creates a new ListToolVersionsResponse instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse + * @memberof google.cloud.dialogflow.cx.v3.ListToolVersionsResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IListSecuritySettingsResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse} ListSecuritySettingsResponse instance + * @param {google.cloud.dialogflow.cx.v3.IListToolVersionsResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ListToolVersionsResponse} ListToolVersionsResponse instance */ - ListSecuritySettingsResponse.create = function create(properties) { - return new ListSecuritySettingsResponse(properties); + ListToolVersionsResponse.create = function create(properties) { + return new ListToolVersionsResponse(properties); }; /** - * Encodes the specified ListSecuritySettingsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse.verify|verify} messages. + * Encodes the specified ListToolVersionsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListToolVersionsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse + * @memberof google.cloud.dialogflow.cx.v3.ListToolVersionsResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IListSecuritySettingsResponse} message ListSecuritySettingsResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListToolVersionsResponse} message ListToolVersionsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListSecuritySettingsResponse.encode = function encode(message, writer) { + ListToolVersionsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.securitySettings != null && message.securitySettings.length) - for (var i = 0; i < message.securitySettings.length; ++i) - $root.google.cloud.dialogflow.cx.v3.SecuritySettings.encode(message.securitySettings[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.toolVersions != null && message.toolVersions.length) + for (var i = 0; i < message.toolVersions.length; ++i) + $root.google.cloud.dialogflow.cx.v3.ToolVersion.encode(message.toolVersions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; /** - * Encodes the specified ListSecuritySettingsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse.verify|verify} messages. + * Encodes the specified ListToolVersionsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListToolVersionsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse + * @memberof google.cloud.dialogflow.cx.v3.ListToolVersionsResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IListSecuritySettingsResponse} message ListSecuritySettingsResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListToolVersionsResponse} message ListToolVersionsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListSecuritySettingsResponse.encodeDelimited = function encodeDelimited(message, writer) { + ListToolVersionsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListSecuritySettingsResponse message from the specified reader or buffer. + * Decodes a ListToolVersionsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse + * @memberof google.cloud.dialogflow.cx.v3.ListToolVersionsResponse * @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.ListSecuritySettingsResponse} ListSecuritySettingsResponse + * @returns {google.cloud.dialogflow.cx.v3.ListToolVersionsResponse} ListToolVersionsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListSecuritySettingsResponse.decode = function decode(reader, length, error) { + ListToolVersionsResponse.decode = function decode(reader, length, error) { 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.ListSecuritySettingsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ListToolVersionsResponse(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - if (!(message.securitySettings && message.securitySettings.length)) - message.securitySettings = []; - message.securitySettings.push($root.google.cloud.dialogflow.cx.v3.SecuritySettings.decode(reader, reader.uint32())); + if (!(message.toolVersions && message.toolVersions.length)) + message.toolVersions = []; + message.toolVersions.push($root.google.cloud.dialogflow.cx.v3.ToolVersion.decode(reader, reader.uint32())); break; } case 2: { @@ -89188,39 +113401,39 @@ }; /** - * Decodes a ListSecuritySettingsResponse message from the specified reader or buffer, length delimited. + * Decodes a ListToolVersionsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse + * @memberof google.cloud.dialogflow.cx.v3.ListToolVersionsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse} ListSecuritySettingsResponse + * @returns {google.cloud.dialogflow.cx.v3.ListToolVersionsResponse} ListToolVersionsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListSecuritySettingsResponse.decodeDelimited = function decodeDelimited(reader) { + ListToolVersionsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListSecuritySettingsResponse message. + * Verifies a ListToolVersionsResponse message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse + * @memberof google.cloud.dialogflow.cx.v3.ListToolVersionsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListSecuritySettingsResponse.verify = function verify(message) { + ListToolVersionsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.securitySettings != null && message.hasOwnProperty("securitySettings")) { - if (!Array.isArray(message.securitySettings)) - return "securitySettings: array expected"; - for (var i = 0; i < message.securitySettings.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.SecuritySettings.verify(message.securitySettings[i]); + if (message.toolVersions != null && message.hasOwnProperty("toolVersions")) { + if (!Array.isArray(message.toolVersions)) + return "toolVersions: array expected"; + for (var i = 0; i < message.toolVersions.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.ToolVersion.verify(message.toolVersions[i]); if (error) - return "securitySettings." + error; + return "toolVersions." + error; } } if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) @@ -89230,25 +113443,25 @@ }; /** - * Creates a ListSecuritySettingsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListToolVersionsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse + * @memberof google.cloud.dialogflow.cx.v3.ListToolVersionsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse} ListSecuritySettingsResponse + * @returns {google.cloud.dialogflow.cx.v3.ListToolVersionsResponse} ListToolVersionsResponse */ - ListSecuritySettingsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse) + ListToolVersionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListToolVersionsResponse) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse(); - if (object.securitySettings) { - if (!Array.isArray(object.securitySettings)) - throw TypeError(".google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse.securitySettings: array expected"); - message.securitySettings = []; - for (var i = 0; i < object.securitySettings.length; ++i) { - if (typeof object.securitySettings[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse.securitySettings: object expected"); - message.securitySettings[i] = $root.google.cloud.dialogflow.cx.v3.SecuritySettings.fromObject(object.securitySettings[i]); + var message = new $root.google.cloud.dialogflow.cx.v3.ListToolVersionsResponse(); + if (object.toolVersions) { + if (!Array.isArray(object.toolVersions)) + throw TypeError(".google.cloud.dialogflow.cx.v3.ListToolVersionsResponse.toolVersions: array expected"); + message.toolVersions = []; + for (var i = 0; i < object.toolVersions.length; ++i) { + if (typeof object.toolVersions[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.ListToolVersionsResponse.toolVersions: object expected"); + message.toolVersions[i] = $root.google.cloud.dialogflow.cx.v3.ToolVersion.fromObject(object.toolVersions[i]); } } if (object.nextPageToken != null) @@ -89257,26 +113470,26 @@ }; /** - * Creates a plain object from a ListSecuritySettingsResponse message. Also converts values to other types if specified. + * Creates a plain object from a ListToolVersionsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse + * @memberof google.cloud.dialogflow.cx.v3.ListToolVersionsResponse * @static - * @param {google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse} message ListSecuritySettingsResponse + * @param {google.cloud.dialogflow.cx.v3.ListToolVersionsResponse} message ListToolVersionsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListSecuritySettingsResponse.toObject = function toObject(message, options) { + ListToolVersionsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.securitySettings = []; + object.toolVersions = []; if (options.defaults) object.nextPageToken = ""; - if (message.securitySettings && message.securitySettings.length) { - object.securitySettings = []; - for (var j = 0; j < message.securitySettings.length; ++j) - object.securitySettings[j] = $root.google.cloud.dialogflow.cx.v3.SecuritySettings.toObject(message.securitySettings[j], options); + if (message.toolVersions && message.toolVersions.length) { + object.toolVersions = []; + for (var j = 0; j < message.toolVersions.length; ++j) + object.toolVersions[j] = $root.google.cloud.dialogflow.cx.v3.ToolVersion.toObject(message.toolVersions[j], options); } if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) object.nextPageToken = message.nextPageToken; @@ -89284,53 +113497,53 @@ }; /** - * Converts this ListSecuritySettingsResponse to JSON. + * Converts this ListToolVersionsResponse to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse + * @memberof google.cloud.dialogflow.cx.v3.ListToolVersionsResponse * @instance * @returns {Object.} JSON object */ - ListSecuritySettingsResponse.prototype.toJSON = function toJSON() { + ListToolVersionsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListSecuritySettingsResponse + * Gets the default type url for ListToolVersionsResponse * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse + * @memberof google.cloud.dialogflow.cx.v3.ListToolVersionsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListSecuritySettingsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListToolVersionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListToolVersionsResponse"; }; - return ListSecuritySettingsResponse; + return ListToolVersionsResponse; })(); - v3.CreateSecuritySettingsRequest = (function() { + v3.CreateToolVersionRequest = (function() { /** - * Properties of a CreateSecuritySettingsRequest. + * Properties of a CreateToolVersionRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface ICreateSecuritySettingsRequest - * @property {string|null} [parent] CreateSecuritySettingsRequest parent - * @property {google.cloud.dialogflow.cx.v3.ISecuritySettings|null} [securitySettings] CreateSecuritySettingsRequest securitySettings + * @interface ICreateToolVersionRequest + * @property {string|null} [parent] CreateToolVersionRequest parent + * @property {google.cloud.dialogflow.cx.v3.IToolVersion|null} [toolVersion] CreateToolVersionRequest toolVersion */ /** - * Constructs a new CreateSecuritySettingsRequest. + * Constructs a new CreateToolVersionRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a CreateSecuritySettingsRequest. - * @implements ICreateSecuritySettingsRequest + * @classdesc Represents a CreateToolVersionRequest. + * @implements ICreateToolVersionRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.ICreateSecuritySettingsRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.ICreateToolVersionRequest=} [properties] Properties to set */ - function CreateSecuritySettingsRequest(properties) { + function CreateToolVersionRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -89338,80 +113551,80 @@ } /** - * CreateSecuritySettingsRequest parent. + * CreateToolVersionRequest parent. * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateToolVersionRequest * @instance */ - CreateSecuritySettingsRequest.prototype.parent = ""; + CreateToolVersionRequest.prototype.parent = ""; /** - * CreateSecuritySettingsRequest securitySettings. - * @member {google.cloud.dialogflow.cx.v3.ISecuritySettings|null|undefined} securitySettings - * @memberof google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest + * CreateToolVersionRequest toolVersion. + * @member {google.cloud.dialogflow.cx.v3.IToolVersion|null|undefined} toolVersion + * @memberof google.cloud.dialogflow.cx.v3.CreateToolVersionRequest * @instance */ - CreateSecuritySettingsRequest.prototype.securitySettings = null; + CreateToolVersionRequest.prototype.toolVersion = null; /** - * Creates a new CreateSecuritySettingsRequest instance using the specified properties. + * Creates a new CreateToolVersionRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateToolVersionRequest * @static - * @param {google.cloud.dialogflow.cx.v3.ICreateSecuritySettingsRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest} CreateSecuritySettingsRequest instance + * @param {google.cloud.dialogflow.cx.v3.ICreateToolVersionRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.CreateToolVersionRequest} CreateToolVersionRequest instance */ - CreateSecuritySettingsRequest.create = function create(properties) { - return new CreateSecuritySettingsRequest(properties); + CreateToolVersionRequest.create = function create(properties) { + return new CreateToolVersionRequest(properties); }; /** - * Encodes the specified CreateSecuritySettingsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest.verify|verify} messages. + * Encodes the specified CreateToolVersionRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateToolVersionRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateToolVersionRequest * @static - * @param {google.cloud.dialogflow.cx.v3.ICreateSecuritySettingsRequest} message CreateSecuritySettingsRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ICreateToolVersionRequest} message CreateToolVersionRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateSecuritySettingsRequest.encode = function encode(message, writer) { + CreateToolVersionRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.securitySettings != null && Object.hasOwnProperty.call(message, "securitySettings")) - $root.google.cloud.dialogflow.cx.v3.SecuritySettings.encode(message.securitySettings, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.toolVersion != null && Object.hasOwnProperty.call(message, "toolVersion")) + $root.google.cloud.dialogflow.cx.v3.ToolVersion.encode(message.toolVersion, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified CreateSecuritySettingsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest.verify|verify} messages. + * Encodes the specified CreateToolVersionRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateToolVersionRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateToolVersionRequest * @static - * @param {google.cloud.dialogflow.cx.v3.ICreateSecuritySettingsRequest} message CreateSecuritySettingsRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ICreateToolVersionRequest} message CreateToolVersionRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateSecuritySettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + CreateToolVersionRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateSecuritySettingsRequest message from the specified reader or buffer. + * Decodes a CreateToolVersionRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateToolVersionRequest * @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.CreateSecuritySettingsRequest} CreateSecuritySettingsRequest + * @returns {google.cloud.dialogflow.cx.v3.CreateToolVersionRequest} CreateToolVersionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateSecuritySettingsRequest.decode = function decode(reader, length, error) { + CreateToolVersionRequest.decode = function decode(reader, length, error) { 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.CreateSecuritySettingsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.CreateToolVersionRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -89422,7 +113635,7 @@ break; } case 2: { - message.securitySettings = $root.google.cloud.dialogflow.cx.v3.SecuritySettings.decode(reader, reader.uint32()); + message.toolVersion = $root.google.cloud.dialogflow.cx.v3.ToolVersion.decode(reader, reader.uint32()); break; } default: @@ -89434,136 +113647,342 @@ }; /** - * Decodes a CreateSecuritySettingsRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateToolVersionRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateToolVersionRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest} CreateSecuritySettingsRequest + * @returns {google.cloud.dialogflow.cx.v3.CreateToolVersionRequest} CreateToolVersionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateSecuritySettingsRequest.decodeDelimited = function decodeDelimited(reader) { + CreateToolVersionRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateSecuritySettingsRequest message. + * Verifies a CreateToolVersionRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateToolVersionRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateSecuritySettingsRequest.verify = function verify(message) { + CreateToolVersionRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.parent != null && message.hasOwnProperty("parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.securitySettings != null && message.hasOwnProperty("securitySettings")) { - var error = $root.google.cloud.dialogflow.cx.v3.SecuritySettings.verify(message.securitySettings); + if (message.toolVersion != null && message.hasOwnProperty("toolVersion")) { + var error = $root.google.cloud.dialogflow.cx.v3.ToolVersion.verify(message.toolVersion); if (error) - return "securitySettings." + error; + return "toolVersion." + error; } return null; }; /** - * Creates a CreateSecuritySettingsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateToolVersionRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateToolVersionRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest} CreateSecuritySettingsRequest + * @returns {google.cloud.dialogflow.cx.v3.CreateToolVersionRequest} CreateToolVersionRequest */ - CreateSecuritySettingsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest) + CreateToolVersionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.CreateToolVersionRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest(); + var message = new $root.google.cloud.dialogflow.cx.v3.CreateToolVersionRequest(); if (object.parent != null) message.parent = String(object.parent); - if (object.securitySettings != null) { - if (typeof object.securitySettings !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest.securitySettings: object expected"); - message.securitySettings = $root.google.cloud.dialogflow.cx.v3.SecuritySettings.fromObject(object.securitySettings); + if (object.toolVersion != null) { + if (typeof object.toolVersion !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.CreateToolVersionRequest.toolVersion: object expected"); + message.toolVersion = $root.google.cloud.dialogflow.cx.v3.ToolVersion.fromObject(object.toolVersion); } return message; }; /** - * Creates a plain object from a CreateSecuritySettingsRequest message. Also converts values to other types if specified. + * Creates a plain object from a CreateToolVersionRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateToolVersionRequest * @static - * @param {google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest} message CreateSecuritySettingsRequest + * @param {google.cloud.dialogflow.cx.v3.CreateToolVersionRequest} message CreateToolVersionRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateSecuritySettingsRequest.toObject = function toObject(message, options) { + CreateToolVersionRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.parent = ""; - object.securitySettings = null; + object.toolVersion = null; } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; - if (message.securitySettings != null && message.hasOwnProperty("securitySettings")) - object.securitySettings = $root.google.cloud.dialogflow.cx.v3.SecuritySettings.toObject(message.securitySettings, options); + if (message.toolVersion != null && message.hasOwnProperty("toolVersion")) + object.toolVersion = $root.google.cloud.dialogflow.cx.v3.ToolVersion.toObject(message.toolVersion, options); return object; }; /** - * Converts this CreateSecuritySettingsRequest to JSON. + * Converts this CreateToolVersionRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateToolVersionRequest * @instance * @returns {Object.} JSON object */ - CreateSecuritySettingsRequest.prototype.toJSON = function toJSON() { + CreateToolVersionRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateSecuritySettingsRequest + * Gets the default type url for CreateToolVersionRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateToolVersionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateToolVersionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.CreateToolVersionRequest"; + }; + + return CreateToolVersionRequest; + })(); + + v3.GetToolVersionRequest = (function() { + + /** + * Properties of a GetToolVersionRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IGetToolVersionRequest + * @property {string|null} [name] GetToolVersionRequest name + */ + + /** + * Constructs a new GetToolVersionRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a GetToolVersionRequest. + * @implements IGetToolVersionRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IGetToolVersionRequest=} [properties] Properties to set + */ + function GetToolVersionRequest(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]]; + } + + /** + * GetToolVersionRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.GetToolVersionRequest + * @instance + */ + GetToolVersionRequest.prototype.name = ""; + + /** + * Creates a new GetToolVersionRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.GetToolVersionRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IGetToolVersionRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.GetToolVersionRequest} GetToolVersionRequest instance + */ + GetToolVersionRequest.create = function create(properties) { + return new GetToolVersionRequest(properties); + }; + + /** + * Encodes the specified GetToolVersionRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetToolVersionRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.GetToolVersionRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IGetToolVersionRequest} message GetToolVersionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetToolVersionRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetToolVersionRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetToolVersionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.GetToolVersionRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IGetToolVersionRequest} message GetToolVersionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetToolVersionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetToolVersionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.GetToolVersionRequest + * @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.GetToolVersionRequest} GetToolVersionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetToolVersionRequest.decode = function decode(reader, length, error) { + 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.GetToolVersionRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetToolVersionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.GetToolVersionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.GetToolVersionRequest} GetToolVersionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetToolVersionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetToolVersionRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.GetToolVersionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetToolVersionRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetToolVersionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.GetToolVersionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.GetToolVersionRequest} GetToolVersionRequest + */ + GetToolVersionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.GetToolVersionRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.GetToolVersionRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetToolVersionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.GetToolVersionRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.GetToolVersionRequest} message GetToolVersionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetToolVersionRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetToolVersionRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.GetToolVersionRequest + * @instance + * @returns {Object.} JSON object + */ + GetToolVersionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetToolVersionRequest + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.GetToolVersionRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateSecuritySettingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetToolVersionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.GetToolVersionRequest"; }; - return CreateSecuritySettingsRequest; + return GetToolVersionRequest; })(); - v3.DeleteSecuritySettingsRequest = (function() { + v3.DeleteToolVersionRequest = (function() { /** - * Properties of a DeleteSecuritySettingsRequest. + * Properties of a DeleteToolVersionRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IDeleteSecuritySettingsRequest - * @property {string|null} [name] DeleteSecuritySettingsRequest name + * @interface IDeleteToolVersionRequest + * @property {string|null} [name] DeleteToolVersionRequest name + * @property {boolean|null} [force] DeleteToolVersionRequest force */ /** - * Constructs a new DeleteSecuritySettingsRequest. + * Constructs a new DeleteToolVersionRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a DeleteSecuritySettingsRequest. - * @implements IDeleteSecuritySettingsRequest + * @classdesc Represents a DeleteToolVersionRequest. + * @implements IDeleteToolVersionRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IDeleteSecuritySettingsRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IDeleteToolVersionRequest=} [properties] Properties to set */ - function DeleteSecuritySettingsRequest(properties) { + function DeleteToolVersionRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -89571,70 +113990,80 @@ } /** - * DeleteSecuritySettingsRequest name. + * DeleteToolVersionRequest name. * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest * @instance */ - DeleteSecuritySettingsRequest.prototype.name = ""; + DeleteToolVersionRequest.prototype.name = ""; /** - * Creates a new DeleteSecuritySettingsRequest instance using the specified properties. + * DeleteToolVersionRequest force. + * @member {boolean} force + * @memberof google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest + * @instance + */ + DeleteToolVersionRequest.prototype.force = false; + + /** + * Creates a new DeleteToolVersionRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IDeleteSecuritySettingsRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest} DeleteSecuritySettingsRequest instance + * @param {google.cloud.dialogflow.cx.v3.IDeleteToolVersionRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest} DeleteToolVersionRequest instance */ - DeleteSecuritySettingsRequest.create = function create(properties) { - return new DeleteSecuritySettingsRequest(properties); + DeleteToolVersionRequest.create = function create(properties) { + return new DeleteToolVersionRequest(properties); }; /** - * Encodes the specified DeleteSecuritySettingsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest.verify|verify} messages. + * Encodes the specified DeleteToolVersionRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IDeleteSecuritySettingsRequest} message DeleteSecuritySettingsRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IDeleteToolVersionRequest} message DeleteToolVersionRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteSecuritySettingsRequest.encode = function encode(message, writer) { + DeleteToolVersionRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.force != null && Object.hasOwnProperty.call(message, "force")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.force); return writer; }; /** - * Encodes the specified DeleteSecuritySettingsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest.verify|verify} messages. + * Encodes the specified DeleteToolVersionRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IDeleteSecuritySettingsRequest} message DeleteSecuritySettingsRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IDeleteToolVersionRequest} message DeleteToolVersionRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteSecuritySettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeleteToolVersionRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteSecuritySettingsRequest message from the specified reader or buffer. + * Decodes a DeleteToolVersionRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest * @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.DeleteSecuritySettingsRequest} DeleteSecuritySettingsRequest + * @returns {google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest} DeleteToolVersionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteSecuritySettingsRequest.decode = function decode(reader, length, error) { + DeleteToolVersionRequest.decode = function decode(reader, length, error) { 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.DeleteSecuritySettingsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -89644,6 +114073,10 @@ message.name = reader.string(); break; } + case 2: { + message.force = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -89653,133 +114086,131 @@ }; /** - * Decodes a DeleteSecuritySettingsRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteToolVersionRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest} DeleteSecuritySettingsRequest + * @returns {google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest} DeleteToolVersionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteSecuritySettingsRequest.decodeDelimited = function decodeDelimited(reader) { + DeleteToolVersionRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteSecuritySettingsRequest message. + * Verifies a DeleteToolVersionRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteSecuritySettingsRequest.verify = function verify(message) { + DeleteToolVersionRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; + if (message.force != null && message.hasOwnProperty("force")) + if (typeof message.force !== "boolean") + return "force: boolean expected"; return null; }; /** - * Creates a DeleteSecuritySettingsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteToolVersionRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest} DeleteSecuritySettingsRequest + * @returns {google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest} DeleteToolVersionRequest */ - DeleteSecuritySettingsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest) + DeleteToolVersionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest(); + var message = new $root.google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest(); if (object.name != null) message.name = String(object.name); + if (object.force != null) + message.force = Boolean(object.force); return message; }; /** - * Creates a plain object from a DeleteSecuritySettingsRequest message. Also converts values to other types if specified. + * Creates a plain object from a DeleteToolVersionRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest * @static - * @param {google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest} message DeleteSecuritySettingsRequest + * @param {google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest} message DeleteToolVersionRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteSecuritySettingsRequest.toObject = function toObject(message, options) { + DeleteToolVersionRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { object.name = ""; + object.force = false; + } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; + if (message.force != null && message.hasOwnProperty("force")) + object.force = message.force; return object; }; /** - * Converts this DeleteSecuritySettingsRequest to JSON. + * Converts this DeleteToolVersionRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest * @instance * @returns {Object.} JSON object */ - DeleteSecuritySettingsRequest.prototype.toJSON = function toJSON() { + DeleteToolVersionRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeleteSecuritySettingsRequest + * Gets the default type url for DeleteToolVersionRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeleteSecuritySettingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeleteToolVersionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest"; }; - return DeleteSecuritySettingsRequest; + return DeleteToolVersionRequest; })(); - v3.SecuritySettings = (function() { + v3.RestoreToolVersionRequest = (function() { /** - * Properties of a SecuritySettings. + * Properties of a RestoreToolVersionRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface ISecuritySettings - * @property {string|null} [name] SecuritySettings name - * @property {string|null} [displayName] SecuritySettings displayName - * @property {google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionStrategy|null} [redactionStrategy] SecuritySettings redactionStrategy - * @property {google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionScope|null} [redactionScope] SecuritySettings redactionScope - * @property {string|null} [inspectTemplate] SecuritySettings inspectTemplate - * @property {string|null} [deidentifyTemplate] SecuritySettings deidentifyTemplate - * @property {number|null} [retentionWindowDays] SecuritySettings retentionWindowDays - * @property {google.cloud.dialogflow.cx.v3.SecuritySettings.RetentionStrategy|null} [retentionStrategy] SecuritySettings retentionStrategy - * @property {Array.|null} [purgeDataTypes] SecuritySettings purgeDataTypes - * @property {google.cloud.dialogflow.cx.v3.SecuritySettings.IAudioExportSettings|null} [audioExportSettings] SecuritySettings audioExportSettings - * @property {google.cloud.dialogflow.cx.v3.SecuritySettings.IInsightsExportSettings|null} [insightsExportSettings] SecuritySettings insightsExportSettings + * @interface IRestoreToolVersionRequest + * @property {string|null} [name] RestoreToolVersionRequest name */ /** - * Constructs a new SecuritySettings. + * Constructs a new RestoreToolVersionRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a SecuritySettings. - * @implements ISecuritySettings + * @classdesc Represents a RestoreToolVersionRequest. + * @implements IRestoreToolVersionRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.ISecuritySettings=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IRestoreToolVersionRequest=} [properties] Properties to set */ - function SecuritySettings(properties) { - this.purgeDataTypes = []; + function RestoreToolVersionRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -89787,188 +114218,70 @@ } /** - * SecuritySettings name. + * RestoreToolVersionRequest name. * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings - * @instance - */ - SecuritySettings.prototype.name = ""; - - /** - * SecuritySettings displayName. - * @member {string} displayName - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings - * @instance - */ - SecuritySettings.prototype.displayName = ""; - - /** - * SecuritySettings redactionStrategy. - * @member {google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionStrategy} redactionStrategy - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings - * @instance - */ - SecuritySettings.prototype.redactionStrategy = 0; - - /** - * SecuritySettings redactionScope. - * @member {google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionScope} redactionScope - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings - * @instance - */ - SecuritySettings.prototype.redactionScope = 0; - - /** - * SecuritySettings inspectTemplate. - * @member {string} inspectTemplate - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings - * @instance - */ - SecuritySettings.prototype.inspectTemplate = ""; - - /** - * SecuritySettings deidentifyTemplate. - * @member {string} deidentifyTemplate - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings - * @instance - */ - SecuritySettings.prototype.deidentifyTemplate = ""; - - /** - * SecuritySettings retentionWindowDays. - * @member {number|null|undefined} retentionWindowDays - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings - * @instance - */ - SecuritySettings.prototype.retentionWindowDays = null; - - /** - * SecuritySettings retentionStrategy. - * @member {google.cloud.dialogflow.cx.v3.SecuritySettings.RetentionStrategy|null|undefined} retentionStrategy - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings - * @instance - */ - SecuritySettings.prototype.retentionStrategy = null; - - /** - * SecuritySettings purgeDataTypes. - * @member {Array.} purgeDataTypes - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings - * @instance - */ - SecuritySettings.prototype.purgeDataTypes = $util.emptyArray; - - /** - * SecuritySettings audioExportSettings. - * @member {google.cloud.dialogflow.cx.v3.SecuritySettings.IAudioExportSettings|null|undefined} audioExportSettings - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings - * @instance - */ - SecuritySettings.prototype.audioExportSettings = null; - - /** - * SecuritySettings insightsExportSettings. - * @member {google.cloud.dialogflow.cx.v3.SecuritySettings.IInsightsExportSettings|null|undefined} insightsExportSettings - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings - * @instance - */ - SecuritySettings.prototype.insightsExportSettings = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * SecuritySettings dataRetention. - * @member {"retentionWindowDays"|"retentionStrategy"|undefined} dataRetention - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings + * @memberof google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest * @instance */ - Object.defineProperty(SecuritySettings.prototype, "dataRetention", { - get: $util.oneOfGetter($oneOfFields = ["retentionWindowDays", "retentionStrategy"]), - set: $util.oneOfSetter($oneOfFields) - }); + RestoreToolVersionRequest.prototype.name = ""; /** - * Creates a new SecuritySettings instance using the specified properties. + * Creates a new RestoreToolVersionRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings + * @memberof google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest * @static - * @param {google.cloud.dialogflow.cx.v3.ISecuritySettings=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.SecuritySettings} SecuritySettings instance + * @param {google.cloud.dialogflow.cx.v3.IRestoreToolVersionRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest} RestoreToolVersionRequest instance */ - SecuritySettings.create = function create(properties) { - return new SecuritySettings(properties); + RestoreToolVersionRequest.create = function create(properties) { + return new RestoreToolVersionRequest(properties); }; /** - * Encodes the specified SecuritySettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SecuritySettings.verify|verify} messages. + * Encodes the specified RestoreToolVersionRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings + * @memberof google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest * @static - * @param {google.cloud.dialogflow.cx.v3.ISecuritySettings} message SecuritySettings message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IRestoreToolVersionRequest} message RestoreToolVersionRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SecuritySettings.encode = function encode(message, writer) { + RestoreToolVersionRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.redactionStrategy != null && Object.hasOwnProperty.call(message, "redactionStrategy")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.redactionStrategy); - if (message.redactionScope != null && Object.hasOwnProperty.call(message, "redactionScope")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.redactionScope); - if (message.retentionWindowDays != null && Object.hasOwnProperty.call(message, "retentionWindowDays")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.retentionWindowDays); - if (message.retentionStrategy != null && Object.hasOwnProperty.call(message, "retentionStrategy")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.retentionStrategy); - if (message.purgeDataTypes != null && message.purgeDataTypes.length) { - writer.uint32(/* id 8, wireType 2 =*/66).fork(); - for (var i = 0; i < message.purgeDataTypes.length; ++i) - writer.int32(message.purgeDataTypes[i]); - writer.ldelim(); - } - if (message.inspectTemplate != null && Object.hasOwnProperty.call(message, "inspectTemplate")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.inspectTemplate); - if (message.audioExportSettings != null && Object.hasOwnProperty.call(message, "audioExportSettings")) - $root.google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings.encode(message.audioExportSettings, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.insightsExportSettings != null && Object.hasOwnProperty.call(message, "insightsExportSettings")) - $root.google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings.encode(message.insightsExportSettings, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); - if (message.deidentifyTemplate != null && Object.hasOwnProperty.call(message, "deidentifyTemplate")) - writer.uint32(/* id 17, wireType 2 =*/138).string(message.deidentifyTemplate); return writer; }; /** - * Encodes the specified SecuritySettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SecuritySettings.verify|verify} messages. + * Encodes the specified RestoreToolVersionRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings + * @memberof google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest * @static - * @param {google.cloud.dialogflow.cx.v3.ISecuritySettings} message SecuritySettings message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IRestoreToolVersionRequest} message RestoreToolVersionRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SecuritySettings.encodeDelimited = function encodeDelimited(message, writer) { + RestoreToolVersionRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SecuritySettings message from the specified reader or buffer. + * Decodes a RestoreToolVersionRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings + * @memberof google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest * @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.SecuritySettings} SecuritySettings + * @returns {google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest} RestoreToolVersionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SecuritySettings.decode = function decode(reader, length, error) { + RestoreToolVersionRequest.decode = function decode(reader, length, error) { 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.SecuritySettings(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -89978,53 +114291,6 @@ message.name = reader.string(); break; } - case 2: { - message.displayName = reader.string(); - break; - } - case 3: { - message.redactionStrategy = reader.int32(); - break; - } - case 4: { - message.redactionScope = reader.int32(); - break; - } - case 9: { - message.inspectTemplate = reader.string(); - break; - } - case 17: { - message.deidentifyTemplate = reader.string(); - break; - } - case 6: { - message.retentionWindowDays = reader.int32(); - break; - } - case 7: { - message.retentionStrategy = reader.int32(); - break; - } - case 8: { - if (!(message.purgeDataTypes && message.purgeDataTypes.length)) - message.purgeDataTypes = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.purgeDataTypes.push(reader.int32()); - } else - message.purgeDataTypes.push(reader.int32()); - break; - } - case 12: { - message.audioExportSettings = $root.google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings.decode(reader, reader.uint32()); - break; - } - case 13: { - message.insightsExportSettings = $root.google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings.decode(reader, reader.uint32()); - break; - } default: reader.skipType(tag & 7); break; @@ -90034,899 +114300,625 @@ }; /** - * Decodes a SecuritySettings message from the specified reader or buffer, length delimited. + * Decodes a RestoreToolVersionRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings + * @memberof google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.SecuritySettings} SecuritySettings + * @returns {google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest} RestoreToolVersionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SecuritySettings.decodeDelimited = function decodeDelimited(reader) { + RestoreToolVersionRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SecuritySettings message. + * Verifies a RestoreToolVersionRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings + * @memberof google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SecuritySettings.verify = function verify(message) { + RestoreToolVersionRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.redactionStrategy != null && message.hasOwnProperty("redactionStrategy")) - switch (message.redactionStrategy) { - default: - return "redactionStrategy: enum value expected"; - case 0: - case 1: - break; - } - if (message.redactionScope != null && message.hasOwnProperty("redactionScope")) - switch (message.redactionScope) { - default: - return "redactionScope: enum value expected"; - case 0: - case 2: - break; - } - if (message.inspectTemplate != null && message.hasOwnProperty("inspectTemplate")) - if (!$util.isString(message.inspectTemplate)) - return "inspectTemplate: string expected"; - if (message.deidentifyTemplate != null && message.hasOwnProperty("deidentifyTemplate")) - if (!$util.isString(message.deidentifyTemplate)) - return "deidentifyTemplate: string expected"; - if (message.retentionWindowDays != null && message.hasOwnProperty("retentionWindowDays")) { - properties.dataRetention = 1; - if (!$util.isInteger(message.retentionWindowDays)) - return "retentionWindowDays: integer expected"; - } - if (message.retentionStrategy != null && message.hasOwnProperty("retentionStrategy")) { - if (properties.dataRetention === 1) - return "dataRetention: multiple values"; - properties.dataRetention = 1; - switch (message.retentionStrategy) { - default: - return "retentionStrategy: enum value expected"; - case 0: - case 1: - break; - } - } - if (message.purgeDataTypes != null && message.hasOwnProperty("purgeDataTypes")) { - if (!Array.isArray(message.purgeDataTypes)) - return "purgeDataTypes: array expected"; - for (var i = 0; i < message.purgeDataTypes.length; ++i) - switch (message.purgeDataTypes[i]) { - default: - return "purgeDataTypes: enum value[] expected"; - case 0: - case 1: - break; - } - } - if (message.audioExportSettings != null && message.hasOwnProperty("audioExportSettings")) { - var error = $root.google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings.verify(message.audioExportSettings); - if (error) - return "audioExportSettings." + error; - } - if (message.insightsExportSettings != null && message.hasOwnProperty("insightsExportSettings")) { - var error = $root.google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings.verify(message.insightsExportSettings); - if (error) - return "insightsExportSettings." + error; - } return null; }; /** - * Creates a SecuritySettings message from a plain object. Also converts values to their respective internal types. + * Creates a RestoreToolVersionRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings + * @memberof google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.SecuritySettings} SecuritySettings + * @returns {google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest} RestoreToolVersionRequest */ - SecuritySettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.SecuritySettings) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.SecuritySettings(); - if (object.name != null) - message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - switch (object.redactionStrategy) { - default: - if (typeof object.redactionStrategy === "number") { - message.redactionStrategy = object.redactionStrategy; - break; - } - break; - case "REDACTION_STRATEGY_UNSPECIFIED": - case 0: - message.redactionStrategy = 0; - break; - case "REDACT_WITH_SERVICE": - case 1: - message.redactionStrategy = 1; - break; - } - switch (object.redactionScope) { - default: - if (typeof object.redactionScope === "number") { - message.redactionScope = object.redactionScope; - break; - } - break; - case "REDACTION_SCOPE_UNSPECIFIED": - case 0: - message.redactionScope = 0; - break; - case "REDACT_DISK_STORAGE": - case 2: - message.redactionScope = 2; - break; - } - if (object.inspectTemplate != null) - message.inspectTemplate = String(object.inspectTemplate); - if (object.deidentifyTemplate != null) - message.deidentifyTemplate = String(object.deidentifyTemplate); - if (object.retentionWindowDays != null) - message.retentionWindowDays = object.retentionWindowDays | 0; - switch (object.retentionStrategy) { - default: - if (typeof object.retentionStrategy === "number") { - message.retentionStrategy = object.retentionStrategy; - break; - } - break; - case "RETENTION_STRATEGY_UNSPECIFIED": - case 0: - message.retentionStrategy = 0; - break; - case "REMOVE_AFTER_CONVERSATION": - case 1: - message.retentionStrategy = 1; - break; - } - if (object.purgeDataTypes) { - if (!Array.isArray(object.purgeDataTypes)) - throw TypeError(".google.cloud.dialogflow.cx.v3.SecuritySettings.purgeDataTypes: array expected"); - message.purgeDataTypes = []; - for (var i = 0; i < object.purgeDataTypes.length; ++i) - switch (object.purgeDataTypes[i]) { - default: - if (typeof object.purgeDataTypes[i] === "number") { - message.purgeDataTypes[i] = object.purgeDataTypes[i]; - break; - } - case "PURGE_DATA_TYPE_UNSPECIFIED": - case 0: - message.purgeDataTypes[i] = 0; - break; - case "DIALOGFLOW_HISTORY": - case 1: - message.purgeDataTypes[i] = 1; - break; - } - } - if (object.audioExportSettings != null) { - if (typeof object.audioExportSettings !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.SecuritySettings.audioExportSettings: object expected"); - message.audioExportSettings = $root.google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings.fromObject(object.audioExportSettings); - } - if (object.insightsExportSettings != null) { - if (typeof object.insightsExportSettings !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.SecuritySettings.insightsExportSettings: object expected"); - message.insightsExportSettings = $root.google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings.fromObject(object.insightsExportSettings); - } + RestoreToolVersionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a SecuritySettings message. Also converts values to other types if specified. + * Creates a plain object from a RestoreToolVersionRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings + * @memberof google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest * @static - * @param {google.cloud.dialogflow.cx.v3.SecuritySettings} message SecuritySettings + * @param {google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest} message RestoreToolVersionRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SecuritySettings.toObject = function toObject(message, options) { + RestoreToolVersionRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.purgeDataTypes = []; - if (options.defaults) { + if (options.defaults) object.name = ""; - object.displayName = ""; - object.redactionStrategy = options.enums === String ? "REDACTION_STRATEGY_UNSPECIFIED" : 0; - object.redactionScope = options.enums === String ? "REDACTION_SCOPE_UNSPECIFIED" : 0; - object.inspectTemplate = ""; - object.audioExportSettings = null; - object.insightsExportSettings = null; - object.deidentifyTemplate = ""; - } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.redactionStrategy != null && message.hasOwnProperty("redactionStrategy")) - object.redactionStrategy = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionStrategy[message.redactionStrategy] === undefined ? message.redactionStrategy : $root.google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionStrategy[message.redactionStrategy] : message.redactionStrategy; - if (message.redactionScope != null && message.hasOwnProperty("redactionScope")) - object.redactionScope = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionScope[message.redactionScope] === undefined ? message.redactionScope : $root.google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionScope[message.redactionScope] : message.redactionScope; - if (message.retentionWindowDays != null && message.hasOwnProperty("retentionWindowDays")) { - object.retentionWindowDays = message.retentionWindowDays; - if (options.oneofs) - object.dataRetention = "retentionWindowDays"; - } - if (message.retentionStrategy != null && message.hasOwnProperty("retentionStrategy")) { - object.retentionStrategy = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.SecuritySettings.RetentionStrategy[message.retentionStrategy] === undefined ? message.retentionStrategy : $root.google.cloud.dialogflow.cx.v3.SecuritySettings.RetentionStrategy[message.retentionStrategy] : message.retentionStrategy; - if (options.oneofs) - object.dataRetention = "retentionStrategy"; - } - if (message.purgeDataTypes && message.purgeDataTypes.length) { - object.purgeDataTypes = []; - for (var j = 0; j < message.purgeDataTypes.length; ++j) - object.purgeDataTypes[j] = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.SecuritySettings.PurgeDataType[message.purgeDataTypes[j]] === undefined ? message.purgeDataTypes[j] : $root.google.cloud.dialogflow.cx.v3.SecuritySettings.PurgeDataType[message.purgeDataTypes[j]] : message.purgeDataTypes[j]; - } - if (message.inspectTemplate != null && message.hasOwnProperty("inspectTemplate")) - object.inspectTemplate = message.inspectTemplate; - if (message.audioExportSettings != null && message.hasOwnProperty("audioExportSettings")) - object.audioExportSettings = $root.google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings.toObject(message.audioExportSettings, options); - if (message.insightsExportSettings != null && message.hasOwnProperty("insightsExportSettings")) - object.insightsExportSettings = $root.google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings.toObject(message.insightsExportSettings, options); - if (message.deidentifyTemplate != null && message.hasOwnProperty("deidentifyTemplate")) - object.deidentifyTemplate = message.deidentifyTemplate; return object; }; /** - * Converts this SecuritySettings to JSON. + * Converts this RestoreToolVersionRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings + * @memberof google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest * @instance * @returns {Object.} JSON object */ - SecuritySettings.prototype.toJSON = function toJSON() { + RestoreToolVersionRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SecuritySettings + * Gets the default type url for RestoreToolVersionRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings + * @memberof google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SecuritySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + RestoreToolVersionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.SecuritySettings"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest"; }; + return RestoreToolVersionRequest; + })(); + + v3.RestoreToolVersionResponse = (function() { + /** - * RedactionStrategy enum. - * @name google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionStrategy - * @enum {number} - * @property {number} REDACTION_STRATEGY_UNSPECIFIED=0 REDACTION_STRATEGY_UNSPECIFIED value - * @property {number} REDACT_WITH_SERVICE=1 REDACT_WITH_SERVICE value + * Properties of a RestoreToolVersionResponse. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IRestoreToolVersionResponse + * @property {google.cloud.dialogflow.cx.v3.ITool|null} [tool] RestoreToolVersionResponse tool */ - SecuritySettings.RedactionStrategy = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "REDACTION_STRATEGY_UNSPECIFIED"] = 0; - values[valuesById[1] = "REDACT_WITH_SERVICE"] = 1; - return values; - })(); /** - * RedactionScope enum. - * @name google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionScope - * @enum {number} - * @property {number} REDACTION_SCOPE_UNSPECIFIED=0 REDACTION_SCOPE_UNSPECIFIED value - * @property {number} REDACT_DISK_STORAGE=2 REDACT_DISK_STORAGE value + * Constructs a new RestoreToolVersionResponse. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a RestoreToolVersionResponse. + * @implements IRestoreToolVersionResponse + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IRestoreToolVersionResponse=} [properties] Properties to set */ - SecuritySettings.RedactionScope = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "REDACTION_SCOPE_UNSPECIFIED"] = 0; - values[valuesById[2] = "REDACT_DISK_STORAGE"] = 2; - return values; - })(); + function RestoreToolVersionResponse(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]]; + } /** - * RetentionStrategy enum. - * @name google.cloud.dialogflow.cx.v3.SecuritySettings.RetentionStrategy - * @enum {number} - * @property {number} RETENTION_STRATEGY_UNSPECIFIED=0 RETENTION_STRATEGY_UNSPECIFIED value - * @property {number} REMOVE_AFTER_CONVERSATION=1 REMOVE_AFTER_CONVERSATION value + * RestoreToolVersionResponse tool. + * @member {google.cloud.dialogflow.cx.v3.ITool|null|undefined} tool + * @memberof google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse + * @instance */ - SecuritySettings.RetentionStrategy = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "RETENTION_STRATEGY_UNSPECIFIED"] = 0; - values[valuesById[1] = "REMOVE_AFTER_CONVERSATION"] = 1; - return values; - })(); + RestoreToolVersionResponse.prototype.tool = null; /** - * PurgeDataType enum. - * @name google.cloud.dialogflow.cx.v3.SecuritySettings.PurgeDataType - * @enum {number} - * @property {number} PURGE_DATA_TYPE_UNSPECIFIED=0 PURGE_DATA_TYPE_UNSPECIFIED value - * @property {number} DIALOGFLOW_HISTORY=1 DIALOGFLOW_HISTORY value + * Creates a new RestoreToolVersionResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse + * @static + * @param {google.cloud.dialogflow.cx.v3.IRestoreToolVersionResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse} RestoreToolVersionResponse instance */ - SecuritySettings.PurgeDataType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PURGE_DATA_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DIALOGFLOW_HISTORY"] = 1; - return values; - })(); + RestoreToolVersionResponse.create = function create(properties) { + return new RestoreToolVersionResponse(properties); + }; - SecuritySettings.AudioExportSettings = (function() { + /** + * Encodes the specified RestoreToolVersionResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse + * @static + * @param {google.cloud.dialogflow.cx.v3.IRestoreToolVersionResponse} message RestoreToolVersionResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RestoreToolVersionResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tool != null && Object.hasOwnProperty.call(message, "tool")) + $root.google.cloud.dialogflow.cx.v3.Tool.encode(message.tool, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; - /** - * Properties of an AudioExportSettings. - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings - * @interface IAudioExportSettings - * @property {string|null} [gcsBucket] AudioExportSettings gcsBucket - * @property {string|null} [audioExportPattern] AudioExportSettings audioExportPattern - * @property {boolean|null} [enableAudioRedaction] AudioExportSettings enableAudioRedaction - * @property {google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings.AudioFormat|null} [audioFormat] AudioExportSettings audioFormat - * @property {boolean|null} [storeTtsAudio] AudioExportSettings storeTtsAudio - */ + /** + * Encodes the specified RestoreToolVersionResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse + * @static + * @param {google.cloud.dialogflow.cx.v3.IRestoreToolVersionResponse} message RestoreToolVersionResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RestoreToolVersionResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Constructs a new AudioExportSettings. - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings - * @classdesc Represents an AudioExportSettings. - * @implements IAudioExportSettings - * @constructor - * @param {google.cloud.dialogflow.cx.v3.SecuritySettings.IAudioExportSettings=} [properties] Properties to set - */ - function AudioExportSettings(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]]; + /** + * Decodes a RestoreToolVersionResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse + * @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.RestoreToolVersionResponse} RestoreToolVersionResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RestoreToolVersionResponse.decode = function decode(reader, length, error) { + 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.RestoreToolVersionResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + message.tool = $root.google.cloud.dialogflow.cx.v3.Tool.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } } + return message; + }; - /** - * AudioExportSettings gcsBucket. - * @member {string} gcsBucket - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings - * @instance - */ - AudioExportSettings.prototype.gcsBucket = ""; - - /** - * AudioExportSettings audioExportPattern. - * @member {string} audioExportPattern - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings - * @instance - */ - AudioExportSettings.prototype.audioExportPattern = ""; - - /** - * AudioExportSettings enableAudioRedaction. - * @member {boolean} enableAudioRedaction - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings - * @instance - */ - AudioExportSettings.prototype.enableAudioRedaction = false; - - /** - * AudioExportSettings audioFormat. - * @member {google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings.AudioFormat} audioFormat - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings - * @instance - */ - AudioExportSettings.prototype.audioFormat = 0; - - /** - * AudioExportSettings storeTtsAudio. - * @member {boolean} storeTtsAudio - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings - * @instance - */ - AudioExportSettings.prototype.storeTtsAudio = false; - - /** - * Creates a new AudioExportSettings instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings - * @static - * @param {google.cloud.dialogflow.cx.v3.SecuritySettings.IAudioExportSettings=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings} AudioExportSettings instance - */ - AudioExportSettings.create = function create(properties) { - return new AudioExportSettings(properties); - }; - - /** - * Encodes the specified AudioExportSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings - * @static - * @param {google.cloud.dialogflow.cx.v3.SecuritySettings.IAudioExportSettings} message AudioExportSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AudioExportSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.gcsBucket != null && Object.hasOwnProperty.call(message, "gcsBucket")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.gcsBucket); - if (message.audioExportPattern != null && Object.hasOwnProperty.call(message, "audioExportPattern")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.audioExportPattern); - if (message.enableAudioRedaction != null && Object.hasOwnProperty.call(message, "enableAudioRedaction")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.enableAudioRedaction); - if (message.audioFormat != null && Object.hasOwnProperty.call(message, "audioFormat")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.audioFormat); - if (message.storeTtsAudio != null && Object.hasOwnProperty.call(message, "storeTtsAudio")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.storeTtsAudio); - return writer; - }; + /** + * Decodes a RestoreToolVersionResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse} RestoreToolVersionResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RestoreToolVersionResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Encodes the specified AudioExportSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings - * @static - * @param {google.cloud.dialogflow.cx.v3.SecuritySettings.IAudioExportSettings} message AudioExportSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AudioExportSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Verifies a RestoreToolVersionResponse message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RestoreToolVersionResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tool != null && message.hasOwnProperty("tool")) { + var error = $root.google.cloud.dialogflow.cx.v3.Tool.verify(message.tool); + if (error) + return "tool." + error; + } + return null; + }; - /** - * Decodes an AudioExportSettings message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings - * @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.SecuritySettings.AudioExportSettings} AudioExportSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AudioExportSettings.decode = function decode(reader, length, error) { - 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.SecuritySettings.AudioExportSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.gcsBucket = reader.string(); - break; - } - case 2: { - message.audioExportPattern = reader.string(); - break; - } - case 3: { - message.enableAudioRedaction = reader.bool(); - break; - } - case 4: { - message.audioFormat = reader.int32(); - break; - } - case 6: { - message.storeTtsAudio = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Creates a RestoreToolVersionResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse} RestoreToolVersionResponse + */ + RestoreToolVersionResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse(); + if (object.tool != null) { + if (typeof object.tool !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse.tool: object expected"); + message.tool = $root.google.cloud.dialogflow.cx.v3.Tool.fromObject(object.tool); + } + return message; + }; - /** - * Decodes an AudioExportSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings} AudioExportSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AudioExportSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a plain object from a RestoreToolVersionResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse + * @static + * @param {google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse} message RestoreToolVersionResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RestoreToolVersionResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.tool = null; + if (message.tool != null && message.hasOwnProperty("tool")) + object.tool = $root.google.cloud.dialogflow.cx.v3.Tool.toObject(message.tool, options); + return object; + }; - /** - * Verifies an AudioExportSettings message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AudioExportSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.gcsBucket != null && message.hasOwnProperty("gcsBucket")) - if (!$util.isString(message.gcsBucket)) - return "gcsBucket: string expected"; - if (message.audioExportPattern != null && message.hasOwnProperty("audioExportPattern")) - if (!$util.isString(message.audioExportPattern)) - return "audioExportPattern: string expected"; - if (message.enableAudioRedaction != null && message.hasOwnProperty("enableAudioRedaction")) - if (typeof message.enableAudioRedaction !== "boolean") - return "enableAudioRedaction: boolean expected"; - if (message.audioFormat != null && message.hasOwnProperty("audioFormat")) - switch (message.audioFormat) { - default: - return "audioFormat: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.storeTtsAudio != null && message.hasOwnProperty("storeTtsAudio")) - if (typeof message.storeTtsAudio !== "boolean") - return "storeTtsAudio: boolean expected"; - return null; - }; + /** + * Converts this RestoreToolVersionResponse to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse + * @instance + * @returns {Object.} JSON object + */ + RestoreToolVersionResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates an AudioExportSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings} AudioExportSettings - */ - AudioExportSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings(); - if (object.gcsBucket != null) - message.gcsBucket = String(object.gcsBucket); - if (object.audioExportPattern != null) - message.audioExportPattern = String(object.audioExportPattern); - if (object.enableAudioRedaction != null) - message.enableAudioRedaction = Boolean(object.enableAudioRedaction); - switch (object.audioFormat) { - default: - if (typeof object.audioFormat === "number") { - message.audioFormat = object.audioFormat; - break; - } - break; - case "AUDIO_FORMAT_UNSPECIFIED": - case 0: - message.audioFormat = 0; - break; - case "MULAW": - case 1: - message.audioFormat = 1; - break; - case "MP3": - case 2: - message.audioFormat = 2; - break; - case "OGG": - case 3: - message.audioFormat = 3; - break; - } - if (object.storeTtsAudio != null) - message.storeTtsAudio = Boolean(object.storeTtsAudio); - return message; - }; + /** + * Gets the default type url for RestoreToolVersionResponse + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RestoreToolVersionResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse"; + }; - /** - * Creates a plain object from an AudioExportSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings - * @static - * @param {google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings} message AudioExportSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AudioExportSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.gcsBucket = ""; - object.audioExportPattern = ""; - object.enableAudioRedaction = false; - object.audioFormat = options.enums === String ? "AUDIO_FORMAT_UNSPECIFIED" : 0; - object.storeTtsAudio = false; - } - if (message.gcsBucket != null && message.hasOwnProperty("gcsBucket")) - object.gcsBucket = message.gcsBucket; - if (message.audioExportPattern != null && message.hasOwnProperty("audioExportPattern")) - object.audioExportPattern = message.audioExportPattern; - if (message.enableAudioRedaction != null && message.hasOwnProperty("enableAudioRedaction")) - object.enableAudioRedaction = message.enableAudioRedaction; - if (message.audioFormat != null && message.hasOwnProperty("audioFormat")) - object.audioFormat = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings.AudioFormat[message.audioFormat] === undefined ? message.audioFormat : $root.google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings.AudioFormat[message.audioFormat] : message.audioFormat; - if (message.storeTtsAudio != null && message.hasOwnProperty("storeTtsAudio")) - object.storeTtsAudio = message.storeTtsAudio; - return object; - }; + return RestoreToolVersionResponse; + })(); - /** - * Converts this AudioExportSettings to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings - * @instance - * @returns {Object.} JSON object - */ - AudioExportSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + v3.ToolVersion = (function() { - /** - * Gets the default type url for AudioExportSettings - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AudioExportSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings"; - }; + /** + * Properties of a ToolVersion. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IToolVersion + * @property {string|null} [name] ToolVersion name + * @property {string|null} [displayName] ToolVersion displayName + * @property {google.cloud.dialogflow.cx.v3.ITool|null} [tool] ToolVersion tool + * @property {google.protobuf.ITimestamp|null} [createTime] ToolVersion createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] ToolVersion updateTime + */ - /** - * AudioFormat enum. - * @name google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings.AudioFormat - * @enum {number} - * @property {number} AUDIO_FORMAT_UNSPECIFIED=0 AUDIO_FORMAT_UNSPECIFIED value - * @property {number} MULAW=1 MULAW value - * @property {number} MP3=2 MP3 value - * @property {number} OGG=3 OGG value - */ - AudioExportSettings.AudioFormat = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "AUDIO_FORMAT_UNSPECIFIED"] = 0; - values[valuesById[1] = "MULAW"] = 1; - values[valuesById[2] = "MP3"] = 2; - values[valuesById[3] = "OGG"] = 3; - return values; - })(); + /** + * Constructs a new ToolVersion. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a ToolVersion. + * @implements IToolVersion + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IToolVersion=} [properties] Properties to set + */ + function ToolVersion(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]]; + } - return AudioExportSettings; - })(); + /** + * ToolVersion name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.ToolVersion + * @instance + */ + ToolVersion.prototype.name = ""; - SecuritySettings.InsightsExportSettings = (function() { + /** + * ToolVersion displayName. + * @member {string} displayName + * @memberof google.cloud.dialogflow.cx.v3.ToolVersion + * @instance + */ + ToolVersion.prototype.displayName = ""; - /** - * Properties of an InsightsExportSettings. - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings - * @interface IInsightsExportSettings - * @property {boolean|null} [enableInsightsExport] InsightsExportSettings enableInsightsExport - */ + /** + * ToolVersion tool. + * @member {google.cloud.dialogflow.cx.v3.ITool|null|undefined} tool + * @memberof google.cloud.dialogflow.cx.v3.ToolVersion + * @instance + */ + ToolVersion.prototype.tool = null; - /** - * Constructs a new InsightsExportSettings. - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings - * @classdesc Represents an InsightsExportSettings. - * @implements IInsightsExportSettings - * @constructor - * @param {google.cloud.dialogflow.cx.v3.SecuritySettings.IInsightsExportSettings=} [properties] Properties to set - */ - function InsightsExportSettings(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]]; - } + /** + * ToolVersion createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.dialogflow.cx.v3.ToolVersion + * @instance + */ + ToolVersion.prototype.createTime = null; - /** - * InsightsExportSettings enableInsightsExport. - * @member {boolean} enableInsightsExport - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings - * @instance - */ - InsightsExportSettings.prototype.enableInsightsExport = false; + /** + * ToolVersion updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.dialogflow.cx.v3.ToolVersion + * @instance + */ + ToolVersion.prototype.updateTime = null; - /** - * Creates a new InsightsExportSettings instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings - * @static - * @param {google.cloud.dialogflow.cx.v3.SecuritySettings.IInsightsExportSettings=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings} InsightsExportSettings instance - */ - InsightsExportSettings.create = function create(properties) { - return new InsightsExportSettings(properties); - }; + /** + * Creates a new ToolVersion instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.ToolVersion + * @static + * @param {google.cloud.dialogflow.cx.v3.IToolVersion=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ToolVersion} ToolVersion instance + */ + ToolVersion.create = function create(properties) { + return new ToolVersion(properties); + }; - /** - * Encodes the specified InsightsExportSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings - * @static - * @param {google.cloud.dialogflow.cx.v3.SecuritySettings.IInsightsExportSettings} message InsightsExportSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InsightsExportSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enableInsightsExport != null && Object.hasOwnProperty.call(message, "enableInsightsExport")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enableInsightsExport); - return writer; - }; + /** + * Encodes the specified ToolVersion message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ToolVersion.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.ToolVersion + * @static + * @param {google.cloud.dialogflow.cx.v3.IToolVersion} message ToolVersion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ToolVersion.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.tool != null && Object.hasOwnProperty.call(message, "tool")) + $root.google.cloud.dialogflow.cx.v3.Tool.encode(message.tool, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; - /** - * Encodes the specified InsightsExportSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings - * @static - * @param {google.cloud.dialogflow.cx.v3.SecuritySettings.IInsightsExportSettings} message InsightsExportSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InsightsExportSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified ToolVersion message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ToolVersion.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.ToolVersion + * @static + * @param {google.cloud.dialogflow.cx.v3.IToolVersion} message ToolVersion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ToolVersion.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes an InsightsExportSettings message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings - * @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.SecuritySettings.InsightsExportSettings} InsightsExportSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InsightsExportSettings.decode = function decode(reader, length, error) { - 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.SecuritySettings.InsightsExportSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) + /** + * Decodes a ToolVersion message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.ToolVersion + * @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.ToolVersion} ToolVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ToolVersion.decode = function decode(reader, length, error) { + 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.ToolVersion(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); break; - switch (tag >>> 3) { - case 1: { - message.enableInsightsExport = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); + } + case 2: { + message.displayName = reader.string(); + break; + } + case 3: { + message.tool = $root.google.cloud.dialogflow.cx.v3.Tool.decode(reader, reader.uint32()); + break; + } + case 4: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } + default: + reader.skipType(tag & 7); + break; } - return message; - }; - - /** - * Decodes an InsightsExportSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings} InsightsExportSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InsightsExportSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + } + return message; + }; - /** - * Verifies an InsightsExportSettings message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - InsightsExportSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enableInsightsExport != null && message.hasOwnProperty("enableInsightsExport")) - if (typeof message.enableInsightsExport !== "boolean") - return "enableInsightsExport: boolean expected"; - return null; - }; + /** + * Decodes a ToolVersion message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.ToolVersion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.ToolVersion} ToolVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ToolVersion.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates an InsightsExportSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings} InsightsExportSettings - */ - InsightsExportSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings(); - if (object.enableInsightsExport != null) - message.enableInsightsExport = Boolean(object.enableInsightsExport); - return message; - }; + /** + * Verifies a ToolVersion message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.ToolVersion + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ToolVersion.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.tool != null && message.hasOwnProperty("tool")) { + var error = $root.google.cloud.dialogflow.cx.v3.Tool.verify(message.tool); + if (error) + return "tool." + error; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + return null; + }; - /** - * Creates a plain object from an InsightsExportSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings - * @static - * @param {google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings} message InsightsExportSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - InsightsExportSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.enableInsightsExport = false; - if (message.enableInsightsExport != null && message.hasOwnProperty("enableInsightsExport")) - object.enableInsightsExport = message.enableInsightsExport; + /** + * Creates a ToolVersion message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.ToolVersion + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.ToolVersion} ToolVersion + */ + ToolVersion.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ToolVersion) return object; - }; + var message = new $root.google.cloud.dialogflow.cx.v3.ToolVersion(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.tool != null) { + if (typeof object.tool !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.ToolVersion.tool: object expected"); + message.tool = $root.google.cloud.dialogflow.cx.v3.Tool.fromObject(object.tool); + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.ToolVersion.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.ToolVersion.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + return message; + }; - /** - * Converts this InsightsExportSettings to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings - * @instance - * @returns {Object.} JSON object - */ - InsightsExportSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a ToolVersion message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.ToolVersion + * @static + * @param {google.cloud.dialogflow.cx.v3.ToolVersion} message ToolVersion + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ToolVersion.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.displayName = ""; + object.tool = null; + object.createTime = null; + object.updateTime = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.tool != null && message.hasOwnProperty("tool")) + object.tool = $root.google.cloud.dialogflow.cx.v3.Tool.toObject(message.tool, options); + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + return object; + }; - /** - * Gets the default type url for InsightsExportSettings - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - InsightsExportSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings"; - }; + /** + * Converts this ToolVersion to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.ToolVersion + * @instance + * @returns {Object.} JSON object + */ + ToolVersion.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return InsightsExportSettings; - })(); + /** + * Gets the default type url for ToolVersion + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.ToolVersion + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ToolVersion.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ToolVersion"; + }; - return SecuritySettings; + return ToolVersion; })(); v3.Versions = (function() { diff --git a/packages/google-cloud-dialogflow-cx/protos/protos.json b/packages/google-cloud-dialogflow-cx/protos/protos.json index c9ecb36b9fe..c3aeb916307 100644 --- a/packages/google-cloud-dialogflow-cx/protos/protos.json +++ b/packages/google-cloud-dialogflow-cx/protos/protos.json @@ -351,6 +351,12 @@ "(google.api.resource).pattern": "projects/{project}/locations/{location}/agents/{agent}" }, "oneofs": { + "sessionEntryResource": { + "oneof": [ + "startFlow", + "startPlaybook" + ] + }, "_genAppBuilderSettings": { "oneof": [ "genAppBuilderSettings" @@ -414,10 +420,16 @@ "type": "string", "id": 16, "options": { - "(google.api.field_behavior)": "IMMUTABLE", "(google.api.resource_reference).type": "dialogflow.googleapis.com/Flow" } }, + "startPlaybook": { + "type": "string", + "id": 39, + "options": { + "(google.api.resource_reference).type": "dialogflow.googleapis.com/Playbook" + } + }, "securitySettings": { "type": "string", "id": 17, @@ -1413,6 +1425,22 @@ "(google.api.field_behavior)": "OPTIONAL" } }, + "inputParameterDefinitions": { + "rule": "repeated", + "type": "ParameterDefinition", + "id": 26, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "outputParameterDefinitions": { + "rule": "repeated", + "type": "ParameterDefinition", + "id": 27, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, "multiLanguageSettings": { "type": "MultiLanguageSettings", "id": 28, @@ -1991,7 +2019,8 @@ "target": { "oneof": [ "targetPage", - "targetFlow" + "targetFlow", + "targetPlaybook" ] } }, @@ -2027,6 +2056,13 @@ "options": { "(google.api.resource_reference).type": "dialogflow.googleapis.com/Flow" } + }, + "targetPlaybook": { + "type": "string", + "id": 7, + "options": { + "(google.api.resource_reference).type": "dialogflow.googleapis.com/Playbook" + } } } }, @@ -2361,6 +2397,10 @@ "text": { "type": "string", "id": 3 + }, + "metadata": { + "type": "google.protobuf.Struct", + "id": 5 } } }, @@ -2622,7 +2662,8 @@ "playAudio", "mixedAudio", "telephonyTransferCall", - "knowledgeInfoCard" + "knowledgeInfoCard", + "toolCall" ] } }, @@ -2673,6 +2714,10 @@ "type": "KnowledgeInfoCard", "id": 20 }, + "toolCall": { + "type": "ToolCall", + "id": 22 + }, "responseType": { "type": "ResponseType", "id": 4 @@ -2832,6 +2877,177 @@ } } }, + "ToolCall": { + "fields": { + "tool": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dialogflow.googleapis.com/Tool" + } + }, + "action": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "inputParameters": { + "type": "google.protobuf.Struct", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ToolCallResult": { + "oneofs": { + "result": { + "oneof": [ + "error", + "outputParameters" + ] + } + }, + "fields": { + "tool": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dialogflow.googleapis.com/Tool" + } + }, + "action": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "error": { + "type": "Error", + "id": 3 + }, + "outputParameters": { + "type": "google.protobuf.Struct", + "id": 4 + } + }, + "nested": { + "Error": { + "fields": { + "message": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + } + } + }, + "ParameterDefinition": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "type": { + "type": "ParameterType", + "id": 2, + "options": { + "deprecated": true + } + }, + "typeSchema": { + "type": "TypeSchema", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "description": { + "type": "string", + "id": 3 + } + }, + "nested": { + "ParameterType": { + "values": { + "PARAMETER_TYPE_UNSPECIFIED": 0, + "STRING": 1, + "NUMBER": 2, + "BOOLEAN": 3, + "NULL": 4, + "OBJECT": 5, + "LIST": 6 + } + } + } + }, + "TypeSchema": { + "oneofs": { + "schema": { + "oneof": [ + "inlineSchema", + "schemaReference" + ] + } + }, + "fields": { + "inlineSchema": { + "type": "InlineSchema", + "id": 1 + }, + "schemaReference": { + "type": "SchemaReference", + "id": 2 + } + }, + "nested": { + "SchemaReference": { + "fields": { + "tool": { + "type": "string", + "id": 1 + }, + "schema": { + "type": "string", + "id": 2 + } + } + } + } + }, + "InlineSchema": { + "fields": { + "type": { + "type": "DataType", + "id": 1 + }, + "items": { + "type": "TypeSchema", + "id": 2 + } + } + }, + "DataType": { + "values": { + "DATA_TYPE_UNSPECIFIED": 0, + "STRING": 1, + "NUMBER": 2, + "BOOLEAN": 3, + "ARRAY": 6 + } + }, "ValidationMessage": { "fields": { "resourceType": { @@ -2927,6 +3143,10 @@ "languageCode": { "type": "string", "id": 4 + }, + "llmModelSettings": { + "type": "LlmModelSettings", + "id": 8 } }, "nested": { @@ -2991,32 +3211,134 @@ } } }, + "LlmModelSettings": { + "fields": { + "model": { + "type": "string", + "id": 1 + }, + "promptText": { + "type": "string", + "id": 2 + } + } + }, "SafetySettings": { "fields": { + "defaultBannedPhraseMatchStrategy": { + "type": "PhraseMatchStrategy", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, "bannedPhrases": { "rule": "repeated", "type": "Phrase", "id": 1 - } - }, - "nested": { - "Phrase": { - "fields": { - "text": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "languageCode": { - "type": "string", + }, + "raiSettings": { + "type": "RaiSettings", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "defaultRaiSettings": { + "type": "RaiSettings", + "id": 3, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "promptSecuritySettings": { + "type": "PromptSecuritySettings", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "Phrase": { + "fields": { + "text": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "languageCode": { + "type": "string", "id": 2, "options": { "(google.api.field_behavior)": "REQUIRED" } } } + }, + "PhraseMatchStrategy": { + "values": { + "PHRASE_MATCH_STRATEGY_UNSPECIFIED": 0, + "PARTIAL_MATCH": 1, + "WORD_MATCH": 2 + } + }, + "RaiSettings": { + "fields": { + "categoryFilters": { + "rule": "repeated", + "type": "CategoryFilter", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "SafetyFilterLevel": { + "values": { + "SAFETY_FILTER_LEVEL_UNSPECIFIED": 0, + "BLOCK_NONE": 1, + "BLOCK_FEW": 2, + "BLOCK_SOME": 3, + "BLOCK_MOST": 4 + } + }, + "SafetyCategory": { + "values": { + "SAFETY_CATEGORY_UNSPECIFIED": 0, + "DANGEROUS_CONTENT": 1, + "HATE_SPEECH": 2, + "HARASSMENT": 3, + "SEXUALLY_EXPLICIT_CONTENT": 4 + } + }, + "CategoryFilter": { + "fields": { + "category": { + "type": "SafetyCategory", + "id": 1 + }, + "filterLevel": { + "type": "SafetyFilterLevel", + "id": 2 + } + } + } + } + }, + "PromptSecuritySettings": { + "fields": { + "enablePromptSecurity": { + "type": "bool", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } } } }, @@ -3153,6 +3475,17 @@ } } }, + "CodeBlock": { + "fields": { + "code": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, "Deployments": { "options": { "(google.api.default_host)": "dialogflow.googleapis.com", @@ -6244,6 +6577,13 @@ "outputAudioConfig": { "type": "OutputAudioConfig", "id": 4 + }, + "responseView": { + "type": "DetectIntentResponseView", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -6315,6 +6655,13 @@ "enableDebuggingInfo": { "type": "bool", "id": 8 + }, + "responseView": { + "type": "DetectIntentResponseView", + "id": 16, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -6491,6 +6838,10 @@ "type": "google.protobuf.Struct", "id": 5 }, + "parameterScope": { + "type": "string", + "id": 12 + }, "currentPage": { "type": "string", "id": 6, @@ -6519,6 +6870,21 @@ "(google.api.resource_reference).type": "dialogflow.googleapis.com/Version" } }, + "currentPlaybook": { + "type": "string", + "id": 19, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "dialogflow.googleapis.com/Playbook" + } + }, + "llmModelSettings": { + "type": "LlmModelSettings", + "id": 21, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, "channel": { "type": "string", "id": 15 @@ -6730,7 +7096,8 @@ "intent", "audio", "event", - "dtmf" + "dtmf", + "toolCallResult" ] } }, @@ -6755,6 +7122,10 @@ "type": "DtmfInput", "id": 7 }, + "toolCallResult": { + "type": "ToolCallResult", + "id": 11 + }, "languageCode": { "type": "string", "id": 4, @@ -6813,26 +7184,6 @@ "type": "ResponseMessage", "id": 4 }, - "webhookIds": { - "rule": "repeated", - "type": "string", - "id": 25 - }, - "webhookDisplayNames": { - "rule": "repeated", - "type": "string", - "id": 26 - }, - "webhookLatencies": { - "rule": "repeated", - "type": "google.protobuf.Duration", - "id": 27 - }, - "webhookTags": { - "rule": "repeated", - "type": "string", - "id": 29 - }, "webhookStatuses": { "rule": "repeated", "type": "google.rpc.Status", @@ -7112,6 +7463,14 @@ } } }, + "DetectIntentResponseView": { + "values": { + "DETECT_INTENT_RESPONSE_VIEW_UNSPECIFIED": 0, + "DETECT_INTENT_RESPONSE_VIEW_FULL": 1, + "DETECT_INTENT_RESPONSE_VIEW_BASIC": 2, + "DETECT_INTENT_RESPONSE_VIEW_DEFAULT": 3 + } + }, "SessionEntityTypes": { "options": { "(google.api.default_host)": "dialogflow.googleapis.com", @@ -7799,11 +8158,27 @@ "deprecated": true } }, + "secretVersionForUsernamePassword": { + "type": "string", + "id": 19, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "secretmanager.googleapis.com/SecretVersion" + } + }, "requestHeaders": { "keyType": "string", "type": "string", "id": 4 }, + "secretVersionsForRequestHeaders": { + "keyType": "string", + "type": "SecretVersionHeaderValue", + "id": 20, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, "allowedCaCerts": { "rule": "repeated", "type": "bytes", @@ -7826,6 +8201,13 @@ "(google.api.field_behavior)": "OPTIONAL" } }, + "serviceAccountAuthConfig": { + "type": "ServiceAccountAuthConfig", + "id": 18, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, "webhookType": { "type": "WebhookType", "id": 6, @@ -7857,6 +8239,18 @@ } }, "nested": { + "SecretVersionHeaderValue": { + "fields": { + "secretVersion": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "secretmanager.googleapis.com/SecretVersion" + } + } + } + }, "OAuthConfig": { "fields": { "clientId": { @@ -7873,6 +8267,14 @@ "(google.api.field_behavior)": "OPTIONAL" } }, + "secretVersionForClientSecret": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "secretmanager.googleapis.com/SecretVersion" + } + }, "tokenEndpoint": { "type": "string", "id": 3, @@ -7898,6 +8300,17 @@ "ACCESS_TOKEN": 3 } }, + "ServiceAccountAuthConfig": { + "fields": { + "serviceAccount": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, "WebhookType": { "values": { "WEBHOOK_TYPE_UNSPECIFIED": 0, @@ -8335,41 +8748,43 @@ } } }, - "Experiments": { + "Examples": { "options": { "(google.api.default_host)": "dialogflow.googleapis.com", "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflow" }, "methods": { - "ListExperiments": { - "requestType": "ListExperimentsRequest", - "responseType": "ListExperimentsResponse", + "CreateExample": { + "requestType": "CreateExampleRequest", + "responseType": "Example", "options": { - "(google.api.http).get": "/v3/{parent=projects/*/locations/*/agents/*/environments/*}/experiments", - "(google.api.method_signature)": "parent" + "(google.api.http).post": "/v3/{parent=projects/*/locations/*/agents/*/playbooks/*}/examples", + "(google.api.http).body": "example", + "(google.api.method_signature)": "parent,example" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v3/{parent=projects/*/locations/*/agents/*/environments/*}/experiments" + "post": "/v3/{parent=projects/*/locations/*/agents/*/playbooks/*}/examples", + "body": "example" } }, { - "(google.api.method_signature)": "parent" + "(google.api.method_signature)": "parent,example" } ] }, - "GetExperiment": { - "requestType": "GetExperimentRequest", - "responseType": "Experiment", + "DeleteExample": { + "requestType": "DeleteExampleRequest", + "responseType": "google.protobuf.Empty", "options": { - "(google.api.http).get": "/v3/{name=projects/*/locations/*/agents/*/environments/*/experiments/*}", + "(google.api.http).delete": "/v3/{name=projects/*/locations/*/agents/*/playbooks/*/examples/*}", "(google.api.method_signature)": "name" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v3/{name=projects/*/locations/*/agents/*/environments/*/experiments/*}" + "delete": "/v3/{name=projects/*/locations/*/agents/*/playbooks/*/examples/*}" } }, { @@ -8377,57 +8792,35 @@ } ] }, - "CreateExperiment": { - "requestType": "CreateExperimentRequest", - "responseType": "Experiment", - "options": { - "(google.api.http).post": "/v3/{parent=projects/*/locations/*/agents/*/environments/*}/experiments", - "(google.api.http).body": "experiment", - "(google.api.method_signature)": "parent,experiment" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v3/{parent=projects/*/locations/*/agents/*/environments/*}/experiments", - "body": "experiment" - } - }, - { - "(google.api.method_signature)": "parent,experiment" - } - ] - }, - "UpdateExperiment": { - "requestType": "UpdateExperimentRequest", - "responseType": "Experiment", + "ListExamples": { + "requestType": "ListExamplesRequest", + "responseType": "ListExamplesResponse", "options": { - "(google.api.http).patch": "/v3/{experiment.name=projects/*/locations/*/agents/*/environments/*/experiments/*}", - "(google.api.http).body": "experiment", - "(google.api.method_signature)": "experiment,update_mask" + "(google.api.http).get": "/v3/{parent=projects/*/locations/*/agents/*/playbooks/*}/examples", + "(google.api.method_signature)": "parent" }, "parsedOptions": [ { "(google.api.http)": { - "patch": "/v3/{experiment.name=projects/*/locations/*/agents/*/environments/*/experiments/*}", - "body": "experiment" + "get": "/v3/{parent=projects/*/locations/*/agents/*/playbooks/*}/examples" } }, { - "(google.api.method_signature)": "experiment,update_mask" + "(google.api.method_signature)": "parent" } ] }, - "DeleteExperiment": { - "requestType": "DeleteExperimentRequest", - "responseType": "google.protobuf.Empty", + "GetExample": { + "requestType": "GetExampleRequest", + "responseType": "Example", "options": { - "(google.api.http).delete": "/v3/{name=projects/*/locations/*/agents/*/environments/*/experiments/*}", + "(google.api.http).get": "/v3/{name=projects/*/locations/*/agents/*/playbooks/*/examples/*}", "(google.api.method_signature)": "name" }, "parsedOptions": [ { "(google.api.http)": { - "delete": "/v3/{name=projects/*/locations/*/agents/*/environments/*/experiments/*}" + "get": "/v3/{name=projects/*/locations/*/agents/*/playbooks/*/examples/*}" } }, { @@ -8435,487 +8828,501 @@ } ] }, - "StartExperiment": { - "requestType": "StartExperimentRequest", - "responseType": "Experiment", + "UpdateExample": { + "requestType": "UpdateExampleRequest", + "responseType": "Example", "options": { - "(google.api.http).post": "/v3/{name=projects/*/locations/*/agents/*/environments/*/experiments/*}:start", - "(google.api.http).body": "*", - "(google.api.method_signature)": "name" + "(google.api.http).patch": "/v3/{example.name=projects/*/locations/*/agents/*/playbooks/*/examples/*}", + "(google.api.http).body": "example", + "(google.api.method_signature)": "example,update_mask" }, "parsedOptions": [ { "(google.api.http)": { - "post": "/v3/{name=projects/*/locations/*/agents/*/environments/*/experiments/*}:start", - "body": "*" + "patch": "/v3/{example.name=projects/*/locations/*/agents/*/playbooks/*/examples/*}", + "body": "example" } }, { - "(google.api.method_signature)": "name" + "(google.api.method_signature)": "example,update_mask" } ] + } + } + }, + "CreateExampleRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "dialogflow.googleapis.com/Example" + } }, - "StopExperiment": { - "requestType": "StopExperimentRequest", - "responseType": "Experiment", + "example": { + "type": "Example", + "id": 2, "options": { - "(google.api.http).post": "/v3/{name=projects/*/locations/*/agents/*/environments/*/experiments/*}:stop", - "(google.api.http).body": "*", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v3/{name=projects/*/locations/*/agents/*/environments/*/experiments/*}:stop", - "body": "*" - } - }, - { - "(google.api.method_signature)": "name" - } - ] + "(google.api.field_behavior)": "REQUIRED" + } } } }, - "Experiment": { - "options": { - "(google.api.resource).type": "dialogflow.googleapis.com/Experiment", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/experiments/{experiment}" - }, + "DeleteExampleRequest": { "fields": { "name": { "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dialogflow.googleapis.com/Example" + } + } + } + }, + "ListExamplesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "dialogflow.googleapis.com/Example" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "languageCode": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListExamplesResponse": { + "fields": { + "examples": { + "rule": "repeated", + "type": "Example", "id": 1 }, - "displayName": { + "nextPageToken": { "type": "string", - "id": 2, + "id": 2 + } + } + }, + "GetExampleRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dialogflow.googleapis.com/Example" + } + } + } + }, + "UpdateExampleRequest": { + "fields": { + "example": { + "type": "Example", + "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED" } }, - "description": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "Example": { + "options": { + "(google.api.resource).type": "dialogflow.googleapis.com/Example", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}/examples/{example}", + "(google.api.resource).plural": "examples", + "(google.api.resource).singular": "example" + }, + "fields": { + "name": { "type": "string", - "id": 3 + "id": 1 }, - "state": { - "type": "State", - "id": 4 + "playbookInput": { + "type": "PlaybookInput", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, - "definition": { - "type": "Definition", - "id": 5 + "playbookOutput": { + "type": "PlaybookOutput", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, - "rolloutConfig": { - "type": "RolloutConfig", - "id": 14 + "actions": { + "rule": "repeated", + "type": "Action", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, - "rolloutState": { - "type": "RolloutState", - "id": 15 + "displayName": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, - "rolloutFailureReason": { + "description": { "type": "string", - "id": 16 + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, - "result": { - "type": "Result", - "id": 6 + "tokenCount": { + "type": "int64", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, "createTime": { "type": "google.protobuf.Timestamp", - "id": 7 - }, - "startTime": { - "type": "google.protobuf.Timestamp", - "id": 8 + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, - "endTime": { + "updateTime": { "type": "google.protobuf.Timestamp", - "id": 9 + "id": 11, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, - "lastUpdateTime": { - "type": "google.protobuf.Timestamp", - "id": 10 - }, - "experimentLength": { - "type": "google.protobuf.Duration", - "id": 11 - }, - "variantsHistory": { - "rule": "repeated", - "type": "VariantsHistory", - "id": 12 - } - }, - "nested": { - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "DRAFT": 1, - "RUNNING": 2, - "DONE": 3, - "ROLLOUT_FAILED": 4 - } - }, - "Definition": { - "oneofs": { - "variants": { - "oneof": [ - "versionVariants" - ] - } - }, - "fields": { - "condition": { - "type": "string", - "id": 1 - }, - "versionVariants": { - "type": "VersionVariants", - "id": 2 - } + "conversationState": { + "type": "OutputState", + "id": 12, + "options": { + "(google.api.field_behavior)": "REQUIRED" } }, - "Result": { - "fields": { - "versionMetrics": { - "rule": "repeated", - "type": "VersionMetrics", - "id": 1 - }, - "lastUpdateTime": { - "type": "google.protobuf.Timestamp", - "id": 2 - } - }, - "nested": { - "MetricType": { - "values": { - "METRIC_UNSPECIFIED": 0, - "CONTAINED_SESSION_NO_CALLBACK_RATE": 1, - "LIVE_AGENT_HANDOFF_RATE": 2, - "CALLBACK_SESSION_RATE": 3, - "ABANDONED_SESSION_RATE": 4, - "SESSION_END_RATE": 5 - } - }, - "CountType": { - "values": { - "COUNT_TYPE_UNSPECIFIED": 0, - "TOTAL_NO_MATCH_COUNT": 1, - "TOTAL_TURN_COUNT": 2, - "AVERAGE_TURN_COUNT": 3 - } - }, - "ConfidenceInterval": { - "fields": { - "confidenceLevel": { - "type": "double", - "id": 1 - }, - "ratio": { - "type": "double", - "id": 2 - }, - "lowerBound": { - "type": "double", - "id": 3 - }, - "upperBound": { - "type": "double", - "id": 4 - } - } - }, - "Metric": { - "oneofs": { - "value": { - "oneof": [ - "ratio", - "count" - ] - } - }, - "fields": { - "type": { - "type": "MetricType", - "id": 1 - }, - "countType": { - "type": "CountType", - "id": 5 - }, - "ratio": { - "type": "double", - "id": 2 - }, - "count": { - "type": "double", - "id": 4 - }, - "confidenceInterval": { - "type": "ConfidenceInterval", - "id": 3 - } - } - }, - "VersionMetrics": { - "fields": { - "version": { - "type": "string", - "id": 1, - "options": { - "(google.api.resource_reference).type": "dialogflow.googleapis.com/Version" - } - }, - "metrics": { - "rule": "repeated", - "type": "Metric", - "id": 2 - }, - "sessionCount": { - "type": "int32", - "id": 3 - } - } - } + "languageCode": { + "type": "string", + "id": 13, + "options": { + "(google.api.field_behavior)": "OPTIONAL" } } } }, - "VersionVariants": { + "PlaybookInput": { "fields": { - "variants": { - "rule": "repeated", - "type": "Variant", - "id": 1 + "precedingConversationSummary": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } - }, - "nested": { - "Variant": { - "fields": { - "version": { - "type": "string", - "id": 1 - }, - "trafficAllocation": { - "type": "float", - "id": 2 - }, - "isControlGroup": { - "type": "bool", - "id": 3 - } + } + }, + "PlaybookOutput": { + "fields": { + "executionSummary": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" } } } }, - "VariantsHistory": { + "Action": { "oneofs": { - "variants": { + "action": { "oneof": [ - "versionVariants" + "userUtterance", + "agentUtterance", + "toolUse", + "playbookInvocation", + "flowInvocation", + "playbookTransition", + "flowTransition" ] } }, "fields": { - "versionVariants": { - "type": "VersionVariants", - "id": 1 + "userUtterance": { + "type": "UserUtterance", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 2 + "agentUtterance": { + "type": "AgentUtterance", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "toolUse": { + "type": "ToolUse", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "playbookInvocation": { + "type": "PlaybookInvocation", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "flowInvocation": { + "type": "FlowInvocation", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "playbookTransition": { + "type": "PlaybookTransition", + "id": 12, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "flowTransition": { + "type": "FlowTransition", + "id": 13, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, - "RolloutConfig": { + "UserUtterance": { "fields": { - "rolloutSteps": { - "rule": "repeated", - "type": "RolloutStep", - "id": 1 - }, - "rolloutCondition": { - "type": "string", - "id": 2 - }, - "failureCondition": { + "text": { "type": "string", - "id": 3 - } - }, - "nested": { - "RolloutStep": { - "fields": { - "displayName": { - "type": "string", - "id": 1 - }, - "trafficPercent": { - "type": "int32", - "id": 2 - }, - "minDuration": { - "type": "google.protobuf.Duration", - "id": 3 - } + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" } } } }, - "RolloutState": { + "AgentUtterance": { "fields": { - "step": { + "text": { "type": "string", - "id": 1 - }, - "stepIndex": { - "type": "int32", - "id": 3 - }, - "startTime": { - "type": "google.protobuf.Timestamp", - "id": 2 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } } } }, - "ListExperimentsRequest": { + "ToolUse": { "fields": { - "parent": { + "tool": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "dialogflow.googleapis.com/Experiment" + "(google.api.resource_reference).type": "dialogflow.googleapis.com/Tool" } }, - "pageSize": { - "type": "int32", - "id": 2 - }, - "pageToken": { + "displayName": { "type": "string", - "id": 3 - } - } - }, - "ListExperimentsResponse": { - "fields": { - "experiments": { - "rule": "repeated", - "type": "Experiment", - "id": 1 + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, - "nextPageToken": { + "action": { "type": "string", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "inputActionParameters": { + "type": "google.protobuf.Struct", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "outputActionParameters": { + "type": "google.protobuf.Struct", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, - "GetExperimentRequest": { + "PlaybookInvocation": { "fields": { - "name": { + "playbook": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dialogflow.googleapis.com/Experiment" + "(google.api.resource_reference).type": "dialogflow.googleapis.com/Playbook" } - } - } - }, - "CreateExperimentRequest": { - "fields": { - "parent": { + }, + "displayName": { "type": "string", - "id": 1, + "id": 5, "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "dialogflow.googleapis.com/Experiment" + "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "experiment": { - "type": "Experiment", + "playbookInput": { + "type": "PlaybookInput", "id": 2, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OPTIONAL" } - } - } - }, - "UpdateExperimentRequest": { - "fields": { - "experiment": { - "type": "Experiment", - "id": 1, + }, + "playbookOutput": { + "type": "PlaybookOutput", + "id": 3, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OPTIONAL" } }, - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 2, + "playbookState": { + "type": "OutputState", + "id": 4, "options": { "(google.api.field_behavior)": "REQUIRED" } } } }, - "DeleteExperimentRequest": { + "FlowInvocation": { "fields": { - "name": { + "flow": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dialogflow.googleapis.com/Experiment" + "(google.api.resource_reference).type": "dialogflow.googleapis.com/Flow" + } + }, + "displayName": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "flowState": { + "type": "OutputState", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" } } } }, - "StartExperimentRequest": { + "PlaybookTransition": { "fields": { - "name": { + "playbook": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dialogflow.googleapis.com/Experiment" + "(google.api.resource_reference).type": "dialogflow.googleapis.com/Playbook" + } + }, + "displayName": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" } } } }, - "StopExperimentRequest": { + "FlowTransition": { "fields": { - "name": { + "flow": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dialogflow.googleapis.com/Experiment" + "(google.api.resource_reference).type": "dialogflow.googleapis.com/Flow" + } + }, + "displayName": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" } } } }, - "Generators": { + "OutputState": { + "values": { + "OUTPUT_STATE_UNSPECIFIED": 0, + "OUTPUT_STATE_OK": 1, + "OUTPUT_STATE_CANCELLED": 2, + "OUTPUT_STATE_FAILED": 3, + "OUTPUT_STATE_ESCALATED": 4, + "OUTPUT_STATE_PENDING": 5 + } + }, + "Experiments": { "options": { "(google.api.default_host)": "dialogflow.googleapis.com", "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflow" }, "methods": { - "ListGenerators": { - "requestType": "ListGeneratorsRequest", - "responseType": "ListGeneratorsResponse", + "ListExperiments": { + "requestType": "ListExperimentsRequest", + "responseType": "ListExperimentsResponse", "options": { - "(google.api.http).get": "/v3/{parent=projects/*/locations/*/agents/*}/generators", + "(google.api.http).get": "/v3/{parent=projects/*/locations/*/agents/*/environments/*}/experiments", "(google.api.method_signature)": "parent" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v3/{parent=projects/*/locations/*/agents/*}/generators" + "get": "/v3/{parent=projects/*/locations/*/agents/*/environments/*}/experiments" } }, { @@ -8923,17 +9330,17 @@ } ] }, - "GetGenerator": { - "requestType": "GetGeneratorRequest", - "responseType": "Generator", + "GetExperiment": { + "requestType": "GetExperimentRequest", + "responseType": "Experiment", "options": { - "(google.api.http).get": "/v3/{name=projects/*/locations/*/agents/*/generators/*}", + "(google.api.http).get": "/v3/{name=projects/*/locations/*/agents/*/environments/*/experiments/*}", "(google.api.method_signature)": "name" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v3/{name=projects/*/locations/*/agents/*/generators/*}" + "get": "/v3/{name=projects/*/locations/*/agents/*/environments/*/experiments/*}" } }, { @@ -8941,57 +9348,97 @@ } ] }, - "CreateGenerator": { - "requestType": "CreateGeneratorRequest", - "responseType": "Generator", + "CreateExperiment": { + "requestType": "CreateExperimentRequest", + "responseType": "Experiment", "options": { - "(google.api.http).post": "/v3/{parent=projects/*/locations/*/agents/*}/generators", - "(google.api.http).body": "generator", - "(google.api.method_signature)": "parent,generator" + "(google.api.http).post": "/v3/{parent=projects/*/locations/*/agents/*/environments/*}/experiments", + "(google.api.http).body": "experiment", + "(google.api.method_signature)": "parent,experiment" }, "parsedOptions": [ { "(google.api.http)": { - "post": "/v3/{parent=projects/*/locations/*/agents/*}/generators", - "body": "generator" + "post": "/v3/{parent=projects/*/locations/*/agents/*/environments/*}/experiments", + "body": "experiment" } }, { - "(google.api.method_signature)": "parent,generator" + "(google.api.method_signature)": "parent,experiment" } ] }, - "UpdateGenerator": { - "requestType": "UpdateGeneratorRequest", - "responseType": "Generator", + "UpdateExperiment": { + "requestType": "UpdateExperimentRequest", + "responseType": "Experiment", "options": { - "(google.api.http).patch": "/v3/{generator.name=projects/*/locations/*/agents/*/generators/*}", - "(google.api.http).body": "generator", - "(google.api.method_signature)": "generator,update_mask" + "(google.api.http).patch": "/v3/{experiment.name=projects/*/locations/*/agents/*/environments/*/experiments/*}", + "(google.api.http).body": "experiment", + "(google.api.method_signature)": "experiment,update_mask" }, "parsedOptions": [ { "(google.api.http)": { - "patch": "/v3/{generator.name=projects/*/locations/*/agents/*/generators/*}", - "body": "generator" + "patch": "/v3/{experiment.name=projects/*/locations/*/agents/*/environments/*/experiments/*}", + "body": "experiment" } }, { - "(google.api.method_signature)": "generator,update_mask" + "(google.api.method_signature)": "experiment,update_mask" } ] }, - "DeleteGenerator": { - "requestType": "DeleteGeneratorRequest", + "DeleteExperiment": { + "requestType": "DeleteExperimentRequest", "responseType": "google.protobuf.Empty", "options": { - "(google.api.http).delete": "/v3/{name=projects/*/locations/*/agents/*/generators/*}", + "(google.api.http).delete": "/v3/{name=projects/*/locations/*/agents/*/environments/*/experiments/*}", "(google.api.method_signature)": "name" }, "parsedOptions": [ { "(google.api.http)": { - "delete": "/v3/{name=projects/*/locations/*/agents/*/generators/*}" + "delete": "/v3/{name=projects/*/locations/*/agents/*/environments/*/experiments/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "StartExperiment": { + "requestType": "StartExperimentRequest", + "responseType": "Experiment", + "options": { + "(google.api.http).post": "/v3/{name=projects/*/locations/*/agents/*/environments/*/experiments/*}:start", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v3/{name=projects/*/locations/*/agents/*/environments/*/experiments/*}:start", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "StopExperiment": { + "requestType": "StopExperimentRequest", + "responseType": "Experiment", + "options": { + "(google.api.http).post": "/v3/{name=projects/*/locations/*/agents/*/environments/*/experiments/*}:stop", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v3/{name=projects/*/locations/*/agents/*/environments/*/experiments/*}:stop", + "body": "*" } }, { @@ -9001,10 +9448,10 @@ } } }, - "Generator": { + "Experiment": { "options": { - "(google.api.resource).type": "dialogflow.googleapis.com/Generator", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/agents/{agent}/generators/{generator}" + "(google.api.resource).type": "dialogflow.googleapis.com/Experiment", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/experiments/{experiment}" }, "fields": { "name": { @@ -9018,135 +9465,318 @@ "(google.api.field_behavior)": "REQUIRED" } }, - "promptText": { - "type": "Phrase", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } + "description": { + "type": "string", + "id": 3 }, - "placeholders": { - "rule": "repeated", - "type": "Placeholder", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } + "state": { + "type": "State", + "id": 4 }, - "modelParameter": { - "type": "ModelParameter", + "definition": { + "type": "Definition", + "id": 5 + }, + "rolloutConfig": { + "type": "RolloutConfig", + "id": 14 + }, + "rolloutState": { + "type": "RolloutState", + "id": 15 + }, + "rolloutFailureReason": { + "type": "string", + "id": 16 + }, + "result": { + "type": "Result", + "id": 6 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 7 + }, + "startTime": { + "type": "google.protobuf.Timestamp", "id": 8 + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 9 + }, + "lastUpdateTime": { + "type": "google.protobuf.Timestamp", + "id": 10 + }, + "experimentLength": { + "type": "google.protobuf.Duration", + "id": 11 + }, + "variantsHistory": { + "rule": "repeated", + "type": "VariantsHistory", + "id": 12 } }, "nested": { - "Placeholder": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "DRAFT": 1, + "RUNNING": 2, + "DONE": 3, + "ROLLOUT_FAILED": 4 + } + }, + "Definition": { + "oneofs": { + "variants": { + "oneof": [ + "versionVariants" + ] + } + }, "fields": { - "id": { + "condition": { "type": "string", "id": 1 }, - "name": { - "type": "string", + "versionVariants": { + "type": "VersionVariants", "id": 2 } } }, - "ModelParameter": { - "oneofs": { - "_temperature": { - "oneof": [ - "temperature" - ] - }, - "_maxDecodeSteps": { - "oneof": [ - "maxDecodeSteps" - ] - }, - "_topP": { - "oneof": [ - "topP" - ] + "Result": { + "fields": { + "versionMetrics": { + "rule": "repeated", + "type": "VersionMetrics", + "id": 1 }, - "_topK": { - "oneof": [ - "topK" - ] + "lastUpdateTime": { + "type": "google.protobuf.Timestamp", + "id": 2 } }, - "fields": { - "temperature": { - "type": "float", - "id": 1, - "options": { - "proto3_optional": true + "nested": { + "MetricType": { + "values": { + "METRIC_UNSPECIFIED": 0, + "CONTAINED_SESSION_NO_CALLBACK_RATE": 1, + "LIVE_AGENT_HANDOFF_RATE": 2, + "CALLBACK_SESSION_RATE": 3, + "ABANDONED_SESSION_RATE": 4, + "SESSION_END_RATE": 5 } }, - "maxDecodeSteps": { - "type": "int32", - "id": 2, - "options": { - "proto3_optional": true + "CountType": { + "values": { + "COUNT_TYPE_UNSPECIFIED": 0, + "TOTAL_NO_MATCH_COUNT": 1, + "TOTAL_TURN_COUNT": 2, + "AVERAGE_TURN_COUNT": 3 } }, - "topP": { - "type": "float", - "id": 3, - "options": { - "proto3_optional": true + "ConfidenceInterval": { + "fields": { + "confidenceLevel": { + "type": "double", + "id": 1 + }, + "ratio": { + "type": "double", + "id": 2 + }, + "lowerBound": { + "type": "double", + "id": 3 + }, + "upperBound": { + "type": "double", + "id": 4 + } } }, - "topK": { - "type": "int32", - "id": 4, - "options": { - "proto3_optional": true + "Metric": { + "oneofs": { + "value": { + "oneof": [ + "ratio", + "count" + ] + } + }, + "fields": { + "type": { + "type": "MetricType", + "id": 1 + }, + "countType": { + "type": "CountType", + "id": 5 + }, + "ratio": { + "type": "double", + "id": 2 + }, + "count": { + "type": "double", + "id": 4 + }, + "confidenceInterval": { + "type": "ConfidenceInterval", + "id": 3 + } } - } - } - } + }, + "VersionMetrics": { + "fields": { + "version": { + "type": "string", + "id": 1, + "options": { + "(google.api.resource_reference).type": "dialogflow.googleapis.com/Version" + } + }, + "metrics": { + "rule": "repeated", + "type": "Metric", + "id": 2 + }, + "sessionCount": { + "type": "int32", + "id": 3 + } + } + } + } + } } }, - "Phrase": { + "VersionVariants": { "fields": { - "text": { + "variants": { + "rule": "repeated", + "type": "Variant", + "id": 1 + } + }, + "nested": { + "Variant": { + "fields": { + "version": { + "type": "string", + "id": 1 + }, + "trafficAllocation": { + "type": "float", + "id": 2 + }, + "isControlGroup": { + "type": "bool", + "id": 3 + } + } + } + } + }, + "VariantsHistory": { + "oneofs": { + "variants": { + "oneof": [ + "versionVariants" + ] + } + }, + "fields": { + "versionVariants": { + "type": "VersionVariants", + "id": 1 + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + } + } + }, + "RolloutConfig": { + "fields": { + "rolloutSteps": { + "rule": "repeated", + "type": "RolloutStep", + "id": 1 + }, + "rolloutCondition": { "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" + "id": 2 + }, + "failureCondition": { + "type": "string", + "id": 3 + } + }, + "nested": { + "RolloutStep": { + "fields": { + "displayName": { + "type": "string", + "id": 1 + }, + "trafficPercent": { + "type": "int32", + "id": 2 + }, + "minDuration": { + "type": "google.protobuf.Duration", + "id": 3 + } } } } }, - "ListGeneratorsRequest": { + "RolloutState": { + "fields": { + "step": { + "type": "string", + "id": 1 + }, + "stepIndex": { + "type": "int32", + "id": 3 + }, + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + } + } + }, + "ListExperimentsRequest": { "fields": { "parent": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "dialogflow.googleapis.com/Generator" + "(google.api.resource_reference).child_type": "dialogflow.googleapis.com/Experiment" } }, - "languageCode": { - "type": "string", - "id": 2 - }, "pageSize": { "type": "int32", - "id": 3 + "id": 2 }, "pageToken": { "type": "string", - "id": 4 + "id": 3 } } }, - "ListGeneratorsResponse": { + "ListExperimentsResponse": { "fields": { - "generators": { + "experiments": { "rule": "repeated", - "type": "Generator", + "type": "Experiment", "id": 1 }, "nextPageToken": { @@ -9155,117 +9785,126 @@ } } }, - "GetGeneratorRequest": { + "GetExperimentRequest": { "fields": { "name": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dialogflow.googleapis.com/Generator" + "(google.api.resource_reference).type": "dialogflow.googleapis.com/Experiment" } - }, - "languageCode": { - "type": "string", - "id": 2 } } }, - "CreateGeneratorRequest": { + "CreateExperimentRequest": { "fields": { "parent": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "dialogflow.googleapis.com/Generator" + "(google.api.resource_reference).child_type": "dialogflow.googleapis.com/Experiment" } }, - "generator": { - "type": "Generator", + "experiment": { + "type": "Experiment", "id": 2, "options": { "(google.api.field_behavior)": "REQUIRED" } - }, - "languageCode": { - "type": "string", - "id": 3 } } }, - "UpdateGeneratorRequest": { + "UpdateExperimentRequest": { "fields": { - "generator": { - "type": "Generator", + "experiment": { + "type": "Experiment", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED" } }, - "languageCode": { - "type": "string", - "id": 2 - }, "updateMask": { "type": "google.protobuf.FieldMask", - "id": 3 + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } } } }, - "DeleteGeneratorRequest": { + "DeleteExperimentRequest": { "fields": { "name": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dialogflow.googleapis.com/Generator" + "(google.api.resource_reference).type": "dialogflow.googleapis.com/Experiment" } - }, - "force": { - "type": "bool", - "id": 2 } } }, - "SecuritySettingsService": { + "StartExperimentRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dialogflow.googleapis.com/Experiment" + } + } + } + }, + "StopExperimentRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dialogflow.googleapis.com/Experiment" + } + } + } + }, + "Generators": { "options": { "(google.api.default_host)": "dialogflow.googleapis.com", "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflow" }, "methods": { - "CreateSecuritySettings": { - "requestType": "CreateSecuritySettingsRequest", - "responseType": "SecuritySettings", + "ListGenerators": { + "requestType": "ListGeneratorsRequest", + "responseType": "ListGeneratorsResponse", "options": { - "(google.api.http).post": "/v3/{parent=projects/*/locations/*}/securitySettings", - "(google.api.http).body": "security_settings", - "(google.api.method_signature)": "parent,security_settings" + "(google.api.http).get": "/v3/{parent=projects/*/locations/*/agents/*}/generators", + "(google.api.method_signature)": "parent" }, "parsedOptions": [ { "(google.api.http)": { - "post": "/v3/{parent=projects/*/locations/*}/securitySettings", - "body": "security_settings" + "get": "/v3/{parent=projects/*/locations/*/agents/*}/generators" } }, { - "(google.api.method_signature)": "parent,security_settings" + "(google.api.method_signature)": "parent" } ] }, - "GetSecuritySettings": { - "requestType": "GetSecuritySettingsRequest", - "responseType": "SecuritySettings", + "GetGenerator": { + "requestType": "GetGeneratorRequest", + "responseType": "Generator", "options": { - "(google.api.http).get": "/v3/{name=projects/*/locations/*/securitySettings/*}", + "(google.api.http).get": "/v3/{name=projects/*/locations/*/agents/*/generators/*}", "(google.api.method_signature)": "name" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v3/{name=projects/*/locations/*/securitySettings/*}" + "get": "/v3/{name=projects/*/locations/*/agents/*/generators/*}" } }, { @@ -9273,119 +9912,2200 @@ } ] }, - "UpdateSecuritySettings": { - "requestType": "UpdateSecuritySettingsRequest", - "responseType": "SecuritySettings", + "CreateGenerator": { + "requestType": "CreateGeneratorRequest", + "responseType": "Generator", "options": { - "(google.api.http).patch": "/v3/{security_settings.name=projects/*/locations/*/securitySettings/*}", - "(google.api.http).body": "security_settings", - "(google.api.method_signature)": "security_settings,update_mask" + "(google.api.http).post": "/v3/{parent=projects/*/locations/*/agents/*}/generators", + "(google.api.http).body": "generator", + "(google.api.method_signature)": "parent,generator" }, "parsedOptions": [ { "(google.api.http)": { - "patch": "/v3/{security_settings.name=projects/*/locations/*/securitySettings/*}", - "body": "security_settings" + "post": "/v3/{parent=projects/*/locations/*/agents/*}/generators", + "body": "generator" } }, { - "(google.api.method_signature)": "security_settings,update_mask" + "(google.api.method_signature)": "parent,generator" } ] }, - "ListSecuritySettings": { - "requestType": "ListSecuritySettingsRequest", - "responseType": "ListSecuritySettingsResponse", + "UpdateGenerator": { + "requestType": "UpdateGeneratorRequest", + "responseType": "Generator", "options": { - "(google.api.http).get": "/v3/{parent=projects/*/locations/*}/securitySettings", - "(google.api.method_signature)": "parent" + "(google.api.http).patch": "/v3/{generator.name=projects/*/locations/*/agents/*/generators/*}", + "(google.api.http).body": "generator", + "(google.api.method_signature)": "generator,update_mask" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v3/{parent=projects/*/locations/*}/securitySettings" + "patch": "/v3/{generator.name=projects/*/locations/*/agents/*/generators/*}", + "body": "generator" } }, { - "(google.api.method_signature)": "parent" + "(google.api.method_signature)": "generator,update_mask" } ] }, - "DeleteSecuritySettings": { - "requestType": "DeleteSecuritySettingsRequest", + "DeleteGenerator": { + "requestType": "DeleteGeneratorRequest", "responseType": "google.protobuf.Empty", "options": { - "(google.api.http).delete": "/v3/{name=projects/*/locations/*/securitySettings/*}", + "(google.api.http).delete": "/v3/{name=projects/*/locations/*/agents/*/generators/*}", "(google.api.method_signature)": "name" }, "parsedOptions": [ { "(google.api.http)": { - "delete": "/v3/{name=projects/*/locations/*/securitySettings/*}" + "delete": "/v3/{name=projects/*/locations/*/agents/*/generators/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + } + } + }, + "Generator": { + "options": { + "(google.api.resource).type": "dialogflow.googleapis.com/Generator", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/agents/{agent}/generators/{generator}" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "displayName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "promptText": { + "type": "Phrase", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "placeholders": { + "rule": "repeated", + "type": "Placeholder", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "llmModelSettings": { + "type": "LlmModelSettings", + "id": 9 + }, + "modelParameter": { + "type": "ModelParameter", + "id": 8 + } + }, + "nested": { + "Placeholder": { + "fields": { + "id": { + "type": "string", + "id": 1 + }, + "name": { + "type": "string", + "id": 2 + } + } + }, + "ModelParameter": { + "oneofs": { + "_temperature": { + "oneof": [ + "temperature" + ] + }, + "_maxDecodeSteps": { + "oneof": [ + "maxDecodeSteps" + ] + }, + "_topP": { + "oneof": [ + "topP" + ] + }, + "_topK": { + "oneof": [ + "topK" + ] + } + }, + "fields": { + "temperature": { + "type": "float", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "maxDecodeSteps": { + "type": "int32", + "id": 2, + "options": { + "proto3_optional": true + } + }, + "topP": { + "type": "float", + "id": 3, + "options": { + "proto3_optional": true + } + }, + "topK": { + "type": "int32", + "id": 4, + "options": { + "proto3_optional": true + } + } + } + } + } + }, + "Phrase": { + "fields": { + "text": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ListGeneratorsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "dialogflow.googleapis.com/Generator" + } + }, + "languageCode": { + "type": "string", + "id": 2 + }, + "pageSize": { + "type": "int32", + "id": 3 + }, + "pageToken": { + "type": "string", + "id": 4 + } + } + }, + "ListGeneratorsResponse": { + "fields": { + "generators": { + "rule": "repeated", + "type": "Generator", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetGeneratorRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dialogflow.googleapis.com/Generator" + } + }, + "languageCode": { + "type": "string", + "id": 2 + } + } + }, + "CreateGeneratorRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "dialogflow.googleapis.com/Generator" + } + }, + "generator": { + "type": "Generator", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "languageCode": { + "type": "string", + "id": 3 + } + } + }, + "UpdateGeneratorRequest": { + "fields": { + "generator": { + "type": "Generator", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "languageCode": { + "type": "string", + "id": 2 + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 3 + } + } + }, + "DeleteGeneratorRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dialogflow.googleapis.com/Generator" + } + }, + "force": { + "type": "bool", + "id": 2 + } + } + }, + "Playbooks": { + "options": { + "(google.api.default_host)": "dialogflow.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflow" + }, + "methods": { + "CreatePlaybook": { + "requestType": "CreatePlaybookRequest", + "responseType": "Playbook", + "options": { + "(google.api.http).post": "/v3/{parent=projects/*/locations/*/agents/*}/playbooks", + "(google.api.http).body": "playbook", + "(google.api.method_signature)": "parent,playbook" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v3/{parent=projects/*/locations/*/agents/*}/playbooks", + "body": "playbook" + } + }, + { + "(google.api.method_signature)": "parent,playbook" + } + ] + }, + "DeletePlaybook": { + "requestType": "DeletePlaybookRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v3/{name=projects/*/locations/*/agents/*/playbooks/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v3/{name=projects/*/locations/*/agents/*/playbooks/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListPlaybooks": { + "requestType": "ListPlaybooksRequest", + "responseType": "ListPlaybooksResponse", + "options": { + "(google.api.http).get": "/v3/{parent=projects/*/locations/*/agents/*}/playbooks", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v3/{parent=projects/*/locations/*/agents/*}/playbooks" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetPlaybook": { + "requestType": "GetPlaybookRequest", + "responseType": "Playbook", + "options": { + "(google.api.http).get": "/v3/{name=projects/*/locations/*/agents/*/playbooks/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v3/{name=projects/*/locations/*/agents/*/playbooks/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ExportPlaybook": { + "requestType": "ExportPlaybookRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v3/{name=projects/*/locations/*/agents/*/playbooks/*}:export", + "(google.api.http).body": "*", + "(google.longrunning.operation_info).response_type": "ExportPlaybookResponse", + "(google.longrunning.operation_info).metadata_type": "google.protobuf.Struct" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v3/{name=projects/*/locations/*/agents/*/playbooks/*}:export", + "body": "*" + } + }, + { + "(google.longrunning.operation_info)": { + "response_type": "ExportPlaybookResponse", + "metadata_type": "google.protobuf.Struct" + } + } + ] + }, + "ImportPlaybook": { + "requestType": "ImportPlaybookRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v3/{parent=projects/*/locations/*/agents/*}/playbooks:import", + "(google.api.http).body": "*", + "(google.longrunning.operation_info).response_type": "ImportPlaybookResponse", + "(google.longrunning.operation_info).metadata_type": "google.protobuf.Struct" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v3/{parent=projects/*/locations/*/agents/*}/playbooks:import", + "body": "*" + } + }, + { + "(google.longrunning.operation_info)": { + "response_type": "ImportPlaybookResponse", + "metadata_type": "google.protobuf.Struct" + } + } + ] + }, + "UpdatePlaybook": { + "requestType": "UpdatePlaybookRequest", + "responseType": "Playbook", + "options": { + "(google.api.http).patch": "/v3/{playbook.name=projects/*/locations/*/agents/*/playbooks/*}", + "(google.api.http).body": "playbook", + "(google.api.method_signature)": "playbook,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v3/{playbook.name=projects/*/locations/*/agents/*/playbooks/*}", + "body": "playbook" + } + }, + { + "(google.api.method_signature)": "playbook,update_mask" + } + ] + }, + "CreatePlaybookVersion": { + "requestType": "CreatePlaybookVersionRequest", + "responseType": "PlaybookVersion", + "options": { + "(google.api.http).post": "/v3/{parent=projects/*/locations/*/agents/*/playbooks/*}/versions", + "(google.api.http).body": "playbook_version", + "(google.api.method_signature)": "parent,playbook_version" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v3/{parent=projects/*/locations/*/agents/*/playbooks/*}/versions", + "body": "playbook_version" + } + }, + { + "(google.api.method_signature)": "parent,playbook_version" + } + ] + }, + "GetPlaybookVersion": { + "requestType": "GetPlaybookVersionRequest", + "responseType": "PlaybookVersion", + "options": { + "(google.api.http).get": "/v3/{name=projects/*/locations/*/agents/*/playbooks/*/versions/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v3/{name=projects/*/locations/*/agents/*/playbooks/*/versions/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "RestorePlaybookVersion": { + "requestType": "RestorePlaybookVersionRequest", + "responseType": "RestorePlaybookVersionResponse", + "options": { + "(google.api.http).post": "/v3/{name=projects/*/locations/*/agents/*/playbooks/*/versions/*}:restore", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v3/{name=projects/*/locations/*/agents/*/playbooks/*/versions/*}:restore", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListPlaybookVersions": { + "requestType": "ListPlaybookVersionsRequest", + "responseType": "ListPlaybookVersionsResponse", + "options": { + "(google.api.http).get": "/v3/{parent=projects/*/locations/*/agents/*/playbooks/*}/versions", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v3/{parent=projects/*/locations/*/agents/*/playbooks/*}/versions" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "DeletePlaybookVersion": { + "requestType": "DeletePlaybookVersionRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v3/{name=projects/*/locations/*/agents/*/playbooks/*/versions/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v3/{name=projects/*/locations/*/agents/*/playbooks/*/versions/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + } + } + }, + "CreatePlaybookRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "dialogflow.googleapis.com/Playbook" + } + }, + "playbook": { + "type": "Playbook", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeletePlaybookRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dialogflow.googleapis.com/Playbook" + } + } + } + }, + "ListPlaybooksRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "dialogflow.googleapis.com/Playbook" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListPlaybooksResponse": { + "fields": { + "playbooks": { + "rule": "repeated", + "type": "Playbook", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetPlaybookRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dialogflow.googleapis.com/Playbook" + } + } + } + }, + "UpdatePlaybookRequest": { + "fields": { + "playbook": { + "type": "Playbook", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2 + } + } + }, + "Playbook": { + "options": { + "(google.api.resource).type": "dialogflow.googleapis.com/Playbook", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "displayName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "goal": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "inputParameterDefinitions": { + "rule": "repeated", + "type": "ParameterDefinition", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "outputParameterDefinitions": { + "rule": "repeated", + "type": "ParameterDefinition", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "instruction": { + "type": "Instruction", + "id": 17 + }, + "tokenCount": { + "type": "int64", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "referencedPlaybooks": { + "rule": "repeated", + "type": "string", + "id": 11, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "dialogflow.googleapis.com/Playbook" + } + }, + "referencedFlows": { + "rule": "repeated", + "type": "string", + "id": 12, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "dialogflow.googleapis.com/Flow" + } + }, + "referencedTools": { + "rule": "repeated", + "type": "string", + "id": 13, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "dialogflow.googleapis.com/Tool" + } + }, + "inlineActions": { + "rule": "repeated", + "type": "string", + "id": 22, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "codeBlock": { + "type": "CodeBlock", + "id": 21, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "llmModelSettings": { + "type": "LlmModelSettings", + "id": 14, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "handlers": { + "rule": "repeated", + "type": "Handler", + "id": 16, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "playbookType": { + "type": "PlaybookType", + "id": 19, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "Step": { + "oneofs": { + "instruction": { + "oneof": [ + "text" + ] + } + }, + "fields": { + "text": { + "type": "string", + "id": 1 + }, + "steps": { + "rule": "repeated", + "type": "Step", + "id": 2 + } + } + }, + "Instruction": { + "fields": { + "guidelines": { + "type": "string", + "id": 1 + }, + "steps": { + "rule": "repeated", + "type": "Step", + "id": 2 + } + } + }, + "PlaybookType": { + "values": { + "PLAYBOOK_TYPE_UNSPECIFIED": 0, + "TASK": 1, + "ROUTINE": 3 + } + } + } + }, + "CreatePlaybookVersionRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "dialogflow.googleapis.com/PlaybookVersion" + } + }, + "playbookVersion": { + "type": "PlaybookVersion", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "PlaybookVersion": { + "options": { + "(google.api.resource).type": "dialogflow.googleapis.com/PlaybookVersion", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}/versions/{version}", + "(google.api.resource).plural": "playbookVersions", + "(google.api.resource).singular": "playbookVersion" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "description": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "playbook": { + "type": "Playbook", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "examples": { + "rule": "repeated", + "type": "Example", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "GetPlaybookVersionRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dialogflow.googleapis.com/PlaybookVersion" + } + } + } + }, + "RestorePlaybookVersionRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dialogflow.googleapis.com/PlaybookVersion" + } + } + } + }, + "RestorePlaybookVersionResponse": { + "fields": { + "playbook": { + "type": "Playbook", + "id": 2 + } + } + }, + "ListPlaybookVersionsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "dialogflow.googleapis.com/PlaybookVersion" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListPlaybookVersionsResponse": { + "fields": { + "playbookVersions": { + "rule": "repeated", + "type": "PlaybookVersion", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "DeletePlaybookVersionRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dialogflow.googleapis.com/PlaybookVersion" + } + } + } + }, + "ExportPlaybookRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dialogflow.googleapis.com/Playbook" + } + }, + "playbookUri": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "dataFormat": { + "type": "DataFormat", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "DataFormat": { + "values": { + "DATA_FORMAT_UNSPECIFIED": 0, + "BLOB": 1, + "JSON": 2 + } + } + } + }, + "ImportPlaybookRequest": { + "oneofs": { + "playbook": { + "oneof": [ + "playbookUri", + "playbookContent" + ] + } + }, + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "dialogflow.googleapis.com/Playbook" + } + }, + "playbookUri": { + "type": "string", + "id": 2 + }, + "playbookContent": { + "type": "bytes", + "id": 3 + }, + "importStrategy": { + "type": "PlaybookImportStrategy", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "PlaybookImportStrategy": { + "fields": { + "mainPlaybookImportStrategy": { + "type": "ImportStrategy", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "nestedResourceImportStrategy": { + "type": "ImportStrategy", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "toolImportStrategy": { + "type": "ImportStrategy", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ImportPlaybookResponse": { + "fields": { + "playbook": { + "type": "string", + "id": 1, + "options": { + "(google.api.resource_reference).type": "dialogflow.googleapis.com/Playbook" + } + }, + "conflictingResources": { + "type": "ConflictingResources", + "id": 2 + } + }, + "nested": { + "ConflictingResources": { + "fields": { + "mainPlaybookDisplayName": { + "type": "string", + "id": 1 + }, + "nestedPlaybookDisplayNames": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "toolDisplayNames": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + } + } + }, + "ExportPlaybookResponse": { + "oneofs": { + "playbook": { + "oneof": [ + "playbookUri", + "playbookContent" + ] + } + }, + "fields": { + "playbookUri": { + "type": "string", + "id": 1 + }, + "playbookContent": { + "type": "bytes", + "id": 2 + } + } + }, + "Handler": { + "oneofs": { + "handler": { + "oneof": [ + "eventHandler", + "lifecycleHandler" + ] + } + }, + "fields": { + "eventHandler": { + "type": "EventHandler", + "id": 1 + }, + "lifecycleHandler": { + "type": "LifecycleHandler", + "id": 3 + } + }, + "nested": { + "EventHandler": { + "fields": { + "event": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "condition": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "fulfillment": { + "type": "Fulfillment", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "LifecycleHandler": { + "fields": { + "lifecycleStage": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "condition": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "fulfillment": { + "type": "Fulfillment", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + } + } + }, + "SecuritySettingsService": { + "options": { + "(google.api.default_host)": "dialogflow.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflow" + }, + "methods": { + "CreateSecuritySettings": { + "requestType": "CreateSecuritySettingsRequest", + "responseType": "SecuritySettings", + "options": { + "(google.api.http).post": "/v3/{parent=projects/*/locations/*}/securitySettings", + "(google.api.http).body": "security_settings", + "(google.api.method_signature)": "parent,security_settings" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v3/{parent=projects/*/locations/*}/securitySettings", + "body": "security_settings" + } + }, + { + "(google.api.method_signature)": "parent,security_settings" + } + ] + }, + "GetSecuritySettings": { + "requestType": "GetSecuritySettingsRequest", + "responseType": "SecuritySettings", + "options": { + "(google.api.http).get": "/v3/{name=projects/*/locations/*/securitySettings/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v3/{name=projects/*/locations/*/securitySettings/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "UpdateSecuritySettings": { + "requestType": "UpdateSecuritySettingsRequest", + "responseType": "SecuritySettings", + "options": { + "(google.api.http).patch": "/v3/{security_settings.name=projects/*/locations/*/securitySettings/*}", + "(google.api.http).body": "security_settings", + "(google.api.method_signature)": "security_settings,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v3/{security_settings.name=projects/*/locations/*/securitySettings/*}", + "body": "security_settings" + } + }, + { + "(google.api.method_signature)": "security_settings,update_mask" + } + ] + }, + "ListSecuritySettings": { + "requestType": "ListSecuritySettingsRequest", + "responseType": "ListSecuritySettingsResponse", + "options": { + "(google.api.http).get": "/v3/{parent=projects/*/locations/*}/securitySettings", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v3/{parent=projects/*/locations/*}/securitySettings" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "DeleteSecuritySettings": { + "requestType": "DeleteSecuritySettingsRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v3/{name=projects/*/locations/*/securitySettings/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v3/{name=projects/*/locations/*/securitySettings/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + } + } + }, + "GetSecuritySettingsRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dialogflow.googleapis.com/SecuritySettings" + } + } + } + }, + "UpdateSecuritySettingsRequest": { + "fields": { + "securitySettings": { + "type": "SecuritySettings", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ListSecuritySettingsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "dialogflow.googleapis.com/SecuritySettings" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListSecuritySettingsResponse": { + "fields": { + "securitySettings": { + "rule": "repeated", + "type": "SecuritySettings", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "CreateSecuritySettingsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "dialogflow.googleapis.com/SecuritySettings" + } + }, + "securitySettings": { + "type": "SecuritySettings", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeleteSecuritySettingsRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dialogflow.googleapis.com/SecuritySettings" + } + } + } + }, + "SecuritySettings": { + "options": { + "(google.api.resource).type": "dialogflow.googleapis.com/SecuritySettings", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/securitySettings/{security_settings}" + }, + "oneofs": { + "dataRetention": { + "oneof": [ + "retentionWindowDays", + "retentionStrategy" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "displayName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "redactionStrategy": { + "type": "RedactionStrategy", + "id": 3 + }, + "redactionScope": { + "type": "RedactionScope", + "id": 4 + }, + "inspectTemplate": { + "type": "string", + "id": 9, + "options": { + "(google.api.resource_reference).type": "dlp.googleapis.com/InspectTemplate" + } + }, + "deidentifyTemplate": { + "type": "string", + "id": 17, + "options": { + "(google.api.resource_reference).type": "dlp.googleapis.com/DeidentifyTemplate" + } + }, + "retentionWindowDays": { + "type": "int32", + "id": 6 + }, + "retentionStrategy": { + "type": "RetentionStrategy", + "id": 7 + }, + "purgeDataTypes": { + "rule": "repeated", + "type": "PurgeDataType", + "id": 8 + }, + "audioExportSettings": { + "type": "AudioExportSettings", + "id": 12 + }, + "insightsExportSettings": { + "type": "InsightsExportSettings", + "id": 13 + } + }, + "nested": { + "RedactionStrategy": { + "values": { + "REDACTION_STRATEGY_UNSPECIFIED": 0, + "REDACT_WITH_SERVICE": 1 + } + }, + "RedactionScope": { + "values": { + "REDACTION_SCOPE_UNSPECIFIED": 0, + "REDACT_DISK_STORAGE": 2 + } + }, + "RetentionStrategy": { + "values": { + "RETENTION_STRATEGY_UNSPECIFIED": 0, + "REMOVE_AFTER_CONVERSATION": 1 + } + }, + "PurgeDataType": { + "values": { + "PURGE_DATA_TYPE_UNSPECIFIED": 0, + "DIALOGFLOW_HISTORY": 1 + } + }, + "AudioExportSettings": { + "fields": { + "gcsBucket": { + "type": "string", + "id": 1 + }, + "audioExportPattern": { + "type": "string", + "id": 2 + }, + "enableAudioRedaction": { + "type": "bool", + "id": 3 + }, + "audioFormat": { + "type": "AudioFormat", + "id": 4 + }, + "storeTtsAudio": { + "type": "bool", + "id": 6 + } + }, + "nested": { + "AudioFormat": { + "values": { + "AUDIO_FORMAT_UNSPECIFIED": 0, + "MULAW": 1, + "MP3": 2, + "OGG": 3 + } + } + } + }, + "InsightsExportSettings": { + "fields": { + "enableInsightsExport": { + "type": "bool", + "id": 1 + } + } + } + } + }, + "Tools": { + "options": { + "(google.api.default_host)": "dialogflow.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflow" + }, + "methods": { + "CreateTool": { + "requestType": "CreateToolRequest", + "responseType": "Tool", + "options": { + "(google.api.http).post": "/v3/{parent=projects/*/locations/*/agents/*}/tools", + "(google.api.http).body": "tool", + "(google.api.method_signature)": "parent,tool" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v3/{parent=projects/*/locations/*/agents/*}/tools", + "body": "tool" + } + }, + { + "(google.api.method_signature)": "parent,tool" + } + ] + }, + "ListTools": { + "requestType": "ListToolsRequest", + "responseType": "ListToolsResponse", + "options": { + "(google.api.http).get": "/v3/{parent=projects/*/locations/*/agents/*}/tools", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v3/{parent=projects/*/locations/*/agents/*}/tools" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetTool": { + "requestType": "GetToolRequest", + "responseType": "Tool", + "options": { + "(google.api.http).get": "/v3/{name=projects/*/locations/*/agents/*/tools/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v3/{name=projects/*/locations/*/agents/*/tools/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "UpdateTool": { + "requestType": "UpdateToolRequest", + "responseType": "Tool", + "options": { + "(google.api.http).patch": "/v3/{tool.name=projects/*/locations/*/agents/*/tools/*}", + "(google.api.http).body": "tool", + "(google.api.method_signature)": "tool,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v3/{tool.name=projects/*/locations/*/agents/*/tools/*}", + "body": "tool" + } + }, + { + "(google.api.method_signature)": "tool,update_mask" + } + ] + }, + "DeleteTool": { + "requestType": "DeleteToolRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v3/{name=projects/*/locations/*/agents/*/tools/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v3/{name=projects/*/locations/*/agents/*/tools/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListToolVersions": { + "requestType": "ListToolVersionsRequest", + "responseType": "ListToolVersionsResponse", + "options": { + "(google.api.http).get": "/v3/{parent=projects/*/locations/*/agents/*/tools/*}/versions", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v3/{parent=projects/*/locations/*/agents/*/tools/*}/versions" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "CreateToolVersion": { + "requestType": "CreateToolVersionRequest", + "responseType": "ToolVersion", + "options": { + "(google.api.http).post": "/v3/{parent=projects/*/locations/*/agents/*/tools/*}/versions", + "(google.api.http).body": "tool_version", + "(google.api.method_signature)": "parent,tool_version" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v3/{parent=projects/*/locations/*/agents/*/tools/*}/versions", + "body": "tool_version" + } + }, + { + "(google.api.method_signature)": "parent,tool_version" + } + ] + }, + "GetToolVersion": { + "requestType": "GetToolVersionRequest", + "responseType": "ToolVersion", + "options": { + "(google.api.http).get": "/v3/{name=projects/*/locations/*/agents/*/tools/*/versions/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v3/{name=projects/*/locations/*/agents/*/tools/*/versions/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "DeleteToolVersion": { + "requestType": "DeleteToolVersionRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v3/{name=projects/*/locations/*/agents/*/tools/*/versions/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v3/{name=projects/*/locations/*/agents/*/tools/*/versions/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "RestoreToolVersion": { + "requestType": "RestoreToolVersionRequest", + "responseType": "RestoreToolVersionResponse", + "options": { + "(google.api.http).post": "/v3/{name=projects/*/locations/*/agents/*/tools/*/versions/*}:restore", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v3/{name=projects/*/locations/*/agents/*/tools/*/versions/*}:restore", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + } + } + }, + "CreateToolRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "dialogflow.googleapis.com/Tool" + } + }, + "tool": { + "type": "Tool", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ListToolsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "dialogflow.googleapis.com/Tool" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListToolsResponse": { + "fields": { + "tools": { + "rule": "repeated", + "type": "Tool", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetToolRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dialogflow.googleapis.com/Tool" + } + } + } + }, + "UpdateToolRequest": { + "fields": { + "tool": { + "type": "Tool", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2 + } + } + }, + "DeleteToolRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dialogflow.googleapis.com/Tool" + } + }, + "force": { + "type": "bool", + "id": 2 + } + } + }, + "Tool": { + "options": { + "(google.api.resource).type": "dialogflow.googleapis.com/Tool", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/agents/{agent}/tools/{tool}" + }, + "oneofs": { + "specification": { + "oneof": [ + "openApiSpec", + "dataStoreSpec", + "functionSpec" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "displayName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "description": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "openApiSpec": { + "type": "OpenApiTool", + "id": 4 + }, + "dataStoreSpec": { + "type": "DataStoreTool", + "id": 8 + }, + "functionSpec": { + "type": "FunctionTool", + "id": 13 + }, + "toolType": { + "type": "ToolType", + "id": 12, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "OpenApiTool": { + "oneofs": { + "schema": { + "oneof": [ + "textSchema" + ] + } + }, + "fields": { + "textSchema": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "authentication": { + "type": "Authentication", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "tlsConfig": { + "type": "TLSConfig", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "serviceDirectoryConfig": { + "type": "ServiceDirectoryConfig", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DataStoreTool": { + "fields": { + "dataStoreConnections": { + "rule": "repeated", + "type": "DataStoreConnection", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "fallbackPrompt": { + "type": "FallbackPrompt", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + }, + "nested": { + "FallbackPrompt": { + "fields": {} + } + } + }, + "FunctionTool": { + "fields": { + "inputSchema": { + "type": "google.protobuf.Struct", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "outputSchema": { + "type": "google.protobuf.Struct", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "Authentication": { + "oneofs": { + "authConfig": { + "oneof": [ + "apiKeyConfig", + "oauthConfig", + "serviceAgentAuthConfig", + "bearerTokenConfig", + "serviceAccountAuthConfig" + ] + } + }, + "fields": { + "apiKeyConfig": { + "type": "ApiKeyConfig", + "id": 1 + }, + "oauthConfig": { + "type": "OAuthConfig", + "id": 2 + }, + "serviceAgentAuthConfig": { + "type": "ServiceAgentAuthConfig", + "id": 3 + }, + "bearerTokenConfig": { + "type": "BearerTokenConfig", + "id": 4 + }, + "serviceAccountAuthConfig": { + "type": "ServiceAccountAuthConfig", + "id": 5 + } + }, + "nested": { + "ApiKeyConfig": { + "fields": { + "keyName": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "apiKey": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "secretVersionForApiKey": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "secretmanager.googleapis.com/SecretVersion" + } + }, + "requestLocation": { + "type": "RequestLocation", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "RequestLocation": { + "values": { + "REQUEST_LOCATION_UNSPECIFIED": 0, + "HEADER": 1, + "QUERY_STRING": 2 + } + }, + "OAuthConfig": { + "fields": { + "oauthGrantType": { + "type": "OauthGrantType", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "clientId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "clientSecret": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "secretVersionForClientSecret": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "secretmanager.googleapis.com/SecretVersion" + } + }, + "tokenEndpoint": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "scopes": { + "rule": "repeated", + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "OauthGrantType": { + "values": { + "OAUTH_GRANT_TYPE_UNSPECIFIED": 0, + "CLIENT_CREDENTIAL": 1 + } + } + } + }, + "ServiceAgentAuthConfig": { + "fields": { + "serviceAgentAuth": { + "type": "ServiceAgentAuth", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "ServiceAgentAuth": { + "values": { + "SERVICE_AGENT_AUTH_UNSPECIFIED": 0, + "ID_TOKEN": 1, + "ACCESS_TOKEN": 2 + } + } + } + }, + "BearerTokenConfig": { + "fields": { + "token": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "secretVersionForToken": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "secretmanager.googleapis.com/SecretVersion" + } + } + } + }, + "ServiceAccountAuthConfig": { + "fields": { + "serviceAccount": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + } + } + }, + "TLSConfig": { + "fields": { + "caCerts": { + "rule": "repeated", + "type": "CACert", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + }, + "nested": { + "CACert": { + "fields": { + "displayName": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "cert": { + "type": "bytes", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } } - }, - { - "(google.api.method_signature)": "name" } - ] - } - } - }, - "GetSecuritySettingsRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dialogflow.googleapis.com/SecuritySettings" } - } - } - }, - "UpdateSecuritySettingsRequest": { - "fields": { - "securitySettings": { - "type": "SecuritySettings", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" + }, + "ServiceDirectoryConfig": { + "fields": { + "service": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "servicedirectory.googleapis.com/Service" + } + } } }, - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" + "ToolType": { + "values": { + "TOOL_TYPE_UNSPECIFIED": 0, + "CUSTOMIZED_TOOL": 1, + "BUILTIN_TOOL": 2 } } } }, - "ListSecuritySettingsRequest": { + "ListToolVersionsRequest": { "fields": { "parent": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "dialogflow.googleapis.com/SecuritySettings" + "(google.api.resource_reference).child_type": "dialogflow.googleapis.com/ToolVersion" } }, "pageSize": { "type": "int32", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "pageToken": { "type": "string", - "id": 3 + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, - "ListSecuritySettingsResponse": { + "ListToolVersionsResponse": { "fields": { - "securitySettings": { + "toolVersions": { "rule": "repeated", - "type": "SecuritySettings", + "type": "ToolVersion", "id": 1 }, "nextPageToken": { @@ -9394,18 +12114,18 @@ } } }, - "CreateSecuritySettingsRequest": { + "CreateToolVersionRequest": { "fields": { "parent": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "dialogflow.googleapis.com/SecuritySettings" + "(google.api.resource_reference).child_type": "dialogflow.googleapis.com/ToolVersion" } }, - "securitySettings": { - "type": "SecuritySettings", + "toolVersion": { + "type": "ToolVersion", "id": 2, "options": { "(google.api.field_behavior)": "REQUIRED" @@ -9413,152 +12133,98 @@ } } }, - "DeleteSecuritySettingsRequest": { + "GetToolVersionRequest": { "fields": { "name": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dialogflow.googleapis.com/SecuritySettings" + "(google.api.resource_reference).type": "dialogflow.googleapis.com/ToolVersion" } } } }, - "SecuritySettings": { - "options": { - "(google.api.resource).type": "dialogflow.googleapis.com/SecuritySettings", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/securitySettings/{security_settings}" - }, - "oneofs": { - "dataRetention": { - "oneof": [ - "retentionWindowDays", - "retentionStrategy" - ] - } - }, + "DeleteToolVersionRequest": { "fields": { "name": { "type": "string", - "id": 1 - }, - "displayName": { - "type": "string", - "id": 2, + "id": 1, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dialogflow.googleapis.com/ToolVersion" } }, - "redactionStrategy": { - "type": "RedactionStrategy", - "id": 3 - }, - "redactionScope": { - "type": "RedactionScope", - "id": 4 - }, - "inspectTemplate": { - "type": "string", - "id": 9, + "force": { + "type": "bool", + "id": 2, "options": { - "(google.api.resource_reference).type": "dlp.googleapis.com/InspectTemplate" + "(google.api.field_behavior)": "OPTIONAL" } - }, - "deidentifyTemplate": { + } + } + }, + "RestoreToolVersionRequest": { + "fields": { + "name": { "type": "string", - "id": 17, + "id": 1, "options": { - "(google.api.resource_reference).type": "dlp.googleapis.com/DeidentifyTemplate" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dialogflow.googleapis.com/ToolVersion" } - }, - "retentionWindowDays": { - "type": "int32", - "id": 6 - }, - "retentionStrategy": { - "type": "RetentionStrategy", - "id": 7 - }, - "purgeDataTypes": { - "rule": "repeated", - "type": "PurgeDataType", - "id": 8 - }, - "audioExportSettings": { - "type": "AudioExportSettings", - "id": 12 - }, - "insightsExportSettings": { - "type": "InsightsExportSettings", - "id": 13 } + } + }, + "RestoreToolVersionResponse": { + "fields": { + "tool": { + "type": "Tool", + "id": 2 + } + } + }, + "ToolVersion": { + "options": { + "(google.api.resource).type": "dialogflow.googleapis.com/ToolVersion", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/agents/{agent}/tools/{tool}/versions/{version}", + "(google.api.resource).plural": "toolVersions", + "(google.api.resource).singular": "toolVersion" }, - "nested": { - "RedactionStrategy": { - "values": { - "REDACTION_STRATEGY_UNSPECIFIED": 0, - "REDACT_WITH_SERVICE": 1 - } - }, - "RedactionScope": { - "values": { - "REDACTION_SCOPE_UNSPECIFIED": 0, - "REDACT_DISK_STORAGE": 2 + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" } }, - "RetentionStrategy": { - "values": { - "RETENTION_STRATEGY_UNSPECIFIED": 0, - "REMOVE_AFTER_CONVERSATION": 1 + "displayName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" } }, - "PurgeDataType": { - "values": { - "PURGE_DATA_TYPE_UNSPECIFIED": 0, - "DIALOGFLOW_HISTORY": 1 + "tool": { + "type": "Tool", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" } }, - "AudioExportSettings": { - "fields": { - "gcsBucket": { - "type": "string", - "id": 1 - }, - "audioExportPattern": { - "type": "string", - "id": 2 - }, - "enableAudioRedaction": { - "type": "bool", - "id": 3 - }, - "audioFormat": { - "type": "AudioFormat", - "id": 4 - }, - "storeTtsAudio": { - "type": "bool", - "id": 6 - } - }, - "nested": { - "AudioFormat": { - "values": { - "AUDIO_FORMAT_UNSPECIFIED": 0, - "MULAW": 1, - "MP3": 2, - "OGG": 3 - } - } + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "InsightsExportSettings": { - "fields": { - "enableInsightsExport": { - "type": "bool", - "id": 1 - } + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" } } } diff --git a/packages/google-cloud-dialogflow-cx/samples/generated/v3/examples.create_example.js b/packages/google-cloud-dialogflow-cx/samples/generated/v3/examples.create_example.js new file mode 100644 index 00000000000..298c84e2686 --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/samples/generated/v3/examples.create_example.js @@ -0,0 +1,68 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, example) { + // [START dialogflow_v3_generated_Examples_CreateExample_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The playbook to create an example for. + * Format: + * `projects//locations//agents//playbooks/`. + */ + // const parent = 'abc123' + /** + * Required. The example to create. + */ + // const example = {} + + // Imports the Cx library + const {ExamplesClient} = require('@google-cloud/dialogflow-cx').v3; + + // Instantiates a client + const cxClient = new ExamplesClient(); + + async function callCreateExample() { + // Construct request + const request = { + parent, + example, + }; + + // Run request + const response = await cxClient.createExample(request); + console.log(response); + } + + callCreateExample(); + // [END dialogflow_v3_generated_Examples_CreateExample_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dialogflow-cx/samples/generated/v3/examples.delete_example.js b/packages/google-cloud-dialogflow-cx/samples/generated/v3/examples.delete_example.js new file mode 100644 index 00000000000..a9d99dbe95b --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/samples/generated/v3/examples.delete_example.js @@ -0,0 +1,63 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dialogflow_v3_generated_Examples_DeleteExample_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the example to delete. + * Format: + * `projects//locations//agents//playbooks//examples/`. + */ + // const name = 'abc123' + + // Imports the Cx library + const {ExamplesClient} = require('@google-cloud/dialogflow-cx').v3; + + // Instantiates a client + const cxClient = new ExamplesClient(); + + async function callDeleteExample() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await cxClient.deleteExample(request); + console.log(response); + } + + callDeleteExample(); + // [END dialogflow_v3_generated_Examples_DeleteExample_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dialogflow-cx/samples/generated/v3/examples.get_example.js b/packages/google-cloud-dialogflow-cx/samples/generated/v3/examples.get_example.js new file mode 100644 index 00000000000..d4992f036c4 --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/samples/generated/v3/examples.get_example.js @@ -0,0 +1,63 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dialogflow_v3_generated_Examples_GetExample_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the example. + * Format: + * `projects//locations//agents//playbooks//examples/`. + */ + // const name = 'abc123' + + // Imports the Cx library + const {ExamplesClient} = require('@google-cloud/dialogflow-cx').v3; + + // Instantiates a client + const cxClient = new ExamplesClient(); + + async function callGetExample() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await cxClient.getExample(request); + console.log(response); + } + + callGetExample(); + // [END dialogflow_v3_generated_Examples_GetExample_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dialogflow-cx/samples/generated/v3/examples.list_examples.js b/packages/google-cloud-dialogflow-cx/samples/generated/v3/examples.list_examples.js new file mode 100644 index 00000000000..8d74ba5f11d --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/samples/generated/v3/examples.list_examples.js @@ -0,0 +1,81 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START dialogflow_v3_generated_Examples_ListExamples_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The playbook to list the examples from. + * Format: + * `projects//locations//agents//playbooks/`. + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of items to return in a single page. By + * default 100 and at most 1000. + */ + // const pageSize = 1234 + /** + * Optional. The next_page_token ListExampleResponse.next_page_token value + * returned from a previous list request. + */ + // const pageToken = 'abc123' + /** + * Optional. The language to list examples for. + * If not specified, list all examples under the playbook. + * Note: languages must be enabled in the agent before they can be used. + */ + // const languageCode = 'abc123' + + // Imports the Cx library + const {ExamplesClient} = require('@google-cloud/dialogflow-cx').v3; + + // Instantiates a client + const cxClient = new ExamplesClient(); + + async function callListExamples() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = cxClient.listExamplesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListExamples(); + // [END dialogflow_v3_generated_Examples_ListExamples_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dialogflow-cx/samples/generated/v3/examples.update_example.js b/packages/google-cloud-dialogflow-cx/samples/generated/v3/examples.update_example.js new file mode 100644 index 00000000000..09f6b8bc60c --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/samples/generated/v3/examples.update_example.js @@ -0,0 +1,66 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(example) { + // [START dialogflow_v3_generated_Examples_UpdateExample_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The example to update. + */ + // const example = {} + /** + * Optional. The mask to control which fields get updated. If the mask is not + * present, all fields will be updated. + */ + // const updateMask = {} + + // Imports the Cx library + const {ExamplesClient} = require('@google-cloud/dialogflow-cx').v3; + + // Instantiates a client + const cxClient = new ExamplesClient(); + + async function callUpdateExample() { + // Construct request + const request = { + example, + }; + + // Run request + const response = await cxClient.updateExample(request); + console.log(response); + } + + callUpdateExample(); + // [END dialogflow_v3_generated_Examples_UpdateExample_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dialogflow-cx/samples/generated/v3/playbooks.create_playbook.js b/packages/google-cloud-dialogflow-cx/samples/generated/v3/playbooks.create_playbook.js new file mode 100644 index 00000000000..d02317cb143 --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/samples/generated/v3/playbooks.create_playbook.js @@ -0,0 +1,67 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, playbook) { + // [START dialogflow_v3_generated_Playbooks_CreatePlaybook_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The agent to create a playbook for. + * Format: `projects//locations//agents/`. + */ + // const parent = 'abc123' + /** + * Required. The playbook to create. + */ + // const playbook = {} + + // Imports the Cx library + const {PlaybooksClient} = require('@google-cloud/dialogflow-cx').v3; + + // Instantiates a client + const cxClient = new PlaybooksClient(); + + async function callCreatePlaybook() { + // Construct request + const request = { + parent, + playbook, + }; + + // Run request + const response = await cxClient.createPlaybook(request); + console.log(response); + } + + callCreatePlaybook(); + // [END dialogflow_v3_generated_Playbooks_CreatePlaybook_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dialogflow-cx/samples/generated/v3/playbooks.create_playbook_version.js b/packages/google-cloud-dialogflow-cx/samples/generated/v3/playbooks.create_playbook_version.js new file mode 100644 index 00000000000..38d52875cd9 --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/samples/generated/v3/playbooks.create_playbook_version.js @@ -0,0 +1,68 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, playbookVersion) { + // [START dialogflow_v3_generated_Playbooks_CreatePlaybookVersion_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The playbook to create a version for. + * Format: + * `projects//locations//agents//playbooks/`. + */ + // const parent = 'abc123' + /** + * Required. The playbook version to create. + */ + // const playbookVersion = {} + + // Imports the Cx library + const {PlaybooksClient} = require('@google-cloud/dialogflow-cx').v3; + + // Instantiates a client + const cxClient = new PlaybooksClient(); + + async function callCreatePlaybookVersion() { + // Construct request + const request = { + parent, + playbookVersion, + }; + + // Run request + const response = await cxClient.createPlaybookVersion(request); + console.log(response); + } + + callCreatePlaybookVersion(); + // [END dialogflow_v3_generated_Playbooks_CreatePlaybookVersion_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dialogflow-cx/samples/generated/v3/playbooks.delete_playbook.js b/packages/google-cloud-dialogflow-cx/samples/generated/v3/playbooks.delete_playbook.js new file mode 100644 index 00000000000..d53cdee8619 --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/samples/generated/v3/playbooks.delete_playbook.js @@ -0,0 +1,63 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dialogflow_v3_generated_Playbooks_DeletePlaybook_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the playbook to delete. + * Format: + * `projects//locations//agents//playbooks/`. + */ + // const name = 'abc123' + + // Imports the Cx library + const {PlaybooksClient} = require('@google-cloud/dialogflow-cx').v3; + + // Instantiates a client + const cxClient = new PlaybooksClient(); + + async function callDeletePlaybook() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await cxClient.deletePlaybook(request); + console.log(response); + } + + callDeletePlaybook(); + // [END dialogflow_v3_generated_Playbooks_DeletePlaybook_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dialogflow-cx/samples/generated/v3/playbooks.delete_playbook_version.js b/packages/google-cloud-dialogflow-cx/samples/generated/v3/playbooks.delete_playbook_version.js new file mode 100644 index 00000000000..97bdfca82a6 --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/samples/generated/v3/playbooks.delete_playbook_version.js @@ -0,0 +1,63 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dialogflow_v3_generated_Playbooks_DeletePlaybookVersion_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the playbook version to delete. + * Format: + * `projects//locations//agents//playbooks//versions/`. + */ + // const name = 'abc123' + + // Imports the Cx library + const {PlaybooksClient} = require('@google-cloud/dialogflow-cx').v3; + + // Instantiates a client + const cxClient = new PlaybooksClient(); + + async function callDeletePlaybookVersion() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await cxClient.deletePlaybookVersion(request); + console.log(response); + } + + callDeletePlaybookVersion(); + // [END dialogflow_v3_generated_Playbooks_DeletePlaybookVersion_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dialogflow-cx/samples/generated/v3/playbooks.export_playbook.js b/packages/google-cloud-dialogflow-cx/samples/generated/v3/playbooks.export_playbook.js new file mode 100644 index 00000000000..1fc967ac0ab --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/samples/generated/v3/playbooks.export_playbook.js @@ -0,0 +1,81 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dialogflow_v3_generated_Playbooks_ExportPlaybook_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the playbook to export. + * Format: + * `projects//locations//agents//playbooks/`. + */ + // const name = 'abc123' + /** + * Optional. The Google Cloud + * Storage (https://cloud.google.com/storage/docs/) URI to export the playbook + * to. The format of this URI must be `gs:///`. If + * left unspecified, the serialized playbook is returned inline. + * Dialogflow performs a write operation for the Cloud Storage object + * on the caller's behalf, so your request authentication must + * have write permissions for the object. For more information, see + * Dialogflow access + * control (https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). + */ + // const playbookUri = 'abc123' + /** + * Optional. The data format of the exported agent. If not specified, `BLOB` + * is assumed. + */ + // const dataFormat = {} + + // Imports the Cx library + const {PlaybooksClient} = require('@google-cloud/dialogflow-cx').v3; + + // Instantiates a client + const cxClient = new PlaybooksClient(); + + async function callExportPlaybook() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await cxClient.exportPlaybook(request); + const [response] = await operation.promise(); + console.log(response); + } + + callExportPlaybook(); + // [END dialogflow_v3_generated_Playbooks_ExportPlaybook_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dialogflow-cx/samples/generated/v3/playbooks.get_playbook.js b/packages/google-cloud-dialogflow-cx/samples/generated/v3/playbooks.get_playbook.js new file mode 100644 index 00000000000..8c8543702e7 --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/samples/generated/v3/playbooks.get_playbook.js @@ -0,0 +1,63 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dialogflow_v3_generated_Playbooks_GetPlaybook_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the playbook. + * Format: + * `projects//locations//agents//playbooks/`. + */ + // const name = 'abc123' + + // Imports the Cx library + const {PlaybooksClient} = require('@google-cloud/dialogflow-cx').v3; + + // Instantiates a client + const cxClient = new PlaybooksClient(); + + async function callGetPlaybook() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await cxClient.getPlaybook(request); + console.log(response); + } + + callGetPlaybook(); + // [END dialogflow_v3_generated_Playbooks_GetPlaybook_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dialogflow-cx/samples/generated/v3/playbooks.get_playbook_version.js b/packages/google-cloud-dialogflow-cx/samples/generated/v3/playbooks.get_playbook_version.js new file mode 100644 index 00000000000..6e0cedd1c82 --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/samples/generated/v3/playbooks.get_playbook_version.js @@ -0,0 +1,63 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dialogflow_v3_generated_Playbooks_GetPlaybookVersion_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the playbook version. + * Format: + * `projects//locations//agents//playbooks//versions/`. + */ + // const name = 'abc123' + + // Imports the Cx library + const {PlaybooksClient} = require('@google-cloud/dialogflow-cx').v3; + + // Instantiates a client + const cxClient = new PlaybooksClient(); + + async function callGetPlaybookVersion() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await cxClient.getPlaybookVersion(request); + console.log(response); + } + + callGetPlaybookVersion(); + // [END dialogflow_v3_generated_Playbooks_GetPlaybookVersion_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dialogflow-cx/samples/generated/v3/playbooks.import_playbook.js b/packages/google-cloud-dialogflow-cx/samples/generated/v3/playbooks.import_playbook.js new file mode 100644 index 00000000000..ed16c94dabf --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/samples/generated/v3/playbooks.import_playbook.js @@ -0,0 +1,78 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START dialogflow_v3_generated_Playbooks_ImportPlaybook_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The agent to import the playbook into. + * Format: `projects//locations//agents/`. + */ + // const parent = 'abc123' + /** + * Dialogflow access + * control + * (https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). + */ + // const playbookUri = 'abc123' + /** + * Uncompressed raw byte content for playbook. + */ + // const playbookContent = Buffer.from('string') + /** + * Optional. Specifies the import strategy used when resolving resource + * conflicts. + */ + // const importStrategy = {} + + // Imports the Cx library + const {PlaybooksClient} = require('@google-cloud/dialogflow-cx').v3; + + // Instantiates a client + const cxClient = new PlaybooksClient(); + + async function callImportPlaybook() { + // Construct request + const request = { + parent, + }; + + // Run request + const [operation] = await cxClient.importPlaybook(request); + const [response] = await operation.promise(); + console.log(response); + } + + callImportPlaybook(); + // [END dialogflow_v3_generated_Playbooks_ImportPlaybook_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dialogflow-cx/samples/generated/v3/playbooks.list_playbook_versions.js b/packages/google-cloud-dialogflow-cx/samples/generated/v3/playbooks.list_playbook_versions.js new file mode 100644 index 00000000000..029ade49acb --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/samples/generated/v3/playbooks.list_playbook_versions.js @@ -0,0 +1,74 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START dialogflow_v3_generated_Playbooks_ListPlaybookVersions_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The playbook to list versions for. + * Format: + * `projects//locations//agents//playbooks/`. + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of items to return in a single page. By + * default 100 and at most 1000. + */ + // const pageSize = 1234 + /** + * Optional. The next_page_token value returned from a previous list request. + */ + // const pageToken = 'abc123' + + // Imports the Cx library + const {PlaybooksClient} = require('@google-cloud/dialogflow-cx').v3; + + // Instantiates a client + const cxClient = new PlaybooksClient(); + + async function callListPlaybookVersions() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = cxClient.listPlaybookVersionsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListPlaybookVersions(); + // [END dialogflow_v3_generated_Playbooks_ListPlaybookVersions_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dialogflow-cx/samples/generated/v3/playbooks.list_playbooks.js b/packages/google-cloud-dialogflow-cx/samples/generated/v3/playbooks.list_playbooks.js new file mode 100644 index 00000000000..2bad300b531 --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/samples/generated/v3/playbooks.list_playbooks.js @@ -0,0 +1,73 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START dialogflow_v3_generated_Playbooks_ListPlaybooks_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The agent to list playbooks from. + * Format: `projects//locations//agents/`. + */ + // const parent = 'abc123' + /** + * The maximum number of items to return in a single page. By default 100 and + * at most 1000. + */ + // const pageSize = 1234 + /** + * The next_page_token value returned from a previous list request. + */ + // const pageToken = 'abc123' + + // Imports the Cx library + const {PlaybooksClient} = require('@google-cloud/dialogflow-cx').v3; + + // Instantiates a client + const cxClient = new PlaybooksClient(); + + async function callListPlaybooks() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = cxClient.listPlaybooksAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListPlaybooks(); + // [END dialogflow_v3_generated_Playbooks_ListPlaybooks_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dialogflow-cx/samples/generated/v3/playbooks.restore_playbook_version.js b/packages/google-cloud-dialogflow-cx/samples/generated/v3/playbooks.restore_playbook_version.js new file mode 100644 index 00000000000..7c0f25b6193 --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/samples/generated/v3/playbooks.restore_playbook_version.js @@ -0,0 +1,63 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dialogflow_v3_generated_Playbooks_RestorePlaybookVersion_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the playbook version. + * Format: + * `projects//locations//agents//playbooks//versions/`. + */ + // const name = 'abc123' + + // Imports the Cx library + const {PlaybooksClient} = require('@google-cloud/dialogflow-cx').v3; + + // Instantiates a client + const cxClient = new PlaybooksClient(); + + async function callRestorePlaybookVersion() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await cxClient.restorePlaybookVersion(request); + console.log(response); + } + + callRestorePlaybookVersion(); + // [END dialogflow_v3_generated_Playbooks_RestorePlaybookVersion_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dialogflow-cx/samples/generated/v3/playbooks.update_playbook.js b/packages/google-cloud-dialogflow-cx/samples/generated/v3/playbooks.update_playbook.js new file mode 100644 index 00000000000..6ed5846b044 --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/samples/generated/v3/playbooks.update_playbook.js @@ -0,0 +1,66 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(playbook) { + // [START dialogflow_v3_generated_Playbooks_UpdatePlaybook_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The playbook to update. + */ + // const playbook = {} + /** + * The mask to control which fields get updated. If the mask is not present, + * all fields will be updated. + */ + // const updateMask = {} + + // Imports the Cx library + const {PlaybooksClient} = require('@google-cloud/dialogflow-cx').v3; + + // Instantiates a client + const cxClient = new PlaybooksClient(); + + async function callUpdatePlaybook() { + // Construct request + const request = { + playbook, + }; + + // Run request + const response = await cxClient.updatePlaybook(request); + console.log(response); + } + + callUpdatePlaybook(); + // [END dialogflow_v3_generated_Playbooks_UpdatePlaybook_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dialogflow-cx/samples/generated/v3/sessions.detect_intent.js b/packages/google-cloud-dialogflow-cx/samples/generated/v3/sessions.detect_intent.js index db60a2c6535..09417852449 100644 --- a/packages/google-cloud-dialogflow-cx/samples/generated/v3/sessions.detect_intent.js +++ b/packages/google-cloud-dialogflow-cx/samples/generated/v3/sessions.detect_intent.js @@ -58,6 +58,12 @@ function main(session, queryInput) { * Instructs the speech synthesizer how to generate the output audio. */ // const outputAudioConfig = {} + /** + * Optional. Specifies which fields in the + * QueryResult google.cloud.dialogflow.cx.v3.QueryResult to return. If not + * set, the default is DETECT_INTENT_RESPONSE_VIEW_FULL. + */ + // const responseView = {} // Imports the Cx library const {SessionsClient} = require('@google-cloud/dialogflow-cx').v3; diff --git a/packages/google-cloud-dialogflow-cx/samples/generated/v3/sessions.server_streaming_detect_intent.js b/packages/google-cloud-dialogflow-cx/samples/generated/v3/sessions.server_streaming_detect_intent.js index 160ec9bd4e2..c5cd4cff3ed 100644 --- a/packages/google-cloud-dialogflow-cx/samples/generated/v3/sessions.server_streaming_detect_intent.js +++ b/packages/google-cloud-dialogflow-cx/samples/generated/v3/sessions.server_streaming_detect_intent.js @@ -58,6 +58,12 @@ function main(session, queryInput) { * Instructs the speech synthesizer how to generate the output audio. */ // const outputAudioConfig = {} + /** + * Optional. Specifies which fields in the + * QueryResult google.cloud.dialogflow.cx.v3.QueryResult to return. If not + * set, the default is DETECT_INTENT_RESPONSE_VIEW_FULL. + */ + // const responseView = {} // Imports the Cx library const {SessionsClient} = require('@google-cloud/dialogflow-cx').v3; diff --git a/packages/google-cloud-dialogflow-cx/samples/generated/v3/sessions.streaming_detect_intent.js b/packages/google-cloud-dialogflow-cx/samples/generated/v3/sessions.streaming_detect_intent.js index c9b24c76c23..6190c650506 100644 --- a/packages/google-cloud-dialogflow-cx/samples/generated/v3/sessions.streaming_detect_intent.js +++ b/packages/google-cloud-dialogflow-cx/samples/generated/v3/sessions.streaming_detect_intent.js @@ -70,6 +70,12 @@ function main(queryInput) { * If true, `StreamingDetectIntentResponse.debugging_info` will get populated. */ // const enableDebuggingInfo = true + /** + * Optional. Specifies which fields in the + * QueryResult google.cloud.dialogflow.cx.v3.QueryResult to return. If not + * set, the default is DETECT_INTENT_RESPONSE_VIEW_FULL. + */ + // const responseView = {} // Imports the Cx library const {SessionsClient} = require('@google-cloud/dialogflow-cx').v3; diff --git a/packages/google-cloud-dialogflow-cx/samples/generated/v3/snippet_metadata_google.cloud.dialogflow.cx.v3.json b/packages/google-cloud-dialogflow-cx/samples/generated/v3/snippet_metadata_google.cloud.dialogflow.cx.v3.json index f5ceec34ea3..1361921df49 100644 --- a/packages/google-cloud-dialogflow-cx/samples/generated/v3/snippet_metadata_google.cloud.dialogflow.cx.v3.json +++ b/packages/google-cloud-dialogflow-cx/samples/generated/v3/snippet_metadata_google.cloud.dialogflow.cx.v3.json @@ -1447,6 +1447,226 @@ } } }, + { + "regionTag": "dialogflow_v3_generated_Examples_CreateExample_async", + "title": "Agents createExample Sample", + "origin": "API_DEFINITION", + "description": " Creates an example in the specified playbook.", + "canonical": true, + "file": "examples.create_example.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateExample", + "fullName": "google.cloud.dialogflow.cx.v3.Examples.CreateExample", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "example", + "type": ".google.cloud.dialogflow.cx.v3.Example" + } + ], + "resultType": ".google.cloud.dialogflow.cx.v3.Example", + "client": { + "shortName": "ExamplesClient", + "fullName": "google.cloud.dialogflow.cx.v3.ExamplesClient" + }, + "method": { + "shortName": "CreateExample", + "fullName": "google.cloud.dialogflow.cx.v3.Examples.CreateExample", + "service": { + "shortName": "Examples", + "fullName": "google.cloud.dialogflow.cx.v3.Examples" + } + } + } + }, + { + "regionTag": "dialogflow_v3_generated_Examples_DeleteExample_async", + "title": "Agents deleteExample Sample", + "origin": "API_DEFINITION", + "description": " Deletes the specified example.", + "canonical": true, + "file": "examples.delete_example.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteExample", + "fullName": "google.cloud.dialogflow.cx.v3.Examples.DeleteExample", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "ExamplesClient", + "fullName": "google.cloud.dialogflow.cx.v3.ExamplesClient" + }, + "method": { + "shortName": "DeleteExample", + "fullName": "google.cloud.dialogflow.cx.v3.Examples.DeleteExample", + "service": { + "shortName": "Examples", + "fullName": "google.cloud.dialogflow.cx.v3.Examples" + } + } + } + }, + { + "regionTag": "dialogflow_v3_generated_Examples_ListExamples_async", + "title": "Agents listExamples Sample", + "origin": "API_DEFINITION", + "description": " Returns a list of examples in the specified playbook.", + "canonical": true, + "file": "examples.list_examples.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 73, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListExamples", + "fullName": "google.cloud.dialogflow.cx.v3.Examples.ListExamples", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "language_code", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dialogflow.cx.v3.ListExamplesResponse", + "client": { + "shortName": "ExamplesClient", + "fullName": "google.cloud.dialogflow.cx.v3.ExamplesClient" + }, + "method": { + "shortName": "ListExamples", + "fullName": "google.cloud.dialogflow.cx.v3.Examples.ListExamples", + "service": { + "shortName": "Examples", + "fullName": "google.cloud.dialogflow.cx.v3.Examples" + } + } + } + }, + { + "regionTag": "dialogflow_v3_generated_Examples_GetExample_async", + "title": "Agents getExample Sample", + "origin": "API_DEFINITION", + "description": " Retrieves the specified example.", + "canonical": true, + "file": "examples.get_example.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetExample", + "fullName": "google.cloud.dialogflow.cx.v3.Examples.GetExample", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dialogflow.cx.v3.Example", + "client": { + "shortName": "ExamplesClient", + "fullName": "google.cloud.dialogflow.cx.v3.ExamplesClient" + }, + "method": { + "shortName": "GetExample", + "fullName": "google.cloud.dialogflow.cx.v3.Examples.GetExample", + "service": { + "shortName": "Examples", + "fullName": "google.cloud.dialogflow.cx.v3.Examples" + } + } + } + }, + { + "regionTag": "dialogflow_v3_generated_Examples_UpdateExample_async", + "title": "Agents updateExample Sample", + "origin": "API_DEFINITION", + "description": " Update the specified example.", + "canonical": true, + "file": "examples.update_example.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateExample", + "fullName": "google.cloud.dialogflow.cx.v3.Examples.UpdateExample", + "async": true, + "parameters": [ + { + "name": "example", + "type": ".google.cloud.dialogflow.cx.v3.Example" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.cloud.dialogflow.cx.v3.Example", + "client": { + "shortName": "ExamplesClient", + "fullName": "google.cloud.dialogflow.cx.v3.ExamplesClient" + }, + "method": { + "shortName": "UpdateExample", + "fullName": "google.cloud.dialogflow.cx.v3.Examples.UpdateExample", + "service": { + "shortName": "Examples", + "fullName": "google.cloud.dialogflow.cx.v3.Examples" + } + } + } + }, { "regionTag": "dialogflow_v3_generated_Experiments_ListExperiments_async", "title": "Agents listExperiments Sample", @@ -3028,23 +3248,23 @@ } }, { - "regionTag": "dialogflow_v3_generated_SecuritySettingsService_CreateSecuritySettings_async", - "title": "Agents createSecuritySettings Sample", + "regionTag": "dialogflow_v3_generated_Playbooks_CreatePlaybook_async", + "title": "Agents createPlaybook Sample", "origin": "API_DEFINITION", - "description": " Create security settings in the specified location.", + "description": " Creates a playbook in a specified agent.", "canonical": true, - "file": "security_settings_service.create_security_settings.js", + "file": "playbooks.create_playbook.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 60, + "end": 59, "type": "FULL" } ], "clientMethod": { - "shortName": "CreateSecuritySettings", - "fullName": "google.cloud.dialogflow.cx.v3.SecuritySettingsService.CreateSecuritySettings", + "shortName": "CreatePlaybook", + "fullName": "google.cloud.dialogflow.cx.v3.Playbooks.CreatePlaybook", "async": true, "parameters": [ { @@ -3052,32 +3272,32 @@ "type": "TYPE_STRING" }, { - "name": "security_settings", - "type": ".google.cloud.dialogflow.cx.v3.SecuritySettings" + "name": "playbook", + "type": ".google.cloud.dialogflow.cx.v3.Playbook" } ], - "resultType": ".google.cloud.dialogflow.cx.v3.SecuritySettings", + "resultType": ".google.cloud.dialogflow.cx.v3.Playbook", "client": { - "shortName": "SecuritySettingsServiceClient", - "fullName": "google.cloud.dialogflow.cx.v3.SecuritySettingsServiceClient" + "shortName": "PlaybooksClient", + "fullName": "google.cloud.dialogflow.cx.v3.PlaybooksClient" }, "method": { - "shortName": "CreateSecuritySettings", - "fullName": "google.cloud.dialogflow.cx.v3.SecuritySettingsService.CreateSecuritySettings", + "shortName": "CreatePlaybook", + "fullName": "google.cloud.dialogflow.cx.v3.Playbooks.CreatePlaybook", "service": { - "shortName": "SecuritySettingsService", - "fullName": "google.cloud.dialogflow.cx.v3.SecuritySettingsService" + "shortName": "Playbooks", + "fullName": "google.cloud.dialogflow.cx.v3.Playbooks" } } } }, { - "regionTag": "dialogflow_v3_generated_SecuritySettingsService_GetSecuritySettings_async", - "title": "Agents getSecuritySettings Sample", + "regionTag": "dialogflow_v3_generated_Playbooks_DeletePlaybook_async", + "title": "Agents deletePlaybook Sample", "origin": "API_DEFINITION", - "description": " Retrieves the specified [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings]. The returned settings may be stale by up to 1 minute.", + "description": " Deletes a specified playbook.", "canonical": true, - "file": "security_settings_service.get_security_settings.js", + "file": "playbooks.delete_playbook.js", "language": "JAVASCRIPT", "segments": [ { @@ -3087,8 +3307,8 @@ } ], "clientMethod": { - "shortName": "GetSecuritySettings", - "fullName": "google.cloud.dialogflow.cx.v3.SecuritySettingsService.GetSecuritySettings", + "shortName": "DeletePlaybook", + "fullName": "google.cloud.dialogflow.cx.v3.Playbooks.DeletePlaybook", "async": true, "parameters": [ { @@ -3096,160 +3316,164 @@ "type": "TYPE_STRING" } ], - "resultType": ".google.cloud.dialogflow.cx.v3.SecuritySettings", + "resultType": ".google.protobuf.Empty", "client": { - "shortName": "SecuritySettingsServiceClient", - "fullName": "google.cloud.dialogflow.cx.v3.SecuritySettingsServiceClient" + "shortName": "PlaybooksClient", + "fullName": "google.cloud.dialogflow.cx.v3.PlaybooksClient" }, "method": { - "shortName": "GetSecuritySettings", - "fullName": "google.cloud.dialogflow.cx.v3.SecuritySettingsService.GetSecuritySettings", + "shortName": "DeletePlaybook", + "fullName": "google.cloud.dialogflow.cx.v3.Playbooks.DeletePlaybook", "service": { - "shortName": "SecuritySettingsService", - "fullName": "google.cloud.dialogflow.cx.v3.SecuritySettingsService" + "shortName": "Playbooks", + "fullName": "google.cloud.dialogflow.cx.v3.Playbooks" } } } }, { - "regionTag": "dialogflow_v3_generated_SecuritySettingsService_UpdateSecuritySettings_async", - "title": "Agents updateSecuritySettings Sample", + "regionTag": "dialogflow_v3_generated_Playbooks_ListPlaybooks_async", + "title": "Agents listPlaybooks Sample", "origin": "API_DEFINITION", - "description": " Updates the specified [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings].", + "description": " Returns a list of playbooks in the specified agent.", "canonical": true, - "file": "security_settings_service.update_security_settings.js", + "file": "playbooks.list_playbooks.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 60, + "end": 65, "type": "FULL" } ], "clientMethod": { - "shortName": "UpdateSecuritySettings", - "fullName": "google.cloud.dialogflow.cx.v3.SecuritySettingsService.UpdateSecuritySettings", + "shortName": "ListPlaybooks", + "fullName": "google.cloud.dialogflow.cx.v3.Playbooks.ListPlaybooks", "async": true, "parameters": [ { - "name": "security_settings", - "type": ".google.cloud.dialogflow.cx.v3.SecuritySettings" + "name": "parent", + "type": "TYPE_STRING" }, { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" } ], - "resultType": ".google.cloud.dialogflow.cx.v3.SecuritySettings", + "resultType": ".google.cloud.dialogflow.cx.v3.ListPlaybooksResponse", "client": { - "shortName": "SecuritySettingsServiceClient", - "fullName": "google.cloud.dialogflow.cx.v3.SecuritySettingsServiceClient" + "shortName": "PlaybooksClient", + "fullName": "google.cloud.dialogflow.cx.v3.PlaybooksClient" }, "method": { - "shortName": "UpdateSecuritySettings", - "fullName": "google.cloud.dialogflow.cx.v3.SecuritySettingsService.UpdateSecuritySettings", + "shortName": "ListPlaybooks", + "fullName": "google.cloud.dialogflow.cx.v3.Playbooks.ListPlaybooks", "service": { - "shortName": "SecuritySettingsService", - "fullName": "google.cloud.dialogflow.cx.v3.SecuritySettingsService" + "shortName": "Playbooks", + "fullName": "google.cloud.dialogflow.cx.v3.Playbooks" } } } }, { - "regionTag": "dialogflow_v3_generated_SecuritySettingsService_ListSecuritySettings_async", - "title": "Agents listSecuritySettings Sample", + "regionTag": "dialogflow_v3_generated_Playbooks_GetPlaybook_async", + "title": "Agents getPlaybook Sample", "origin": "API_DEFINITION", - "description": " Returns the list of all security settings in the specified location.", + "description": " Retrieves the specified Playbook.", "canonical": true, - "file": "security_settings_service.list_security_settings.js", + "file": "playbooks.get_playbook.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 65, + "end": 55, "type": "FULL" } ], "clientMethod": { - "shortName": "ListSecuritySettings", - "fullName": "google.cloud.dialogflow.cx.v3.SecuritySettingsService.ListSecuritySettings", + "shortName": "GetPlaybook", + "fullName": "google.cloud.dialogflow.cx.v3.Playbooks.GetPlaybook", "async": true, "parameters": [ { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", + "name": "name", "type": "TYPE_STRING" } ], - "resultType": ".google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse", + "resultType": ".google.cloud.dialogflow.cx.v3.Playbook", "client": { - "shortName": "SecuritySettingsServiceClient", - "fullName": "google.cloud.dialogflow.cx.v3.SecuritySettingsServiceClient" + "shortName": "PlaybooksClient", + "fullName": "google.cloud.dialogflow.cx.v3.PlaybooksClient" }, "method": { - "shortName": "ListSecuritySettings", - "fullName": "google.cloud.dialogflow.cx.v3.SecuritySettingsService.ListSecuritySettings", + "shortName": "GetPlaybook", + "fullName": "google.cloud.dialogflow.cx.v3.Playbooks.GetPlaybook", "service": { - "shortName": "SecuritySettingsService", - "fullName": "google.cloud.dialogflow.cx.v3.SecuritySettingsService" + "shortName": "Playbooks", + "fullName": "google.cloud.dialogflow.cx.v3.Playbooks" } } } }, { - "regionTag": "dialogflow_v3_generated_SecuritySettingsService_DeleteSecuritySettings_async", - "title": "Agents deleteSecuritySettings Sample", + "regionTag": "dialogflow_v3_generated_Playbooks_ExportPlaybook_async", + "title": "Agents exportPlaybook Sample", "origin": "API_DEFINITION", - "description": " Deletes the specified [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings].", + "description": " Exports the specified playbook to a binary file. Note that resources (e.g. examples, tools) that the playbook references will also be exported.", "canonical": true, - "file": "security_settings_service.delete_security_settings.js", + "file": "playbooks.export_playbook.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 56, + "end": 73, "type": "FULL" } ], "clientMethod": { - "shortName": "DeleteSecuritySettings", - "fullName": "google.cloud.dialogflow.cx.v3.SecuritySettingsService.DeleteSecuritySettings", + "shortName": "ExportPlaybook", + "fullName": "google.cloud.dialogflow.cx.v3.Playbooks.ExportPlaybook", "async": true, "parameters": [ { "name": "name", "type": "TYPE_STRING" + }, + { + "name": "playbook_uri", + "type": "TYPE_STRING" + }, + { + "name": "data_format", + "type": ".google.cloud.dialogflow.cx.v3.ExportPlaybookRequest.DataFormat" } ], - "resultType": ".google.protobuf.Empty", + "resultType": ".google.longrunning.Operation", "client": { - "shortName": "SecuritySettingsServiceClient", - "fullName": "google.cloud.dialogflow.cx.v3.SecuritySettingsServiceClient" + "shortName": "PlaybooksClient", + "fullName": "google.cloud.dialogflow.cx.v3.PlaybooksClient" }, "method": { - "shortName": "DeleteSecuritySettings", - "fullName": "google.cloud.dialogflow.cx.v3.SecuritySettingsService.DeleteSecuritySettings", + "shortName": "ExportPlaybook", + "fullName": "google.cloud.dialogflow.cx.v3.Playbooks.ExportPlaybook", "service": { - "shortName": "SecuritySettingsService", - "fullName": "google.cloud.dialogflow.cx.v3.SecuritySettingsService" + "shortName": "Playbooks", + "fullName": "google.cloud.dialogflow.cx.v3.Playbooks" } } } }, { - "regionTag": "dialogflow_v3_generated_SessionEntityTypes_ListSessionEntityTypes_async", - "title": "Agents listSessionEntityTypes Sample", + "regionTag": "dialogflow_v3_generated_Playbooks_ImportPlaybook_async", + "title": "Agents importPlaybook Sample", "origin": "API_DEFINITION", - "description": " Returns the list of all session entity types in the specified session.", + "description": " Imports the specified playbook to the specified agent from a binary file.", "canonical": true, - "file": "session_entity_types.list_session_entity_types.js", + "file": "playbooks.import_playbook.js", "language": "JAVASCRIPT", "segments": [ { @@ -3259,8 +3483,8 @@ } ], "clientMethod": { - "shortName": "ListSessionEntityTypes", - "fullName": "google.cloud.dialogflow.cx.v3.SessionEntityTypes.ListSessionEntityTypes", + "shortName": "ImportPlaybook", + "fullName": "google.cloud.dialogflow.cx.v3.Playbooks.ImportPlaybook", "async": true, "parameters": [ { @@ -3268,87 +3492,95 @@ "type": "TYPE_STRING" }, { - "name": "page_size", - "type": "TYPE_INT32" + "name": "playbook_uri", + "type": "TYPE_STRING" }, { - "name": "page_token", - "type": "TYPE_STRING" + "name": "playbook_content", + "type": "TYPE_BYTES" + }, + { + "name": "import_strategy", + "type": ".google.cloud.dialogflow.cx.v3.PlaybookImportStrategy" } ], - "resultType": ".google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse", + "resultType": ".google.longrunning.Operation", "client": { - "shortName": "SessionEntityTypesClient", - "fullName": "google.cloud.dialogflow.cx.v3.SessionEntityTypesClient" + "shortName": "PlaybooksClient", + "fullName": "google.cloud.dialogflow.cx.v3.PlaybooksClient" }, "method": { - "shortName": "ListSessionEntityTypes", - "fullName": "google.cloud.dialogflow.cx.v3.SessionEntityTypes.ListSessionEntityTypes", + "shortName": "ImportPlaybook", + "fullName": "google.cloud.dialogflow.cx.v3.Playbooks.ImportPlaybook", "service": { - "shortName": "SessionEntityTypes", - "fullName": "google.cloud.dialogflow.cx.v3.SessionEntityTypes" + "shortName": "Playbooks", + "fullName": "google.cloud.dialogflow.cx.v3.Playbooks" } } } }, { - "regionTag": "dialogflow_v3_generated_SessionEntityTypes_GetSessionEntityType_async", - "title": "Agents getSessionEntityType Sample", + "regionTag": "dialogflow_v3_generated_Playbooks_UpdatePlaybook_async", + "title": "Agents updatePlaybook Sample", "origin": "API_DEFINITION", - "description": " Retrieves the specified session entity type.", + "description": " Updates the specified Playbook.", "canonical": true, - "file": "session_entity_types.get_session_entity_type.js", + "file": "playbooks.update_playbook.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 59, + "end": 58, "type": "FULL" } ], "clientMethod": { - "shortName": "GetSessionEntityType", - "fullName": "google.cloud.dialogflow.cx.v3.SessionEntityTypes.GetSessionEntityType", + "shortName": "UpdatePlaybook", + "fullName": "google.cloud.dialogflow.cx.v3.Playbooks.UpdatePlaybook", "async": true, "parameters": [ { - "name": "name", - "type": "TYPE_STRING" + "name": "playbook", + "type": ".google.cloud.dialogflow.cx.v3.Playbook" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" } ], - "resultType": ".google.cloud.dialogflow.cx.v3.SessionEntityType", + "resultType": ".google.cloud.dialogflow.cx.v3.Playbook", "client": { - "shortName": "SessionEntityTypesClient", - "fullName": "google.cloud.dialogflow.cx.v3.SessionEntityTypesClient" + "shortName": "PlaybooksClient", + "fullName": "google.cloud.dialogflow.cx.v3.PlaybooksClient" }, "method": { - "shortName": "GetSessionEntityType", - "fullName": "google.cloud.dialogflow.cx.v3.SessionEntityTypes.GetSessionEntityType", + "shortName": "UpdatePlaybook", + "fullName": "google.cloud.dialogflow.cx.v3.Playbooks.UpdatePlaybook", "service": { - "shortName": "SessionEntityTypes", - "fullName": "google.cloud.dialogflow.cx.v3.SessionEntityTypes" + "shortName": "Playbooks", + "fullName": "google.cloud.dialogflow.cx.v3.Playbooks" } } } }, { - "regionTag": "dialogflow_v3_generated_SessionEntityTypes_CreateSessionEntityType_async", - "title": "Agents createSessionEntityType Sample", + "regionTag": "dialogflow_v3_generated_Playbooks_CreatePlaybookVersion_async", + "title": "Agents createPlaybookVersion Sample", "origin": "API_DEFINITION", - "description": " Creates a session entity type.", + "description": " Creates a version for the specified Playbook.", "canonical": true, - "file": "session_entity_types.create_session_entity_type.js", + "file": "playbooks.create_playbook_version.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 64, + "end": 60, "type": "FULL" } ], "clientMethod": { - "shortName": "CreateSessionEntityType", - "fullName": "google.cloud.dialogflow.cx.v3.SessionEntityTypes.CreateSessionEntityType", + "shortName": "CreatePlaybookVersion", + "fullName": "google.cloud.dialogflow.cx.v3.Playbooks.CreatePlaybookVersion", "async": true, "parameters": [ { @@ -3356,87 +3588,83 @@ "type": "TYPE_STRING" }, { - "name": "session_entity_type", - "type": ".google.cloud.dialogflow.cx.v3.SessionEntityType" + "name": "playbook_version", + "type": ".google.cloud.dialogflow.cx.v3.PlaybookVersion" } ], - "resultType": ".google.cloud.dialogflow.cx.v3.SessionEntityType", + "resultType": ".google.cloud.dialogflow.cx.v3.PlaybookVersion", "client": { - "shortName": "SessionEntityTypesClient", - "fullName": "google.cloud.dialogflow.cx.v3.SessionEntityTypesClient" + "shortName": "PlaybooksClient", + "fullName": "google.cloud.dialogflow.cx.v3.PlaybooksClient" }, "method": { - "shortName": "CreateSessionEntityType", - "fullName": "google.cloud.dialogflow.cx.v3.SessionEntityTypes.CreateSessionEntityType", + "shortName": "CreatePlaybookVersion", + "fullName": "google.cloud.dialogflow.cx.v3.Playbooks.CreatePlaybookVersion", "service": { - "shortName": "SessionEntityTypes", - "fullName": "google.cloud.dialogflow.cx.v3.SessionEntityTypes" + "shortName": "Playbooks", + "fullName": "google.cloud.dialogflow.cx.v3.Playbooks" } } } }, { - "regionTag": "dialogflow_v3_generated_SessionEntityTypes_UpdateSessionEntityType_async", - "title": "Agents updateSessionEntityType Sample", + "regionTag": "dialogflow_v3_generated_Playbooks_GetPlaybookVersion_async", + "title": "Agents getPlaybookVersion Sample", "origin": "API_DEFINITION", - "description": " Updates the specified session entity type.", + "description": " Retrieves the specified version of the Playbook.", "canonical": true, - "file": "session_entity_types.update_session_entity_type.js", + "file": "playbooks.get_playbook_version.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 63, + "end": 55, "type": "FULL" } ], "clientMethod": { - "shortName": "UpdateSessionEntityType", - "fullName": "google.cloud.dialogflow.cx.v3.SessionEntityTypes.UpdateSessionEntityType", + "shortName": "GetPlaybookVersion", + "fullName": "google.cloud.dialogflow.cx.v3.Playbooks.GetPlaybookVersion", "async": true, "parameters": [ { - "name": "session_entity_type", - "type": ".google.cloud.dialogflow.cx.v3.SessionEntityType" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" + "name": "name", + "type": "TYPE_STRING" } ], - "resultType": ".google.cloud.dialogflow.cx.v3.SessionEntityType", + "resultType": ".google.cloud.dialogflow.cx.v3.PlaybookVersion", "client": { - "shortName": "SessionEntityTypesClient", - "fullName": "google.cloud.dialogflow.cx.v3.SessionEntityTypesClient" + "shortName": "PlaybooksClient", + "fullName": "google.cloud.dialogflow.cx.v3.PlaybooksClient" }, "method": { - "shortName": "UpdateSessionEntityType", - "fullName": "google.cloud.dialogflow.cx.v3.SessionEntityTypes.UpdateSessionEntityType", + "shortName": "GetPlaybookVersion", + "fullName": "google.cloud.dialogflow.cx.v3.Playbooks.GetPlaybookVersion", "service": { - "shortName": "SessionEntityTypes", - "fullName": "google.cloud.dialogflow.cx.v3.SessionEntityTypes" + "shortName": "Playbooks", + "fullName": "google.cloud.dialogflow.cx.v3.Playbooks" } } } }, { - "regionTag": "dialogflow_v3_generated_SessionEntityTypes_DeleteSessionEntityType_async", - "title": "Agents deleteSessionEntityType Sample", + "regionTag": "dialogflow_v3_generated_Playbooks_RestorePlaybookVersion_async", + "title": "Agents restorePlaybookVersion Sample", "origin": "API_DEFINITION", - "description": " Deletes the specified session entity type.", + "description": " Retrieves the specified version of the Playbook and stores it as the current playbook draft, returning the playbook with resources updated.", "canonical": true, - "file": "session_entity_types.delete_session_entity_type.js", + "file": "playbooks.restore_playbook_version.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 59, + "end": 55, "type": "FULL" } ], "clientMethod": { - "shortName": "DeleteSessionEntityType", - "fullName": "google.cloud.dialogflow.cx.v3.SessionEntityTypes.DeleteSessionEntityType", + "shortName": "RestorePlaybookVersion", + "fullName": "google.cloud.dialogflow.cx.v3.Playbooks.RestorePlaybookVersion", "async": true, "parameters": [ { @@ -3444,244 +3672,1100 @@ "type": "TYPE_STRING" } ], - "resultType": ".google.protobuf.Empty", + "resultType": ".google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse", "client": { - "shortName": "SessionEntityTypesClient", - "fullName": "google.cloud.dialogflow.cx.v3.SessionEntityTypesClient" + "shortName": "PlaybooksClient", + "fullName": "google.cloud.dialogflow.cx.v3.PlaybooksClient" }, "method": { - "shortName": "DeleteSessionEntityType", - "fullName": "google.cloud.dialogflow.cx.v3.SessionEntityTypes.DeleteSessionEntityType", + "shortName": "RestorePlaybookVersion", + "fullName": "google.cloud.dialogflow.cx.v3.Playbooks.RestorePlaybookVersion", "service": { - "shortName": "SessionEntityTypes", - "fullName": "google.cloud.dialogflow.cx.v3.SessionEntityTypes" + "shortName": "Playbooks", + "fullName": "google.cloud.dialogflow.cx.v3.Playbooks" } } } }, { - "regionTag": "dialogflow_v3_generated_Sessions_DetectIntent_async", - "title": "Agents detectIntent Sample", + "regionTag": "dialogflow_v3_generated_Playbooks_ListPlaybookVersions_async", + "title": "Agents listPlaybookVersions Sample", "origin": "API_DEFINITION", - "description": " Processes a natural language query and returns structured, actionable data as a result. This method is not idempotent, because it may cause session entity types to be updated, which in turn might affect results of future queries. Note: Always use agent versions for production traffic. See [Versions and environments](https://cloud.google.com/dialogflow/cx/docs/concept/version).", + "description": " Lists versions for the specified Playbook.", "canonical": true, - "file": "sessions.detect_intent.js", + "file": "playbooks.list_playbook_versions.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 80, + "end": 66, "type": "FULL" } ], "clientMethod": { - "shortName": "DetectIntent", - "fullName": "google.cloud.dialogflow.cx.v3.Sessions.DetectIntent", + "shortName": "ListPlaybookVersions", + "fullName": "google.cloud.dialogflow.cx.v3.Playbooks.ListPlaybookVersions", "async": true, "parameters": [ { - "name": "session", + "name": "parent", "type": "TYPE_STRING" }, { - "name": "query_params", - "type": ".google.cloud.dialogflow.cx.v3.QueryParameters" - }, - { - "name": "query_input", - "type": ".google.cloud.dialogflow.cx.v3.QueryInput" + "name": "page_size", + "type": "TYPE_INT32" }, { - "name": "output_audio_config", - "type": ".google.cloud.dialogflow.cx.v3.OutputAudioConfig" + "name": "page_token", + "type": "TYPE_STRING" } ], - "resultType": ".google.cloud.dialogflow.cx.v3.DetectIntentResponse", + "resultType": ".google.cloud.dialogflow.cx.v3.ListPlaybookVersionsResponse", "client": { - "shortName": "SessionsClient", - "fullName": "google.cloud.dialogflow.cx.v3.SessionsClient" + "shortName": "PlaybooksClient", + "fullName": "google.cloud.dialogflow.cx.v3.PlaybooksClient" }, "method": { - "shortName": "DetectIntent", - "fullName": "google.cloud.dialogflow.cx.v3.Sessions.DetectIntent", + "shortName": "ListPlaybookVersions", + "fullName": "google.cloud.dialogflow.cx.v3.Playbooks.ListPlaybookVersions", "service": { - "shortName": "Sessions", - "fullName": "google.cloud.dialogflow.cx.v3.Sessions" + "shortName": "Playbooks", + "fullName": "google.cloud.dialogflow.cx.v3.Playbooks" } } } }, { - "regionTag": "dialogflow_v3_generated_Sessions_ServerStreamingDetectIntent_async", - "title": "Agents serverStreamingDetectIntent Sample", + "regionTag": "dialogflow_v3_generated_Playbooks_DeletePlaybookVersion_async", + "title": "Agents deletePlaybookVersion Sample", "origin": "API_DEFINITION", - "description": " Processes a natural language query and returns structured, actionable data as a result through server-side streaming. Server-side streaming allows Dialogflow to send [partial responses](https://cloud.google.com/dialogflow/cx/docs/concept/fulfillment#partial-response) earlier in a single request.", + "description": " Deletes the specified version of the Playbook.", "canonical": true, - "file": "sessions.server_streaming_detect_intent.js", + "file": "playbooks.delete_playbook_version.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 82, + "end": 55, "type": "FULL" } ], "clientMethod": { - "shortName": "ServerStreamingDetectIntent", - "fullName": "google.cloud.dialogflow.cx.v3.Sessions.ServerStreamingDetectIntent", + "shortName": "DeletePlaybookVersion", + "fullName": "google.cloud.dialogflow.cx.v3.Playbooks.DeletePlaybookVersion", "async": true, "parameters": [ { - "name": "session", + "name": "name", "type": "TYPE_STRING" - }, - { - "name": "query_params", - "type": ".google.cloud.dialogflow.cx.v3.QueryParameters" - }, - { - "name": "query_input", - "type": ".google.cloud.dialogflow.cx.v3.QueryInput" - }, - { - "name": "output_audio_config", - "type": ".google.cloud.dialogflow.cx.v3.OutputAudioConfig" } ], - "resultType": ".google.cloud.dialogflow.cx.v3.DetectIntentResponse", + "resultType": ".google.protobuf.Empty", "client": { - "shortName": "SessionsClient", - "fullName": "google.cloud.dialogflow.cx.v3.SessionsClient" + "shortName": "PlaybooksClient", + "fullName": "google.cloud.dialogflow.cx.v3.PlaybooksClient" }, "method": { - "shortName": "ServerStreamingDetectIntent", - "fullName": "google.cloud.dialogflow.cx.v3.Sessions.ServerStreamingDetectIntent", + "shortName": "DeletePlaybookVersion", + "fullName": "google.cloud.dialogflow.cx.v3.Playbooks.DeletePlaybookVersion", "service": { - "shortName": "Sessions", - "fullName": "google.cloud.dialogflow.cx.v3.Sessions" + "shortName": "Playbooks", + "fullName": "google.cloud.dialogflow.cx.v3.Playbooks" } } } }, { - "regionTag": "dialogflow_v3_generated_Sessions_StreamingDetectIntent_async", - "title": "Agents streamingDetectIntent Sample", + "regionTag": "dialogflow_v3_generated_SecuritySettingsService_CreateSecuritySettings_async", + "title": "Agents createSecuritySettings Sample", "origin": "API_DEFINITION", - "description": " Processes a natural language query in audio format in a streaming fashion and returns structured, actionable data as a result. This method is only available via the gRPC API (not REST). Note: Always use agent versions for production traffic. See [Versions and environments](https://cloud.google.com/dialogflow/cx/docs/concept/version).", + "description": " Create security settings in the specified location.", "canonical": true, - "file": "sessions.streaming_detect_intent.js", + "file": "security_settings_service.create_security_settings.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 95, + "end": 60, "type": "FULL" } ], "clientMethod": { - "shortName": "StreamingDetectIntent", - "fullName": "google.cloud.dialogflow.cx.v3.Sessions.StreamingDetectIntent", + "shortName": "CreateSecuritySettings", + "fullName": "google.cloud.dialogflow.cx.v3.SecuritySettingsService.CreateSecuritySettings", "async": true, "parameters": [ { - "name": "session", + "name": "parent", "type": "TYPE_STRING" }, { - "name": "query_params", - "type": ".google.cloud.dialogflow.cx.v3.QueryParameters" - }, - { - "name": "query_input", - "type": ".google.cloud.dialogflow.cx.v3.QueryInput" - }, - { - "name": "output_audio_config", - "type": ".google.cloud.dialogflow.cx.v3.OutputAudioConfig" - }, - { - "name": "enable_partial_response", - "type": "TYPE_BOOL" - }, - { - "name": "enable_debugging_info", - "type": "TYPE_BOOL" + "name": "security_settings", + "type": ".google.cloud.dialogflow.cx.v3.SecuritySettings" } ], - "resultType": ".google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse", + "resultType": ".google.cloud.dialogflow.cx.v3.SecuritySettings", "client": { - "shortName": "SessionsClient", - "fullName": "google.cloud.dialogflow.cx.v3.SessionsClient" + "shortName": "SecuritySettingsServiceClient", + "fullName": "google.cloud.dialogflow.cx.v3.SecuritySettingsServiceClient" }, "method": { - "shortName": "StreamingDetectIntent", - "fullName": "google.cloud.dialogflow.cx.v3.Sessions.StreamingDetectIntent", + "shortName": "CreateSecuritySettings", + "fullName": "google.cloud.dialogflow.cx.v3.SecuritySettingsService.CreateSecuritySettings", "service": { - "shortName": "Sessions", - "fullName": "google.cloud.dialogflow.cx.v3.Sessions" + "shortName": "SecuritySettingsService", + "fullName": "google.cloud.dialogflow.cx.v3.SecuritySettingsService" } } } }, { - "regionTag": "dialogflow_v3_generated_Sessions_MatchIntent_async", - "title": "Agents matchIntent Sample", + "regionTag": "dialogflow_v3_generated_SecuritySettingsService_GetSecuritySettings_async", + "title": "Agents getSecuritySettings Sample", "origin": "API_DEFINITION", - "description": " Returns preliminary intent match results, doesn't change the session status.", + "description": " Retrieves the specified [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings]. The returned settings may be stale by up to 1 minute.", "canonical": true, - "file": "sessions.match_intent.js", + "file": "security_settings_service.get_security_settings.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 77, + "end": 55, "type": "FULL" } ], "clientMethod": { - "shortName": "MatchIntent", - "fullName": "google.cloud.dialogflow.cx.v3.Sessions.MatchIntent", + "shortName": "GetSecuritySettings", + "fullName": "google.cloud.dialogflow.cx.v3.SecuritySettingsService.GetSecuritySettings", "async": true, "parameters": [ { - "name": "session", + "name": "name", "type": "TYPE_STRING" - }, - { - "name": "query_params", - "type": ".google.cloud.dialogflow.cx.v3.QueryParameters" - }, - { - "name": "query_input", - "type": ".google.cloud.dialogflow.cx.v3.QueryInput" - }, - { - "name": "persist_parameter_changes", - "type": "TYPE_BOOL" } ], - "resultType": ".google.cloud.dialogflow.cx.v3.MatchIntentResponse", + "resultType": ".google.cloud.dialogflow.cx.v3.SecuritySettings", "client": { - "shortName": "SessionsClient", - "fullName": "google.cloud.dialogflow.cx.v3.SessionsClient" + "shortName": "SecuritySettingsServiceClient", + "fullName": "google.cloud.dialogflow.cx.v3.SecuritySettingsServiceClient" }, "method": { - "shortName": "MatchIntent", - "fullName": "google.cloud.dialogflow.cx.v3.Sessions.MatchIntent", + "shortName": "GetSecuritySettings", + "fullName": "google.cloud.dialogflow.cx.v3.SecuritySettingsService.GetSecuritySettings", "service": { - "shortName": "Sessions", - "fullName": "google.cloud.dialogflow.cx.v3.Sessions" + "shortName": "SecuritySettingsService", + "fullName": "google.cloud.dialogflow.cx.v3.SecuritySettingsService" } } } }, { - "regionTag": "dialogflow_v3_generated_Sessions_FulfillIntent_async", - "title": "Agents fulfillIntent Sample", + "regionTag": "dialogflow_v3_generated_SecuritySettingsService_UpdateSecuritySettings_async", + "title": "Agents updateSecuritySettings Sample", "origin": "API_DEFINITION", - "description": " Fulfills a matched intent returned by [MatchIntent][google.cloud.dialogflow.cx.v3.Sessions.MatchIntent]. Must be called after [MatchIntent][google.cloud.dialogflow.cx.v3.Sessions.MatchIntent], with input from [MatchIntentResponse][google.cloud.dialogflow.cx.v3.MatchIntentResponse]. Otherwise, the behavior is undefined.", + "description": " Updates the specified [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings].", "canonical": true, - "file": "sessions.fulfill_intent.js", + "file": "security_settings_service.update_security_settings.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateSecuritySettings", + "fullName": "google.cloud.dialogflow.cx.v3.SecuritySettingsService.UpdateSecuritySettings", + "async": true, + "parameters": [ + { + "name": "security_settings", + "type": ".google.cloud.dialogflow.cx.v3.SecuritySettings" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.cloud.dialogflow.cx.v3.SecuritySettings", + "client": { + "shortName": "SecuritySettingsServiceClient", + "fullName": "google.cloud.dialogflow.cx.v3.SecuritySettingsServiceClient" + }, + "method": { + "shortName": "UpdateSecuritySettings", + "fullName": "google.cloud.dialogflow.cx.v3.SecuritySettingsService.UpdateSecuritySettings", + "service": { + "shortName": "SecuritySettingsService", + "fullName": "google.cloud.dialogflow.cx.v3.SecuritySettingsService" + } + } + } + }, + { + "regionTag": "dialogflow_v3_generated_SecuritySettingsService_ListSecuritySettings_async", + "title": "Agents listSecuritySettings Sample", + "origin": "API_DEFINITION", + "description": " Returns the list of all security settings in the specified location.", + "canonical": true, + "file": "security_settings_service.list_security_settings.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 65, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListSecuritySettings", + "fullName": "google.cloud.dialogflow.cx.v3.SecuritySettingsService.ListSecuritySettings", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse", + "client": { + "shortName": "SecuritySettingsServiceClient", + "fullName": "google.cloud.dialogflow.cx.v3.SecuritySettingsServiceClient" + }, + "method": { + "shortName": "ListSecuritySettings", + "fullName": "google.cloud.dialogflow.cx.v3.SecuritySettingsService.ListSecuritySettings", + "service": { + "shortName": "SecuritySettingsService", + "fullName": "google.cloud.dialogflow.cx.v3.SecuritySettingsService" + } + } + } + }, + { + "regionTag": "dialogflow_v3_generated_SecuritySettingsService_DeleteSecuritySettings_async", + "title": "Agents deleteSecuritySettings Sample", + "origin": "API_DEFINITION", + "description": " Deletes the specified [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings].", + "canonical": true, + "file": "security_settings_service.delete_security_settings.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteSecuritySettings", + "fullName": "google.cloud.dialogflow.cx.v3.SecuritySettingsService.DeleteSecuritySettings", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "SecuritySettingsServiceClient", + "fullName": "google.cloud.dialogflow.cx.v3.SecuritySettingsServiceClient" + }, + "method": { + "shortName": "DeleteSecuritySettings", + "fullName": "google.cloud.dialogflow.cx.v3.SecuritySettingsService.DeleteSecuritySettings", + "service": { + "shortName": "SecuritySettingsService", + "fullName": "google.cloud.dialogflow.cx.v3.SecuritySettingsService" + } + } + } + }, + { + "regionTag": "dialogflow_v3_generated_SessionEntityTypes_ListSessionEntityTypes_async", + "title": "Agents listSessionEntityTypes Sample", + "origin": "API_DEFINITION", + "description": " Returns the list of all session entity types in the specified session.", + "canonical": true, + "file": "session_entity_types.list_session_entity_types.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 70, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListSessionEntityTypes", + "fullName": "google.cloud.dialogflow.cx.v3.SessionEntityTypes.ListSessionEntityTypes", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dialogflow.cx.v3.ListSessionEntityTypesResponse", + "client": { + "shortName": "SessionEntityTypesClient", + "fullName": "google.cloud.dialogflow.cx.v3.SessionEntityTypesClient" + }, + "method": { + "shortName": "ListSessionEntityTypes", + "fullName": "google.cloud.dialogflow.cx.v3.SessionEntityTypes.ListSessionEntityTypes", + "service": { + "shortName": "SessionEntityTypes", + "fullName": "google.cloud.dialogflow.cx.v3.SessionEntityTypes" + } + } + } + }, + { + "regionTag": "dialogflow_v3_generated_SessionEntityTypes_GetSessionEntityType_async", + "title": "Agents getSessionEntityType Sample", + "origin": "API_DEFINITION", + "description": " Retrieves the specified session entity type.", + "canonical": true, + "file": "session_entity_types.get_session_entity_type.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetSessionEntityType", + "fullName": "google.cloud.dialogflow.cx.v3.SessionEntityTypes.GetSessionEntityType", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dialogflow.cx.v3.SessionEntityType", + "client": { + "shortName": "SessionEntityTypesClient", + "fullName": "google.cloud.dialogflow.cx.v3.SessionEntityTypesClient" + }, + "method": { + "shortName": "GetSessionEntityType", + "fullName": "google.cloud.dialogflow.cx.v3.SessionEntityTypes.GetSessionEntityType", + "service": { + "shortName": "SessionEntityTypes", + "fullName": "google.cloud.dialogflow.cx.v3.SessionEntityTypes" + } + } + } + }, + { + "regionTag": "dialogflow_v3_generated_SessionEntityTypes_CreateSessionEntityType_async", + "title": "Agents createSessionEntityType Sample", + "origin": "API_DEFINITION", + "description": " Creates a session entity type.", + "canonical": true, + "file": "session_entity_types.create_session_entity_type.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateSessionEntityType", + "fullName": "google.cloud.dialogflow.cx.v3.SessionEntityTypes.CreateSessionEntityType", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "session_entity_type", + "type": ".google.cloud.dialogflow.cx.v3.SessionEntityType" + } + ], + "resultType": ".google.cloud.dialogflow.cx.v3.SessionEntityType", + "client": { + "shortName": "SessionEntityTypesClient", + "fullName": "google.cloud.dialogflow.cx.v3.SessionEntityTypesClient" + }, + "method": { + "shortName": "CreateSessionEntityType", + "fullName": "google.cloud.dialogflow.cx.v3.SessionEntityTypes.CreateSessionEntityType", + "service": { + "shortName": "SessionEntityTypes", + "fullName": "google.cloud.dialogflow.cx.v3.SessionEntityTypes" + } + } + } + }, + { + "regionTag": "dialogflow_v3_generated_SessionEntityTypes_UpdateSessionEntityType_async", + "title": "Agents updateSessionEntityType Sample", + "origin": "API_DEFINITION", + "description": " Updates the specified session entity type.", + "canonical": true, + "file": "session_entity_types.update_session_entity_type.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 63, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateSessionEntityType", + "fullName": "google.cloud.dialogflow.cx.v3.SessionEntityTypes.UpdateSessionEntityType", + "async": true, + "parameters": [ + { + "name": "session_entity_type", + "type": ".google.cloud.dialogflow.cx.v3.SessionEntityType" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.cloud.dialogflow.cx.v3.SessionEntityType", + "client": { + "shortName": "SessionEntityTypesClient", + "fullName": "google.cloud.dialogflow.cx.v3.SessionEntityTypesClient" + }, + "method": { + "shortName": "UpdateSessionEntityType", + "fullName": "google.cloud.dialogflow.cx.v3.SessionEntityTypes.UpdateSessionEntityType", + "service": { + "shortName": "SessionEntityTypes", + "fullName": "google.cloud.dialogflow.cx.v3.SessionEntityTypes" + } + } + } + }, + { + "regionTag": "dialogflow_v3_generated_SessionEntityTypes_DeleteSessionEntityType_async", + "title": "Agents deleteSessionEntityType Sample", + "origin": "API_DEFINITION", + "description": " Deletes the specified session entity type.", + "canonical": true, + "file": "session_entity_types.delete_session_entity_type.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteSessionEntityType", + "fullName": "google.cloud.dialogflow.cx.v3.SessionEntityTypes.DeleteSessionEntityType", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "SessionEntityTypesClient", + "fullName": "google.cloud.dialogflow.cx.v3.SessionEntityTypesClient" + }, + "method": { + "shortName": "DeleteSessionEntityType", + "fullName": "google.cloud.dialogflow.cx.v3.SessionEntityTypes.DeleteSessionEntityType", + "service": { + "shortName": "SessionEntityTypes", + "fullName": "google.cloud.dialogflow.cx.v3.SessionEntityTypes" + } + } + } + }, + { + "regionTag": "dialogflow_v3_generated_Sessions_DetectIntent_async", + "title": "Agents detectIntent Sample", + "origin": "API_DEFINITION", + "description": " Processes a natural language query and returns structured, actionable data as a result. This method is not idempotent, because it may cause session entity types to be updated, which in turn might affect results of future queries. Note: Always use agent versions for production traffic. See [Versions and environments](https://cloud.google.com/dialogflow/cx/docs/concept/version).", + "canonical": true, + "file": "sessions.detect_intent.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 86, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DetectIntent", + "fullName": "google.cloud.dialogflow.cx.v3.Sessions.DetectIntent", + "async": true, + "parameters": [ + { + "name": "session", + "type": "TYPE_STRING" + }, + { + "name": "query_params", + "type": ".google.cloud.dialogflow.cx.v3.QueryParameters" + }, + { + "name": "query_input", + "type": ".google.cloud.dialogflow.cx.v3.QueryInput" + }, + { + "name": "output_audio_config", + "type": ".google.cloud.dialogflow.cx.v3.OutputAudioConfig" + }, + { + "name": "response_view", + "type": ".google.cloud.dialogflow.cx.v3.DetectIntentResponseView" + } + ], + "resultType": ".google.cloud.dialogflow.cx.v3.DetectIntentResponse", + "client": { + "shortName": "SessionsClient", + "fullName": "google.cloud.dialogflow.cx.v3.SessionsClient" + }, + "method": { + "shortName": "DetectIntent", + "fullName": "google.cloud.dialogflow.cx.v3.Sessions.DetectIntent", + "service": { + "shortName": "Sessions", + "fullName": "google.cloud.dialogflow.cx.v3.Sessions" + } + } + } + }, + { + "regionTag": "dialogflow_v3_generated_Sessions_ServerStreamingDetectIntent_async", + "title": "Agents serverStreamingDetectIntent Sample", + "origin": "API_DEFINITION", + "description": " Processes a natural language query and returns structured, actionable data as a result through server-side streaming. Server-side streaming allows Dialogflow to send [partial responses](https://cloud.google.com/dialogflow/cx/docs/concept/fulfillment#partial-response) earlier in a single request.", + "canonical": true, + "file": "sessions.server_streaming_detect_intent.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 88, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ServerStreamingDetectIntent", + "fullName": "google.cloud.dialogflow.cx.v3.Sessions.ServerStreamingDetectIntent", + "async": true, + "parameters": [ + { + "name": "session", + "type": "TYPE_STRING" + }, + { + "name": "query_params", + "type": ".google.cloud.dialogflow.cx.v3.QueryParameters" + }, + { + "name": "query_input", + "type": ".google.cloud.dialogflow.cx.v3.QueryInput" + }, + { + "name": "output_audio_config", + "type": ".google.cloud.dialogflow.cx.v3.OutputAudioConfig" + }, + { + "name": "response_view", + "type": ".google.cloud.dialogflow.cx.v3.DetectIntentResponseView" + } + ], + "resultType": ".google.cloud.dialogflow.cx.v3.DetectIntentResponse", + "client": { + "shortName": "SessionsClient", + "fullName": "google.cloud.dialogflow.cx.v3.SessionsClient" + }, + "method": { + "shortName": "ServerStreamingDetectIntent", + "fullName": "google.cloud.dialogflow.cx.v3.Sessions.ServerStreamingDetectIntent", + "service": { + "shortName": "Sessions", + "fullName": "google.cloud.dialogflow.cx.v3.Sessions" + } + } + } + }, + { + "regionTag": "dialogflow_v3_generated_Sessions_StreamingDetectIntent_async", + "title": "Agents streamingDetectIntent Sample", + "origin": "API_DEFINITION", + "description": " Processes a natural language query in audio format in a streaming fashion and returns structured, actionable data as a result. This method is only available via the gRPC API (not REST). Note: Always use agent versions for production traffic. See [Versions and environments](https://cloud.google.com/dialogflow/cx/docs/concept/version).", + "canonical": true, + "file": "sessions.streaming_detect_intent.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 101, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "StreamingDetectIntent", + "fullName": "google.cloud.dialogflow.cx.v3.Sessions.StreamingDetectIntent", + "async": true, + "parameters": [ + { + "name": "session", + "type": "TYPE_STRING" + }, + { + "name": "query_params", + "type": ".google.cloud.dialogflow.cx.v3.QueryParameters" + }, + { + "name": "query_input", + "type": ".google.cloud.dialogflow.cx.v3.QueryInput" + }, + { + "name": "output_audio_config", + "type": ".google.cloud.dialogflow.cx.v3.OutputAudioConfig" + }, + { + "name": "enable_partial_response", + "type": "TYPE_BOOL" + }, + { + "name": "enable_debugging_info", + "type": "TYPE_BOOL" + }, + { + "name": "response_view", + "type": ".google.cloud.dialogflow.cx.v3.DetectIntentResponseView" + } + ], + "resultType": ".google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse", + "client": { + "shortName": "SessionsClient", + "fullName": "google.cloud.dialogflow.cx.v3.SessionsClient" + }, + "method": { + "shortName": "StreamingDetectIntent", + "fullName": "google.cloud.dialogflow.cx.v3.Sessions.StreamingDetectIntent", + "service": { + "shortName": "Sessions", + "fullName": "google.cloud.dialogflow.cx.v3.Sessions" + } + } + } + }, + { + "regionTag": "dialogflow_v3_generated_Sessions_MatchIntent_async", + "title": "Agents matchIntent Sample", + "origin": "API_DEFINITION", + "description": " Returns preliminary intent match results, doesn't change the session status.", + "canonical": true, + "file": "sessions.match_intent.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 77, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "MatchIntent", + "fullName": "google.cloud.dialogflow.cx.v3.Sessions.MatchIntent", + "async": true, + "parameters": [ + { + "name": "session", + "type": "TYPE_STRING" + }, + { + "name": "query_params", + "type": ".google.cloud.dialogflow.cx.v3.QueryParameters" + }, + { + "name": "query_input", + "type": ".google.cloud.dialogflow.cx.v3.QueryInput" + }, + { + "name": "persist_parameter_changes", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.cloud.dialogflow.cx.v3.MatchIntentResponse", + "client": { + "shortName": "SessionsClient", + "fullName": "google.cloud.dialogflow.cx.v3.SessionsClient" + }, + "method": { + "shortName": "MatchIntent", + "fullName": "google.cloud.dialogflow.cx.v3.Sessions.MatchIntent", + "service": { + "shortName": "Sessions", + "fullName": "google.cloud.dialogflow.cx.v3.Sessions" + } + } + } + }, + { + "regionTag": "dialogflow_v3_generated_Sessions_FulfillIntent_async", + "title": "Agents fulfillIntent Sample", + "origin": "API_DEFINITION", + "description": " Fulfills a matched intent returned by [MatchIntent][google.cloud.dialogflow.cx.v3.Sessions.MatchIntent]. Must be called after [MatchIntent][google.cloud.dialogflow.cx.v3.Sessions.MatchIntent], with input from [MatchIntentResponse][google.cloud.dialogflow.cx.v3.MatchIntentResponse]. Otherwise, the behavior is undefined.", + "canonical": true, + "file": "sessions.fulfill_intent.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 61, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "FulfillIntent", + "fullName": "google.cloud.dialogflow.cx.v3.Sessions.FulfillIntent", + "async": true, + "parameters": [ + { + "name": "match_intent_request", + "type": ".google.cloud.dialogflow.cx.v3.MatchIntentRequest" + }, + { + "name": "match", + "type": ".google.cloud.dialogflow.cx.v3.Match" + }, + { + "name": "output_audio_config", + "type": ".google.cloud.dialogflow.cx.v3.OutputAudioConfig" + } + ], + "resultType": ".google.cloud.dialogflow.cx.v3.FulfillIntentResponse", + "client": { + "shortName": "SessionsClient", + "fullName": "google.cloud.dialogflow.cx.v3.SessionsClient" + }, + "method": { + "shortName": "FulfillIntent", + "fullName": "google.cloud.dialogflow.cx.v3.Sessions.FulfillIntent", + "service": { + "shortName": "Sessions", + "fullName": "google.cloud.dialogflow.cx.v3.Sessions" + } + } + } + }, + { + "regionTag": "dialogflow_v3_generated_Sessions_SubmitAnswerFeedback_async", + "title": "Agents submitAnswerFeedback Sample", + "origin": "API_DEFINITION", + "description": " Updates the feedback received from the user for a single turn of the bot response.", + "canonical": true, + "file": "sessions.submit_answer_feedback.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 69, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "SubmitAnswerFeedback", + "fullName": "google.cloud.dialogflow.cx.v3.Sessions.SubmitAnswerFeedback", + "async": true, + "parameters": [ + { + "name": "session", + "type": "TYPE_STRING" + }, + { + "name": "response_id", + "type": "TYPE_STRING" + }, + { + "name": "answer_feedback", + "type": ".google.cloud.dialogflow.cx.v3.AnswerFeedback" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.cloud.dialogflow.cx.v3.AnswerFeedback", + "client": { + "shortName": "SessionsClient", + "fullName": "google.cloud.dialogflow.cx.v3.SessionsClient" + }, + "method": { + "shortName": "SubmitAnswerFeedback", + "fullName": "google.cloud.dialogflow.cx.v3.Sessions.SubmitAnswerFeedback", + "service": { + "shortName": "Sessions", + "fullName": "google.cloud.dialogflow.cx.v3.Sessions" + } + } + } + }, + { + "regionTag": "dialogflow_v3_generated_TestCases_ListTestCases_async", + "title": "Agents listTestCases Sample", + "origin": "API_DEFINITION", + "description": " Fetches a list of test cases for a given agent.", + "canonical": true, + "file": "test_cases.list_test_cases.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 70, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListTestCases", + "fullName": "google.cloud.dialogflow.cx.v3.TestCases.ListTestCases", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "view", + "type": ".google.cloud.dialogflow.cx.v3.ListTestCasesRequest.TestCaseView" + } + ], + "resultType": ".google.cloud.dialogflow.cx.v3.ListTestCasesResponse", + "client": { + "shortName": "TestCasesClient", + "fullName": "google.cloud.dialogflow.cx.v3.TestCasesClient" + }, + "method": { + "shortName": "ListTestCases", + "fullName": "google.cloud.dialogflow.cx.v3.TestCases.ListTestCases", + "service": { + "shortName": "TestCases", + "fullName": "google.cloud.dialogflow.cx.v3.TestCases" + } + } + } + }, + { + "regionTag": "dialogflow_v3_generated_TestCases_BatchDeleteTestCases_async", + "title": "Agents batchDeleteTestCases Sample", + "origin": "API_DEFINITION", + "description": " Batch deletes test cases.", + "canonical": true, + "file": "test_cases.batch_delete_test_cases.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "BatchDeleteTestCases", + "fullName": "google.cloud.dialogflow.cx.v3.TestCases.BatchDeleteTestCases", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "names", + "type": "TYPE_STRING[]" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "TestCasesClient", + "fullName": "google.cloud.dialogflow.cx.v3.TestCasesClient" + }, + "method": { + "shortName": "BatchDeleteTestCases", + "fullName": "google.cloud.dialogflow.cx.v3.TestCases.BatchDeleteTestCases", + "service": { + "shortName": "TestCases", + "fullName": "google.cloud.dialogflow.cx.v3.TestCases" + } + } + } + }, + { + "regionTag": "dialogflow_v3_generated_TestCases_GetTestCase_async", + "title": "Agents getTestCase Sample", + "origin": "API_DEFINITION", + "description": " Gets a test case.", + "canonical": true, + "file": "test_cases.get_test_case.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetTestCase", + "fullName": "google.cloud.dialogflow.cx.v3.TestCases.GetTestCase", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dialogflow.cx.v3.TestCase", + "client": { + "shortName": "TestCasesClient", + "fullName": "google.cloud.dialogflow.cx.v3.TestCasesClient" + }, + "method": { + "shortName": "GetTestCase", + "fullName": "google.cloud.dialogflow.cx.v3.TestCases.GetTestCase", + "service": { + "shortName": "TestCases", + "fullName": "google.cloud.dialogflow.cx.v3.TestCases" + } + } + } + }, + { + "regionTag": "dialogflow_v3_generated_TestCases_CreateTestCase_async", + "title": "Agents createTestCase Sample", + "origin": "API_DEFINITION", + "description": " Creates a test case for the given agent.", + "canonical": true, + "file": "test_cases.create_test_case.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateTestCase", + "fullName": "google.cloud.dialogflow.cx.v3.TestCases.CreateTestCase", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "test_case", + "type": ".google.cloud.dialogflow.cx.v3.TestCase" + } + ], + "resultType": ".google.cloud.dialogflow.cx.v3.TestCase", + "client": { + "shortName": "TestCasesClient", + "fullName": "google.cloud.dialogflow.cx.v3.TestCasesClient" + }, + "method": { + "shortName": "CreateTestCase", + "fullName": "google.cloud.dialogflow.cx.v3.TestCases.CreateTestCase", + "service": { + "shortName": "TestCases", + "fullName": "google.cloud.dialogflow.cx.v3.TestCases" + } + } + } + }, + { + "regionTag": "dialogflow_v3_generated_TestCases_UpdateTestCase_async", + "title": "Agents updateTestCase Sample", + "origin": "API_DEFINITION", + "description": " Updates the specified test case.", + "canonical": true, + "file": "test_cases.update_test_case.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 61, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateTestCase", + "fullName": "google.cloud.dialogflow.cx.v3.TestCases.UpdateTestCase", + "async": true, + "parameters": [ + { + "name": "test_case", + "type": ".google.cloud.dialogflow.cx.v3.TestCase" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.cloud.dialogflow.cx.v3.TestCase", + "client": { + "shortName": "TestCasesClient", + "fullName": "google.cloud.dialogflow.cx.v3.TestCasesClient" + }, + "method": { + "shortName": "UpdateTestCase", + "fullName": "google.cloud.dialogflow.cx.v3.TestCases.UpdateTestCase", + "service": { + "shortName": "TestCases", + "fullName": "google.cloud.dialogflow.cx.v3.TestCases" + } + } + } + }, + { + "regionTag": "dialogflow_v3_generated_TestCases_RunTestCase_async", + "title": "Agents runTestCase Sample", + "origin": "API_DEFINITION", + "description": " Kicks off a test case run. This method is a [long-running operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). The returned `Operation` type has the following method-specific fields: - `metadata`: [RunTestCaseMetadata][google.cloud.dialogflow.cx.v3.RunTestCaseMetadata] - `response`: [RunTestCaseResponse][google.cloud.dialogflow.cx.v3.RunTestCaseResponse]", + "canonical": true, + "file": "test_cases.run_test_case.js", "language": "JAVASCRIPT", "segments": [ { @@ -3691,108 +4775,244 @@ } ], "clientMethod": { - "shortName": "FulfillIntent", - "fullName": "google.cloud.dialogflow.cx.v3.Sessions.FulfillIntent", + "shortName": "RunTestCase", + "fullName": "google.cloud.dialogflow.cx.v3.TestCases.RunTestCase", "async": true, "parameters": [ { - "name": "match_intent_request", - "type": ".google.cloud.dialogflow.cx.v3.MatchIntentRequest" + "name": "name", + "type": "TYPE_STRING" }, { - "name": "match", - "type": ".google.cloud.dialogflow.cx.v3.Match" + "name": "environment", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "TestCasesClient", + "fullName": "google.cloud.dialogflow.cx.v3.TestCasesClient" + }, + "method": { + "shortName": "RunTestCase", + "fullName": "google.cloud.dialogflow.cx.v3.TestCases.RunTestCase", + "service": { + "shortName": "TestCases", + "fullName": "google.cloud.dialogflow.cx.v3.TestCases" + } + } + } + }, + { + "regionTag": "dialogflow_v3_generated_TestCases_BatchRunTestCases_async", + "title": "Agents batchRunTestCases Sample", + "origin": "API_DEFINITION", + "description": " Kicks off a batch run of test cases. This method is a [long-running operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). The returned `Operation` type has the following method-specific fields: - `metadata`: [BatchRunTestCasesMetadata][google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata] - `response`: [BatchRunTestCasesResponse][google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse]", + "canonical": true, + "file": "test_cases.batch_run_test_cases.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 66, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "BatchRunTestCases", + "fullName": "google.cloud.dialogflow.cx.v3.TestCases.BatchRunTestCases", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" }, { - "name": "output_audio_config", - "type": ".google.cloud.dialogflow.cx.v3.OutputAudioConfig" + "name": "environment", + "type": "TYPE_STRING" + }, + { + "name": "test_cases", + "type": "TYPE_STRING[]" } ], - "resultType": ".google.cloud.dialogflow.cx.v3.FulfillIntentResponse", + "resultType": ".google.longrunning.Operation", "client": { - "shortName": "SessionsClient", - "fullName": "google.cloud.dialogflow.cx.v3.SessionsClient" + "shortName": "TestCasesClient", + "fullName": "google.cloud.dialogflow.cx.v3.TestCasesClient" }, "method": { - "shortName": "FulfillIntent", - "fullName": "google.cloud.dialogflow.cx.v3.Sessions.FulfillIntent", + "shortName": "BatchRunTestCases", + "fullName": "google.cloud.dialogflow.cx.v3.TestCases.BatchRunTestCases", "service": { - "shortName": "Sessions", - "fullName": "google.cloud.dialogflow.cx.v3.Sessions" + "shortName": "TestCases", + "fullName": "google.cloud.dialogflow.cx.v3.TestCases" } } } }, { - "regionTag": "dialogflow_v3_generated_Sessions_SubmitAnswerFeedback_async", - "title": "Agents submitAnswerFeedback Sample", + "regionTag": "dialogflow_v3_generated_TestCases_CalculateCoverage_async", + "title": "Agents calculateCoverage Sample", "origin": "API_DEFINITION", - "description": " Updates the feedback received from the user for a single turn of the bot response.", + "description": " Calculates the test coverage for an agent.", "canonical": true, - "file": "sessions.submit_answer_feedback.js", + "file": "test_cases.calculate_coverage.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 69, + "end": 59, "type": "FULL" } ], "clientMethod": { - "shortName": "SubmitAnswerFeedback", - "fullName": "google.cloud.dialogflow.cx.v3.Sessions.SubmitAnswerFeedback", + "shortName": "CalculateCoverage", + "fullName": "google.cloud.dialogflow.cx.v3.TestCases.CalculateCoverage", "async": true, "parameters": [ { - "name": "session", + "name": "agent", "type": "TYPE_STRING" }, { - "name": "response_id", + "name": "type", + "type": ".google.cloud.dialogflow.cx.v3.CalculateCoverageRequest.CoverageType" + } + ], + "resultType": ".google.cloud.dialogflow.cx.v3.CalculateCoverageResponse", + "client": { + "shortName": "TestCasesClient", + "fullName": "google.cloud.dialogflow.cx.v3.TestCasesClient" + }, + "method": { + "shortName": "CalculateCoverage", + "fullName": "google.cloud.dialogflow.cx.v3.TestCases.CalculateCoverage", + "service": { + "shortName": "TestCases", + "fullName": "google.cloud.dialogflow.cx.v3.TestCases" + } + } + } + }, + { + "regionTag": "dialogflow_v3_generated_TestCases_ImportTestCases_async", + "title": "Agents importTestCases Sample", + "origin": "API_DEFINITION", + "description": " Imports the test cases from a Cloud Storage bucket or a local file. It always creates new test cases and won't overwrite any existing ones. The provided ID in the imported test case is neglected. This method is a [long-running operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). The returned `Operation` type has the following method-specific fields: - `metadata`: [ImportTestCasesMetadata][google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata] - `response`: [ImportTestCasesResponse][google.cloud.dialogflow.cx.v3.ImportTestCasesResponse]", + "canonical": true, + "file": "test_cases.import_test_cases.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 70, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ImportTestCases", + "fullName": "google.cloud.dialogflow.cx.v3.TestCases.ImportTestCases", + "async": true, + "parameters": [ + { + "name": "parent", "type": "TYPE_STRING" }, { - "name": "answer_feedback", - "type": ".google.cloud.dialogflow.cx.v3.AnswerFeedback" + "name": "gcs_uri", + "type": "TYPE_STRING" }, { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" + "name": "content", + "type": "TYPE_BYTES" } ], - "resultType": ".google.cloud.dialogflow.cx.v3.AnswerFeedback", + "resultType": ".google.longrunning.Operation", "client": { - "shortName": "SessionsClient", - "fullName": "google.cloud.dialogflow.cx.v3.SessionsClient" + "shortName": "TestCasesClient", + "fullName": "google.cloud.dialogflow.cx.v3.TestCasesClient" }, "method": { - "shortName": "SubmitAnswerFeedback", - "fullName": "google.cloud.dialogflow.cx.v3.Sessions.SubmitAnswerFeedback", + "shortName": "ImportTestCases", + "fullName": "google.cloud.dialogflow.cx.v3.TestCases.ImportTestCases", "service": { - "shortName": "Sessions", - "fullName": "google.cloud.dialogflow.cx.v3.Sessions" + "shortName": "TestCases", + "fullName": "google.cloud.dialogflow.cx.v3.TestCases" } } } }, { - "regionTag": "dialogflow_v3_generated_TestCases_ListTestCases_async", - "title": "Agents listTestCases Sample", + "regionTag": "dialogflow_v3_generated_TestCases_ExportTestCases_async", + "title": "Agents exportTestCases Sample", "origin": "API_DEFINITION", - "description": " Fetches a list of test cases for a given agent.", + "description": " Exports the test cases under the agent to a Cloud Storage bucket or a local file. Filter can be applied to export a subset of test cases. This method is a [long-running operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). The returned `Operation` type has the following method-specific fields: - `metadata`: [ExportTestCasesMetadata][google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata] - `response`: [ExportTestCasesResponse][google.cloud.dialogflow.cx.v3.ExportTestCasesResponse]", "canonical": true, - "file": "test_cases.list_test_cases.js", + "file": "test_cases.export_test_cases.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 70, + "end": 82, "type": "FULL" } ], "clientMethod": { - "shortName": "ListTestCases", - "fullName": "google.cloud.dialogflow.cx.v3.TestCases.ListTestCases", + "shortName": "ExportTestCases", + "fullName": "google.cloud.dialogflow.cx.v3.TestCases.ExportTestCases", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "gcs_uri", + "type": "TYPE_STRING" + }, + { + "name": "data_format", + "type": ".google.cloud.dialogflow.cx.v3.ExportTestCasesRequest.DataFormat" + }, + { + "name": "filter", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "TestCasesClient", + "fullName": "google.cloud.dialogflow.cx.v3.TestCasesClient" + }, + "method": { + "shortName": "ExportTestCases", + "fullName": "google.cloud.dialogflow.cx.v3.TestCases.ExportTestCases", + "service": { + "shortName": "TestCases", + "fullName": "google.cloud.dialogflow.cx.v3.TestCases" + } + } + } + }, + { + "regionTag": "dialogflow_v3_generated_TestCases_ListTestCaseResults_async", + "title": "Agents listTestCaseResults Sample", + "origin": "API_DEFINITION", + "description": " Fetches the list of run results for the given test case. A maximum of 100 results are kept for each test case.", + "canonical": true, + "file": "test_cases.list_test_case_results.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 90, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListTestCaseResults", + "fullName": "google.cloud.dialogflow.cx.v3.TestCases.ListTestCaseResults", "async": true, "parameters": [ { @@ -3808,18 +5028,18 @@ "type": "TYPE_STRING" }, { - "name": "view", - "type": ".google.cloud.dialogflow.cx.v3.ListTestCasesRequest.TestCaseView" + "name": "filter", + "type": "TYPE_STRING" } ], - "resultType": ".google.cloud.dialogflow.cx.v3.ListTestCasesResponse", + "resultType": ".google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse", "client": { "shortName": "TestCasesClient", "fullName": "google.cloud.dialogflow.cx.v3.TestCasesClient" }, "method": { - "shortName": "ListTestCases", - "fullName": "google.cloud.dialogflow.cx.v3.TestCases.ListTestCases", + "shortName": "ListTestCaseResults", + "fullName": "google.cloud.dialogflow.cx.v3.TestCases.ListTestCaseResults", "service": { "shortName": "TestCases", "fullName": "google.cloud.dialogflow.cx.v3.TestCases" @@ -3828,42 +5048,38 @@ } }, { - "regionTag": "dialogflow_v3_generated_TestCases_BatchDeleteTestCases_async", - "title": "Agents batchDeleteTestCases Sample", + "regionTag": "dialogflow_v3_generated_TestCases_GetTestCaseResult_async", + "title": "Agents getTestCaseResult Sample", "origin": "API_DEFINITION", - "description": " Batch deletes test cases.", + "description": " Gets a test case result.", "canonical": true, - "file": "test_cases.batch_delete_test_cases.js", + "file": "test_cases.get_test_case_result.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 60, + "end": 55, "type": "FULL" } ], "clientMethod": { - "shortName": "BatchDeleteTestCases", - "fullName": "google.cloud.dialogflow.cx.v3.TestCases.BatchDeleteTestCases", + "shortName": "GetTestCaseResult", + "fullName": "google.cloud.dialogflow.cx.v3.TestCases.GetTestCaseResult", "async": true, "parameters": [ { - "name": "parent", + "name": "name", "type": "TYPE_STRING" - }, - { - "name": "names", - "type": "TYPE_STRING[]" } ], - "resultType": ".google.protobuf.Empty", + "resultType": ".google.cloud.dialogflow.cx.v3.TestCaseResult", "client": { "shortName": "TestCasesClient", "fullName": "google.cloud.dialogflow.cx.v3.TestCasesClient" }, "method": { - "shortName": "BatchDeleteTestCases", - "fullName": "google.cloud.dialogflow.cx.v3.TestCases.BatchDeleteTestCases", + "shortName": "GetTestCaseResult", + "fullName": "google.cloud.dialogflow.cx.v3.TestCases.GetTestCaseResult", "service": { "shortName": "TestCases", "fullName": "google.cloud.dialogflow.cx.v3.TestCases" @@ -3872,63 +5088,67 @@ } }, { - "regionTag": "dialogflow_v3_generated_TestCases_GetTestCase_async", - "title": "Agents getTestCase Sample", + "regionTag": "dialogflow_v3_generated_Tools_CreateTool_async", + "title": "Agents createTool Sample", "origin": "API_DEFINITION", - "description": " Gets a test case.", + "description": " Creates a [Tool][google.cloud.dialogflow.cx.v3.Tool] in the specified agent.", "canonical": true, - "file": "test_cases.get_test_case.js", + "file": "tools.create_tool.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 55, + "end": 59, "type": "FULL" } ], "clientMethod": { - "shortName": "GetTestCase", - "fullName": "google.cloud.dialogflow.cx.v3.TestCases.GetTestCase", + "shortName": "CreateTool", + "fullName": "google.cloud.dialogflow.cx.v3.Tools.CreateTool", "async": true, "parameters": [ { - "name": "name", + "name": "parent", "type": "TYPE_STRING" + }, + { + "name": "tool", + "type": ".google.cloud.dialogflow.cx.v3.Tool" } ], - "resultType": ".google.cloud.dialogflow.cx.v3.TestCase", + "resultType": ".google.cloud.dialogflow.cx.v3.Tool", "client": { - "shortName": "TestCasesClient", - "fullName": "google.cloud.dialogflow.cx.v3.TestCasesClient" + "shortName": "ToolsClient", + "fullName": "google.cloud.dialogflow.cx.v3.ToolsClient" }, "method": { - "shortName": "GetTestCase", - "fullName": "google.cloud.dialogflow.cx.v3.TestCases.GetTestCase", + "shortName": "CreateTool", + "fullName": "google.cloud.dialogflow.cx.v3.Tools.CreateTool", "service": { - "shortName": "TestCases", - "fullName": "google.cloud.dialogflow.cx.v3.TestCases" + "shortName": "Tools", + "fullName": "google.cloud.dialogflow.cx.v3.Tools" } } } }, { - "regionTag": "dialogflow_v3_generated_TestCases_CreateTestCase_async", - "title": "Agents createTestCase Sample", + "regionTag": "dialogflow_v3_generated_Tools_ListTools_async", + "title": "Agents listTools Sample", "origin": "API_DEFINITION", - "description": " Creates a test case for the given agent.", + "description": " Returns a list of [Tools][google.cloud.dialogflow.cx.v3.Tool] in the specified agent.", "canonical": true, - "file": "test_cases.create_test_case.js", + "file": "tools.list_tools.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 59, + "end": 65, "type": "FULL" } ], "clientMethod": { - "shortName": "CreateTestCase", - "fullName": "google.cloud.dialogflow.cx.v3.TestCases.CreateTestCase", + "shortName": "ListTools", + "fullName": "google.cloud.dialogflow.cx.v3.Tools.ListTools", "async": true, "parameters": [ { @@ -3936,223 +5156,223 @@ "type": "TYPE_STRING" }, { - "name": "test_case", - "type": ".google.cloud.dialogflow.cx.v3.TestCase" + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" } ], - "resultType": ".google.cloud.dialogflow.cx.v3.TestCase", + "resultType": ".google.cloud.dialogflow.cx.v3.ListToolsResponse", "client": { - "shortName": "TestCasesClient", - "fullName": "google.cloud.dialogflow.cx.v3.TestCasesClient" + "shortName": "ToolsClient", + "fullName": "google.cloud.dialogflow.cx.v3.ToolsClient" }, "method": { - "shortName": "CreateTestCase", - "fullName": "google.cloud.dialogflow.cx.v3.TestCases.CreateTestCase", + "shortName": "ListTools", + "fullName": "google.cloud.dialogflow.cx.v3.Tools.ListTools", "service": { - "shortName": "TestCases", - "fullName": "google.cloud.dialogflow.cx.v3.TestCases" + "shortName": "Tools", + "fullName": "google.cloud.dialogflow.cx.v3.Tools" } } } }, { - "regionTag": "dialogflow_v3_generated_TestCases_UpdateTestCase_async", - "title": "Agents updateTestCase Sample", + "regionTag": "dialogflow_v3_generated_Tools_GetTool_async", + "title": "Agents getTool Sample", "origin": "API_DEFINITION", - "description": " Updates the specified test case.", + "description": " Retrieves the specified [Tool][google.cloud.dialogflow.cx.v3.Tool].", "canonical": true, - "file": "test_cases.update_test_case.js", + "file": "tools.get_tool.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 61, + "end": 55, "type": "FULL" } ], "clientMethod": { - "shortName": "UpdateTestCase", - "fullName": "google.cloud.dialogflow.cx.v3.TestCases.UpdateTestCase", + "shortName": "GetTool", + "fullName": "google.cloud.dialogflow.cx.v3.Tools.GetTool", "async": true, "parameters": [ { - "name": "test_case", - "type": ".google.cloud.dialogflow.cx.v3.TestCase" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" + "name": "name", + "type": "TYPE_STRING" } ], - "resultType": ".google.cloud.dialogflow.cx.v3.TestCase", + "resultType": ".google.cloud.dialogflow.cx.v3.Tool", "client": { - "shortName": "TestCasesClient", - "fullName": "google.cloud.dialogflow.cx.v3.TestCasesClient" + "shortName": "ToolsClient", + "fullName": "google.cloud.dialogflow.cx.v3.ToolsClient" }, "method": { - "shortName": "UpdateTestCase", - "fullName": "google.cloud.dialogflow.cx.v3.TestCases.UpdateTestCase", + "shortName": "GetTool", + "fullName": "google.cloud.dialogflow.cx.v3.Tools.GetTool", "service": { - "shortName": "TestCases", - "fullName": "google.cloud.dialogflow.cx.v3.TestCases" + "shortName": "Tools", + "fullName": "google.cloud.dialogflow.cx.v3.Tools" } } } }, { - "regionTag": "dialogflow_v3_generated_TestCases_RunTestCase_async", - "title": "Agents runTestCase Sample", + "regionTag": "dialogflow_v3_generated_Tools_UpdateTool_async", + "title": "Agents updateTool Sample", "origin": "API_DEFINITION", - "description": " Kicks off a test case run. This method is a [long-running operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). The returned `Operation` type has the following method-specific fields: - `metadata`: [RunTestCaseMetadata][google.cloud.dialogflow.cx.v3.RunTestCaseMetadata] - `response`: [RunTestCaseResponse][google.cloud.dialogflow.cx.v3.RunTestCaseResponse]", + "description": " Update the specified [Tool][google.cloud.dialogflow.cx.v3.Tool].", "canonical": true, - "file": "test_cases.run_test_case.js", + "file": "tools.update_tool.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 61, + "end": 58, "type": "FULL" } ], "clientMethod": { - "shortName": "RunTestCase", - "fullName": "google.cloud.dialogflow.cx.v3.TestCases.RunTestCase", + "shortName": "UpdateTool", + "fullName": "google.cloud.dialogflow.cx.v3.Tools.UpdateTool", "async": true, "parameters": [ { - "name": "name", - "type": "TYPE_STRING" + "name": "tool", + "type": ".google.cloud.dialogflow.cx.v3.Tool" }, { - "name": "environment", - "type": "TYPE_STRING" + "name": "update_mask", + "type": ".google.protobuf.FieldMask" } ], - "resultType": ".google.longrunning.Operation", + "resultType": ".google.cloud.dialogflow.cx.v3.Tool", "client": { - "shortName": "TestCasesClient", - "fullName": "google.cloud.dialogflow.cx.v3.TestCasesClient" + "shortName": "ToolsClient", + "fullName": "google.cloud.dialogflow.cx.v3.ToolsClient" }, "method": { - "shortName": "RunTestCase", - "fullName": "google.cloud.dialogflow.cx.v3.TestCases.RunTestCase", + "shortName": "UpdateTool", + "fullName": "google.cloud.dialogflow.cx.v3.Tools.UpdateTool", "service": { - "shortName": "TestCases", - "fullName": "google.cloud.dialogflow.cx.v3.TestCases" + "shortName": "Tools", + "fullName": "google.cloud.dialogflow.cx.v3.Tools" } } } }, { - "regionTag": "dialogflow_v3_generated_TestCases_BatchRunTestCases_async", - "title": "Agents batchRunTestCases Sample", + "regionTag": "dialogflow_v3_generated_Tools_DeleteTool_async", + "title": "Agents deleteTool Sample", "origin": "API_DEFINITION", - "description": " Kicks off a batch run of test cases. This method is a [long-running operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). The returned `Operation` type has the following method-specific fields: - `metadata`: [BatchRunTestCasesMetadata][google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata] - `response`: [BatchRunTestCasesResponse][google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse]", + "description": " Deletes a specified [Tool][google.cloud.dialogflow.cx.v3.Tool].", "canonical": true, - "file": "test_cases.batch_run_test_cases.js", + "file": "tools.delete_tool.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 66, + "end": 64, "type": "FULL" } ], "clientMethod": { - "shortName": "BatchRunTestCases", - "fullName": "google.cloud.dialogflow.cx.v3.TestCases.BatchRunTestCases", + "shortName": "DeleteTool", + "fullName": "google.cloud.dialogflow.cx.v3.Tools.DeleteTool", "async": true, "parameters": [ { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "environment", + "name": "name", "type": "TYPE_STRING" }, { - "name": "test_cases", - "type": "TYPE_STRING[]" + "name": "force", + "type": "TYPE_BOOL" } ], - "resultType": ".google.longrunning.Operation", + "resultType": ".google.protobuf.Empty", "client": { - "shortName": "TestCasesClient", - "fullName": "google.cloud.dialogflow.cx.v3.TestCasesClient" + "shortName": "ToolsClient", + "fullName": "google.cloud.dialogflow.cx.v3.ToolsClient" }, "method": { - "shortName": "BatchRunTestCases", - "fullName": "google.cloud.dialogflow.cx.v3.TestCases.BatchRunTestCases", + "shortName": "DeleteTool", + "fullName": "google.cloud.dialogflow.cx.v3.Tools.DeleteTool", "service": { - "shortName": "TestCases", - "fullName": "google.cloud.dialogflow.cx.v3.TestCases" + "shortName": "Tools", + "fullName": "google.cloud.dialogflow.cx.v3.Tools" } } } }, { - "regionTag": "dialogflow_v3_generated_TestCases_CalculateCoverage_async", - "title": "Agents calculateCoverage Sample", + "regionTag": "dialogflow_v3_generated_Tools_ListToolVersions_async", + "title": "Agents listToolVersions Sample", "origin": "API_DEFINITION", - "description": " Calculates the test coverage for an agent.", + "description": " List versions of the specified [Tool][google.cloud.dialogflow.cx.v3.Tool].", "canonical": true, - "file": "test_cases.calculate_coverage.js", + "file": "tools.list_tool_versions.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 59, + "end": 66, "type": "FULL" } ], "clientMethod": { - "shortName": "CalculateCoverage", - "fullName": "google.cloud.dialogflow.cx.v3.TestCases.CalculateCoverage", + "shortName": "ListToolVersions", + "fullName": "google.cloud.dialogflow.cx.v3.Tools.ListToolVersions", "async": true, "parameters": [ { - "name": "agent", + "name": "parent", "type": "TYPE_STRING" }, { - "name": "type", - "type": ".google.cloud.dialogflow.cx.v3.CalculateCoverageRequest.CoverageType" + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" } ], - "resultType": ".google.cloud.dialogflow.cx.v3.CalculateCoverageResponse", + "resultType": ".google.cloud.dialogflow.cx.v3.ListToolVersionsResponse", "client": { - "shortName": "TestCasesClient", - "fullName": "google.cloud.dialogflow.cx.v3.TestCasesClient" + "shortName": "ToolsClient", + "fullName": "google.cloud.dialogflow.cx.v3.ToolsClient" }, "method": { - "shortName": "CalculateCoverage", - "fullName": "google.cloud.dialogflow.cx.v3.TestCases.CalculateCoverage", + "shortName": "ListToolVersions", + "fullName": "google.cloud.dialogflow.cx.v3.Tools.ListToolVersions", "service": { - "shortName": "TestCases", - "fullName": "google.cloud.dialogflow.cx.v3.TestCases" + "shortName": "Tools", + "fullName": "google.cloud.dialogflow.cx.v3.Tools" } } } }, { - "regionTag": "dialogflow_v3_generated_TestCases_ImportTestCases_async", - "title": "Agents importTestCases Sample", + "regionTag": "dialogflow_v3_generated_Tools_CreateToolVersion_async", + "title": "Agents createToolVersion Sample", "origin": "API_DEFINITION", - "description": " Imports the test cases from a Cloud Storage bucket or a local file. It always creates new test cases and won't overwrite any existing ones. The provided ID in the imported test case is neglected. This method is a [long-running operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). The returned `Operation` type has the following method-specific fields: - `metadata`: [ImportTestCasesMetadata][google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata] - `response`: [ImportTestCasesResponse][google.cloud.dialogflow.cx.v3.ImportTestCasesResponse]", + "description": " Creates a version for the specified [Tool][google.cloud.dialogflow.cx.v3.Tool].", "canonical": true, - "file": "test_cases.import_test_cases.js", + "file": "tools.create_tool_version.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 70, + "end": 60, "type": "FULL" } ], "clientMethod": { - "shortName": "ImportTestCases", - "fullName": "google.cloud.dialogflow.cx.v3.TestCases.ImportTestCases", + "shortName": "CreateToolVersion", + "fullName": "google.cloud.dialogflow.cx.v3.Tools.CreateToolVersion", "async": true, "parameters": [ { @@ -4160,140 +5380,116 @@ "type": "TYPE_STRING" }, { - "name": "gcs_uri", - "type": "TYPE_STRING" - }, - { - "name": "content", - "type": "TYPE_BYTES" + "name": "tool_version", + "type": ".google.cloud.dialogflow.cx.v3.ToolVersion" } ], - "resultType": ".google.longrunning.Operation", + "resultType": ".google.cloud.dialogflow.cx.v3.ToolVersion", "client": { - "shortName": "TestCasesClient", - "fullName": "google.cloud.dialogflow.cx.v3.TestCasesClient" + "shortName": "ToolsClient", + "fullName": "google.cloud.dialogflow.cx.v3.ToolsClient" }, "method": { - "shortName": "ImportTestCases", - "fullName": "google.cloud.dialogflow.cx.v3.TestCases.ImportTestCases", + "shortName": "CreateToolVersion", + "fullName": "google.cloud.dialogflow.cx.v3.Tools.CreateToolVersion", "service": { - "shortName": "TestCases", - "fullName": "google.cloud.dialogflow.cx.v3.TestCases" + "shortName": "Tools", + "fullName": "google.cloud.dialogflow.cx.v3.Tools" } } } }, { - "regionTag": "dialogflow_v3_generated_TestCases_ExportTestCases_async", - "title": "Agents exportTestCases Sample", + "regionTag": "dialogflow_v3_generated_Tools_GetToolVersion_async", + "title": "Agents getToolVersion Sample", "origin": "API_DEFINITION", - "description": " Exports the test cases under the agent to a Cloud Storage bucket or a local file. Filter can be applied to export a subset of test cases. This method is a [long-running operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). The returned `Operation` type has the following method-specific fields: - `metadata`: [ExportTestCasesMetadata][google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata] - `response`: [ExportTestCasesResponse][google.cloud.dialogflow.cx.v3.ExportTestCasesResponse]", + "description": " Retrieves the specified version of the [Tool][google.cloud.dialogflow.cx.v3.Tool].", "canonical": true, - "file": "test_cases.export_test_cases.js", + "file": "tools.get_tool_version.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 82, + "end": 55, "type": "FULL" } ], "clientMethod": { - "shortName": "ExportTestCases", - "fullName": "google.cloud.dialogflow.cx.v3.TestCases.ExportTestCases", + "shortName": "GetToolVersion", + "fullName": "google.cloud.dialogflow.cx.v3.Tools.GetToolVersion", "async": true, "parameters": [ { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "gcs_uri", - "type": "TYPE_STRING" - }, - { - "name": "data_format", - "type": ".google.cloud.dialogflow.cx.v3.ExportTestCasesRequest.DataFormat" - }, - { - "name": "filter", + "name": "name", "type": "TYPE_STRING" } ], - "resultType": ".google.longrunning.Operation", + "resultType": ".google.cloud.dialogflow.cx.v3.ToolVersion", "client": { - "shortName": "TestCasesClient", - "fullName": "google.cloud.dialogflow.cx.v3.TestCasesClient" + "shortName": "ToolsClient", + "fullName": "google.cloud.dialogflow.cx.v3.ToolsClient" }, "method": { - "shortName": "ExportTestCases", - "fullName": "google.cloud.dialogflow.cx.v3.TestCases.ExportTestCases", + "shortName": "GetToolVersion", + "fullName": "google.cloud.dialogflow.cx.v3.Tools.GetToolVersion", "service": { - "shortName": "TestCases", - "fullName": "google.cloud.dialogflow.cx.v3.TestCases" + "shortName": "Tools", + "fullName": "google.cloud.dialogflow.cx.v3.Tools" } } } }, { - "regionTag": "dialogflow_v3_generated_TestCases_ListTestCaseResults_async", - "title": "Agents listTestCaseResults Sample", + "regionTag": "dialogflow_v3_generated_Tools_DeleteToolVersion_async", + "title": "Agents deleteToolVersion Sample", "origin": "API_DEFINITION", - "description": " Fetches the list of run results for the given test case. A maximum of 100 results are kept for each test case.", + "description": " Deletes the specified version of the [Tool][google.cloud.dialogflow.cx.v3.Tool].", "canonical": true, - "file": "test_cases.list_test_case_results.js", + "file": "tools.delete_tool_version.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 90, + "end": 64, "type": "FULL" } ], "clientMethod": { - "shortName": "ListTestCaseResults", - "fullName": "google.cloud.dialogflow.cx.v3.TestCases.ListTestCaseResults", + "shortName": "DeleteToolVersion", + "fullName": "google.cloud.dialogflow.cx.v3.Tools.DeleteToolVersion", "async": true, "parameters": [ { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", + "name": "name", "type": "TYPE_STRING" }, { - "name": "filter", - "type": "TYPE_STRING" + "name": "force", + "type": "TYPE_BOOL" } ], - "resultType": ".google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse", + "resultType": ".google.protobuf.Empty", "client": { - "shortName": "TestCasesClient", - "fullName": "google.cloud.dialogflow.cx.v3.TestCasesClient" + "shortName": "ToolsClient", + "fullName": "google.cloud.dialogflow.cx.v3.ToolsClient" }, "method": { - "shortName": "ListTestCaseResults", - "fullName": "google.cloud.dialogflow.cx.v3.TestCases.ListTestCaseResults", + "shortName": "DeleteToolVersion", + "fullName": "google.cloud.dialogflow.cx.v3.Tools.DeleteToolVersion", "service": { - "shortName": "TestCases", - "fullName": "google.cloud.dialogflow.cx.v3.TestCases" + "shortName": "Tools", + "fullName": "google.cloud.dialogflow.cx.v3.Tools" } } } }, { - "regionTag": "dialogflow_v3_generated_TestCases_GetTestCaseResult_async", - "title": "Agents getTestCaseResult Sample", + "regionTag": "dialogflow_v3_generated_Tools_RestoreToolVersion_async", + "title": "Agents restoreToolVersion Sample", "origin": "API_DEFINITION", - "description": " Gets a test case result.", + "description": " Retrieves the specified version of the Tool and stores it as the current tool draft, returning the tool with resources updated.", "canonical": true, - "file": "test_cases.get_test_case_result.js", + "file": "tools.restore_tool_version.js", "language": "JAVASCRIPT", "segments": [ { @@ -4303,8 +5499,8 @@ } ], "clientMethod": { - "shortName": "GetTestCaseResult", - "fullName": "google.cloud.dialogflow.cx.v3.TestCases.GetTestCaseResult", + "shortName": "RestoreToolVersion", + "fullName": "google.cloud.dialogflow.cx.v3.Tools.RestoreToolVersion", "async": true, "parameters": [ { @@ -4312,17 +5508,17 @@ "type": "TYPE_STRING" } ], - "resultType": ".google.cloud.dialogflow.cx.v3.TestCaseResult", + "resultType": ".google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse", "client": { - "shortName": "TestCasesClient", - "fullName": "google.cloud.dialogflow.cx.v3.TestCasesClient" + "shortName": "ToolsClient", + "fullName": "google.cloud.dialogflow.cx.v3.ToolsClient" }, "method": { - "shortName": "GetTestCaseResult", - "fullName": "google.cloud.dialogflow.cx.v3.TestCases.GetTestCaseResult", + "shortName": "RestoreToolVersion", + "fullName": "google.cloud.dialogflow.cx.v3.Tools.RestoreToolVersion", "service": { - "shortName": "TestCases", - "fullName": "google.cloud.dialogflow.cx.v3.TestCases" + "shortName": "Tools", + "fullName": "google.cloud.dialogflow.cx.v3.Tools" } } } diff --git a/packages/google-cloud-dialogflow-cx/samples/generated/v3/tools.create_tool.js b/packages/google-cloud-dialogflow-cx/samples/generated/v3/tools.create_tool.js new file mode 100644 index 00000000000..44c479beb36 --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/samples/generated/v3/tools.create_tool.js @@ -0,0 +1,67 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, tool) { + // [START dialogflow_v3_generated_Tools_CreateTool_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The agent to create a Tool for. + * Format: `projects//locations//agents/`. + */ + // const parent = 'abc123' + /** + * Required. The Tool to be created. + */ + // const tool = {} + + // Imports the Cx library + const {ToolsClient} = require('@google-cloud/dialogflow-cx').v3; + + // Instantiates a client + const cxClient = new ToolsClient(); + + async function callCreateTool() { + // Construct request + const request = { + parent, + tool, + }; + + // Run request + const response = await cxClient.createTool(request); + console.log(response); + } + + callCreateTool(); + // [END dialogflow_v3_generated_Tools_CreateTool_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dialogflow-cx/samples/generated/v3/tools.create_tool_version.js b/packages/google-cloud-dialogflow-cx/samples/generated/v3/tools.create_tool_version.js new file mode 100644 index 00000000000..d94d67dc07a --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/samples/generated/v3/tools.create_tool_version.js @@ -0,0 +1,68 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, toolVersion) { + // [START dialogflow_v3_generated_Tools_CreateToolVersion_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The tool to create a version for. + * Format: + * `projects//locations//agents//tools/`. + */ + // const parent = 'abc123' + /** + * Required. The tool version to create. + */ + // const toolVersion = {} + + // Imports the Cx library + const {ToolsClient} = require('@google-cloud/dialogflow-cx').v3; + + // Instantiates a client + const cxClient = new ToolsClient(); + + async function callCreateToolVersion() { + // Construct request + const request = { + parent, + toolVersion, + }; + + // Run request + const response = await cxClient.createToolVersion(request); + console.log(response); + } + + callCreateToolVersion(); + // [END dialogflow_v3_generated_Tools_CreateToolVersion_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dialogflow-cx/samples/generated/v3/tools.delete_tool.js b/packages/google-cloud-dialogflow-cx/samples/generated/v3/tools.delete_tool.js new file mode 100644 index 00000000000..04d1e40fd32 --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/samples/generated/v3/tools.delete_tool.js @@ -0,0 +1,72 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dialogflow_v3_generated_Tools_DeleteTool_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the Tool to be deleted. + * Format: + * `projects//locations//agents//tools/`. + */ + // const name = 'abc123' + /** + * This field has no effect for Tools not being used. + * For Tools that are used: + * * If `force` is set to false, an error will be returned with message + * indicating the referenced resources. + * * If `force` is set to true, Dialogflow will remove the tool, as well + * as any references to the tool. + */ + // const force = true + + // Imports the Cx library + const {ToolsClient} = require('@google-cloud/dialogflow-cx').v3; + + // Instantiates a client + const cxClient = new ToolsClient(); + + async function callDeleteTool() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await cxClient.deleteTool(request); + console.log(response); + } + + callDeleteTool(); + // [END dialogflow_v3_generated_Tools_DeleteTool_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dialogflow-cx/samples/generated/v3/tools.delete_tool_version.js b/packages/google-cloud-dialogflow-cx/samples/generated/v3/tools.delete_tool_version.js new file mode 100644 index 00000000000..4683218621e --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/samples/generated/v3/tools.delete_tool_version.js @@ -0,0 +1,72 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dialogflow_v3_generated_Tools_DeleteToolVersion_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the tool version to delete. + * Format: + * `projects//locations//agents//tools//versions/`. + */ + // const name = 'abc123' + /** + * Optional. This field has no effect for Tools not being used. + * For Tools that are used: + * * If `force` is set to false, an error will be returned with message + * indicating the referenced resources. + * * If `force` is set to true, Dialogflow will remove the tool, as well + * as any references to the tool. + */ + // const force = true + + // Imports the Cx library + const {ToolsClient} = require('@google-cloud/dialogflow-cx').v3; + + // Instantiates a client + const cxClient = new ToolsClient(); + + async function callDeleteToolVersion() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await cxClient.deleteToolVersion(request); + console.log(response); + } + + callDeleteToolVersion(); + // [END dialogflow_v3_generated_Tools_DeleteToolVersion_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dialogflow-cx/samples/generated/v3/tools.get_tool.js b/packages/google-cloud-dialogflow-cx/samples/generated/v3/tools.get_tool.js new file mode 100644 index 00000000000..21384a83657 --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/samples/generated/v3/tools.get_tool.js @@ -0,0 +1,63 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dialogflow_v3_generated_Tools_GetTool_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the Tool. + * Format: + * `projects//locations//agents//tools/`. + */ + // const name = 'abc123' + + // Imports the Cx library + const {ToolsClient} = require('@google-cloud/dialogflow-cx').v3; + + // Instantiates a client + const cxClient = new ToolsClient(); + + async function callGetTool() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await cxClient.getTool(request); + console.log(response); + } + + callGetTool(); + // [END dialogflow_v3_generated_Tools_GetTool_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dialogflow-cx/samples/generated/v3/tools.get_tool_version.js b/packages/google-cloud-dialogflow-cx/samples/generated/v3/tools.get_tool_version.js new file mode 100644 index 00000000000..da26466fd93 --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/samples/generated/v3/tools.get_tool_version.js @@ -0,0 +1,63 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dialogflow_v3_generated_Tools_GetToolVersion_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the tool version. + * Format: + * `projects//locations//agents//tools//versions/`. + */ + // const name = 'abc123' + + // Imports the Cx library + const {ToolsClient} = require('@google-cloud/dialogflow-cx').v3; + + // Instantiates a client + const cxClient = new ToolsClient(); + + async function callGetToolVersion() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await cxClient.getToolVersion(request); + console.log(response); + } + + callGetToolVersion(); + // [END dialogflow_v3_generated_Tools_GetToolVersion_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dialogflow-cx/samples/generated/v3/tools.list_tool_versions.js b/packages/google-cloud-dialogflow-cx/samples/generated/v3/tools.list_tool_versions.js new file mode 100644 index 00000000000..3a65be4a2c4 --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/samples/generated/v3/tools.list_tool_versions.js @@ -0,0 +1,74 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START dialogflow_v3_generated_Tools_ListToolVersions_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent of the tool versions. + * Format: + * `projects//locations//agents//tools/`. + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of items to return in a single page. By + * default 100 and at most 1000. + */ + // const pageSize = 1234 + /** + * Optional. The next_page_token value returned from a previous list request. + */ + // const pageToken = 'abc123' + + // Imports the Cx library + const {ToolsClient} = require('@google-cloud/dialogflow-cx').v3; + + // Instantiates a client + const cxClient = new ToolsClient(); + + async function callListToolVersions() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = cxClient.listToolVersionsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListToolVersions(); + // [END dialogflow_v3_generated_Tools_ListToolVersions_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dialogflow-cx/samples/generated/v3/tools.list_tools.js b/packages/google-cloud-dialogflow-cx/samples/generated/v3/tools.list_tools.js new file mode 100644 index 00000000000..179c6ae0e29 --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/samples/generated/v3/tools.list_tools.js @@ -0,0 +1,73 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START dialogflow_v3_generated_Tools_ListTools_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The agent to list the Tools from. + * Format: `projects//locations//agents/`. + */ + // const parent = 'abc123' + /** + * The maximum number of items to return in a single page. By default 100 and + * at most 1000. + */ + // const pageSize = 1234 + /** + * The next_page_token value returned from a previous list request. + */ + // const pageToken = 'abc123' + + // Imports the Cx library + const {ToolsClient} = require('@google-cloud/dialogflow-cx').v3; + + // Instantiates a client + const cxClient = new ToolsClient(); + + async function callListTools() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = cxClient.listToolsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListTools(); + // [END dialogflow_v3_generated_Tools_ListTools_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dialogflow-cx/samples/generated/v3/tools.restore_tool_version.js b/packages/google-cloud-dialogflow-cx/samples/generated/v3/tools.restore_tool_version.js new file mode 100644 index 00000000000..9a10e89e12b --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/samples/generated/v3/tools.restore_tool_version.js @@ -0,0 +1,63 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dialogflow_v3_generated_Tools_RestoreToolVersion_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the tool version. + * Format: + * `projects//locations//agents//tools//versions/`. + */ + // const name = 'abc123' + + // Imports the Cx library + const {ToolsClient} = require('@google-cloud/dialogflow-cx').v3; + + // Instantiates a client + const cxClient = new ToolsClient(); + + async function callRestoreToolVersion() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await cxClient.restoreToolVersion(request); + console.log(response); + } + + callRestoreToolVersion(); + // [END dialogflow_v3_generated_Tools_RestoreToolVersion_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dialogflow-cx/samples/generated/v3/tools.update_tool.js b/packages/google-cloud-dialogflow-cx/samples/generated/v3/tools.update_tool.js new file mode 100644 index 00000000000..117c579b42a --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/samples/generated/v3/tools.update_tool.js @@ -0,0 +1,66 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(tool) { + // [START dialogflow_v3_generated_Tools_UpdateTool_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The Tool to be updated. + */ + // const tool = {} + /** + * The mask to control which fields get updated. If the mask is not present, + * all fields will be updated. + */ + // const updateMask = {} + + // Imports the Cx library + const {ToolsClient} = require('@google-cloud/dialogflow-cx').v3; + + // Instantiates a client + const cxClient = new ToolsClient(); + + async function callUpdateTool() { + // Construct request + const request = { + tool, + }; + + // Run request + const response = await cxClient.updateTool(request); + console.log(response); + } + + callUpdateTool(); + // [END dialogflow_v3_generated_Tools_UpdateTool_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dialogflow-cx/src/index.ts b/packages/google-cloud-dialogflow-cx/src/index.ts index 351e758e670..e81389dcb40 100644 --- a/packages/google-cloud-dialogflow-cx/src/index.ts +++ b/packages/google-cloud-dialogflow-cx/src/index.ts @@ -29,6 +29,8 @@ const EntityTypesClient = v3.EntityTypesClient; type EntityTypesClient = v3.EntityTypesClient; const EnvironmentsClient = v3.EnvironmentsClient; type EnvironmentsClient = v3.EnvironmentsClient; +const ExamplesClient = v3.ExamplesClient; +type ExamplesClient = v3.ExamplesClient; const ExperimentsClient = v3.ExperimentsClient; type ExperimentsClient = v3.ExperimentsClient; const FlowsClient = v3.FlowsClient; @@ -39,6 +41,8 @@ const IntentsClient = v3.IntentsClient; type IntentsClient = v3.IntentsClient; const PagesClient = v3.PagesClient; type PagesClient = v3.PagesClient; +const PlaybooksClient = v3.PlaybooksClient; +type PlaybooksClient = v3.PlaybooksClient; const SecuritySettingsServiceClient = v3.SecuritySettingsServiceClient; type SecuritySettingsServiceClient = v3.SecuritySettingsServiceClient; const SessionEntityTypesClient = v3.SessionEntityTypesClient; @@ -47,6 +51,8 @@ const SessionsClient = v3.SessionsClient; type SessionsClient = v3.SessionsClient; const TestCasesClient = v3.TestCasesClient; type TestCasesClient = v3.TestCasesClient; +const ToolsClient = v3.ToolsClient; +type ToolsClient = v3.ToolsClient; const TransitionRouteGroupsClient = v3.TransitionRouteGroupsClient; type TransitionRouteGroupsClient = v3.TransitionRouteGroupsClient; const VersionsClient = v3.VersionsClient; @@ -54,7 +60,7 @@ type VersionsClient = v3.VersionsClient; const WebhooksClient = v3.WebhooksClient; type WebhooksClient = v3.WebhooksClient; -export {v3, v3beta1, AgentsClient, ChangelogsClient, DeploymentsClient, EntityTypesClient, EnvironmentsClient, ExperimentsClient, FlowsClient, GeneratorsClient, IntentsClient, PagesClient, SecuritySettingsServiceClient, SessionEntityTypesClient, SessionsClient, TestCasesClient, TransitionRouteGroupsClient, VersionsClient, WebhooksClient}; -export default {v3, v3beta1, AgentsClient, ChangelogsClient, DeploymentsClient, EntityTypesClient, EnvironmentsClient, ExperimentsClient, FlowsClient, GeneratorsClient, IntentsClient, PagesClient, SecuritySettingsServiceClient, SessionEntityTypesClient, SessionsClient, TestCasesClient, TransitionRouteGroupsClient, VersionsClient, WebhooksClient}; +export {v3, v3beta1, AgentsClient, ChangelogsClient, DeploymentsClient, EntityTypesClient, EnvironmentsClient, ExamplesClient, ExperimentsClient, FlowsClient, GeneratorsClient, IntentsClient, PagesClient, PlaybooksClient, SecuritySettingsServiceClient, SessionEntityTypesClient, SessionsClient, TestCasesClient, ToolsClient, TransitionRouteGroupsClient, VersionsClient, WebhooksClient}; +export default {v3, v3beta1, AgentsClient, ChangelogsClient, DeploymentsClient, EntityTypesClient, EnvironmentsClient, ExamplesClient, ExperimentsClient, FlowsClient, GeneratorsClient, IntentsClient, PagesClient, PlaybooksClient, SecuritySettingsServiceClient, SessionEntityTypesClient, SessionsClient, TestCasesClient, ToolsClient, TransitionRouteGroupsClient, VersionsClient, WebhooksClient}; import * as protos from '../protos/protos'; export {protos}; diff --git a/packages/google-cloud-dialogflow-cx/src/v3/agents_client.ts b/packages/google-cloud-dialogflow-cx/src/v3/agents_client.ts index 57967f43328..79155504459 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/agents_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3/agents_client.ts @@ -208,6 +208,9 @@ export class AgentsClient { environmentPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}' ), + examplePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}/examples/{example}' + ), experimentPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/experiments/{experiment}' ), @@ -229,6 +232,12 @@ export class AgentsClient { pagePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/pages/{page}' ), + playbookPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}' + ), + playbookVersionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}/versions/{version}' + ), projectPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}' ), @@ -253,6 +262,12 @@ export class AgentsClient { testCaseResultPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/testCases/{test_case}/results/{result}' ), + toolPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/tools/{tool}' + ), + toolVersionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/tools/{tool}/versions/{version}' + ), versionPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/versions/{version}' ), @@ -2503,6 +2518,81 @@ export class AgentsClient { return this.pathTemplates.environmentPathTemplate.match(environmentName).environment; } + /** + * Return a fully-qualified example resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} playbook + * @param {string} example + * @returns {string} Resource name string. + */ + examplePath(project:string,location:string,agent:string,playbook:string,example:string) { + return this.pathTemplates.examplePathTemplate.render({ + project: project, + location: location, + agent: agent, + playbook: playbook, + example: example, + }); + } + + /** + * Parse the project from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the project. + */ + matchProjectFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).project; + } + + /** + * Parse the location from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the location. + */ + matchLocationFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).location; + } + + /** + * Parse the agent from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).agent; + } + + /** + * Parse the playbook from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the playbook. + */ + matchPlaybookFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).playbook; + } + + /** + * Parse the example from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the example. + */ + matchExampleFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).example; + } + /** * Return a fully-qualified experiment resource name string. * @@ -2937,6 +3027,143 @@ export class AgentsClient { return this.pathTemplates.pagePathTemplate.match(pageName).page; } + /** + * Return a fully-qualified playbook resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} playbook + * @returns {string} Resource name string. + */ + playbookPath(project:string,location:string,agent:string,playbook:string) { + return this.pathTemplates.playbookPathTemplate.render({ + project: project, + location: location, + agent: agent, + playbook: playbook, + }); + } + + /** + * Parse the project from Playbook resource. + * + * @param {string} playbookName + * A fully-qualified path representing Playbook resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPlaybookName(playbookName: string) { + return this.pathTemplates.playbookPathTemplate.match(playbookName).project; + } + + /** + * Parse the location from Playbook resource. + * + * @param {string} playbookName + * A fully-qualified path representing Playbook resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPlaybookName(playbookName: string) { + return this.pathTemplates.playbookPathTemplate.match(playbookName).location; + } + + /** + * Parse the agent from Playbook resource. + * + * @param {string} playbookName + * A fully-qualified path representing Playbook resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromPlaybookName(playbookName: string) { + return this.pathTemplates.playbookPathTemplate.match(playbookName).agent; + } + + /** + * Parse the playbook from Playbook resource. + * + * @param {string} playbookName + * A fully-qualified path representing Playbook resource. + * @returns {string} A string representing the playbook. + */ + matchPlaybookFromPlaybookName(playbookName: string) { + return this.pathTemplates.playbookPathTemplate.match(playbookName).playbook; + } + + /** + * Return a fully-qualified playbookVersion resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} playbook + * @param {string} version + * @returns {string} Resource name string. + */ + playbookVersionPath(project:string,location:string,agent:string,playbook:string,version:string) { + return this.pathTemplates.playbookVersionPathTemplate.render({ + project: project, + location: location, + agent: agent, + playbook: playbook, + version: version, + }); + } + + /** + * Parse the project from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).project; + } + + /** + * Parse the location from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).location; + } + + /** + * Parse the agent from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).agent; + } + + /** + * Parse the playbook from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the playbook. + */ + matchPlaybookFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).playbook; + } + + /** + * Parse the version from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the version. + */ + matchVersionFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).version; + } + /** * Return a fully-qualified project resource name string. * @@ -3446,6 +3673,143 @@ export class AgentsClient { return this.pathTemplates.testCaseResultPathTemplate.match(testCaseResultName).result; } + /** + * Return a fully-qualified tool resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} tool + * @returns {string} Resource name string. + */ + toolPath(project:string,location:string,agent:string,tool:string) { + return this.pathTemplates.toolPathTemplate.render({ + project: project, + location: location, + agent: agent, + tool: tool, + }); + } + + /** + * Parse the project from Tool resource. + * + * @param {string} toolName + * A fully-qualified path representing Tool resource. + * @returns {string} A string representing the project. + */ + matchProjectFromToolName(toolName: string) { + return this.pathTemplates.toolPathTemplate.match(toolName).project; + } + + /** + * Parse the location from Tool resource. + * + * @param {string} toolName + * A fully-qualified path representing Tool resource. + * @returns {string} A string representing the location. + */ + matchLocationFromToolName(toolName: string) { + return this.pathTemplates.toolPathTemplate.match(toolName).location; + } + + /** + * Parse the agent from Tool resource. + * + * @param {string} toolName + * A fully-qualified path representing Tool resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromToolName(toolName: string) { + return this.pathTemplates.toolPathTemplate.match(toolName).agent; + } + + /** + * Parse the tool from Tool resource. + * + * @param {string} toolName + * A fully-qualified path representing Tool resource. + * @returns {string} A string representing the tool. + */ + matchToolFromToolName(toolName: string) { + return this.pathTemplates.toolPathTemplate.match(toolName).tool; + } + + /** + * Return a fully-qualified toolVersion resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} tool + * @param {string} version + * @returns {string} Resource name string. + */ + toolVersionPath(project:string,location:string,agent:string,tool:string,version:string) { + return this.pathTemplates.toolVersionPathTemplate.render({ + project: project, + location: location, + agent: agent, + tool: tool, + version: version, + }); + } + + /** + * Parse the project from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the project. + */ + matchProjectFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).project; + } + + /** + * Parse the location from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the location. + */ + matchLocationFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).location; + } + + /** + * Parse the agent from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).agent; + } + + /** + * Parse the tool from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the tool. + */ + matchToolFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).tool; + } + + /** + * Parse the version from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the version. + */ + matchVersionFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).version; + } + /** * Return a fully-qualified version resource name string. * diff --git a/packages/google-cloud-dialogflow-cx/src/v3/agents_proto_list.json b/packages/google-cloud-dialogflow-cx/src/v3/agents_proto_list.json index 81549ae03b3..081858680c0 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/agents_proto_list.json +++ b/packages/google-cloud-dialogflow-cx/src/v3/agents_proto_list.json @@ -3,10 +3,12 @@ "../../protos/google/cloud/dialogflow/cx/v3/agent.proto", "../../protos/google/cloud/dialogflow/cx/v3/audio_config.proto", "../../protos/google/cloud/dialogflow/cx/v3/changelog.proto", + "../../protos/google/cloud/dialogflow/cx/v3/code_block.proto", "../../protos/google/cloud/dialogflow/cx/v3/data_store_connection.proto", "../../protos/google/cloud/dialogflow/cx/v3/deployment.proto", "../../protos/google/cloud/dialogflow/cx/v3/entity_type.proto", "../../protos/google/cloud/dialogflow/cx/v3/environment.proto", + "../../protos/google/cloud/dialogflow/cx/v3/example.proto", "../../protos/google/cloud/dialogflow/cx/v3/experiment.proto", "../../protos/google/cloud/dialogflow/cx/v3/flow.proto", "../../protos/google/cloud/dialogflow/cx/v3/fulfillment.proto", @@ -17,12 +19,17 @@ "../../protos/google/cloud/dialogflow/cx/v3/inline.proto", "../../protos/google/cloud/dialogflow/cx/v3/intent.proto", "../../protos/google/cloud/dialogflow/cx/v3/page.proto", + "../../protos/google/cloud/dialogflow/cx/v3/parameter_definition.proto", + "../../protos/google/cloud/dialogflow/cx/v3/playbook.proto", "../../protos/google/cloud/dialogflow/cx/v3/response_message.proto", "../../protos/google/cloud/dialogflow/cx/v3/safety_settings.proto", "../../protos/google/cloud/dialogflow/cx/v3/security_settings.proto", "../../protos/google/cloud/dialogflow/cx/v3/session.proto", "../../protos/google/cloud/dialogflow/cx/v3/session_entity_type.proto", "../../protos/google/cloud/dialogflow/cx/v3/test_case.proto", + "../../protos/google/cloud/dialogflow/cx/v3/tool.proto", + "../../protos/google/cloud/dialogflow/cx/v3/tool_call.proto", + "../../protos/google/cloud/dialogflow/cx/v3/trace.proto", "../../protos/google/cloud/dialogflow/cx/v3/transition_route_group.proto", "../../protos/google/cloud/dialogflow/cx/v3/validation_message.proto", "../../protos/google/cloud/dialogflow/cx/v3/version.proto", diff --git a/packages/google-cloud-dialogflow-cx/src/v3/changelogs_client.ts b/packages/google-cloud-dialogflow-cx/src/v3/changelogs_client.ts index a6377bdca44..a69f731abe6 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/changelogs_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3/changelogs_client.ts @@ -208,6 +208,9 @@ export class ChangelogsClient { environmentPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}' ), + examplePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}/examples/{example}' + ), experimentPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/experiments/{experiment}' ), @@ -229,6 +232,12 @@ export class ChangelogsClient { pagePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/pages/{page}' ), + playbookPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}' + ), + playbookVersionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}/versions/{version}' + ), projectPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}' ), @@ -253,6 +262,12 @@ export class ChangelogsClient { testCaseResultPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/testCases/{test_case}/results/{result}' ), + toolPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/tools/{tool}' + ), + toolVersionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/tools/{tool}/versions/{version}' + ), versionPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/versions/{version}' ), @@ -1582,6 +1597,81 @@ export class ChangelogsClient { return this.pathTemplates.environmentPathTemplate.match(environmentName).environment; } + /** + * Return a fully-qualified example resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} playbook + * @param {string} example + * @returns {string} Resource name string. + */ + examplePath(project:string,location:string,agent:string,playbook:string,example:string) { + return this.pathTemplates.examplePathTemplate.render({ + project: project, + location: location, + agent: agent, + playbook: playbook, + example: example, + }); + } + + /** + * Parse the project from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the project. + */ + matchProjectFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).project; + } + + /** + * Parse the location from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the location. + */ + matchLocationFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).location; + } + + /** + * Parse the agent from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).agent; + } + + /** + * Parse the playbook from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the playbook. + */ + matchPlaybookFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).playbook; + } + + /** + * Parse the example from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the example. + */ + matchExampleFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).example; + } + /** * Return a fully-qualified experiment resource name string. * @@ -2016,6 +2106,143 @@ export class ChangelogsClient { return this.pathTemplates.pagePathTemplate.match(pageName).page; } + /** + * Return a fully-qualified playbook resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} playbook + * @returns {string} Resource name string. + */ + playbookPath(project:string,location:string,agent:string,playbook:string) { + return this.pathTemplates.playbookPathTemplate.render({ + project: project, + location: location, + agent: agent, + playbook: playbook, + }); + } + + /** + * Parse the project from Playbook resource. + * + * @param {string} playbookName + * A fully-qualified path representing Playbook resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPlaybookName(playbookName: string) { + return this.pathTemplates.playbookPathTemplate.match(playbookName).project; + } + + /** + * Parse the location from Playbook resource. + * + * @param {string} playbookName + * A fully-qualified path representing Playbook resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPlaybookName(playbookName: string) { + return this.pathTemplates.playbookPathTemplate.match(playbookName).location; + } + + /** + * Parse the agent from Playbook resource. + * + * @param {string} playbookName + * A fully-qualified path representing Playbook resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromPlaybookName(playbookName: string) { + return this.pathTemplates.playbookPathTemplate.match(playbookName).agent; + } + + /** + * Parse the playbook from Playbook resource. + * + * @param {string} playbookName + * A fully-qualified path representing Playbook resource. + * @returns {string} A string representing the playbook. + */ + matchPlaybookFromPlaybookName(playbookName: string) { + return this.pathTemplates.playbookPathTemplate.match(playbookName).playbook; + } + + /** + * Return a fully-qualified playbookVersion resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} playbook + * @param {string} version + * @returns {string} Resource name string. + */ + playbookVersionPath(project:string,location:string,agent:string,playbook:string,version:string) { + return this.pathTemplates.playbookVersionPathTemplate.render({ + project: project, + location: location, + agent: agent, + playbook: playbook, + version: version, + }); + } + + /** + * Parse the project from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).project; + } + + /** + * Parse the location from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).location; + } + + /** + * Parse the agent from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).agent; + } + + /** + * Parse the playbook from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the playbook. + */ + matchPlaybookFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).playbook; + } + + /** + * Parse the version from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the version. + */ + matchVersionFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).version; + } + /** * Return a fully-qualified project resource name string. * @@ -2525,6 +2752,143 @@ export class ChangelogsClient { return this.pathTemplates.testCaseResultPathTemplate.match(testCaseResultName).result; } + /** + * Return a fully-qualified tool resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} tool + * @returns {string} Resource name string. + */ + toolPath(project:string,location:string,agent:string,tool:string) { + return this.pathTemplates.toolPathTemplate.render({ + project: project, + location: location, + agent: agent, + tool: tool, + }); + } + + /** + * Parse the project from Tool resource. + * + * @param {string} toolName + * A fully-qualified path representing Tool resource. + * @returns {string} A string representing the project. + */ + matchProjectFromToolName(toolName: string) { + return this.pathTemplates.toolPathTemplate.match(toolName).project; + } + + /** + * Parse the location from Tool resource. + * + * @param {string} toolName + * A fully-qualified path representing Tool resource. + * @returns {string} A string representing the location. + */ + matchLocationFromToolName(toolName: string) { + return this.pathTemplates.toolPathTemplate.match(toolName).location; + } + + /** + * Parse the agent from Tool resource. + * + * @param {string} toolName + * A fully-qualified path representing Tool resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromToolName(toolName: string) { + return this.pathTemplates.toolPathTemplate.match(toolName).agent; + } + + /** + * Parse the tool from Tool resource. + * + * @param {string} toolName + * A fully-qualified path representing Tool resource. + * @returns {string} A string representing the tool. + */ + matchToolFromToolName(toolName: string) { + return this.pathTemplates.toolPathTemplate.match(toolName).tool; + } + + /** + * Return a fully-qualified toolVersion resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} tool + * @param {string} version + * @returns {string} Resource name string. + */ + toolVersionPath(project:string,location:string,agent:string,tool:string,version:string) { + return this.pathTemplates.toolVersionPathTemplate.render({ + project: project, + location: location, + agent: agent, + tool: tool, + version: version, + }); + } + + /** + * Parse the project from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the project. + */ + matchProjectFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).project; + } + + /** + * Parse the location from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the location. + */ + matchLocationFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).location; + } + + /** + * Parse the agent from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).agent; + } + + /** + * Parse the tool from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the tool. + */ + matchToolFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).tool; + } + + /** + * Parse the version from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the version. + */ + matchVersionFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).version; + } + /** * Return a fully-qualified version resource name string. * diff --git a/packages/google-cloud-dialogflow-cx/src/v3/changelogs_proto_list.json b/packages/google-cloud-dialogflow-cx/src/v3/changelogs_proto_list.json index 81549ae03b3..081858680c0 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/changelogs_proto_list.json +++ b/packages/google-cloud-dialogflow-cx/src/v3/changelogs_proto_list.json @@ -3,10 +3,12 @@ "../../protos/google/cloud/dialogflow/cx/v3/agent.proto", "../../protos/google/cloud/dialogflow/cx/v3/audio_config.proto", "../../protos/google/cloud/dialogflow/cx/v3/changelog.proto", + "../../protos/google/cloud/dialogflow/cx/v3/code_block.proto", "../../protos/google/cloud/dialogflow/cx/v3/data_store_connection.proto", "../../protos/google/cloud/dialogflow/cx/v3/deployment.proto", "../../protos/google/cloud/dialogflow/cx/v3/entity_type.proto", "../../protos/google/cloud/dialogflow/cx/v3/environment.proto", + "../../protos/google/cloud/dialogflow/cx/v3/example.proto", "../../protos/google/cloud/dialogflow/cx/v3/experiment.proto", "../../protos/google/cloud/dialogflow/cx/v3/flow.proto", "../../protos/google/cloud/dialogflow/cx/v3/fulfillment.proto", @@ -17,12 +19,17 @@ "../../protos/google/cloud/dialogflow/cx/v3/inline.proto", "../../protos/google/cloud/dialogflow/cx/v3/intent.proto", "../../protos/google/cloud/dialogflow/cx/v3/page.proto", + "../../protos/google/cloud/dialogflow/cx/v3/parameter_definition.proto", + "../../protos/google/cloud/dialogflow/cx/v3/playbook.proto", "../../protos/google/cloud/dialogflow/cx/v3/response_message.proto", "../../protos/google/cloud/dialogflow/cx/v3/safety_settings.proto", "../../protos/google/cloud/dialogflow/cx/v3/security_settings.proto", "../../protos/google/cloud/dialogflow/cx/v3/session.proto", "../../protos/google/cloud/dialogflow/cx/v3/session_entity_type.proto", "../../protos/google/cloud/dialogflow/cx/v3/test_case.proto", + "../../protos/google/cloud/dialogflow/cx/v3/tool.proto", + "../../protos/google/cloud/dialogflow/cx/v3/tool_call.proto", + "../../protos/google/cloud/dialogflow/cx/v3/trace.proto", "../../protos/google/cloud/dialogflow/cx/v3/transition_route_group.proto", "../../protos/google/cloud/dialogflow/cx/v3/validation_message.proto", "../../protos/google/cloud/dialogflow/cx/v3/version.proto", diff --git a/packages/google-cloud-dialogflow-cx/src/v3/deployments_client.ts b/packages/google-cloud-dialogflow-cx/src/v3/deployments_client.ts index 9e777ef7c20..a6575ee596e 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/deployments_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3/deployments_client.ts @@ -208,6 +208,9 @@ export class DeploymentsClient { environmentPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}' ), + examplePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}/examples/{example}' + ), experimentPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/experiments/{experiment}' ), @@ -229,6 +232,12 @@ export class DeploymentsClient { pagePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/pages/{page}' ), + playbookPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}' + ), + playbookVersionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}/versions/{version}' + ), projectPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}' ), @@ -253,6 +262,12 @@ export class DeploymentsClient { testCaseResultPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/testCases/{test_case}/results/{result}' ), + toolPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/tools/{tool}' + ), + toolVersionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/tools/{tool}/versions/{version}' + ), versionPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/versions/{version}' ), @@ -1524,6 +1539,81 @@ export class DeploymentsClient { return this.pathTemplates.environmentPathTemplate.match(environmentName).environment; } + /** + * Return a fully-qualified example resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} playbook + * @param {string} example + * @returns {string} Resource name string. + */ + examplePath(project:string,location:string,agent:string,playbook:string,example:string) { + return this.pathTemplates.examplePathTemplate.render({ + project: project, + location: location, + agent: agent, + playbook: playbook, + example: example, + }); + } + + /** + * Parse the project from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the project. + */ + matchProjectFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).project; + } + + /** + * Parse the location from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the location. + */ + matchLocationFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).location; + } + + /** + * Parse the agent from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).agent; + } + + /** + * Parse the playbook from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the playbook. + */ + matchPlaybookFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).playbook; + } + + /** + * Parse the example from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the example. + */ + matchExampleFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).example; + } + /** * Return a fully-qualified experiment resource name string. * @@ -1958,6 +2048,143 @@ export class DeploymentsClient { return this.pathTemplates.pagePathTemplate.match(pageName).page; } + /** + * Return a fully-qualified playbook resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} playbook + * @returns {string} Resource name string. + */ + playbookPath(project:string,location:string,agent:string,playbook:string) { + return this.pathTemplates.playbookPathTemplate.render({ + project: project, + location: location, + agent: agent, + playbook: playbook, + }); + } + + /** + * Parse the project from Playbook resource. + * + * @param {string} playbookName + * A fully-qualified path representing Playbook resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPlaybookName(playbookName: string) { + return this.pathTemplates.playbookPathTemplate.match(playbookName).project; + } + + /** + * Parse the location from Playbook resource. + * + * @param {string} playbookName + * A fully-qualified path representing Playbook resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPlaybookName(playbookName: string) { + return this.pathTemplates.playbookPathTemplate.match(playbookName).location; + } + + /** + * Parse the agent from Playbook resource. + * + * @param {string} playbookName + * A fully-qualified path representing Playbook resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromPlaybookName(playbookName: string) { + return this.pathTemplates.playbookPathTemplate.match(playbookName).agent; + } + + /** + * Parse the playbook from Playbook resource. + * + * @param {string} playbookName + * A fully-qualified path representing Playbook resource. + * @returns {string} A string representing the playbook. + */ + matchPlaybookFromPlaybookName(playbookName: string) { + return this.pathTemplates.playbookPathTemplate.match(playbookName).playbook; + } + + /** + * Return a fully-qualified playbookVersion resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} playbook + * @param {string} version + * @returns {string} Resource name string. + */ + playbookVersionPath(project:string,location:string,agent:string,playbook:string,version:string) { + return this.pathTemplates.playbookVersionPathTemplate.render({ + project: project, + location: location, + agent: agent, + playbook: playbook, + version: version, + }); + } + + /** + * Parse the project from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).project; + } + + /** + * Parse the location from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).location; + } + + /** + * Parse the agent from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).agent; + } + + /** + * Parse the playbook from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the playbook. + */ + matchPlaybookFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).playbook; + } + + /** + * Parse the version from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the version. + */ + matchVersionFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).version; + } + /** * Return a fully-qualified project resource name string. * @@ -2467,6 +2694,143 @@ export class DeploymentsClient { return this.pathTemplates.testCaseResultPathTemplate.match(testCaseResultName).result; } + /** + * Return a fully-qualified tool resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} tool + * @returns {string} Resource name string. + */ + toolPath(project:string,location:string,agent:string,tool:string) { + return this.pathTemplates.toolPathTemplate.render({ + project: project, + location: location, + agent: agent, + tool: tool, + }); + } + + /** + * Parse the project from Tool resource. + * + * @param {string} toolName + * A fully-qualified path representing Tool resource. + * @returns {string} A string representing the project. + */ + matchProjectFromToolName(toolName: string) { + return this.pathTemplates.toolPathTemplate.match(toolName).project; + } + + /** + * Parse the location from Tool resource. + * + * @param {string} toolName + * A fully-qualified path representing Tool resource. + * @returns {string} A string representing the location. + */ + matchLocationFromToolName(toolName: string) { + return this.pathTemplates.toolPathTemplate.match(toolName).location; + } + + /** + * Parse the agent from Tool resource. + * + * @param {string} toolName + * A fully-qualified path representing Tool resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromToolName(toolName: string) { + return this.pathTemplates.toolPathTemplate.match(toolName).agent; + } + + /** + * Parse the tool from Tool resource. + * + * @param {string} toolName + * A fully-qualified path representing Tool resource. + * @returns {string} A string representing the tool. + */ + matchToolFromToolName(toolName: string) { + return this.pathTemplates.toolPathTemplate.match(toolName).tool; + } + + /** + * Return a fully-qualified toolVersion resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} tool + * @param {string} version + * @returns {string} Resource name string. + */ + toolVersionPath(project:string,location:string,agent:string,tool:string,version:string) { + return this.pathTemplates.toolVersionPathTemplate.render({ + project: project, + location: location, + agent: agent, + tool: tool, + version: version, + }); + } + + /** + * Parse the project from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the project. + */ + matchProjectFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).project; + } + + /** + * Parse the location from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the location. + */ + matchLocationFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).location; + } + + /** + * Parse the agent from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).agent; + } + + /** + * Parse the tool from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the tool. + */ + matchToolFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).tool; + } + + /** + * Parse the version from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the version. + */ + matchVersionFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).version; + } + /** * Return a fully-qualified version resource name string. * diff --git a/packages/google-cloud-dialogflow-cx/src/v3/deployments_proto_list.json b/packages/google-cloud-dialogflow-cx/src/v3/deployments_proto_list.json index 81549ae03b3..081858680c0 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/deployments_proto_list.json +++ b/packages/google-cloud-dialogflow-cx/src/v3/deployments_proto_list.json @@ -3,10 +3,12 @@ "../../protos/google/cloud/dialogflow/cx/v3/agent.proto", "../../protos/google/cloud/dialogflow/cx/v3/audio_config.proto", "../../protos/google/cloud/dialogflow/cx/v3/changelog.proto", + "../../protos/google/cloud/dialogflow/cx/v3/code_block.proto", "../../protos/google/cloud/dialogflow/cx/v3/data_store_connection.proto", "../../protos/google/cloud/dialogflow/cx/v3/deployment.proto", "../../protos/google/cloud/dialogflow/cx/v3/entity_type.proto", "../../protos/google/cloud/dialogflow/cx/v3/environment.proto", + "../../protos/google/cloud/dialogflow/cx/v3/example.proto", "../../protos/google/cloud/dialogflow/cx/v3/experiment.proto", "../../protos/google/cloud/dialogflow/cx/v3/flow.proto", "../../protos/google/cloud/dialogflow/cx/v3/fulfillment.proto", @@ -17,12 +19,17 @@ "../../protos/google/cloud/dialogflow/cx/v3/inline.proto", "../../protos/google/cloud/dialogflow/cx/v3/intent.proto", "../../protos/google/cloud/dialogflow/cx/v3/page.proto", + "../../protos/google/cloud/dialogflow/cx/v3/parameter_definition.proto", + "../../protos/google/cloud/dialogflow/cx/v3/playbook.proto", "../../protos/google/cloud/dialogflow/cx/v3/response_message.proto", "../../protos/google/cloud/dialogflow/cx/v3/safety_settings.proto", "../../protos/google/cloud/dialogflow/cx/v3/security_settings.proto", "../../protos/google/cloud/dialogflow/cx/v3/session.proto", "../../protos/google/cloud/dialogflow/cx/v3/session_entity_type.proto", "../../protos/google/cloud/dialogflow/cx/v3/test_case.proto", + "../../protos/google/cloud/dialogflow/cx/v3/tool.proto", + "../../protos/google/cloud/dialogflow/cx/v3/tool_call.proto", + "../../protos/google/cloud/dialogflow/cx/v3/trace.proto", "../../protos/google/cloud/dialogflow/cx/v3/transition_route_group.proto", "../../protos/google/cloud/dialogflow/cx/v3/validation_message.proto", "../../protos/google/cloud/dialogflow/cx/v3/version.proto", 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 4fd9b14d975..70dfc16c83a 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 @@ -208,6 +208,9 @@ export class EntityTypesClient { environmentPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}' ), + examplePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}/examples/{example}' + ), experimentPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/experiments/{experiment}' ), @@ -229,6 +232,12 @@ export class EntityTypesClient { pagePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/pages/{page}' ), + playbookPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}' + ), + playbookVersionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}/versions/{version}' + ), projectPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}' ), @@ -253,6 +262,12 @@ export class EntityTypesClient { testCaseResultPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/testCases/{test_case}/results/{result}' ), + toolPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/tools/{tool}' + ), + toolVersionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/tools/{tool}/versions/{version}' + ), versionPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/versions/{version}' ), @@ -2198,6 +2213,81 @@ export class EntityTypesClient { return this.pathTemplates.environmentPathTemplate.match(environmentName).environment; } + /** + * Return a fully-qualified example resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} playbook + * @param {string} example + * @returns {string} Resource name string. + */ + examplePath(project:string,location:string,agent:string,playbook:string,example:string) { + return this.pathTemplates.examplePathTemplate.render({ + project: project, + location: location, + agent: agent, + playbook: playbook, + example: example, + }); + } + + /** + * Parse the project from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the project. + */ + matchProjectFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).project; + } + + /** + * Parse the location from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the location. + */ + matchLocationFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).location; + } + + /** + * Parse the agent from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).agent; + } + + /** + * Parse the playbook from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the playbook. + */ + matchPlaybookFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).playbook; + } + + /** + * Parse the example from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the example. + */ + matchExampleFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).example; + } + /** * Return a fully-qualified experiment resource name string. * @@ -2632,6 +2722,143 @@ export class EntityTypesClient { return this.pathTemplates.pagePathTemplate.match(pageName).page; } + /** + * Return a fully-qualified playbook resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} playbook + * @returns {string} Resource name string. + */ + playbookPath(project:string,location:string,agent:string,playbook:string) { + return this.pathTemplates.playbookPathTemplate.render({ + project: project, + location: location, + agent: agent, + playbook: playbook, + }); + } + + /** + * Parse the project from Playbook resource. + * + * @param {string} playbookName + * A fully-qualified path representing Playbook resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPlaybookName(playbookName: string) { + return this.pathTemplates.playbookPathTemplate.match(playbookName).project; + } + + /** + * Parse the location from Playbook resource. + * + * @param {string} playbookName + * A fully-qualified path representing Playbook resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPlaybookName(playbookName: string) { + return this.pathTemplates.playbookPathTemplate.match(playbookName).location; + } + + /** + * Parse the agent from Playbook resource. + * + * @param {string} playbookName + * A fully-qualified path representing Playbook resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromPlaybookName(playbookName: string) { + return this.pathTemplates.playbookPathTemplate.match(playbookName).agent; + } + + /** + * Parse the playbook from Playbook resource. + * + * @param {string} playbookName + * A fully-qualified path representing Playbook resource. + * @returns {string} A string representing the playbook. + */ + matchPlaybookFromPlaybookName(playbookName: string) { + return this.pathTemplates.playbookPathTemplate.match(playbookName).playbook; + } + + /** + * Return a fully-qualified playbookVersion resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} playbook + * @param {string} version + * @returns {string} Resource name string. + */ + playbookVersionPath(project:string,location:string,agent:string,playbook:string,version:string) { + return this.pathTemplates.playbookVersionPathTemplate.render({ + project: project, + location: location, + agent: agent, + playbook: playbook, + version: version, + }); + } + + /** + * Parse the project from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).project; + } + + /** + * Parse the location from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).location; + } + + /** + * Parse the agent from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).agent; + } + + /** + * Parse the playbook from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the playbook. + */ + matchPlaybookFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).playbook; + } + + /** + * Parse the version from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the version. + */ + matchVersionFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).version; + } + /** * Return a fully-qualified project resource name string. * @@ -3141,6 +3368,143 @@ export class EntityTypesClient { return this.pathTemplates.testCaseResultPathTemplate.match(testCaseResultName).result; } + /** + * Return a fully-qualified tool resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} tool + * @returns {string} Resource name string. + */ + toolPath(project:string,location:string,agent:string,tool:string) { + return this.pathTemplates.toolPathTemplate.render({ + project: project, + location: location, + agent: agent, + tool: tool, + }); + } + + /** + * Parse the project from Tool resource. + * + * @param {string} toolName + * A fully-qualified path representing Tool resource. + * @returns {string} A string representing the project. + */ + matchProjectFromToolName(toolName: string) { + return this.pathTemplates.toolPathTemplate.match(toolName).project; + } + + /** + * Parse the location from Tool resource. + * + * @param {string} toolName + * A fully-qualified path representing Tool resource. + * @returns {string} A string representing the location. + */ + matchLocationFromToolName(toolName: string) { + return this.pathTemplates.toolPathTemplate.match(toolName).location; + } + + /** + * Parse the agent from Tool resource. + * + * @param {string} toolName + * A fully-qualified path representing Tool resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromToolName(toolName: string) { + return this.pathTemplates.toolPathTemplate.match(toolName).agent; + } + + /** + * Parse the tool from Tool resource. + * + * @param {string} toolName + * A fully-qualified path representing Tool resource. + * @returns {string} A string representing the tool. + */ + matchToolFromToolName(toolName: string) { + return this.pathTemplates.toolPathTemplate.match(toolName).tool; + } + + /** + * Return a fully-qualified toolVersion resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} tool + * @param {string} version + * @returns {string} Resource name string. + */ + toolVersionPath(project:string,location:string,agent:string,tool:string,version:string) { + return this.pathTemplates.toolVersionPathTemplate.render({ + project: project, + location: location, + agent: agent, + tool: tool, + version: version, + }); + } + + /** + * Parse the project from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the project. + */ + matchProjectFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).project; + } + + /** + * Parse the location from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the location. + */ + matchLocationFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).location; + } + + /** + * Parse the agent from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).agent; + } + + /** + * Parse the tool from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the tool. + */ + matchToolFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).tool; + } + + /** + * Parse the version from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the version. + */ + matchVersionFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).version; + } + /** * Return a fully-qualified version resource name string. * diff --git a/packages/google-cloud-dialogflow-cx/src/v3/entity_types_proto_list.json b/packages/google-cloud-dialogflow-cx/src/v3/entity_types_proto_list.json index 81549ae03b3..081858680c0 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/entity_types_proto_list.json +++ b/packages/google-cloud-dialogflow-cx/src/v3/entity_types_proto_list.json @@ -3,10 +3,12 @@ "../../protos/google/cloud/dialogflow/cx/v3/agent.proto", "../../protos/google/cloud/dialogflow/cx/v3/audio_config.proto", "../../protos/google/cloud/dialogflow/cx/v3/changelog.proto", + "../../protos/google/cloud/dialogflow/cx/v3/code_block.proto", "../../protos/google/cloud/dialogflow/cx/v3/data_store_connection.proto", "../../protos/google/cloud/dialogflow/cx/v3/deployment.proto", "../../protos/google/cloud/dialogflow/cx/v3/entity_type.proto", "../../protos/google/cloud/dialogflow/cx/v3/environment.proto", + "../../protos/google/cloud/dialogflow/cx/v3/example.proto", "../../protos/google/cloud/dialogflow/cx/v3/experiment.proto", "../../protos/google/cloud/dialogflow/cx/v3/flow.proto", "../../protos/google/cloud/dialogflow/cx/v3/fulfillment.proto", @@ -17,12 +19,17 @@ "../../protos/google/cloud/dialogflow/cx/v3/inline.proto", "../../protos/google/cloud/dialogflow/cx/v3/intent.proto", "../../protos/google/cloud/dialogflow/cx/v3/page.proto", + "../../protos/google/cloud/dialogflow/cx/v3/parameter_definition.proto", + "../../protos/google/cloud/dialogflow/cx/v3/playbook.proto", "../../protos/google/cloud/dialogflow/cx/v3/response_message.proto", "../../protos/google/cloud/dialogflow/cx/v3/safety_settings.proto", "../../protos/google/cloud/dialogflow/cx/v3/security_settings.proto", "../../protos/google/cloud/dialogflow/cx/v3/session.proto", "../../protos/google/cloud/dialogflow/cx/v3/session_entity_type.proto", "../../protos/google/cloud/dialogflow/cx/v3/test_case.proto", + "../../protos/google/cloud/dialogflow/cx/v3/tool.proto", + "../../protos/google/cloud/dialogflow/cx/v3/tool_call.proto", + "../../protos/google/cloud/dialogflow/cx/v3/trace.proto", "../../protos/google/cloud/dialogflow/cx/v3/transition_route_group.proto", "../../protos/google/cloud/dialogflow/cx/v3/validation_message.proto", "../../protos/google/cloud/dialogflow/cx/v3/version.proto", diff --git a/packages/google-cloud-dialogflow-cx/src/v3/environments_client.ts b/packages/google-cloud-dialogflow-cx/src/v3/environments_client.ts index e6806774c9b..027305fd4aa 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/environments_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3/environments_client.ts @@ -209,6 +209,9 @@ export class EnvironmentsClient { environmentPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}' ), + examplePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}/examples/{example}' + ), experimentPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/experiments/{experiment}' ), @@ -230,6 +233,12 @@ export class EnvironmentsClient { pagePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/pages/{page}' ), + playbookPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}' + ), + playbookVersionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}/versions/{version}' + ), projectPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}' ), @@ -254,6 +263,12 @@ export class EnvironmentsClient { testCaseResultPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/testCases/{test_case}/results/{result}' ), + toolPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/tools/{tool}' + ), + toolVersionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/tools/{tool}/versions/{version}' + ), versionPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/versions/{version}' ), @@ -2539,6 +2554,81 @@ export class EnvironmentsClient { return this.pathTemplates.environmentPathTemplate.match(environmentName).environment; } + /** + * Return a fully-qualified example resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} playbook + * @param {string} example + * @returns {string} Resource name string. + */ + examplePath(project:string,location:string,agent:string,playbook:string,example:string) { + return this.pathTemplates.examplePathTemplate.render({ + project: project, + location: location, + agent: agent, + playbook: playbook, + example: example, + }); + } + + /** + * Parse the project from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the project. + */ + matchProjectFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).project; + } + + /** + * Parse the location from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the location. + */ + matchLocationFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).location; + } + + /** + * Parse the agent from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).agent; + } + + /** + * Parse the playbook from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the playbook. + */ + matchPlaybookFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).playbook; + } + + /** + * Parse the example from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the example. + */ + matchExampleFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).example; + } + /** * Return a fully-qualified experiment resource name string. * @@ -2973,6 +3063,143 @@ export class EnvironmentsClient { return this.pathTemplates.pagePathTemplate.match(pageName).page; } + /** + * Return a fully-qualified playbook resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} playbook + * @returns {string} Resource name string. + */ + playbookPath(project:string,location:string,agent:string,playbook:string) { + return this.pathTemplates.playbookPathTemplate.render({ + project: project, + location: location, + agent: agent, + playbook: playbook, + }); + } + + /** + * Parse the project from Playbook resource. + * + * @param {string} playbookName + * A fully-qualified path representing Playbook resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPlaybookName(playbookName: string) { + return this.pathTemplates.playbookPathTemplate.match(playbookName).project; + } + + /** + * Parse the location from Playbook resource. + * + * @param {string} playbookName + * A fully-qualified path representing Playbook resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPlaybookName(playbookName: string) { + return this.pathTemplates.playbookPathTemplate.match(playbookName).location; + } + + /** + * Parse the agent from Playbook resource. + * + * @param {string} playbookName + * A fully-qualified path representing Playbook resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromPlaybookName(playbookName: string) { + return this.pathTemplates.playbookPathTemplate.match(playbookName).agent; + } + + /** + * Parse the playbook from Playbook resource. + * + * @param {string} playbookName + * A fully-qualified path representing Playbook resource. + * @returns {string} A string representing the playbook. + */ + matchPlaybookFromPlaybookName(playbookName: string) { + return this.pathTemplates.playbookPathTemplate.match(playbookName).playbook; + } + + /** + * Return a fully-qualified playbookVersion resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} playbook + * @param {string} version + * @returns {string} Resource name string. + */ + playbookVersionPath(project:string,location:string,agent:string,playbook:string,version:string) { + return this.pathTemplates.playbookVersionPathTemplate.render({ + project: project, + location: location, + agent: agent, + playbook: playbook, + version: version, + }); + } + + /** + * Parse the project from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).project; + } + + /** + * Parse the location from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).location; + } + + /** + * Parse the agent from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).agent; + } + + /** + * Parse the playbook from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the playbook. + */ + matchPlaybookFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).playbook; + } + + /** + * Parse the version from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the version. + */ + matchVersionFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).version; + } + /** * Return a fully-qualified project resource name string. * @@ -3482,6 +3709,143 @@ export class EnvironmentsClient { return this.pathTemplates.testCaseResultPathTemplate.match(testCaseResultName).result; } + /** + * Return a fully-qualified tool resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} tool + * @returns {string} Resource name string. + */ + toolPath(project:string,location:string,agent:string,tool:string) { + return this.pathTemplates.toolPathTemplate.render({ + project: project, + location: location, + agent: agent, + tool: tool, + }); + } + + /** + * Parse the project from Tool resource. + * + * @param {string} toolName + * A fully-qualified path representing Tool resource. + * @returns {string} A string representing the project. + */ + matchProjectFromToolName(toolName: string) { + return this.pathTemplates.toolPathTemplate.match(toolName).project; + } + + /** + * Parse the location from Tool resource. + * + * @param {string} toolName + * A fully-qualified path representing Tool resource. + * @returns {string} A string representing the location. + */ + matchLocationFromToolName(toolName: string) { + return this.pathTemplates.toolPathTemplate.match(toolName).location; + } + + /** + * Parse the agent from Tool resource. + * + * @param {string} toolName + * A fully-qualified path representing Tool resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromToolName(toolName: string) { + return this.pathTemplates.toolPathTemplate.match(toolName).agent; + } + + /** + * Parse the tool from Tool resource. + * + * @param {string} toolName + * A fully-qualified path representing Tool resource. + * @returns {string} A string representing the tool. + */ + matchToolFromToolName(toolName: string) { + return this.pathTemplates.toolPathTemplate.match(toolName).tool; + } + + /** + * Return a fully-qualified toolVersion resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} tool + * @param {string} version + * @returns {string} Resource name string. + */ + toolVersionPath(project:string,location:string,agent:string,tool:string,version:string) { + return this.pathTemplates.toolVersionPathTemplate.render({ + project: project, + location: location, + agent: agent, + tool: tool, + version: version, + }); + } + + /** + * Parse the project from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the project. + */ + matchProjectFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).project; + } + + /** + * Parse the location from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the location. + */ + matchLocationFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).location; + } + + /** + * Parse the agent from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).agent; + } + + /** + * Parse the tool from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the tool. + */ + matchToolFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).tool; + } + + /** + * Parse the version from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the version. + */ + matchVersionFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).version; + } + /** * Return a fully-qualified version resource name string. * diff --git a/packages/google-cloud-dialogflow-cx/src/v3/environments_proto_list.json b/packages/google-cloud-dialogflow-cx/src/v3/environments_proto_list.json index 81549ae03b3..081858680c0 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/environments_proto_list.json +++ b/packages/google-cloud-dialogflow-cx/src/v3/environments_proto_list.json @@ -3,10 +3,12 @@ "../../protos/google/cloud/dialogflow/cx/v3/agent.proto", "../../protos/google/cloud/dialogflow/cx/v3/audio_config.proto", "../../protos/google/cloud/dialogflow/cx/v3/changelog.proto", + "../../protos/google/cloud/dialogflow/cx/v3/code_block.proto", "../../protos/google/cloud/dialogflow/cx/v3/data_store_connection.proto", "../../protos/google/cloud/dialogflow/cx/v3/deployment.proto", "../../protos/google/cloud/dialogflow/cx/v3/entity_type.proto", "../../protos/google/cloud/dialogflow/cx/v3/environment.proto", + "../../protos/google/cloud/dialogflow/cx/v3/example.proto", "../../protos/google/cloud/dialogflow/cx/v3/experiment.proto", "../../protos/google/cloud/dialogflow/cx/v3/flow.proto", "../../protos/google/cloud/dialogflow/cx/v3/fulfillment.proto", @@ -17,12 +19,17 @@ "../../protos/google/cloud/dialogflow/cx/v3/inline.proto", "../../protos/google/cloud/dialogflow/cx/v3/intent.proto", "../../protos/google/cloud/dialogflow/cx/v3/page.proto", + "../../protos/google/cloud/dialogflow/cx/v3/parameter_definition.proto", + "../../protos/google/cloud/dialogflow/cx/v3/playbook.proto", "../../protos/google/cloud/dialogflow/cx/v3/response_message.proto", "../../protos/google/cloud/dialogflow/cx/v3/safety_settings.proto", "../../protos/google/cloud/dialogflow/cx/v3/security_settings.proto", "../../protos/google/cloud/dialogflow/cx/v3/session.proto", "../../protos/google/cloud/dialogflow/cx/v3/session_entity_type.proto", "../../protos/google/cloud/dialogflow/cx/v3/test_case.proto", + "../../protos/google/cloud/dialogflow/cx/v3/tool.proto", + "../../protos/google/cloud/dialogflow/cx/v3/tool_call.proto", + "../../protos/google/cloud/dialogflow/cx/v3/trace.proto", "../../protos/google/cloud/dialogflow/cx/v3/transition_route_group.proto", "../../protos/google/cloud/dialogflow/cx/v3/validation_message.proto", "../../protos/google/cloud/dialogflow/cx/v3/version.proto", diff --git a/packages/google-cloud-dialogflow-cx/src/v3/examples_client.ts b/packages/google-cloud-dialogflow-cx/src/v3/examples_client.ts new file mode 100644 index 00000000000..efbef135d3b --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/src/v3/examples_client.ts @@ -0,0 +1,3293 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type {Callback, CallOptions, Descriptors, ClientOptions, GrpcClientOptions, PaginationCallback, GaxCall, LocationsClient, LocationProtos} from 'google-gax'; +import {Transform} from 'stream'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +import {loggingUtils as logging, decodeAnyProtosInArray} from 'google-gax'; + +/** + * Client JSON configuration object, loaded from + * `src/v3/examples_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './examples_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Service for managing {@link protos.google.cloud.dialogflow.cx.v3.Example|Examples}. + * @class + * @memberof v3 + */ +export class ExamplesClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + private _universeDomain: string; + private _servicePath: string; + private _log = logging.log('dialogflow-cx'); + + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + locationsClient: LocationsClient; + pathTemplates: {[name: string]: gax.PathTemplate}; + operationsClient: gax.OperationsClient; + examplesStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of ExamplesClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new ExamplesClient({fallback: true}, gax); + * ``` + */ + constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof ExamplesClient; + if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) { + throw new Error('Please set either universe_domain or universeDomain, but not both.'); + } + const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined; + this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com'; + this._servicePath = 'dialogflow.' + this._universeDomain; + const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; + this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== this._servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = this._servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === this._servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + this.locationsClient = new this._gaxModule.LocationsClient( + this._gaxGrpc, + opts + ); + + + // Determine the client header string. + const clientHeader = [ + `gax/${this._gaxModule.version}`, + `gapic/${version}`, + ]; + if (typeof process === 'object' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + agentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}' + ), + agentGenerativeSettingsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/generativeSettings' + ), + agentValidationResultPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/validationResult' + ), + changelogPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/changelogs/{changelog}' + ), + continuousTestResultPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/continuousTestResults/{continuous_test_result}' + ), + deploymentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/deployments/{deployment}' + ), + entityTypePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/entityTypes/{entity_type}' + ), + environmentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}' + ), + examplePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}/examples/{example}' + ), + experimentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/experiments/{experiment}' + ), + flowPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}' + ), + flowValidationResultPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/validationResult' + ), + generatorPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/generators/{generator}' + ), + intentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/intents/{intent}' + ), + locationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}' + ), + pagePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/pages/{page}' + ), + playbookPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}' + ), + playbookVersionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}/versions/{version}' + ), + projectPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}' + ), + projectLocationAgentEnvironmentSessionEntityTypePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/sessions/{session}/entityTypes/{entity_type}' + ), + projectLocationAgentFlowTransitionRouteGroupsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/transitionRouteGroups/{transition_route_group}' + ), + projectLocationAgentSessionEntityTypePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/sessions/{session}/entityTypes/{entity_type}' + ), + projectLocationAgentTransitionRouteGroupsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/transitionRouteGroups/{transition_route_group}' + ), + securitySettingsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/securitySettings/{security_settings}' + ), + testCasePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/testCases/{test_case}' + ), + testCaseResultPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/testCases/{test_case}/results/{result}' + ), + toolPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/tools/{tool}' + ), + toolVersionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/tools/{tool}/versions/{version}' + ), + versionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/versions/{version}' + ), + webhookPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/webhooks/{webhook}' + ), + }; + + // Some of the methods on this service return "paged" results, + // (e.g. 50 results at a time, with tokens to get subsequent + // pages). Denote the keys used for pagination and results. + this.descriptors.page = { + listExamples: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'examples') + }; + + const protoFilesRoot = this._gaxModule.protobufFromJSON(jsonProtos); + // This API contains "long-running operations", which return a + // an Operation object that allows for tracking of the operation, + // rather than holding a request open. + const lroOptions: GrpcClientOptions = { + auth: this.auth, + grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined + }; + if (opts.fallback) { + lroOptions.protoJson = protoFilesRoot; + lroOptions.httpRules = [{selector: 'google.cloud.location.Locations.GetLocation',get: '/v3/{name=projects/*/locations/*}',},{selector: 'google.cloud.location.Locations.ListLocations',get: '/v3/{name=projects/*}/locations',},{selector: 'google.longrunning.Operations.CancelOperation',post: '/v3/{name=projects/*/operations/*}:cancel',additional_bindings: [{post: '/v3/{name=projects/*/locations/*/operations/*}:cancel',}], + },{selector: 'google.longrunning.Operations.GetOperation',get: '/v3/{name=projects/*/operations/*}',additional_bindings: [{get: '/v3/{name=projects/*/locations/*/operations/*}',}], + },{selector: 'google.longrunning.Operations.ListOperations',get: '/v3/{name=projects/*}/operations',additional_bindings: [{get: '/v3/{name=projects/*/locations/*}/operations',}], + }]; + } + this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts); + + this.descriptors.longrunning = { + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.dialogflow.cx.v3.Examples', gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, {'x-goog-api-client': clientHeader.join(' ')}); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this.innerApiCalls = {}; + + // Add a warn function to the client constructor so it can be easily tested. + this.warn = this._gaxModule.warn; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.examplesStub) { + return this.examplesStub; + } + + // Put together the "service stub" for + // google.cloud.dialogflow.cx.v3.Examples. + this.examplesStub = this._gaxGrpc.createStub( + this._opts.fallback ? + (this._protos as protobuf.Root).lookupService('google.cloud.dialogflow.cx.v3.Examples') : + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.dialogflow.cx.v3.Examples, + this._opts, this._providedCustomServicePath) as Promise<{[method: string]: Function}>; + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const examplesStubMethods = + ['createExample', 'deleteExample', 'listExamples', 'getExample', 'updateExample']; + for (const methodName of examplesStubMethods) { + const callPromise = this.examplesStub.then( + stub => (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error|null|undefined) => () => { + throw err; + }); + + const descriptor = + this.descriptors.page[methodName] || + undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.examplesStub; + } + + /** + * The DNS address for this API service. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'dialogflow.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'dialogflow.googleapis.com'; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + get apiEndpoint() { + return this._servicePath; + } + + get universeDomain() { + return this._universeDomain; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/dialogflow' + ]; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId(callback?: Callback): + Promise|void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- +/** + * Creates an example in the specified playbook. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The playbook to create an example for. + * Format: + * `projects//locations//agents//playbooks/`. + * @param {google.cloud.dialogflow.cx.v3.Example} request.example + * Required. The example to create. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.dialogflow.cx.v3.Example|Example}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v3/examples.create_example.js + * region_tag:dialogflow_v3_generated_Examples_CreateExample_async + */ + createExample( + request?: protos.google.cloud.dialogflow.cx.v3.ICreateExampleRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.dialogflow.cx.v3.IExample, + protos.google.cloud.dialogflow.cx.v3.ICreateExampleRequest|undefined, {}|undefined + ]>; + createExample( + request: protos.google.cloud.dialogflow.cx.v3.ICreateExampleRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dialogflow.cx.v3.IExample, + protos.google.cloud.dialogflow.cx.v3.ICreateExampleRequest|null|undefined, + {}|null|undefined>): void; + createExample( + request: protos.google.cloud.dialogflow.cx.v3.ICreateExampleRequest, + callback: Callback< + protos.google.cloud.dialogflow.cx.v3.IExample, + protos.google.cloud.dialogflow.cx.v3.ICreateExampleRequest|null|undefined, + {}|null|undefined>): void; + createExample( + request?: protos.google.cloud.dialogflow.cx.v3.ICreateExampleRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.dialogflow.cx.v3.IExample, + protos.google.cloud.dialogflow.cx.v3.ICreateExampleRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.dialogflow.cx.v3.IExample, + protos.google.cloud.dialogflow.cx.v3.ICreateExampleRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.dialogflow.cx.v3.IExample, + protos.google.cloud.dialogflow.cx.v3.ICreateExampleRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('createExample request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.dialogflow.cx.v3.IExample, + protos.google.cloud.dialogflow.cx.v3.ICreateExampleRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('createExample response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.createExample(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.dialogflow.cx.v3.IExample, + protos.google.cloud.dialogflow.cx.v3.ICreateExampleRequest|undefined, + {}|undefined + ]) => { + this._log.info('createExample response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Deletes the specified example. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the example to delete. + * Format: + * `projects//locations//agents//playbooks//examples/`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v3/examples.delete_example.js + * region_tag:dialogflow_v3_generated_Examples_DeleteExample_async + */ + deleteExample( + request?: protos.google.cloud.dialogflow.cx.v3.IDeleteExampleRequest, + options?: CallOptions): + Promise<[ + protos.google.protobuf.IEmpty, + protos.google.cloud.dialogflow.cx.v3.IDeleteExampleRequest|undefined, {}|undefined + ]>; + deleteExample( + request: protos.google.cloud.dialogflow.cx.v3.IDeleteExampleRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.dialogflow.cx.v3.IDeleteExampleRequest|null|undefined, + {}|null|undefined>): void; + deleteExample( + request: protos.google.cloud.dialogflow.cx.v3.IDeleteExampleRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.dialogflow.cx.v3.IDeleteExampleRequest|null|undefined, + {}|null|undefined>): void; + deleteExample( + request?: protos.google.cloud.dialogflow.cx.v3.IDeleteExampleRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.dialogflow.cx.v3.IDeleteExampleRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.dialogflow.cx.v3.IDeleteExampleRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.protobuf.IEmpty, + protos.google.cloud.dialogflow.cx.v3.IDeleteExampleRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('deleteExample request %j', request); + const wrappedCallback: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.dialogflow.cx.v3.IDeleteExampleRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('deleteExample response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.deleteExample(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.protobuf.IEmpty, + protos.google.cloud.dialogflow.cx.v3.IDeleteExampleRequest|undefined, + {}|undefined + ]) => { + this._log.info('deleteExample response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Retrieves the specified example. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the example. + * Format: + * `projects//locations//agents//playbooks//examples/`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.dialogflow.cx.v3.Example|Example}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v3/examples.get_example.js + * region_tag:dialogflow_v3_generated_Examples_GetExample_async + */ + getExample( + request?: protos.google.cloud.dialogflow.cx.v3.IGetExampleRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.dialogflow.cx.v3.IExample, + protos.google.cloud.dialogflow.cx.v3.IGetExampleRequest|undefined, {}|undefined + ]>; + getExample( + request: protos.google.cloud.dialogflow.cx.v3.IGetExampleRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dialogflow.cx.v3.IExample, + protos.google.cloud.dialogflow.cx.v3.IGetExampleRequest|null|undefined, + {}|null|undefined>): void; + getExample( + request: protos.google.cloud.dialogflow.cx.v3.IGetExampleRequest, + callback: Callback< + protos.google.cloud.dialogflow.cx.v3.IExample, + protos.google.cloud.dialogflow.cx.v3.IGetExampleRequest|null|undefined, + {}|null|undefined>): void; + getExample( + request?: protos.google.cloud.dialogflow.cx.v3.IGetExampleRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.dialogflow.cx.v3.IExample, + protos.google.cloud.dialogflow.cx.v3.IGetExampleRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.dialogflow.cx.v3.IExample, + protos.google.cloud.dialogflow.cx.v3.IGetExampleRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.dialogflow.cx.v3.IExample, + protos.google.cloud.dialogflow.cx.v3.IGetExampleRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('getExample request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.dialogflow.cx.v3.IExample, + protos.google.cloud.dialogflow.cx.v3.IGetExampleRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getExample response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getExample(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.dialogflow.cx.v3.IExample, + protos.google.cloud.dialogflow.cx.v3.IGetExampleRequest|undefined, + {}|undefined + ]) => { + this._log.info('getExample response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Update the specified example. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.dialogflow.cx.v3.Example} request.example + * Required. The example to update. + * @param {google.protobuf.FieldMask} [request.updateMask] + * Optional. The mask to control which fields get updated. If the mask is not + * present, all fields will be updated. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.dialogflow.cx.v3.Example|Example}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v3/examples.update_example.js + * region_tag:dialogflow_v3_generated_Examples_UpdateExample_async + */ + updateExample( + request?: protos.google.cloud.dialogflow.cx.v3.IUpdateExampleRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.dialogflow.cx.v3.IExample, + protos.google.cloud.dialogflow.cx.v3.IUpdateExampleRequest|undefined, {}|undefined + ]>; + updateExample( + request: protos.google.cloud.dialogflow.cx.v3.IUpdateExampleRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dialogflow.cx.v3.IExample, + protos.google.cloud.dialogflow.cx.v3.IUpdateExampleRequest|null|undefined, + {}|null|undefined>): void; + updateExample( + request: protos.google.cloud.dialogflow.cx.v3.IUpdateExampleRequest, + callback: Callback< + protos.google.cloud.dialogflow.cx.v3.IExample, + protos.google.cloud.dialogflow.cx.v3.IUpdateExampleRequest|null|undefined, + {}|null|undefined>): void; + updateExample( + request?: protos.google.cloud.dialogflow.cx.v3.IUpdateExampleRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.dialogflow.cx.v3.IExample, + protos.google.cloud.dialogflow.cx.v3.IUpdateExampleRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.dialogflow.cx.v3.IExample, + protos.google.cloud.dialogflow.cx.v3.IUpdateExampleRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.dialogflow.cx.v3.IExample, + protos.google.cloud.dialogflow.cx.v3.IUpdateExampleRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'example.name': request.example!.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('updateExample request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.dialogflow.cx.v3.IExample, + protos.google.cloud.dialogflow.cx.v3.IUpdateExampleRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('updateExample response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.updateExample(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.dialogflow.cx.v3.IExample, + protos.google.cloud.dialogflow.cx.v3.IUpdateExampleRequest|undefined, + {}|undefined + ]) => { + this._log.info('updateExample response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } + + /** + * Returns a list of examples in the specified playbook. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The playbook to list the examples from. + * Format: + * `projects//locations//agents//playbooks/`. + * @param {number} [request.pageSize] + * Optional. The maximum number of items to return in a single page. By + * default 100 and at most 1000. + * @param {string} [request.pageToken] + * Optional. The {@link protos.ListExampleResponse.next_page_token|next_page_token} value + * returned from a previous list request. + * @param {string} [request.languageCode] + * Optional. The language to list examples for. + * If not specified, list all examples under the playbook. + * Note: languages must be enabled in the agent before they can be used. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.dialogflow.cx.v3.Example|Example}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listExamplesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listExamples( + request?: protos.google.cloud.dialogflow.cx.v3.IListExamplesRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.dialogflow.cx.v3.IExample[], + protos.google.cloud.dialogflow.cx.v3.IListExamplesRequest|null, + protos.google.cloud.dialogflow.cx.v3.IListExamplesResponse + ]>; + listExamples( + request: protos.google.cloud.dialogflow.cx.v3.IListExamplesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dialogflow.cx.v3.IListExamplesRequest, + protos.google.cloud.dialogflow.cx.v3.IListExamplesResponse|null|undefined, + protos.google.cloud.dialogflow.cx.v3.IExample>): void; + listExamples( + request: protos.google.cloud.dialogflow.cx.v3.IListExamplesRequest, + callback: PaginationCallback< + protos.google.cloud.dialogflow.cx.v3.IListExamplesRequest, + protos.google.cloud.dialogflow.cx.v3.IListExamplesResponse|null|undefined, + protos.google.cloud.dialogflow.cx.v3.IExample>): void; + listExamples( + request?: protos.google.cloud.dialogflow.cx.v3.IListExamplesRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.dialogflow.cx.v3.IListExamplesRequest, + protos.google.cloud.dialogflow.cx.v3.IListExamplesResponse|null|undefined, + protos.google.cloud.dialogflow.cx.v3.IExample>, + callback?: PaginationCallback< + protos.google.cloud.dialogflow.cx.v3.IListExamplesRequest, + protos.google.cloud.dialogflow.cx.v3.IListExamplesResponse|null|undefined, + protos.google.cloud.dialogflow.cx.v3.IExample>): + Promise<[ + protos.google.cloud.dialogflow.cx.v3.IExample[], + protos.google.cloud.dialogflow.cx.v3.IListExamplesRequest|null, + protos.google.cloud.dialogflow.cx.v3.IListExamplesResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.cloud.dialogflow.cx.v3.IListExamplesRequest, + protos.google.cloud.dialogflow.cx.v3.IListExamplesResponse|null|undefined, + protos.google.cloud.dialogflow.cx.v3.IExample>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listExamples values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listExamples request %j', request); + return this.innerApiCalls + .listExamples(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.cloud.dialogflow.cx.v3.IExample[], + protos.google.cloud.dialogflow.cx.v3.IListExamplesRequest|null, + protos.google.cloud.dialogflow.cx.v3.IListExamplesResponse + ]) => { + this._log.info('listExamples values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listExamples`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The playbook to list the examples from. + * Format: + * `projects//locations//agents//playbooks/`. + * @param {number} [request.pageSize] + * Optional. The maximum number of items to return in a single page. By + * default 100 and at most 1000. + * @param {string} [request.pageToken] + * Optional. The {@link protos.ListExampleResponse.next_page_token|next_page_token} value + * returned from a previous list request. + * @param {string} [request.languageCode] + * Optional. The language to list examples for. + * If not specified, list all examples under the playbook. + * Note: languages must be enabled in the agent before they can be used. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.dialogflow.cx.v3.Example|Example} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listExamplesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listExamplesStream( + request?: protos.google.cloud.dialogflow.cx.v3.IListExamplesRequest, + options?: CallOptions): + Transform{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listExamples']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listExamples stream %j', request); + return this.descriptors.page.listExamples.createStream( + this.innerApiCalls.listExamples as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listExamples`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The playbook to list the examples from. + * Format: + * `projects//locations//agents//playbooks/`. + * @param {number} [request.pageSize] + * Optional. The maximum number of items to return in a single page. By + * default 100 and at most 1000. + * @param {string} [request.pageToken] + * Optional. The {@link protos.ListExampleResponse.next_page_token|next_page_token} value + * returned from a previous list request. + * @param {string} [request.languageCode] + * Optional. The language to list examples for. + * If not specified, list all examples under the playbook. + * Note: languages must be enabled in the agent before they can be used. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.dialogflow.cx.v3.Example|Example}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v3/examples.list_examples.js + * region_tag:dialogflow_v3_generated_Examples_ListExamples_async + */ + listExamplesAsync( + request?: protos.google.cloud.dialogflow.cx.v3.IListExamplesRequest, + options?: CallOptions): + AsyncIterable{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listExamples']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listExamples iterate %j', request); + return this.descriptors.page.listExamples.asyncIterate( + this.innerApiCalls['listExamples'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } +/** + * Gets information about a location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Resource name for the location. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.cloud.location.Location | Location}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example + * ``` + * const [response] = await client.getLocation(request); + * ``` + */ + getLocation( + request: LocationProtos.google.cloud.location.IGetLocationRequest, + options?: + | gax.CallOptions + | Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + > + ): Promise { + return this.locationsClient.getLocation(request, options, callback); + } + +/** + * Lists information about the supported locations for this service. Returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The resource that owns the locations collection, if applicable. + * @param {string} request.filter + * The standard list filter. + * @param {number} request.pageSize + * The standard list page size. + * @param {string} request.pageToken + * The standard list page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example + * ``` + * const iterable = client.listLocationsAsync(request); + * for await (const response of iterable) { + * // process response + * } + * ``` + */ + listLocationsAsync( + request: LocationProtos.google.cloud.location.IListLocationsRequest, + options?: CallOptions + ): AsyncIterable { + return this.locationsClient.listLocationsAsync(request, options); + } + +/** + * Gets the latest state of a long-running operation. Clients can use this + * method to poll the operation result at intervals as recommended by the API + * service. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} + * for the details. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * const name = ''; + * const [response] = await client.getOperation({name}); + * // doThingsWith(response) + * ``` + */ + getOperation( + request: protos.google.longrunning.GetOperationRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + > + ): Promise<[protos.google.longrunning.Operation]> { + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + return this.operationsClient.getOperation(request, options, callback); + } + /** + * Lists operations that match the specified filter in the request. If the + * server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object. + * + * For-await-of syntax is used with the iterable to recursively get response element on-demand. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation collection. + * @param {string} request.filter - The standard list filter. + * @param {number=} request.pageSize - + * The maximum number of resources contained in the underlying API + * response. If page streaming is performed per-resource, this + * parameter does not affect the return value. If page streaming is + * performed per-page, this determines the maximum number of + * resources in a page. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the + * details. + * @returns {Object} + * An iterable Object that conforms to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | iteration protocols}. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * for await (const response of client.listOperationsAsync(request)); + * // doThingsWith(response) + * ``` + */ + listOperationsAsync( + request: protos.google.longrunning.ListOperationsRequest, + options?: gax.CallOptions + ): AsyncIterable { + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + return this.operationsClient.listOperationsAsync(request, options); + } + /** + * Starts asynchronous cancellation on a long-running operation. The server + * makes a best effort to cancel the operation, but success is not + * guaranteed. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. Clients can use + * {@link Operations.GetOperation} or + * other methods to check whether the cancellation succeeded or whether the + * operation completed despite cancellation. On successful cancellation, + * the operation is not deleted; instead, it becomes an operation with + * an {@link Operation.error} value with a {@link google.rpc.Status.code} of + * 1, corresponding to `Code.CANCELLED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be cancelled. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the + * details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.cancelOperation({name: ''}); + * ``` + */ + cancelOperation( + request: protos.google.longrunning.CancelOperationRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protos.google.longrunning.CancelOperationRequest, + protos.google.protobuf.Empty, + {} | undefined | null + >, + callback?: Callback< + protos.google.longrunning.CancelOperationRequest, + protos.google.protobuf.Empty, + {} | undefined | null + > + ): Promise { + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + return this.operationsClient.cancelOperation(request, options, callback); + } + + /** + * Deletes a long-running operation. This method indicates that the client is + * no longer interested in the operation result. It does not cancel the + * operation. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be deleted. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} + * for the details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.deleteOperation({name: ''}); + * ``` + */ + deleteOperation( + request: protos.google.longrunning.DeleteOperationRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + > + ): Promise { + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + return this.operationsClient.deleteOperation(request, options, callback); + } + + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified agent resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @returns {string} Resource name string. + */ + agentPath(project:string,location:string,agent:string) { + return this.pathTemplates.agentPathTemplate.render({ + project: project, + location: location, + agent: agent, + }); + } + + /** + * Parse the project from Agent resource. + * + * @param {string} agentName + * A fully-qualified path representing Agent resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAgentName(agentName: string) { + return this.pathTemplates.agentPathTemplate.match(agentName).project; + } + + /** + * Parse the location from Agent resource. + * + * @param {string} agentName + * A fully-qualified path representing Agent resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAgentName(agentName: string) { + return this.pathTemplates.agentPathTemplate.match(agentName).location; + } + + /** + * Parse the agent from Agent resource. + * + * @param {string} agentName + * A fully-qualified path representing Agent resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromAgentName(agentName: string) { + return this.pathTemplates.agentPathTemplate.match(agentName).agent; + } + + /** + * Return a fully-qualified agentGenerativeSettings resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @returns {string} Resource name string. + */ + agentGenerativeSettingsPath(project:string,location:string,agent:string) { + return this.pathTemplates.agentGenerativeSettingsPathTemplate.render({ + project: project, + location: location, + agent: agent, + }); + } + + /** + * Parse the project from AgentGenerativeSettings resource. + * + * @param {string} agentGenerativeSettingsName + * A fully-qualified path representing AgentGenerativeSettings resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAgentGenerativeSettingsName(agentGenerativeSettingsName: string) { + return this.pathTemplates.agentGenerativeSettingsPathTemplate.match(agentGenerativeSettingsName).project; + } + + /** + * Parse the location from AgentGenerativeSettings resource. + * + * @param {string} agentGenerativeSettingsName + * A fully-qualified path representing AgentGenerativeSettings resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAgentGenerativeSettingsName(agentGenerativeSettingsName: string) { + return this.pathTemplates.agentGenerativeSettingsPathTemplate.match(agentGenerativeSettingsName).location; + } + + /** + * Parse the agent from AgentGenerativeSettings resource. + * + * @param {string} agentGenerativeSettingsName + * A fully-qualified path representing AgentGenerativeSettings resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromAgentGenerativeSettingsName(agentGenerativeSettingsName: string) { + return this.pathTemplates.agentGenerativeSettingsPathTemplate.match(agentGenerativeSettingsName).agent; + } + + /** + * Return a fully-qualified agentValidationResult resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @returns {string} Resource name string. + */ + agentValidationResultPath(project:string,location:string,agent:string) { + return this.pathTemplates.agentValidationResultPathTemplate.render({ + project: project, + location: location, + agent: agent, + }); + } + + /** + * Parse the project from AgentValidationResult resource. + * + * @param {string} agentValidationResultName + * A fully-qualified path representing AgentValidationResult resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAgentValidationResultName(agentValidationResultName: string) { + return this.pathTemplates.agentValidationResultPathTemplate.match(agentValidationResultName).project; + } + + /** + * Parse the location from AgentValidationResult resource. + * + * @param {string} agentValidationResultName + * A fully-qualified path representing AgentValidationResult resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAgentValidationResultName(agentValidationResultName: string) { + return this.pathTemplates.agentValidationResultPathTemplate.match(agentValidationResultName).location; + } + + /** + * Parse the agent from AgentValidationResult resource. + * + * @param {string} agentValidationResultName + * A fully-qualified path representing AgentValidationResult resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromAgentValidationResultName(agentValidationResultName: string) { + return this.pathTemplates.agentValidationResultPathTemplate.match(agentValidationResultName).agent; + } + + /** + * Return a fully-qualified changelog resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} changelog + * @returns {string} Resource name string. + */ + changelogPath(project:string,location:string,agent:string,changelog:string) { + return this.pathTemplates.changelogPathTemplate.render({ + project: project, + location: location, + agent: agent, + changelog: changelog, + }); + } + + /** + * Parse the project from Changelog resource. + * + * @param {string} changelogName + * A fully-qualified path representing Changelog resource. + * @returns {string} A string representing the project. + */ + matchProjectFromChangelogName(changelogName: string) { + return this.pathTemplates.changelogPathTemplate.match(changelogName).project; + } + + /** + * Parse the location from Changelog resource. + * + * @param {string} changelogName + * A fully-qualified path representing Changelog resource. + * @returns {string} A string representing the location. + */ + matchLocationFromChangelogName(changelogName: string) { + return this.pathTemplates.changelogPathTemplate.match(changelogName).location; + } + + /** + * Parse the agent from Changelog resource. + * + * @param {string} changelogName + * A fully-qualified path representing Changelog resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromChangelogName(changelogName: string) { + return this.pathTemplates.changelogPathTemplate.match(changelogName).agent; + } + + /** + * Parse the changelog from Changelog resource. + * + * @param {string} changelogName + * A fully-qualified path representing Changelog resource. + * @returns {string} A string representing the changelog. + */ + matchChangelogFromChangelogName(changelogName: string) { + return this.pathTemplates.changelogPathTemplate.match(changelogName).changelog; + } + + /** + * Return a fully-qualified continuousTestResult resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} environment + * @param {string} continuous_test_result + * @returns {string} Resource name string. + */ + continuousTestResultPath(project:string,location:string,agent:string,environment:string,continuousTestResult:string) { + return this.pathTemplates.continuousTestResultPathTemplate.render({ + project: project, + location: location, + agent: agent, + environment: environment, + continuous_test_result: continuousTestResult, + }); + } + + /** + * Parse the project from ContinuousTestResult resource. + * + * @param {string} continuousTestResultName + * A fully-qualified path representing ContinuousTestResult resource. + * @returns {string} A string representing the project. + */ + matchProjectFromContinuousTestResultName(continuousTestResultName: string) { + return this.pathTemplates.continuousTestResultPathTemplate.match(continuousTestResultName).project; + } + + /** + * Parse the location from ContinuousTestResult resource. + * + * @param {string} continuousTestResultName + * A fully-qualified path representing ContinuousTestResult resource. + * @returns {string} A string representing the location. + */ + matchLocationFromContinuousTestResultName(continuousTestResultName: string) { + return this.pathTemplates.continuousTestResultPathTemplate.match(continuousTestResultName).location; + } + + /** + * Parse the agent from ContinuousTestResult resource. + * + * @param {string} continuousTestResultName + * A fully-qualified path representing ContinuousTestResult resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromContinuousTestResultName(continuousTestResultName: string) { + return this.pathTemplates.continuousTestResultPathTemplate.match(continuousTestResultName).agent; + } + + /** + * Parse the environment from ContinuousTestResult resource. + * + * @param {string} continuousTestResultName + * A fully-qualified path representing ContinuousTestResult resource. + * @returns {string} A string representing the environment. + */ + matchEnvironmentFromContinuousTestResultName(continuousTestResultName: string) { + return this.pathTemplates.continuousTestResultPathTemplate.match(continuousTestResultName).environment; + } + + /** + * Parse the continuous_test_result from ContinuousTestResult resource. + * + * @param {string} continuousTestResultName + * A fully-qualified path representing ContinuousTestResult resource. + * @returns {string} A string representing the continuous_test_result. + */ + matchContinuousTestResultFromContinuousTestResultName(continuousTestResultName: string) { + return this.pathTemplates.continuousTestResultPathTemplate.match(continuousTestResultName).continuous_test_result; + } + + /** + * Return a fully-qualified deployment resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} environment + * @param {string} deployment + * @returns {string} Resource name string. + */ + deploymentPath(project:string,location:string,agent:string,environment:string,deployment:string) { + return this.pathTemplates.deploymentPathTemplate.render({ + project: project, + location: location, + agent: agent, + environment: environment, + deployment: deployment, + }); + } + + /** + * Parse the project from Deployment resource. + * + * @param {string} deploymentName + * A fully-qualified path representing Deployment resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDeploymentName(deploymentName: string) { + return this.pathTemplates.deploymentPathTemplate.match(deploymentName).project; + } + + /** + * Parse the location from Deployment resource. + * + * @param {string} deploymentName + * A fully-qualified path representing Deployment resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDeploymentName(deploymentName: string) { + return this.pathTemplates.deploymentPathTemplate.match(deploymentName).location; + } + + /** + * Parse the agent from Deployment resource. + * + * @param {string} deploymentName + * A fully-qualified path representing Deployment resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromDeploymentName(deploymentName: string) { + return this.pathTemplates.deploymentPathTemplate.match(deploymentName).agent; + } + + /** + * Parse the environment from Deployment resource. + * + * @param {string} deploymentName + * A fully-qualified path representing Deployment resource. + * @returns {string} A string representing the environment. + */ + matchEnvironmentFromDeploymentName(deploymentName: string) { + return this.pathTemplates.deploymentPathTemplate.match(deploymentName).environment; + } + + /** + * Parse the deployment from Deployment resource. + * + * @param {string} deploymentName + * A fully-qualified path representing Deployment resource. + * @returns {string} A string representing the deployment. + */ + matchDeploymentFromDeploymentName(deploymentName: string) { + return this.pathTemplates.deploymentPathTemplate.match(deploymentName).deployment; + } + + /** + * Return a fully-qualified entityType resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} entity_type + * @returns {string} Resource name string. + */ + entityTypePath(project:string,location:string,agent:string,entityType:string) { + return this.pathTemplates.entityTypePathTemplate.render({ + project: project, + location: location, + agent: agent, + entity_type: entityType, + }); + } + + /** + * Parse the project from EntityType resource. + * + * @param {string} entityTypeName + * A fully-qualified path representing EntityType resource. + * @returns {string} A string representing the project. + */ + matchProjectFromEntityTypeName(entityTypeName: string) { + return this.pathTemplates.entityTypePathTemplate.match(entityTypeName).project; + } + + /** + * Parse the location from EntityType resource. + * + * @param {string} entityTypeName + * A fully-qualified path representing EntityType resource. + * @returns {string} A string representing the location. + */ + matchLocationFromEntityTypeName(entityTypeName: string) { + return this.pathTemplates.entityTypePathTemplate.match(entityTypeName).location; + } + + /** + * Parse the agent from EntityType resource. + * + * @param {string} entityTypeName + * A fully-qualified path representing EntityType resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromEntityTypeName(entityTypeName: string) { + return this.pathTemplates.entityTypePathTemplate.match(entityTypeName).agent; + } + + /** + * Parse the entity_type from EntityType resource. + * + * @param {string} entityTypeName + * A fully-qualified path representing EntityType resource. + * @returns {string} A string representing the entity_type. + */ + matchEntityTypeFromEntityTypeName(entityTypeName: string) { + return this.pathTemplates.entityTypePathTemplate.match(entityTypeName).entity_type; + } + + /** + * Return a fully-qualified environment resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} environment + * @returns {string} Resource name string. + */ + environmentPath(project:string,location:string,agent:string,environment:string) { + return this.pathTemplates.environmentPathTemplate.render({ + project: project, + location: location, + agent: agent, + environment: environment, + }); + } + + /** + * Parse the project from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the project. + */ + matchProjectFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName).project; + } + + /** + * Parse the location from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the location. + */ + matchLocationFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName).location; + } + + /** + * Parse the agent from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName).agent; + } + + /** + * Parse the environment from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the environment. + */ + matchEnvironmentFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName).environment; + } + + /** + * Return a fully-qualified example resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} playbook + * @param {string} example + * @returns {string} Resource name string. + */ + examplePath(project:string,location:string,agent:string,playbook:string,example:string) { + return this.pathTemplates.examplePathTemplate.render({ + project: project, + location: location, + agent: agent, + playbook: playbook, + example: example, + }); + } + + /** + * Parse the project from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the project. + */ + matchProjectFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).project; + } + + /** + * Parse the location from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the location. + */ + matchLocationFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).location; + } + + /** + * Parse the agent from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).agent; + } + + /** + * Parse the playbook from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the playbook. + */ + matchPlaybookFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).playbook; + } + + /** + * Parse the example from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the example. + */ + matchExampleFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).example; + } + + /** + * Return a fully-qualified experiment resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} environment + * @param {string} experiment + * @returns {string} Resource name string. + */ + experimentPath(project:string,location:string,agent:string,environment:string,experiment:string) { + return this.pathTemplates.experimentPathTemplate.render({ + project: project, + location: location, + agent: agent, + environment: environment, + experiment: experiment, + }); + } + + /** + * Parse the project from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the project. + */ + matchProjectFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName).project; + } + + /** + * Parse the location from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the location. + */ + matchLocationFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName).location; + } + + /** + * Parse the agent from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName).agent; + } + + /** + * Parse the environment from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the environment. + */ + matchEnvironmentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName).environment; + } + + /** + * Parse the experiment from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the experiment. + */ + matchExperimentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName).experiment; + } + + /** + * Return a fully-qualified flow resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} flow + * @returns {string} Resource name string. + */ + flowPath(project:string,location:string,agent:string,flow:string) { + return this.pathTemplates.flowPathTemplate.render({ + project: project, + location: location, + agent: agent, + flow: flow, + }); + } + + /** + * Parse the project from Flow resource. + * + * @param {string} flowName + * A fully-qualified path representing Flow resource. + * @returns {string} A string representing the project. + */ + matchProjectFromFlowName(flowName: string) { + return this.pathTemplates.flowPathTemplate.match(flowName).project; + } + + /** + * Parse the location from Flow resource. + * + * @param {string} flowName + * A fully-qualified path representing Flow resource. + * @returns {string} A string representing the location. + */ + matchLocationFromFlowName(flowName: string) { + return this.pathTemplates.flowPathTemplate.match(flowName).location; + } + + /** + * Parse the agent from Flow resource. + * + * @param {string} flowName + * A fully-qualified path representing Flow resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromFlowName(flowName: string) { + return this.pathTemplates.flowPathTemplate.match(flowName).agent; + } + + /** + * Parse the flow from Flow resource. + * + * @param {string} flowName + * A fully-qualified path representing Flow resource. + * @returns {string} A string representing the flow. + */ + matchFlowFromFlowName(flowName: string) { + return this.pathTemplates.flowPathTemplate.match(flowName).flow; + } + + /** + * Return a fully-qualified flowValidationResult resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} flow + * @returns {string} Resource name string. + */ + flowValidationResultPath(project:string,location:string,agent:string,flow:string) { + return this.pathTemplates.flowValidationResultPathTemplate.render({ + project: project, + location: location, + agent: agent, + flow: flow, + }); + } + + /** + * Parse the project from FlowValidationResult resource. + * + * @param {string} flowValidationResultName + * A fully-qualified path representing FlowValidationResult resource. + * @returns {string} A string representing the project. + */ + matchProjectFromFlowValidationResultName(flowValidationResultName: string) { + return this.pathTemplates.flowValidationResultPathTemplate.match(flowValidationResultName).project; + } + + /** + * Parse the location from FlowValidationResult resource. + * + * @param {string} flowValidationResultName + * A fully-qualified path representing FlowValidationResult resource. + * @returns {string} A string representing the location. + */ + matchLocationFromFlowValidationResultName(flowValidationResultName: string) { + return this.pathTemplates.flowValidationResultPathTemplate.match(flowValidationResultName).location; + } + + /** + * Parse the agent from FlowValidationResult resource. + * + * @param {string} flowValidationResultName + * A fully-qualified path representing FlowValidationResult resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromFlowValidationResultName(flowValidationResultName: string) { + return this.pathTemplates.flowValidationResultPathTemplate.match(flowValidationResultName).agent; + } + + /** + * Parse the flow from FlowValidationResult resource. + * + * @param {string} flowValidationResultName + * A fully-qualified path representing FlowValidationResult resource. + * @returns {string} A string representing the flow. + */ + matchFlowFromFlowValidationResultName(flowValidationResultName: string) { + return this.pathTemplates.flowValidationResultPathTemplate.match(flowValidationResultName).flow; + } + + /** + * Return a fully-qualified generator resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} generator + * @returns {string} Resource name string. + */ + generatorPath(project:string,location:string,agent:string,generator:string) { + return this.pathTemplates.generatorPathTemplate.render({ + project: project, + location: location, + agent: agent, + generator: generator, + }); + } + + /** + * Parse the project from Generator resource. + * + * @param {string} generatorName + * A fully-qualified path representing Generator resource. + * @returns {string} A string representing the project. + */ + matchProjectFromGeneratorName(generatorName: string) { + return this.pathTemplates.generatorPathTemplate.match(generatorName).project; + } + + /** + * Parse the location from Generator resource. + * + * @param {string} generatorName + * A fully-qualified path representing Generator resource. + * @returns {string} A string representing the location. + */ + matchLocationFromGeneratorName(generatorName: string) { + return this.pathTemplates.generatorPathTemplate.match(generatorName).location; + } + + /** + * Parse the agent from Generator resource. + * + * @param {string} generatorName + * A fully-qualified path representing Generator resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromGeneratorName(generatorName: string) { + return this.pathTemplates.generatorPathTemplate.match(generatorName).agent; + } + + /** + * Parse the generator from Generator resource. + * + * @param {string} generatorName + * A fully-qualified path representing Generator resource. + * @returns {string} A string representing the generator. + */ + matchGeneratorFromGeneratorName(generatorName: string) { + return this.pathTemplates.generatorPathTemplate.match(generatorName).generator; + } + + /** + * Return a fully-qualified intent resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} intent + * @returns {string} Resource name string. + */ + intentPath(project:string,location:string,agent:string,intent:string) { + return this.pathTemplates.intentPathTemplate.render({ + project: project, + location: location, + agent: agent, + intent: intent, + }); + } + + /** + * Parse the project from Intent resource. + * + * @param {string} intentName + * A fully-qualified path representing Intent resource. + * @returns {string} A string representing the project. + */ + matchProjectFromIntentName(intentName: string) { + return this.pathTemplates.intentPathTemplate.match(intentName).project; + } + + /** + * Parse the location from Intent resource. + * + * @param {string} intentName + * A fully-qualified path representing Intent resource. + * @returns {string} A string representing the location. + */ + matchLocationFromIntentName(intentName: string) { + return this.pathTemplates.intentPathTemplate.match(intentName).location; + } + + /** + * Parse the agent from Intent resource. + * + * @param {string} intentName + * A fully-qualified path representing Intent resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromIntentName(intentName: string) { + return this.pathTemplates.intentPathTemplate.match(intentName).agent; + } + + /** + * Parse the intent from Intent resource. + * + * @param {string} intentName + * A fully-qualified path representing Intent resource. + * @returns {string} A string representing the intent. + */ + matchIntentFromIntentName(intentName: string) { + return this.pathTemplates.intentPathTemplate.match(intentName).intent; + } + + /** + * Return a fully-qualified location resource name string. + * + * @param {string} project + * @param {string} location + * @returns {string} Resource name string. + */ + locationPath(project:string,location:string) { + return this.pathTemplates.locationPathTemplate.render({ + project: project, + location: location, + }); + } + + /** + * Parse the project from Location resource. + * + * @param {string} locationName + * A fully-qualified path representing Location resource. + * @returns {string} A string representing the project. + */ + matchProjectFromLocationName(locationName: string) { + return this.pathTemplates.locationPathTemplate.match(locationName).project; + } + + /** + * Parse the location from Location resource. + * + * @param {string} locationName + * A fully-qualified path representing Location resource. + * @returns {string} A string representing the location. + */ + matchLocationFromLocationName(locationName: string) { + return this.pathTemplates.locationPathTemplate.match(locationName).location; + } + + /** + * Return a fully-qualified page resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} flow + * @param {string} page + * @returns {string} Resource name string. + */ + pagePath(project:string,location:string,agent:string,flow:string,page:string) { + return this.pathTemplates.pagePathTemplate.render({ + project: project, + location: location, + agent: agent, + flow: flow, + page: page, + }); + } + + /** + * Parse the project from Page resource. + * + * @param {string} pageName + * A fully-qualified path representing Page resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPageName(pageName: string) { + return this.pathTemplates.pagePathTemplate.match(pageName).project; + } + + /** + * Parse the location from Page resource. + * + * @param {string} pageName + * A fully-qualified path representing Page resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPageName(pageName: string) { + return this.pathTemplates.pagePathTemplate.match(pageName).location; + } + + /** + * Parse the agent from Page resource. + * + * @param {string} pageName + * A fully-qualified path representing Page resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromPageName(pageName: string) { + return this.pathTemplates.pagePathTemplate.match(pageName).agent; + } + + /** + * Parse the flow from Page resource. + * + * @param {string} pageName + * A fully-qualified path representing Page resource. + * @returns {string} A string representing the flow. + */ + matchFlowFromPageName(pageName: string) { + return this.pathTemplates.pagePathTemplate.match(pageName).flow; + } + + /** + * Parse the page from Page resource. + * + * @param {string} pageName + * A fully-qualified path representing Page resource. + * @returns {string} A string representing the page. + */ + matchPageFromPageName(pageName: string) { + return this.pathTemplates.pagePathTemplate.match(pageName).page; + } + + /** + * Return a fully-qualified playbook resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} playbook + * @returns {string} Resource name string. + */ + playbookPath(project:string,location:string,agent:string,playbook:string) { + return this.pathTemplates.playbookPathTemplate.render({ + project: project, + location: location, + agent: agent, + playbook: playbook, + }); + } + + /** + * Parse the project from Playbook resource. + * + * @param {string} playbookName + * A fully-qualified path representing Playbook resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPlaybookName(playbookName: string) { + return this.pathTemplates.playbookPathTemplate.match(playbookName).project; + } + + /** + * Parse the location from Playbook resource. + * + * @param {string} playbookName + * A fully-qualified path representing Playbook resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPlaybookName(playbookName: string) { + return this.pathTemplates.playbookPathTemplate.match(playbookName).location; + } + + /** + * Parse the agent from Playbook resource. + * + * @param {string} playbookName + * A fully-qualified path representing Playbook resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromPlaybookName(playbookName: string) { + return this.pathTemplates.playbookPathTemplate.match(playbookName).agent; + } + + /** + * Parse the playbook from Playbook resource. + * + * @param {string} playbookName + * A fully-qualified path representing Playbook resource. + * @returns {string} A string representing the playbook. + */ + matchPlaybookFromPlaybookName(playbookName: string) { + return this.pathTemplates.playbookPathTemplate.match(playbookName).playbook; + } + + /** + * Return a fully-qualified playbookVersion resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} playbook + * @param {string} version + * @returns {string} Resource name string. + */ + playbookVersionPath(project:string,location:string,agent:string,playbook:string,version:string) { + return this.pathTemplates.playbookVersionPathTemplate.render({ + project: project, + location: location, + agent: agent, + playbook: playbook, + version: version, + }); + } + + /** + * Parse the project from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).project; + } + + /** + * Parse the location from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).location; + } + + /** + * Parse the agent from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).agent; + } + + /** + * Parse the playbook from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the playbook. + */ + matchPlaybookFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).playbook; + } + + /** + * Parse the version from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the version. + */ + matchVersionFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).version; + } + + /** + * Return a fully-qualified project resource name string. + * + * @param {string} project + * @returns {string} Resource name string. + */ + projectPath(project:string) { + return this.pathTemplates.projectPathTemplate.render({ + project: project, + }); + } + + /** + * Parse the project from Project resource. + * + * @param {string} projectName + * A fully-qualified path representing Project resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectName(projectName: string) { + return this.pathTemplates.projectPathTemplate.match(projectName).project; + } + + /** + * Return a fully-qualified projectLocationAgentEnvironmentSessionEntityType resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} environment + * @param {string} session + * @param {string} entity_type + * @returns {string} Resource name string. + */ + projectLocationAgentEnvironmentSessionEntityTypePath(project:string,location:string,agent:string,environment:string,session:string,entityType:string) { + return this.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.render({ + project: project, + location: location, + agent: agent, + environment: environment, + session: session, + entity_type: entityType, + }); + } + + /** + * Parse the project from ProjectLocationAgentEnvironmentSessionEntityType resource. + * + * @param {string} projectLocationAgentEnvironmentSessionEntityTypeName + * A fully-qualified path representing project_location_agent_environment_session_entity_type resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationAgentEnvironmentSessionEntityTypeName(projectLocationAgentEnvironmentSessionEntityTypeName: string) { + return this.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match(projectLocationAgentEnvironmentSessionEntityTypeName).project; + } + + /** + * Parse the location from ProjectLocationAgentEnvironmentSessionEntityType resource. + * + * @param {string} projectLocationAgentEnvironmentSessionEntityTypeName + * A fully-qualified path representing project_location_agent_environment_session_entity_type resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationAgentEnvironmentSessionEntityTypeName(projectLocationAgentEnvironmentSessionEntityTypeName: string) { + return this.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match(projectLocationAgentEnvironmentSessionEntityTypeName).location; + } + + /** + * Parse the agent from ProjectLocationAgentEnvironmentSessionEntityType resource. + * + * @param {string} projectLocationAgentEnvironmentSessionEntityTypeName + * A fully-qualified path representing project_location_agent_environment_session_entity_type resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromProjectLocationAgentEnvironmentSessionEntityTypeName(projectLocationAgentEnvironmentSessionEntityTypeName: string) { + return this.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match(projectLocationAgentEnvironmentSessionEntityTypeName).agent; + } + + /** + * Parse the environment from ProjectLocationAgentEnvironmentSessionEntityType resource. + * + * @param {string} projectLocationAgentEnvironmentSessionEntityTypeName + * A fully-qualified path representing project_location_agent_environment_session_entity_type resource. + * @returns {string} A string representing the environment. + */ + matchEnvironmentFromProjectLocationAgentEnvironmentSessionEntityTypeName(projectLocationAgentEnvironmentSessionEntityTypeName: string) { + return this.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match(projectLocationAgentEnvironmentSessionEntityTypeName).environment; + } + + /** + * Parse the session from ProjectLocationAgentEnvironmentSessionEntityType resource. + * + * @param {string} projectLocationAgentEnvironmentSessionEntityTypeName + * A fully-qualified path representing project_location_agent_environment_session_entity_type resource. + * @returns {string} A string representing the session. + */ + matchSessionFromProjectLocationAgentEnvironmentSessionEntityTypeName(projectLocationAgentEnvironmentSessionEntityTypeName: string) { + return this.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match(projectLocationAgentEnvironmentSessionEntityTypeName).session; + } + + /** + * Parse the entity_type from ProjectLocationAgentEnvironmentSessionEntityType resource. + * + * @param {string} projectLocationAgentEnvironmentSessionEntityTypeName + * A fully-qualified path representing project_location_agent_environment_session_entity_type resource. + * @returns {string} A string representing the entity_type. + */ + matchEntityTypeFromProjectLocationAgentEnvironmentSessionEntityTypeName(projectLocationAgentEnvironmentSessionEntityTypeName: string) { + return this.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match(projectLocationAgentEnvironmentSessionEntityTypeName).entity_type; + } + + /** + * Return a fully-qualified projectLocationAgentFlowTransitionRouteGroups resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} flow + * @param {string} transition_route_group + * @returns {string} Resource name string. + */ + projectLocationAgentFlowTransitionRouteGroupsPath(project:string,location:string,agent:string,flow:string,transitionRouteGroup:string) { + return this.pathTemplates.projectLocationAgentFlowTransitionRouteGroupsPathTemplate.render({ + project: project, + location: location, + agent: agent, + flow: flow, + transition_route_group: transitionRouteGroup, + }); + } + + /** + * Parse the project from ProjectLocationAgentFlowTransitionRouteGroups resource. + * + * @param {string} projectLocationAgentFlowTransitionRouteGroupsName + * A fully-qualified path representing project_location_agent_flow_transitionRouteGroups resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationAgentFlowTransitionRouteGroupsName(projectLocationAgentFlowTransitionRouteGroupsName: string) { + return this.pathTemplates.projectLocationAgentFlowTransitionRouteGroupsPathTemplate.match(projectLocationAgentFlowTransitionRouteGroupsName).project; + } + + /** + * Parse the location from ProjectLocationAgentFlowTransitionRouteGroups resource. + * + * @param {string} projectLocationAgentFlowTransitionRouteGroupsName + * A fully-qualified path representing project_location_agent_flow_transitionRouteGroups resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationAgentFlowTransitionRouteGroupsName(projectLocationAgentFlowTransitionRouteGroupsName: string) { + return this.pathTemplates.projectLocationAgentFlowTransitionRouteGroupsPathTemplate.match(projectLocationAgentFlowTransitionRouteGroupsName).location; + } + + /** + * Parse the agent from ProjectLocationAgentFlowTransitionRouteGroups resource. + * + * @param {string} projectLocationAgentFlowTransitionRouteGroupsName + * A fully-qualified path representing project_location_agent_flow_transitionRouteGroups resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromProjectLocationAgentFlowTransitionRouteGroupsName(projectLocationAgentFlowTransitionRouteGroupsName: string) { + return this.pathTemplates.projectLocationAgentFlowTransitionRouteGroupsPathTemplate.match(projectLocationAgentFlowTransitionRouteGroupsName).agent; + } + + /** + * Parse the flow from ProjectLocationAgentFlowTransitionRouteGroups resource. + * + * @param {string} projectLocationAgentFlowTransitionRouteGroupsName + * A fully-qualified path representing project_location_agent_flow_transitionRouteGroups resource. + * @returns {string} A string representing the flow. + */ + matchFlowFromProjectLocationAgentFlowTransitionRouteGroupsName(projectLocationAgentFlowTransitionRouteGroupsName: string) { + return this.pathTemplates.projectLocationAgentFlowTransitionRouteGroupsPathTemplate.match(projectLocationAgentFlowTransitionRouteGroupsName).flow; + } + + /** + * Parse the transition_route_group from ProjectLocationAgentFlowTransitionRouteGroups resource. + * + * @param {string} projectLocationAgentFlowTransitionRouteGroupsName + * A fully-qualified path representing project_location_agent_flow_transitionRouteGroups resource. + * @returns {string} A string representing the transition_route_group. + */ + matchTransitionRouteGroupFromProjectLocationAgentFlowTransitionRouteGroupsName(projectLocationAgentFlowTransitionRouteGroupsName: string) { + return this.pathTemplates.projectLocationAgentFlowTransitionRouteGroupsPathTemplate.match(projectLocationAgentFlowTransitionRouteGroupsName).transition_route_group; + } + + /** + * Return a fully-qualified projectLocationAgentSessionEntityType resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} session + * @param {string} entity_type + * @returns {string} Resource name string. + */ + projectLocationAgentSessionEntityTypePath(project:string,location:string,agent:string,session:string,entityType:string) { + return this.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render({ + project: project, + location: location, + agent: agent, + session: session, + entity_type: entityType, + }); + } + + /** + * Parse the project from ProjectLocationAgentSessionEntityType resource. + * + * @param {string} projectLocationAgentSessionEntityTypeName + * A fully-qualified path representing project_location_agent_session_entity_type resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationAgentSessionEntityTypeName(projectLocationAgentSessionEntityTypeName: string) { + return this.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match(projectLocationAgentSessionEntityTypeName).project; + } + + /** + * Parse the location from ProjectLocationAgentSessionEntityType resource. + * + * @param {string} projectLocationAgentSessionEntityTypeName + * A fully-qualified path representing project_location_agent_session_entity_type resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationAgentSessionEntityTypeName(projectLocationAgentSessionEntityTypeName: string) { + return this.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match(projectLocationAgentSessionEntityTypeName).location; + } + + /** + * Parse the agent from ProjectLocationAgentSessionEntityType resource. + * + * @param {string} projectLocationAgentSessionEntityTypeName + * A fully-qualified path representing project_location_agent_session_entity_type resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromProjectLocationAgentSessionEntityTypeName(projectLocationAgentSessionEntityTypeName: string) { + return this.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match(projectLocationAgentSessionEntityTypeName).agent; + } + + /** + * Parse the session from ProjectLocationAgentSessionEntityType resource. + * + * @param {string} projectLocationAgentSessionEntityTypeName + * A fully-qualified path representing project_location_agent_session_entity_type resource. + * @returns {string} A string representing the session. + */ + matchSessionFromProjectLocationAgentSessionEntityTypeName(projectLocationAgentSessionEntityTypeName: string) { + return this.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match(projectLocationAgentSessionEntityTypeName).session; + } + + /** + * Parse the entity_type from ProjectLocationAgentSessionEntityType resource. + * + * @param {string} projectLocationAgentSessionEntityTypeName + * A fully-qualified path representing project_location_agent_session_entity_type resource. + * @returns {string} A string representing the entity_type. + */ + matchEntityTypeFromProjectLocationAgentSessionEntityTypeName(projectLocationAgentSessionEntityTypeName: string) { + return this.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match(projectLocationAgentSessionEntityTypeName).entity_type; + } + + /** + * Return a fully-qualified projectLocationAgentTransitionRouteGroups resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} transition_route_group + * @returns {string} Resource name string. + */ + projectLocationAgentTransitionRouteGroupsPath(project:string,location:string,agent:string,transitionRouteGroup:string) { + return this.pathTemplates.projectLocationAgentTransitionRouteGroupsPathTemplate.render({ + project: project, + location: location, + agent: agent, + transition_route_group: transitionRouteGroup, + }); + } + + /** + * Parse the project from ProjectLocationAgentTransitionRouteGroups resource. + * + * @param {string} projectLocationAgentTransitionRouteGroupsName + * A fully-qualified path representing project_location_agent_transitionRouteGroups resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationAgentTransitionRouteGroupsName(projectLocationAgentTransitionRouteGroupsName: string) { + return this.pathTemplates.projectLocationAgentTransitionRouteGroupsPathTemplate.match(projectLocationAgentTransitionRouteGroupsName).project; + } + + /** + * Parse the location from ProjectLocationAgentTransitionRouteGroups resource. + * + * @param {string} projectLocationAgentTransitionRouteGroupsName + * A fully-qualified path representing project_location_agent_transitionRouteGroups resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationAgentTransitionRouteGroupsName(projectLocationAgentTransitionRouteGroupsName: string) { + return this.pathTemplates.projectLocationAgentTransitionRouteGroupsPathTemplate.match(projectLocationAgentTransitionRouteGroupsName).location; + } + + /** + * Parse the agent from ProjectLocationAgentTransitionRouteGroups resource. + * + * @param {string} projectLocationAgentTransitionRouteGroupsName + * A fully-qualified path representing project_location_agent_transitionRouteGroups resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromProjectLocationAgentTransitionRouteGroupsName(projectLocationAgentTransitionRouteGroupsName: string) { + return this.pathTemplates.projectLocationAgentTransitionRouteGroupsPathTemplate.match(projectLocationAgentTransitionRouteGroupsName).agent; + } + + /** + * Parse the transition_route_group from ProjectLocationAgentTransitionRouteGroups resource. + * + * @param {string} projectLocationAgentTransitionRouteGroupsName + * A fully-qualified path representing project_location_agent_transitionRouteGroups resource. + * @returns {string} A string representing the transition_route_group. + */ + matchTransitionRouteGroupFromProjectLocationAgentTransitionRouteGroupsName(projectLocationAgentTransitionRouteGroupsName: string) { + return this.pathTemplates.projectLocationAgentTransitionRouteGroupsPathTemplate.match(projectLocationAgentTransitionRouteGroupsName).transition_route_group; + } + + /** + * Return a fully-qualified securitySettings resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} security_settings + * @returns {string} Resource name string. + */ + securitySettingsPath(project:string,location:string,securitySettings:string) { + return this.pathTemplates.securitySettingsPathTemplate.render({ + project: project, + location: location, + security_settings: securitySettings, + }); + } + + /** + * Parse the project from SecuritySettings resource. + * + * @param {string} securitySettingsName + * A fully-qualified path representing SecuritySettings resource. + * @returns {string} A string representing the project. + */ + matchProjectFromSecuritySettingsName(securitySettingsName: string) { + return this.pathTemplates.securitySettingsPathTemplate.match(securitySettingsName).project; + } + + /** + * Parse the location from SecuritySettings resource. + * + * @param {string} securitySettingsName + * A fully-qualified path representing SecuritySettings resource. + * @returns {string} A string representing the location. + */ + matchLocationFromSecuritySettingsName(securitySettingsName: string) { + return this.pathTemplates.securitySettingsPathTemplate.match(securitySettingsName).location; + } + + /** + * Parse the security_settings from SecuritySettings resource. + * + * @param {string} securitySettingsName + * A fully-qualified path representing SecuritySettings resource. + * @returns {string} A string representing the security_settings. + */ + matchSecuritySettingsFromSecuritySettingsName(securitySettingsName: string) { + return this.pathTemplates.securitySettingsPathTemplate.match(securitySettingsName).security_settings; + } + + /** + * Return a fully-qualified testCase resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} test_case + * @returns {string} Resource name string. + */ + testCasePath(project:string,location:string,agent:string,testCase:string) { + return this.pathTemplates.testCasePathTemplate.render({ + project: project, + location: location, + agent: agent, + test_case: testCase, + }); + } + + /** + * Parse the project from TestCase resource. + * + * @param {string} testCaseName + * A fully-qualified path representing TestCase resource. + * @returns {string} A string representing the project. + */ + matchProjectFromTestCaseName(testCaseName: string) { + return this.pathTemplates.testCasePathTemplate.match(testCaseName).project; + } + + /** + * Parse the location from TestCase resource. + * + * @param {string} testCaseName + * A fully-qualified path representing TestCase resource. + * @returns {string} A string representing the location. + */ + matchLocationFromTestCaseName(testCaseName: string) { + return this.pathTemplates.testCasePathTemplate.match(testCaseName).location; + } + + /** + * Parse the agent from TestCase resource. + * + * @param {string} testCaseName + * A fully-qualified path representing TestCase resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromTestCaseName(testCaseName: string) { + return this.pathTemplates.testCasePathTemplate.match(testCaseName).agent; + } + + /** + * Parse the test_case from TestCase resource. + * + * @param {string} testCaseName + * A fully-qualified path representing TestCase resource. + * @returns {string} A string representing the test_case. + */ + matchTestCaseFromTestCaseName(testCaseName: string) { + return this.pathTemplates.testCasePathTemplate.match(testCaseName).test_case; + } + + /** + * Return a fully-qualified testCaseResult resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} test_case + * @param {string} result + * @returns {string} Resource name string. + */ + testCaseResultPath(project:string,location:string,agent:string,testCase:string,result:string) { + return this.pathTemplates.testCaseResultPathTemplate.render({ + project: project, + location: location, + agent: agent, + test_case: testCase, + result: result, + }); + } + + /** + * Parse the project from TestCaseResult resource. + * + * @param {string} testCaseResultName + * A fully-qualified path representing TestCaseResult resource. + * @returns {string} A string representing the project. + */ + matchProjectFromTestCaseResultName(testCaseResultName: string) { + return this.pathTemplates.testCaseResultPathTemplate.match(testCaseResultName).project; + } + + /** + * Parse the location from TestCaseResult resource. + * + * @param {string} testCaseResultName + * A fully-qualified path representing TestCaseResult resource. + * @returns {string} A string representing the location. + */ + matchLocationFromTestCaseResultName(testCaseResultName: string) { + return this.pathTemplates.testCaseResultPathTemplate.match(testCaseResultName).location; + } + + /** + * Parse the agent from TestCaseResult resource. + * + * @param {string} testCaseResultName + * A fully-qualified path representing TestCaseResult resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromTestCaseResultName(testCaseResultName: string) { + return this.pathTemplates.testCaseResultPathTemplate.match(testCaseResultName).agent; + } + + /** + * Parse the test_case from TestCaseResult resource. + * + * @param {string} testCaseResultName + * A fully-qualified path representing TestCaseResult resource. + * @returns {string} A string representing the test_case. + */ + matchTestCaseFromTestCaseResultName(testCaseResultName: string) { + return this.pathTemplates.testCaseResultPathTemplate.match(testCaseResultName).test_case; + } + + /** + * Parse the result from TestCaseResult resource. + * + * @param {string} testCaseResultName + * A fully-qualified path representing TestCaseResult resource. + * @returns {string} A string representing the result. + */ + matchResultFromTestCaseResultName(testCaseResultName: string) { + return this.pathTemplates.testCaseResultPathTemplate.match(testCaseResultName).result; + } + + /** + * Return a fully-qualified tool resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} tool + * @returns {string} Resource name string. + */ + toolPath(project:string,location:string,agent:string,tool:string) { + return this.pathTemplates.toolPathTemplate.render({ + project: project, + location: location, + agent: agent, + tool: tool, + }); + } + + /** + * Parse the project from Tool resource. + * + * @param {string} toolName + * A fully-qualified path representing Tool resource. + * @returns {string} A string representing the project. + */ + matchProjectFromToolName(toolName: string) { + return this.pathTemplates.toolPathTemplate.match(toolName).project; + } + + /** + * Parse the location from Tool resource. + * + * @param {string} toolName + * A fully-qualified path representing Tool resource. + * @returns {string} A string representing the location. + */ + matchLocationFromToolName(toolName: string) { + return this.pathTemplates.toolPathTemplate.match(toolName).location; + } + + /** + * Parse the agent from Tool resource. + * + * @param {string} toolName + * A fully-qualified path representing Tool resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromToolName(toolName: string) { + return this.pathTemplates.toolPathTemplate.match(toolName).agent; + } + + /** + * Parse the tool from Tool resource. + * + * @param {string} toolName + * A fully-qualified path representing Tool resource. + * @returns {string} A string representing the tool. + */ + matchToolFromToolName(toolName: string) { + return this.pathTemplates.toolPathTemplate.match(toolName).tool; + } + + /** + * Return a fully-qualified toolVersion resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} tool + * @param {string} version + * @returns {string} Resource name string. + */ + toolVersionPath(project:string,location:string,agent:string,tool:string,version:string) { + return this.pathTemplates.toolVersionPathTemplate.render({ + project: project, + location: location, + agent: agent, + tool: tool, + version: version, + }); + } + + /** + * Parse the project from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the project. + */ + matchProjectFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).project; + } + + /** + * Parse the location from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the location. + */ + matchLocationFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).location; + } + + /** + * Parse the agent from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).agent; + } + + /** + * Parse the tool from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the tool. + */ + matchToolFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).tool; + } + + /** + * Parse the version from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the version. + */ + matchVersionFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).version; + } + + /** + * Return a fully-qualified version resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} flow + * @param {string} version + * @returns {string} Resource name string. + */ + versionPath(project:string,location:string,agent:string,flow:string,version:string) { + return this.pathTemplates.versionPathTemplate.render({ + project: project, + location: location, + agent: agent, + flow: flow, + version: version, + }); + } + + /** + * Parse the project from Version resource. + * + * @param {string} versionName + * A fully-qualified path representing Version resource. + * @returns {string} A string representing the project. + */ + matchProjectFromVersionName(versionName: string) { + return this.pathTemplates.versionPathTemplate.match(versionName).project; + } + + /** + * Parse the location from Version resource. + * + * @param {string} versionName + * A fully-qualified path representing Version resource. + * @returns {string} A string representing the location. + */ + matchLocationFromVersionName(versionName: string) { + return this.pathTemplates.versionPathTemplate.match(versionName).location; + } + + /** + * Parse the agent from Version resource. + * + * @param {string} versionName + * A fully-qualified path representing Version resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromVersionName(versionName: string) { + return this.pathTemplates.versionPathTemplate.match(versionName).agent; + } + + /** + * Parse the flow from Version resource. + * + * @param {string} versionName + * A fully-qualified path representing Version resource. + * @returns {string} A string representing the flow. + */ + matchFlowFromVersionName(versionName: string) { + return this.pathTemplates.versionPathTemplate.match(versionName).flow; + } + + /** + * Parse the version from Version resource. + * + * @param {string} versionName + * A fully-qualified path representing Version resource. + * @returns {string} A string representing the version. + */ + matchVersionFromVersionName(versionName: string) { + return this.pathTemplates.versionPathTemplate.match(versionName).version; + } + + /** + * Return a fully-qualified webhook resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} webhook + * @returns {string} Resource name string. + */ + webhookPath(project:string,location:string,agent:string,webhook:string) { + return this.pathTemplates.webhookPathTemplate.render({ + project: project, + location: location, + agent: agent, + webhook: webhook, + }); + } + + /** + * Parse the project from Webhook resource. + * + * @param {string} webhookName + * A fully-qualified path representing Webhook resource. + * @returns {string} A string representing the project. + */ + matchProjectFromWebhookName(webhookName: string) { + return this.pathTemplates.webhookPathTemplate.match(webhookName).project; + } + + /** + * Parse the location from Webhook resource. + * + * @param {string} webhookName + * A fully-qualified path representing Webhook resource. + * @returns {string} A string representing the location. + */ + matchLocationFromWebhookName(webhookName: string) { + return this.pathTemplates.webhookPathTemplate.match(webhookName).location; + } + + /** + * Parse the agent from Webhook resource. + * + * @param {string} webhookName + * A fully-qualified path representing Webhook resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromWebhookName(webhookName: string) { + return this.pathTemplates.webhookPathTemplate.match(webhookName).agent; + } + + /** + * Parse the webhook from Webhook resource. + * + * @param {string} webhookName + * A fully-qualified path representing Webhook resource. + * @returns {string} A string representing the webhook. + */ + matchWebhookFromWebhookName(webhookName: string) { + return this.pathTemplates.webhookPathTemplate.match(webhookName).webhook; + } + + /** + * Terminate the gRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + if (this.examplesStub && !this._terminated) { + return this.examplesStub.then(stub => { + this._log.info('ending gRPC channel'); + this._terminated = true; + stub.close(); + this.locationsClient.close().catch(err => {throw err}); + void this.operationsClient.close(); + }); + } + return Promise.resolve(); + } +} \ No newline at end of file diff --git a/packages/google-cloud-dialogflow-cx/src/v3/examples_client_config.json b/packages/google-cloud-dialogflow-cx/src/v3/examples_client_config.json new file mode 100644 index 00000000000..e5a642712fa --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/src/v3/examples_client_config.json @@ -0,0 +1,54 @@ +{ + "interfaces": { + "google.cloud.dialogflow.cx.v3.Examples": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "unavailable": [ + "UNAVAILABLE" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "CreateExample": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "default" + }, + "DeleteExample": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "default" + }, + "ListExamples": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "default" + }, + "GetExample": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "default" + }, + "UpdateExample": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "default" + } + } + } + } +} diff --git a/packages/google-cloud-dialogflow-cx/src/v3/examples_proto_list.json b/packages/google-cloud-dialogflow-cx/src/v3/examples_proto_list.json new file mode 100644 index 00000000000..081858680c0 --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/src/v3/examples_proto_list.json @@ -0,0 +1,37 @@ +[ + "../../protos/google/cloud/dialogflow/cx/v3/advanced_settings.proto", + "../../protos/google/cloud/dialogflow/cx/v3/agent.proto", + "../../protos/google/cloud/dialogflow/cx/v3/audio_config.proto", + "../../protos/google/cloud/dialogflow/cx/v3/changelog.proto", + "../../protos/google/cloud/dialogflow/cx/v3/code_block.proto", + "../../protos/google/cloud/dialogflow/cx/v3/data_store_connection.proto", + "../../protos/google/cloud/dialogflow/cx/v3/deployment.proto", + "../../protos/google/cloud/dialogflow/cx/v3/entity_type.proto", + "../../protos/google/cloud/dialogflow/cx/v3/environment.proto", + "../../protos/google/cloud/dialogflow/cx/v3/example.proto", + "../../protos/google/cloud/dialogflow/cx/v3/experiment.proto", + "../../protos/google/cloud/dialogflow/cx/v3/flow.proto", + "../../protos/google/cloud/dialogflow/cx/v3/fulfillment.proto", + "../../protos/google/cloud/dialogflow/cx/v3/gcs.proto", + "../../protos/google/cloud/dialogflow/cx/v3/generative_settings.proto", + "../../protos/google/cloud/dialogflow/cx/v3/generator.proto", + "../../protos/google/cloud/dialogflow/cx/v3/import_strategy.proto", + "../../protos/google/cloud/dialogflow/cx/v3/inline.proto", + "../../protos/google/cloud/dialogflow/cx/v3/intent.proto", + "../../protos/google/cloud/dialogflow/cx/v3/page.proto", + "../../protos/google/cloud/dialogflow/cx/v3/parameter_definition.proto", + "../../protos/google/cloud/dialogflow/cx/v3/playbook.proto", + "../../protos/google/cloud/dialogflow/cx/v3/response_message.proto", + "../../protos/google/cloud/dialogflow/cx/v3/safety_settings.proto", + "../../protos/google/cloud/dialogflow/cx/v3/security_settings.proto", + "../../protos/google/cloud/dialogflow/cx/v3/session.proto", + "../../protos/google/cloud/dialogflow/cx/v3/session_entity_type.proto", + "../../protos/google/cloud/dialogflow/cx/v3/test_case.proto", + "../../protos/google/cloud/dialogflow/cx/v3/tool.proto", + "../../protos/google/cloud/dialogflow/cx/v3/tool_call.proto", + "../../protos/google/cloud/dialogflow/cx/v3/trace.proto", + "../../protos/google/cloud/dialogflow/cx/v3/transition_route_group.proto", + "../../protos/google/cloud/dialogflow/cx/v3/validation_message.proto", + "../../protos/google/cloud/dialogflow/cx/v3/version.proto", + "../../protos/google/cloud/dialogflow/cx/v3/webhook.proto" +] diff --git a/packages/google-cloud-dialogflow-cx/src/v3/experiments_client.ts b/packages/google-cloud-dialogflow-cx/src/v3/experiments_client.ts index c05849ac353..fc354492015 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/experiments_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3/experiments_client.ts @@ -208,6 +208,9 @@ export class ExperimentsClient { environmentPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}' ), + examplePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}/examples/{example}' + ), experimentPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/experiments/{experiment}' ), @@ -229,6 +232,12 @@ export class ExperimentsClient { pagePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/pages/{page}' ), + playbookPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}' + ), + playbookVersionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}/versions/{version}' + ), projectPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}' ), @@ -253,6 +262,12 @@ export class ExperimentsClient { testCaseResultPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/testCases/{test_case}/results/{result}' ), + toolPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/tools/{tool}' + ), + toolVersionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/tools/{tool}/versions/{version}' + ), versionPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/versions/{version}' ), @@ -2012,6 +2027,81 @@ export class ExperimentsClient { return this.pathTemplates.environmentPathTemplate.match(environmentName).environment; } + /** + * Return a fully-qualified example resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} playbook + * @param {string} example + * @returns {string} Resource name string. + */ + examplePath(project:string,location:string,agent:string,playbook:string,example:string) { + return this.pathTemplates.examplePathTemplate.render({ + project: project, + location: location, + agent: agent, + playbook: playbook, + example: example, + }); + } + + /** + * Parse the project from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the project. + */ + matchProjectFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).project; + } + + /** + * Parse the location from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the location. + */ + matchLocationFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).location; + } + + /** + * Parse the agent from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).agent; + } + + /** + * Parse the playbook from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the playbook. + */ + matchPlaybookFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).playbook; + } + + /** + * Parse the example from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the example. + */ + matchExampleFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).example; + } + /** * Return a fully-qualified experiment resource name string. * @@ -2446,6 +2536,143 @@ export class ExperimentsClient { return this.pathTemplates.pagePathTemplate.match(pageName).page; } + /** + * Return a fully-qualified playbook resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} playbook + * @returns {string} Resource name string. + */ + playbookPath(project:string,location:string,agent:string,playbook:string) { + return this.pathTemplates.playbookPathTemplate.render({ + project: project, + location: location, + agent: agent, + playbook: playbook, + }); + } + + /** + * Parse the project from Playbook resource. + * + * @param {string} playbookName + * A fully-qualified path representing Playbook resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPlaybookName(playbookName: string) { + return this.pathTemplates.playbookPathTemplate.match(playbookName).project; + } + + /** + * Parse the location from Playbook resource. + * + * @param {string} playbookName + * A fully-qualified path representing Playbook resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPlaybookName(playbookName: string) { + return this.pathTemplates.playbookPathTemplate.match(playbookName).location; + } + + /** + * Parse the agent from Playbook resource. + * + * @param {string} playbookName + * A fully-qualified path representing Playbook resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromPlaybookName(playbookName: string) { + return this.pathTemplates.playbookPathTemplate.match(playbookName).agent; + } + + /** + * Parse the playbook from Playbook resource. + * + * @param {string} playbookName + * A fully-qualified path representing Playbook resource. + * @returns {string} A string representing the playbook. + */ + matchPlaybookFromPlaybookName(playbookName: string) { + return this.pathTemplates.playbookPathTemplate.match(playbookName).playbook; + } + + /** + * Return a fully-qualified playbookVersion resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} playbook + * @param {string} version + * @returns {string} Resource name string. + */ + playbookVersionPath(project:string,location:string,agent:string,playbook:string,version:string) { + return this.pathTemplates.playbookVersionPathTemplate.render({ + project: project, + location: location, + agent: agent, + playbook: playbook, + version: version, + }); + } + + /** + * Parse the project from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).project; + } + + /** + * Parse the location from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).location; + } + + /** + * Parse the agent from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).agent; + } + + /** + * Parse the playbook from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the playbook. + */ + matchPlaybookFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).playbook; + } + + /** + * Parse the version from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the version. + */ + matchVersionFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).version; + } + /** * Return a fully-qualified project resource name string. * @@ -2955,6 +3182,143 @@ export class ExperimentsClient { return this.pathTemplates.testCaseResultPathTemplate.match(testCaseResultName).result; } + /** + * Return a fully-qualified tool resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} tool + * @returns {string} Resource name string. + */ + toolPath(project:string,location:string,agent:string,tool:string) { + return this.pathTemplates.toolPathTemplate.render({ + project: project, + location: location, + agent: agent, + tool: tool, + }); + } + + /** + * Parse the project from Tool resource. + * + * @param {string} toolName + * A fully-qualified path representing Tool resource. + * @returns {string} A string representing the project. + */ + matchProjectFromToolName(toolName: string) { + return this.pathTemplates.toolPathTemplate.match(toolName).project; + } + + /** + * Parse the location from Tool resource. + * + * @param {string} toolName + * A fully-qualified path representing Tool resource. + * @returns {string} A string representing the location. + */ + matchLocationFromToolName(toolName: string) { + return this.pathTemplates.toolPathTemplate.match(toolName).location; + } + + /** + * Parse the agent from Tool resource. + * + * @param {string} toolName + * A fully-qualified path representing Tool resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromToolName(toolName: string) { + return this.pathTemplates.toolPathTemplate.match(toolName).agent; + } + + /** + * Parse the tool from Tool resource. + * + * @param {string} toolName + * A fully-qualified path representing Tool resource. + * @returns {string} A string representing the tool. + */ + matchToolFromToolName(toolName: string) { + return this.pathTemplates.toolPathTemplate.match(toolName).tool; + } + + /** + * Return a fully-qualified toolVersion resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} tool + * @param {string} version + * @returns {string} Resource name string. + */ + toolVersionPath(project:string,location:string,agent:string,tool:string,version:string) { + return this.pathTemplates.toolVersionPathTemplate.render({ + project: project, + location: location, + agent: agent, + tool: tool, + version: version, + }); + } + + /** + * Parse the project from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the project. + */ + matchProjectFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).project; + } + + /** + * Parse the location from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the location. + */ + matchLocationFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).location; + } + + /** + * Parse the agent from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).agent; + } + + /** + * Parse the tool from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the tool. + */ + matchToolFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).tool; + } + + /** + * Parse the version from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the version. + */ + matchVersionFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).version; + } + /** * Return a fully-qualified version resource name string. * diff --git a/packages/google-cloud-dialogflow-cx/src/v3/experiments_proto_list.json b/packages/google-cloud-dialogflow-cx/src/v3/experiments_proto_list.json index 81549ae03b3..081858680c0 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/experiments_proto_list.json +++ b/packages/google-cloud-dialogflow-cx/src/v3/experiments_proto_list.json @@ -3,10 +3,12 @@ "../../protos/google/cloud/dialogflow/cx/v3/agent.proto", "../../protos/google/cloud/dialogflow/cx/v3/audio_config.proto", "../../protos/google/cloud/dialogflow/cx/v3/changelog.proto", + "../../protos/google/cloud/dialogflow/cx/v3/code_block.proto", "../../protos/google/cloud/dialogflow/cx/v3/data_store_connection.proto", "../../protos/google/cloud/dialogflow/cx/v3/deployment.proto", "../../protos/google/cloud/dialogflow/cx/v3/entity_type.proto", "../../protos/google/cloud/dialogflow/cx/v3/environment.proto", + "../../protos/google/cloud/dialogflow/cx/v3/example.proto", "../../protos/google/cloud/dialogflow/cx/v3/experiment.proto", "../../protos/google/cloud/dialogflow/cx/v3/flow.proto", "../../protos/google/cloud/dialogflow/cx/v3/fulfillment.proto", @@ -17,12 +19,17 @@ "../../protos/google/cloud/dialogflow/cx/v3/inline.proto", "../../protos/google/cloud/dialogflow/cx/v3/intent.proto", "../../protos/google/cloud/dialogflow/cx/v3/page.proto", + "../../protos/google/cloud/dialogflow/cx/v3/parameter_definition.proto", + "../../protos/google/cloud/dialogflow/cx/v3/playbook.proto", "../../protos/google/cloud/dialogflow/cx/v3/response_message.proto", "../../protos/google/cloud/dialogflow/cx/v3/safety_settings.proto", "../../protos/google/cloud/dialogflow/cx/v3/security_settings.proto", "../../protos/google/cloud/dialogflow/cx/v3/session.proto", "../../protos/google/cloud/dialogflow/cx/v3/session_entity_type.proto", "../../protos/google/cloud/dialogflow/cx/v3/test_case.proto", + "../../protos/google/cloud/dialogflow/cx/v3/tool.proto", + "../../protos/google/cloud/dialogflow/cx/v3/tool_call.proto", + "../../protos/google/cloud/dialogflow/cx/v3/trace.proto", "../../protos/google/cloud/dialogflow/cx/v3/transition_route_group.proto", "../../protos/google/cloud/dialogflow/cx/v3/validation_message.proto", "../../protos/google/cloud/dialogflow/cx/v3/version.proto", 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 cfa9d485871..965fb5b79cc 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/flows_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3/flows_client.ts @@ -208,6 +208,9 @@ export class FlowsClient { environmentPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}' ), + examplePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}/examples/{example}' + ), experimentPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/experiments/{experiment}' ), @@ -229,6 +232,12 @@ export class FlowsClient { pagePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/pages/{page}' ), + playbookPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}' + ), + playbookVersionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}/versions/{version}' + ), projectPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}' ), @@ -253,6 +262,12 @@ export class FlowsClient { testCaseResultPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/testCases/{test_case}/results/{result}' ), + toolPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/tools/{tool}' + ), + toolVersionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/tools/{tool}/versions/{version}' + ), versionPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/versions/{version}' ), @@ -2529,6 +2544,81 @@ export class FlowsClient { return this.pathTemplates.environmentPathTemplate.match(environmentName).environment; } + /** + * Return a fully-qualified example resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} playbook + * @param {string} example + * @returns {string} Resource name string. + */ + examplePath(project:string,location:string,agent:string,playbook:string,example:string) { + return this.pathTemplates.examplePathTemplate.render({ + project: project, + location: location, + agent: agent, + playbook: playbook, + example: example, + }); + } + + /** + * Parse the project from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the project. + */ + matchProjectFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).project; + } + + /** + * Parse the location from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the location. + */ + matchLocationFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).location; + } + + /** + * Parse the agent from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).agent; + } + + /** + * Parse the playbook from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the playbook. + */ + matchPlaybookFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).playbook; + } + + /** + * Parse the example from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the example. + */ + matchExampleFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).example; + } + /** * Return a fully-qualified experiment resource name string. * @@ -2963,6 +3053,143 @@ export class FlowsClient { return this.pathTemplates.pagePathTemplate.match(pageName).page; } + /** + * Return a fully-qualified playbook resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} playbook + * @returns {string} Resource name string. + */ + playbookPath(project:string,location:string,agent:string,playbook:string) { + return this.pathTemplates.playbookPathTemplate.render({ + project: project, + location: location, + agent: agent, + playbook: playbook, + }); + } + + /** + * Parse the project from Playbook resource. + * + * @param {string} playbookName + * A fully-qualified path representing Playbook resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPlaybookName(playbookName: string) { + return this.pathTemplates.playbookPathTemplate.match(playbookName).project; + } + + /** + * Parse the location from Playbook resource. + * + * @param {string} playbookName + * A fully-qualified path representing Playbook resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPlaybookName(playbookName: string) { + return this.pathTemplates.playbookPathTemplate.match(playbookName).location; + } + + /** + * Parse the agent from Playbook resource. + * + * @param {string} playbookName + * A fully-qualified path representing Playbook resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromPlaybookName(playbookName: string) { + return this.pathTemplates.playbookPathTemplate.match(playbookName).agent; + } + + /** + * Parse the playbook from Playbook resource. + * + * @param {string} playbookName + * A fully-qualified path representing Playbook resource. + * @returns {string} A string representing the playbook. + */ + matchPlaybookFromPlaybookName(playbookName: string) { + return this.pathTemplates.playbookPathTemplate.match(playbookName).playbook; + } + + /** + * Return a fully-qualified playbookVersion resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} playbook + * @param {string} version + * @returns {string} Resource name string. + */ + playbookVersionPath(project:string,location:string,agent:string,playbook:string,version:string) { + return this.pathTemplates.playbookVersionPathTemplate.render({ + project: project, + location: location, + agent: agent, + playbook: playbook, + version: version, + }); + } + + /** + * Parse the project from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).project; + } + + /** + * Parse the location from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).location; + } + + /** + * Parse the agent from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).agent; + } + + /** + * Parse the playbook from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the playbook. + */ + matchPlaybookFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).playbook; + } + + /** + * Parse the version from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the version. + */ + matchVersionFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).version; + } + /** * Return a fully-qualified project resource name string. * @@ -3472,6 +3699,143 @@ export class FlowsClient { return this.pathTemplates.testCaseResultPathTemplate.match(testCaseResultName).result; } + /** + * Return a fully-qualified tool resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} tool + * @returns {string} Resource name string. + */ + toolPath(project:string,location:string,agent:string,tool:string) { + return this.pathTemplates.toolPathTemplate.render({ + project: project, + location: location, + agent: agent, + tool: tool, + }); + } + + /** + * Parse the project from Tool resource. + * + * @param {string} toolName + * A fully-qualified path representing Tool resource. + * @returns {string} A string representing the project. + */ + matchProjectFromToolName(toolName: string) { + return this.pathTemplates.toolPathTemplate.match(toolName).project; + } + + /** + * Parse the location from Tool resource. + * + * @param {string} toolName + * A fully-qualified path representing Tool resource. + * @returns {string} A string representing the location. + */ + matchLocationFromToolName(toolName: string) { + return this.pathTemplates.toolPathTemplate.match(toolName).location; + } + + /** + * Parse the agent from Tool resource. + * + * @param {string} toolName + * A fully-qualified path representing Tool resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromToolName(toolName: string) { + return this.pathTemplates.toolPathTemplate.match(toolName).agent; + } + + /** + * Parse the tool from Tool resource. + * + * @param {string} toolName + * A fully-qualified path representing Tool resource. + * @returns {string} A string representing the tool. + */ + matchToolFromToolName(toolName: string) { + return this.pathTemplates.toolPathTemplate.match(toolName).tool; + } + + /** + * Return a fully-qualified toolVersion resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} tool + * @param {string} version + * @returns {string} Resource name string. + */ + toolVersionPath(project:string,location:string,agent:string,tool:string,version:string) { + return this.pathTemplates.toolVersionPathTemplate.render({ + project: project, + location: location, + agent: agent, + tool: tool, + version: version, + }); + } + + /** + * Parse the project from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the project. + */ + matchProjectFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).project; + } + + /** + * Parse the location from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the location. + */ + matchLocationFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).location; + } + + /** + * Parse the agent from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).agent; + } + + /** + * Parse the tool from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the tool. + */ + matchToolFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).tool; + } + + /** + * Parse the version from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the version. + */ + matchVersionFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).version; + } + /** * Return a fully-qualified version resource name string. * diff --git a/packages/google-cloud-dialogflow-cx/src/v3/flows_proto_list.json b/packages/google-cloud-dialogflow-cx/src/v3/flows_proto_list.json index 81549ae03b3..081858680c0 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/flows_proto_list.json +++ b/packages/google-cloud-dialogflow-cx/src/v3/flows_proto_list.json @@ -3,10 +3,12 @@ "../../protos/google/cloud/dialogflow/cx/v3/agent.proto", "../../protos/google/cloud/dialogflow/cx/v3/audio_config.proto", "../../protos/google/cloud/dialogflow/cx/v3/changelog.proto", + "../../protos/google/cloud/dialogflow/cx/v3/code_block.proto", "../../protos/google/cloud/dialogflow/cx/v3/data_store_connection.proto", "../../protos/google/cloud/dialogflow/cx/v3/deployment.proto", "../../protos/google/cloud/dialogflow/cx/v3/entity_type.proto", "../../protos/google/cloud/dialogflow/cx/v3/environment.proto", + "../../protos/google/cloud/dialogflow/cx/v3/example.proto", "../../protos/google/cloud/dialogflow/cx/v3/experiment.proto", "../../protos/google/cloud/dialogflow/cx/v3/flow.proto", "../../protos/google/cloud/dialogflow/cx/v3/fulfillment.proto", @@ -17,12 +19,17 @@ "../../protos/google/cloud/dialogflow/cx/v3/inline.proto", "../../protos/google/cloud/dialogflow/cx/v3/intent.proto", "../../protos/google/cloud/dialogflow/cx/v3/page.proto", + "../../protos/google/cloud/dialogflow/cx/v3/parameter_definition.proto", + "../../protos/google/cloud/dialogflow/cx/v3/playbook.proto", "../../protos/google/cloud/dialogflow/cx/v3/response_message.proto", "../../protos/google/cloud/dialogflow/cx/v3/safety_settings.proto", "../../protos/google/cloud/dialogflow/cx/v3/security_settings.proto", "../../protos/google/cloud/dialogflow/cx/v3/session.proto", "../../protos/google/cloud/dialogflow/cx/v3/session_entity_type.proto", "../../protos/google/cloud/dialogflow/cx/v3/test_case.proto", + "../../protos/google/cloud/dialogflow/cx/v3/tool.proto", + "../../protos/google/cloud/dialogflow/cx/v3/tool_call.proto", + "../../protos/google/cloud/dialogflow/cx/v3/trace.proto", "../../protos/google/cloud/dialogflow/cx/v3/transition_route_group.proto", "../../protos/google/cloud/dialogflow/cx/v3/validation_message.proto", "../../protos/google/cloud/dialogflow/cx/v3/version.proto", diff --git a/packages/google-cloud-dialogflow-cx/src/v3/gapic_metadata.json b/packages/google-cloud-dialogflow-cx/src/v3/gapic_metadata.json index 8edee9cb10f..7b74a2ddbc0 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/gapic_metadata.json +++ b/packages/google-cloud-dialogflow-cx/src/v3/gapic_metadata.json @@ -413,6 +413,74 @@ } } }, + "Examples": { + "clients": { + "grpc": { + "libraryClient": "ExamplesClient", + "rpcs": { + "CreateExample": { + "methods": [ + "createExample" + ] + }, + "DeleteExample": { + "methods": [ + "deleteExample" + ] + }, + "GetExample": { + "methods": [ + "getExample" + ] + }, + "UpdateExample": { + "methods": [ + "updateExample" + ] + }, + "ListExamples": { + "methods": [ + "listExamples", + "listExamplesStream", + "listExamplesAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "ExamplesClient", + "rpcs": { + "CreateExample": { + "methods": [ + "createExample" + ] + }, + "DeleteExample": { + "methods": [ + "deleteExample" + ] + }, + "GetExample": { + "methods": [ + "getExample" + ] + }, + "UpdateExample": { + "methods": [ + "updateExample" + ] + }, + "ListExamples": { + "methods": [ + "listExamples", + "listExamplesStream", + "listExamplesAsync" + ] + } + } + } + } + }, "Experiments": { "clients": { "grpc": { @@ -843,6 +911,148 @@ } } }, + "Playbooks": { + "clients": { + "grpc": { + "libraryClient": "PlaybooksClient", + "rpcs": { + "CreatePlaybook": { + "methods": [ + "createPlaybook" + ] + }, + "DeletePlaybook": { + "methods": [ + "deletePlaybook" + ] + }, + "GetPlaybook": { + "methods": [ + "getPlaybook" + ] + }, + "UpdatePlaybook": { + "methods": [ + "updatePlaybook" + ] + }, + "CreatePlaybookVersion": { + "methods": [ + "createPlaybookVersion" + ] + }, + "GetPlaybookVersion": { + "methods": [ + "getPlaybookVersion" + ] + }, + "RestorePlaybookVersion": { + "methods": [ + "restorePlaybookVersion" + ] + }, + "DeletePlaybookVersion": { + "methods": [ + "deletePlaybookVersion" + ] + }, + "ExportPlaybook": { + "methods": [ + "exportPlaybook" + ] + }, + "ImportPlaybook": { + "methods": [ + "importPlaybook" + ] + }, + "ListPlaybooks": { + "methods": [ + "listPlaybooks", + "listPlaybooksStream", + "listPlaybooksAsync" + ] + }, + "ListPlaybookVersions": { + "methods": [ + "listPlaybookVersions", + "listPlaybookVersionsStream", + "listPlaybookVersionsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "PlaybooksClient", + "rpcs": { + "CreatePlaybook": { + "methods": [ + "createPlaybook" + ] + }, + "DeletePlaybook": { + "methods": [ + "deletePlaybook" + ] + }, + "GetPlaybook": { + "methods": [ + "getPlaybook" + ] + }, + "UpdatePlaybook": { + "methods": [ + "updatePlaybook" + ] + }, + "CreatePlaybookVersion": { + "methods": [ + "createPlaybookVersion" + ] + }, + "GetPlaybookVersion": { + "methods": [ + "getPlaybookVersion" + ] + }, + "RestorePlaybookVersion": { + "methods": [ + "restorePlaybookVersion" + ] + }, + "DeletePlaybookVersion": { + "methods": [ + "deletePlaybookVersion" + ] + }, + "ExportPlaybook": { + "methods": [ + "exportPlaybook" + ] + }, + "ImportPlaybook": { + "methods": [ + "importPlaybook" + ] + }, + "ListPlaybooks": { + "methods": [ + "listPlaybooks", + "listPlaybooksStream", + "listPlaybooksAsync" + ] + }, + "ListPlaybookVersions": { + "methods": [ + "listPlaybookVersions", + "listPlaybookVersionsStream", + "listPlaybookVersionsAsync" + ] + } + } + } + } + }, "SecuritySettingsService": { "clients": { "grpc": { @@ -1185,6 +1395,128 @@ } } }, + "Tools": { + "clients": { + "grpc": { + "libraryClient": "ToolsClient", + "rpcs": { + "CreateTool": { + "methods": [ + "createTool" + ] + }, + "GetTool": { + "methods": [ + "getTool" + ] + }, + "UpdateTool": { + "methods": [ + "updateTool" + ] + }, + "DeleteTool": { + "methods": [ + "deleteTool" + ] + }, + "CreateToolVersion": { + "methods": [ + "createToolVersion" + ] + }, + "GetToolVersion": { + "methods": [ + "getToolVersion" + ] + }, + "DeleteToolVersion": { + "methods": [ + "deleteToolVersion" + ] + }, + "RestoreToolVersion": { + "methods": [ + "restoreToolVersion" + ] + }, + "ListTools": { + "methods": [ + "listTools", + "listToolsStream", + "listToolsAsync" + ] + }, + "ListToolVersions": { + "methods": [ + "listToolVersions", + "listToolVersionsStream", + "listToolVersionsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "ToolsClient", + "rpcs": { + "CreateTool": { + "methods": [ + "createTool" + ] + }, + "GetTool": { + "methods": [ + "getTool" + ] + }, + "UpdateTool": { + "methods": [ + "updateTool" + ] + }, + "DeleteTool": { + "methods": [ + "deleteTool" + ] + }, + "CreateToolVersion": { + "methods": [ + "createToolVersion" + ] + }, + "GetToolVersion": { + "methods": [ + "getToolVersion" + ] + }, + "DeleteToolVersion": { + "methods": [ + "deleteToolVersion" + ] + }, + "RestoreToolVersion": { + "methods": [ + "restoreToolVersion" + ] + }, + "ListTools": { + "methods": [ + "listTools", + "listToolsStream", + "listToolsAsync" + ] + }, + "ListToolVersions": { + "methods": [ + "listToolVersions", + "listToolVersionsStream", + "listToolVersionsAsync" + ] + } + } + } + } + }, "TransitionRouteGroups": { "clients": { "grpc": { diff --git a/packages/google-cloud-dialogflow-cx/src/v3/generators_client.ts b/packages/google-cloud-dialogflow-cx/src/v3/generators_client.ts index ad5b8b73cb4..e5fe5818bc7 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/generators_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3/generators_client.ts @@ -208,6 +208,9 @@ export class GeneratorsClient { environmentPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}' ), + examplePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}/examples/{example}' + ), experimentPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/experiments/{experiment}' ), @@ -229,6 +232,12 @@ export class GeneratorsClient { pagePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/pages/{page}' ), + playbookPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}' + ), + playbookVersionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}/versions/{version}' + ), projectPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}' ), @@ -253,6 +262,12 @@ export class GeneratorsClient { testCaseResultPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/testCases/{test_case}/results/{result}' ), + toolPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/tools/{tool}' + ), + toolVersionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/tools/{tool}/versions/{version}' + ), versionPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/versions/{version}' ), @@ -1832,6 +1847,81 @@ export class GeneratorsClient { return this.pathTemplates.environmentPathTemplate.match(environmentName).environment; } + /** + * Return a fully-qualified example resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} playbook + * @param {string} example + * @returns {string} Resource name string. + */ + examplePath(project:string,location:string,agent:string,playbook:string,example:string) { + return this.pathTemplates.examplePathTemplate.render({ + project: project, + location: location, + agent: agent, + playbook: playbook, + example: example, + }); + } + + /** + * Parse the project from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the project. + */ + matchProjectFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).project; + } + + /** + * Parse the location from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the location. + */ + matchLocationFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).location; + } + + /** + * Parse the agent from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).agent; + } + + /** + * Parse the playbook from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the playbook. + */ + matchPlaybookFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).playbook; + } + + /** + * Parse the example from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the example. + */ + matchExampleFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).example; + } + /** * Return a fully-qualified experiment resource name string. * @@ -2266,6 +2356,143 @@ export class GeneratorsClient { return this.pathTemplates.pagePathTemplate.match(pageName).page; } + /** + * Return a fully-qualified playbook resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} playbook + * @returns {string} Resource name string. + */ + playbookPath(project:string,location:string,agent:string,playbook:string) { + return this.pathTemplates.playbookPathTemplate.render({ + project: project, + location: location, + agent: agent, + playbook: playbook, + }); + } + + /** + * Parse the project from Playbook resource. + * + * @param {string} playbookName + * A fully-qualified path representing Playbook resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPlaybookName(playbookName: string) { + return this.pathTemplates.playbookPathTemplate.match(playbookName).project; + } + + /** + * Parse the location from Playbook resource. + * + * @param {string} playbookName + * A fully-qualified path representing Playbook resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPlaybookName(playbookName: string) { + return this.pathTemplates.playbookPathTemplate.match(playbookName).location; + } + + /** + * Parse the agent from Playbook resource. + * + * @param {string} playbookName + * A fully-qualified path representing Playbook resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromPlaybookName(playbookName: string) { + return this.pathTemplates.playbookPathTemplate.match(playbookName).agent; + } + + /** + * Parse the playbook from Playbook resource. + * + * @param {string} playbookName + * A fully-qualified path representing Playbook resource. + * @returns {string} A string representing the playbook. + */ + matchPlaybookFromPlaybookName(playbookName: string) { + return this.pathTemplates.playbookPathTemplate.match(playbookName).playbook; + } + + /** + * Return a fully-qualified playbookVersion resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} playbook + * @param {string} version + * @returns {string} Resource name string. + */ + playbookVersionPath(project:string,location:string,agent:string,playbook:string,version:string) { + return this.pathTemplates.playbookVersionPathTemplate.render({ + project: project, + location: location, + agent: agent, + playbook: playbook, + version: version, + }); + } + + /** + * Parse the project from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).project; + } + + /** + * Parse the location from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).location; + } + + /** + * Parse the agent from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).agent; + } + + /** + * Parse the playbook from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the playbook. + */ + matchPlaybookFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).playbook; + } + + /** + * Parse the version from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the version. + */ + matchVersionFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).version; + } + /** * Return a fully-qualified project resource name string. * @@ -2775,6 +3002,143 @@ export class GeneratorsClient { return this.pathTemplates.testCaseResultPathTemplate.match(testCaseResultName).result; } + /** + * Return a fully-qualified tool resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} tool + * @returns {string} Resource name string. + */ + toolPath(project:string,location:string,agent:string,tool:string) { + return this.pathTemplates.toolPathTemplate.render({ + project: project, + location: location, + agent: agent, + tool: tool, + }); + } + + /** + * Parse the project from Tool resource. + * + * @param {string} toolName + * A fully-qualified path representing Tool resource. + * @returns {string} A string representing the project. + */ + matchProjectFromToolName(toolName: string) { + return this.pathTemplates.toolPathTemplate.match(toolName).project; + } + + /** + * Parse the location from Tool resource. + * + * @param {string} toolName + * A fully-qualified path representing Tool resource. + * @returns {string} A string representing the location. + */ + matchLocationFromToolName(toolName: string) { + return this.pathTemplates.toolPathTemplate.match(toolName).location; + } + + /** + * Parse the agent from Tool resource. + * + * @param {string} toolName + * A fully-qualified path representing Tool resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromToolName(toolName: string) { + return this.pathTemplates.toolPathTemplate.match(toolName).agent; + } + + /** + * Parse the tool from Tool resource. + * + * @param {string} toolName + * A fully-qualified path representing Tool resource. + * @returns {string} A string representing the tool. + */ + matchToolFromToolName(toolName: string) { + return this.pathTemplates.toolPathTemplate.match(toolName).tool; + } + + /** + * Return a fully-qualified toolVersion resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} tool + * @param {string} version + * @returns {string} Resource name string. + */ + toolVersionPath(project:string,location:string,agent:string,tool:string,version:string) { + return this.pathTemplates.toolVersionPathTemplate.render({ + project: project, + location: location, + agent: agent, + tool: tool, + version: version, + }); + } + + /** + * Parse the project from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the project. + */ + matchProjectFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).project; + } + + /** + * Parse the location from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the location. + */ + matchLocationFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).location; + } + + /** + * Parse the agent from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).agent; + } + + /** + * Parse the tool from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the tool. + */ + matchToolFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).tool; + } + + /** + * Parse the version from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the version. + */ + matchVersionFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).version; + } + /** * Return a fully-qualified version resource name string. * diff --git a/packages/google-cloud-dialogflow-cx/src/v3/generators_proto_list.json b/packages/google-cloud-dialogflow-cx/src/v3/generators_proto_list.json index 81549ae03b3..081858680c0 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/generators_proto_list.json +++ b/packages/google-cloud-dialogflow-cx/src/v3/generators_proto_list.json @@ -3,10 +3,12 @@ "../../protos/google/cloud/dialogflow/cx/v3/agent.proto", "../../protos/google/cloud/dialogflow/cx/v3/audio_config.proto", "../../protos/google/cloud/dialogflow/cx/v3/changelog.proto", + "../../protos/google/cloud/dialogflow/cx/v3/code_block.proto", "../../protos/google/cloud/dialogflow/cx/v3/data_store_connection.proto", "../../protos/google/cloud/dialogflow/cx/v3/deployment.proto", "../../protos/google/cloud/dialogflow/cx/v3/entity_type.proto", "../../protos/google/cloud/dialogflow/cx/v3/environment.proto", + "../../protos/google/cloud/dialogflow/cx/v3/example.proto", "../../protos/google/cloud/dialogflow/cx/v3/experiment.proto", "../../protos/google/cloud/dialogflow/cx/v3/flow.proto", "../../protos/google/cloud/dialogflow/cx/v3/fulfillment.proto", @@ -17,12 +19,17 @@ "../../protos/google/cloud/dialogflow/cx/v3/inline.proto", "../../protos/google/cloud/dialogflow/cx/v3/intent.proto", "../../protos/google/cloud/dialogflow/cx/v3/page.proto", + "../../protos/google/cloud/dialogflow/cx/v3/parameter_definition.proto", + "../../protos/google/cloud/dialogflow/cx/v3/playbook.proto", "../../protos/google/cloud/dialogflow/cx/v3/response_message.proto", "../../protos/google/cloud/dialogflow/cx/v3/safety_settings.proto", "../../protos/google/cloud/dialogflow/cx/v3/security_settings.proto", "../../protos/google/cloud/dialogflow/cx/v3/session.proto", "../../protos/google/cloud/dialogflow/cx/v3/session_entity_type.proto", "../../protos/google/cloud/dialogflow/cx/v3/test_case.proto", + "../../protos/google/cloud/dialogflow/cx/v3/tool.proto", + "../../protos/google/cloud/dialogflow/cx/v3/tool_call.proto", + "../../protos/google/cloud/dialogflow/cx/v3/trace.proto", "../../protos/google/cloud/dialogflow/cx/v3/transition_route_group.proto", "../../protos/google/cloud/dialogflow/cx/v3/validation_message.proto", "../../protos/google/cloud/dialogflow/cx/v3/version.proto", diff --git a/packages/google-cloud-dialogflow-cx/src/v3/index.ts b/packages/google-cloud-dialogflow-cx/src/v3/index.ts index 8b3b7c5fe69..cd3ff32a69c 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/index.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3/index.ts @@ -21,15 +21,18 @@ export {ChangelogsClient} from './changelogs_client'; export {DeploymentsClient} from './deployments_client'; export {EntityTypesClient} from './entity_types_client'; export {EnvironmentsClient} from './environments_client'; +export {ExamplesClient} from './examples_client'; export {ExperimentsClient} from './experiments_client'; export {FlowsClient} from './flows_client'; export {GeneratorsClient} from './generators_client'; export {IntentsClient} from './intents_client'; export {PagesClient} from './pages_client'; +export {PlaybooksClient} from './playbooks_client'; export {SecuritySettingsServiceClient} from './security_settings_service_client'; export {SessionEntityTypesClient} from './session_entity_types_client'; export {SessionsClient} from './sessions_client'; export {TestCasesClient} from './test_cases_client'; +export {ToolsClient} from './tools_client'; export {TransitionRouteGroupsClient} from './transition_route_groups_client'; export {VersionsClient} from './versions_client'; export {WebhooksClient} from './webhooks_client'; 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 22aa50ee75c..0b204c4320c 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/intents_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3/intents_client.ts @@ -208,6 +208,9 @@ export class IntentsClient { environmentPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}' ), + examplePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}/examples/{example}' + ), experimentPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/experiments/{experiment}' ), @@ -229,6 +232,12 @@ export class IntentsClient { pagePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/pages/{page}' ), + playbookPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}' + ), + playbookVersionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}/versions/{version}' + ), projectPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}' ), @@ -253,6 +262,12 @@ export class IntentsClient { testCaseResultPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/testCases/{test_case}/results/{result}' ), + toolPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/tools/{tool}' + ), + toolVersionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/tools/{tool}/versions/{version}' + ), versionPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/versions/{version}' ), @@ -2176,6 +2191,81 @@ export class IntentsClient { return this.pathTemplates.environmentPathTemplate.match(environmentName).environment; } + /** + * Return a fully-qualified example resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} playbook + * @param {string} example + * @returns {string} Resource name string. + */ + examplePath(project:string,location:string,agent:string,playbook:string,example:string) { + return this.pathTemplates.examplePathTemplate.render({ + project: project, + location: location, + agent: agent, + playbook: playbook, + example: example, + }); + } + + /** + * Parse the project from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the project. + */ + matchProjectFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).project; + } + + /** + * Parse the location from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the location. + */ + matchLocationFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).location; + } + + /** + * Parse the agent from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).agent; + } + + /** + * Parse the playbook from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the playbook. + */ + matchPlaybookFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).playbook; + } + + /** + * Parse the example from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the example. + */ + matchExampleFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).example; + } + /** * Return a fully-qualified experiment resource name string. * @@ -2610,6 +2700,143 @@ export class IntentsClient { return this.pathTemplates.pagePathTemplate.match(pageName).page; } + /** + * Return a fully-qualified playbook resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} playbook + * @returns {string} Resource name string. + */ + playbookPath(project:string,location:string,agent:string,playbook:string) { + return this.pathTemplates.playbookPathTemplate.render({ + project: project, + location: location, + agent: agent, + playbook: playbook, + }); + } + + /** + * Parse the project from Playbook resource. + * + * @param {string} playbookName + * A fully-qualified path representing Playbook resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPlaybookName(playbookName: string) { + return this.pathTemplates.playbookPathTemplate.match(playbookName).project; + } + + /** + * Parse the location from Playbook resource. + * + * @param {string} playbookName + * A fully-qualified path representing Playbook resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPlaybookName(playbookName: string) { + return this.pathTemplates.playbookPathTemplate.match(playbookName).location; + } + + /** + * Parse the agent from Playbook resource. + * + * @param {string} playbookName + * A fully-qualified path representing Playbook resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromPlaybookName(playbookName: string) { + return this.pathTemplates.playbookPathTemplate.match(playbookName).agent; + } + + /** + * Parse the playbook from Playbook resource. + * + * @param {string} playbookName + * A fully-qualified path representing Playbook resource. + * @returns {string} A string representing the playbook. + */ + matchPlaybookFromPlaybookName(playbookName: string) { + return this.pathTemplates.playbookPathTemplate.match(playbookName).playbook; + } + + /** + * Return a fully-qualified playbookVersion resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} playbook + * @param {string} version + * @returns {string} Resource name string. + */ + playbookVersionPath(project:string,location:string,agent:string,playbook:string,version:string) { + return this.pathTemplates.playbookVersionPathTemplate.render({ + project: project, + location: location, + agent: agent, + playbook: playbook, + version: version, + }); + } + + /** + * Parse the project from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).project; + } + + /** + * Parse the location from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).location; + } + + /** + * Parse the agent from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).agent; + } + + /** + * Parse the playbook from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the playbook. + */ + matchPlaybookFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).playbook; + } + + /** + * Parse the version from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the version. + */ + matchVersionFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).version; + } + /** * Return a fully-qualified project resource name string. * @@ -3119,6 +3346,143 @@ export class IntentsClient { return this.pathTemplates.testCaseResultPathTemplate.match(testCaseResultName).result; } + /** + * Return a fully-qualified tool resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} tool + * @returns {string} Resource name string. + */ + toolPath(project:string,location:string,agent:string,tool:string) { + return this.pathTemplates.toolPathTemplate.render({ + project: project, + location: location, + agent: agent, + tool: tool, + }); + } + + /** + * Parse the project from Tool resource. + * + * @param {string} toolName + * A fully-qualified path representing Tool resource. + * @returns {string} A string representing the project. + */ + matchProjectFromToolName(toolName: string) { + return this.pathTemplates.toolPathTemplate.match(toolName).project; + } + + /** + * Parse the location from Tool resource. + * + * @param {string} toolName + * A fully-qualified path representing Tool resource. + * @returns {string} A string representing the location. + */ + matchLocationFromToolName(toolName: string) { + return this.pathTemplates.toolPathTemplate.match(toolName).location; + } + + /** + * Parse the agent from Tool resource. + * + * @param {string} toolName + * A fully-qualified path representing Tool resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromToolName(toolName: string) { + return this.pathTemplates.toolPathTemplate.match(toolName).agent; + } + + /** + * Parse the tool from Tool resource. + * + * @param {string} toolName + * A fully-qualified path representing Tool resource. + * @returns {string} A string representing the tool. + */ + matchToolFromToolName(toolName: string) { + return this.pathTemplates.toolPathTemplate.match(toolName).tool; + } + + /** + * Return a fully-qualified toolVersion resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} tool + * @param {string} version + * @returns {string} Resource name string. + */ + toolVersionPath(project:string,location:string,agent:string,tool:string,version:string) { + return this.pathTemplates.toolVersionPathTemplate.render({ + project: project, + location: location, + agent: agent, + tool: tool, + version: version, + }); + } + + /** + * Parse the project from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the project. + */ + matchProjectFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).project; + } + + /** + * Parse the location from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the location. + */ + matchLocationFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).location; + } + + /** + * Parse the agent from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).agent; + } + + /** + * Parse the tool from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the tool. + */ + matchToolFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).tool; + } + + /** + * Parse the version from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the version. + */ + matchVersionFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).version; + } + /** * Return a fully-qualified version resource name string. * diff --git a/packages/google-cloud-dialogflow-cx/src/v3/intents_proto_list.json b/packages/google-cloud-dialogflow-cx/src/v3/intents_proto_list.json index 81549ae03b3..081858680c0 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/intents_proto_list.json +++ b/packages/google-cloud-dialogflow-cx/src/v3/intents_proto_list.json @@ -3,10 +3,12 @@ "../../protos/google/cloud/dialogflow/cx/v3/agent.proto", "../../protos/google/cloud/dialogflow/cx/v3/audio_config.proto", "../../protos/google/cloud/dialogflow/cx/v3/changelog.proto", + "../../protos/google/cloud/dialogflow/cx/v3/code_block.proto", "../../protos/google/cloud/dialogflow/cx/v3/data_store_connection.proto", "../../protos/google/cloud/dialogflow/cx/v3/deployment.proto", "../../protos/google/cloud/dialogflow/cx/v3/entity_type.proto", "../../protos/google/cloud/dialogflow/cx/v3/environment.proto", + "../../protos/google/cloud/dialogflow/cx/v3/example.proto", "../../protos/google/cloud/dialogflow/cx/v3/experiment.proto", "../../protos/google/cloud/dialogflow/cx/v3/flow.proto", "../../protos/google/cloud/dialogflow/cx/v3/fulfillment.proto", @@ -17,12 +19,17 @@ "../../protos/google/cloud/dialogflow/cx/v3/inline.proto", "../../protos/google/cloud/dialogflow/cx/v3/intent.proto", "../../protos/google/cloud/dialogflow/cx/v3/page.proto", + "../../protos/google/cloud/dialogflow/cx/v3/parameter_definition.proto", + "../../protos/google/cloud/dialogflow/cx/v3/playbook.proto", "../../protos/google/cloud/dialogflow/cx/v3/response_message.proto", "../../protos/google/cloud/dialogflow/cx/v3/safety_settings.proto", "../../protos/google/cloud/dialogflow/cx/v3/security_settings.proto", "../../protos/google/cloud/dialogflow/cx/v3/session.proto", "../../protos/google/cloud/dialogflow/cx/v3/session_entity_type.proto", "../../protos/google/cloud/dialogflow/cx/v3/test_case.proto", + "../../protos/google/cloud/dialogflow/cx/v3/tool.proto", + "../../protos/google/cloud/dialogflow/cx/v3/tool_call.proto", + "../../protos/google/cloud/dialogflow/cx/v3/trace.proto", "../../protos/google/cloud/dialogflow/cx/v3/transition_route_group.proto", "../../protos/google/cloud/dialogflow/cx/v3/validation_message.proto", "../../protos/google/cloud/dialogflow/cx/v3/version.proto", 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 695f5c26264..7cf0e1d47bd 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/pages_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3/pages_client.ts @@ -208,6 +208,9 @@ export class PagesClient { environmentPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}' ), + examplePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}/examples/{example}' + ), experimentPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/experiments/{experiment}' ), @@ -229,6 +232,12 @@ export class PagesClient { pagePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/pages/{page}' ), + playbookPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}' + ), + playbookVersionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}/versions/{version}' + ), projectPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}' ), @@ -253,6 +262,12 @@ export class PagesClient { testCaseResultPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/testCases/{test_case}/results/{result}' ), + toolPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/tools/{tool}' + ), + toolVersionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/tools/{tool}/versions/{version}' + ), versionPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/versions/{version}' ), @@ -1966,6 +1981,81 @@ export class PagesClient { return this.pathTemplates.environmentPathTemplate.match(environmentName).environment; } + /** + * Return a fully-qualified example resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} playbook + * @param {string} example + * @returns {string} Resource name string. + */ + examplePath(project:string,location:string,agent:string,playbook:string,example:string) { + return this.pathTemplates.examplePathTemplate.render({ + project: project, + location: location, + agent: agent, + playbook: playbook, + example: example, + }); + } + + /** + * Parse the project from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the project. + */ + matchProjectFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).project; + } + + /** + * Parse the location from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the location. + */ + matchLocationFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).location; + } + + /** + * Parse the agent from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).agent; + } + + /** + * Parse the playbook from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the playbook. + */ + matchPlaybookFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).playbook; + } + + /** + * Parse the example from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the example. + */ + matchExampleFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).example; + } + /** * Return a fully-qualified experiment resource name string. * @@ -2400,6 +2490,143 @@ export class PagesClient { return this.pathTemplates.pagePathTemplate.match(pageName).page; } + /** + * Return a fully-qualified playbook resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} playbook + * @returns {string} Resource name string. + */ + playbookPath(project:string,location:string,agent:string,playbook:string) { + return this.pathTemplates.playbookPathTemplate.render({ + project: project, + location: location, + agent: agent, + playbook: playbook, + }); + } + + /** + * Parse the project from Playbook resource. + * + * @param {string} playbookName + * A fully-qualified path representing Playbook resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPlaybookName(playbookName: string) { + return this.pathTemplates.playbookPathTemplate.match(playbookName).project; + } + + /** + * Parse the location from Playbook resource. + * + * @param {string} playbookName + * A fully-qualified path representing Playbook resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPlaybookName(playbookName: string) { + return this.pathTemplates.playbookPathTemplate.match(playbookName).location; + } + + /** + * Parse the agent from Playbook resource. + * + * @param {string} playbookName + * A fully-qualified path representing Playbook resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromPlaybookName(playbookName: string) { + return this.pathTemplates.playbookPathTemplate.match(playbookName).agent; + } + + /** + * Parse the playbook from Playbook resource. + * + * @param {string} playbookName + * A fully-qualified path representing Playbook resource. + * @returns {string} A string representing the playbook. + */ + matchPlaybookFromPlaybookName(playbookName: string) { + return this.pathTemplates.playbookPathTemplate.match(playbookName).playbook; + } + + /** + * Return a fully-qualified playbookVersion resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} playbook + * @param {string} version + * @returns {string} Resource name string. + */ + playbookVersionPath(project:string,location:string,agent:string,playbook:string,version:string) { + return this.pathTemplates.playbookVersionPathTemplate.render({ + project: project, + location: location, + agent: agent, + playbook: playbook, + version: version, + }); + } + + /** + * Parse the project from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).project; + } + + /** + * Parse the location from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).location; + } + + /** + * Parse the agent from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).agent; + } + + /** + * Parse the playbook from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the playbook. + */ + matchPlaybookFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).playbook; + } + + /** + * Parse the version from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the version. + */ + matchVersionFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).version; + } + /** * Return a fully-qualified project resource name string. * @@ -2909,6 +3136,143 @@ export class PagesClient { return this.pathTemplates.testCaseResultPathTemplate.match(testCaseResultName).result; } + /** + * Return a fully-qualified tool resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} tool + * @returns {string} Resource name string. + */ + toolPath(project:string,location:string,agent:string,tool:string) { + return this.pathTemplates.toolPathTemplate.render({ + project: project, + location: location, + agent: agent, + tool: tool, + }); + } + + /** + * Parse the project from Tool resource. + * + * @param {string} toolName + * A fully-qualified path representing Tool resource. + * @returns {string} A string representing the project. + */ + matchProjectFromToolName(toolName: string) { + return this.pathTemplates.toolPathTemplate.match(toolName).project; + } + + /** + * Parse the location from Tool resource. + * + * @param {string} toolName + * A fully-qualified path representing Tool resource. + * @returns {string} A string representing the location. + */ + matchLocationFromToolName(toolName: string) { + return this.pathTemplates.toolPathTemplate.match(toolName).location; + } + + /** + * Parse the agent from Tool resource. + * + * @param {string} toolName + * A fully-qualified path representing Tool resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromToolName(toolName: string) { + return this.pathTemplates.toolPathTemplate.match(toolName).agent; + } + + /** + * Parse the tool from Tool resource. + * + * @param {string} toolName + * A fully-qualified path representing Tool resource. + * @returns {string} A string representing the tool. + */ + matchToolFromToolName(toolName: string) { + return this.pathTemplates.toolPathTemplate.match(toolName).tool; + } + + /** + * Return a fully-qualified toolVersion resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} tool + * @param {string} version + * @returns {string} Resource name string. + */ + toolVersionPath(project:string,location:string,agent:string,tool:string,version:string) { + return this.pathTemplates.toolVersionPathTemplate.render({ + project: project, + location: location, + agent: agent, + tool: tool, + version: version, + }); + } + + /** + * Parse the project from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the project. + */ + matchProjectFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).project; + } + + /** + * Parse the location from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the location. + */ + matchLocationFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).location; + } + + /** + * Parse the agent from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).agent; + } + + /** + * Parse the tool from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the tool. + */ + matchToolFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).tool; + } + + /** + * Parse the version from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the version. + */ + matchVersionFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).version; + } + /** * Return a fully-qualified version resource name string. * diff --git a/packages/google-cloud-dialogflow-cx/src/v3/pages_proto_list.json b/packages/google-cloud-dialogflow-cx/src/v3/pages_proto_list.json index 81549ae03b3..081858680c0 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/pages_proto_list.json +++ b/packages/google-cloud-dialogflow-cx/src/v3/pages_proto_list.json @@ -3,10 +3,12 @@ "../../protos/google/cloud/dialogflow/cx/v3/agent.proto", "../../protos/google/cloud/dialogflow/cx/v3/audio_config.proto", "../../protos/google/cloud/dialogflow/cx/v3/changelog.proto", + "../../protos/google/cloud/dialogflow/cx/v3/code_block.proto", "../../protos/google/cloud/dialogflow/cx/v3/data_store_connection.proto", "../../protos/google/cloud/dialogflow/cx/v3/deployment.proto", "../../protos/google/cloud/dialogflow/cx/v3/entity_type.proto", "../../protos/google/cloud/dialogflow/cx/v3/environment.proto", + "../../protos/google/cloud/dialogflow/cx/v3/example.proto", "../../protos/google/cloud/dialogflow/cx/v3/experiment.proto", "../../protos/google/cloud/dialogflow/cx/v3/flow.proto", "../../protos/google/cloud/dialogflow/cx/v3/fulfillment.proto", @@ -17,12 +19,17 @@ "../../protos/google/cloud/dialogflow/cx/v3/inline.proto", "../../protos/google/cloud/dialogflow/cx/v3/intent.proto", "../../protos/google/cloud/dialogflow/cx/v3/page.proto", + "../../protos/google/cloud/dialogflow/cx/v3/parameter_definition.proto", + "../../protos/google/cloud/dialogflow/cx/v3/playbook.proto", "../../protos/google/cloud/dialogflow/cx/v3/response_message.proto", "../../protos/google/cloud/dialogflow/cx/v3/safety_settings.proto", "../../protos/google/cloud/dialogflow/cx/v3/security_settings.proto", "../../protos/google/cloud/dialogflow/cx/v3/session.proto", "../../protos/google/cloud/dialogflow/cx/v3/session_entity_type.proto", "../../protos/google/cloud/dialogflow/cx/v3/test_case.proto", + "../../protos/google/cloud/dialogflow/cx/v3/tool.proto", + "../../protos/google/cloud/dialogflow/cx/v3/tool_call.proto", + "../../protos/google/cloud/dialogflow/cx/v3/trace.proto", "../../protos/google/cloud/dialogflow/cx/v3/transition_route_group.proto", "../../protos/google/cloud/dialogflow/cx/v3/validation_message.proto", "../../protos/google/cloud/dialogflow/cx/v3/version.proto", diff --git a/packages/google-cloud-dialogflow-cx/src/v3/playbooks_client.ts b/packages/google-cloud-dialogflow-cx/src/v3/playbooks_client.ts new file mode 100644 index 00000000000..f3a5f2532bb --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/src/v3/playbooks_client.ts @@ -0,0 +1,4123 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type {Callback, CallOptions, Descriptors, ClientOptions, GrpcClientOptions, LROperation, PaginationCallback, GaxCall, LocationsClient, LocationProtos} from 'google-gax'; +import {Transform} from 'stream'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +import {loggingUtils as logging, decodeAnyProtosInArray} from 'google-gax'; + +/** + * Client JSON configuration object, loaded from + * `src/v3/playbooks_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './playbooks_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Service for managing {@link protos.google.cloud.dialogflow.cx.v3.Playbook|Playbooks}. + * @class + * @memberof v3 + */ +export class PlaybooksClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + private _universeDomain: string; + private _servicePath: string; + private _log = logging.log('dialogflow-cx'); + + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + locationsClient: LocationsClient; + pathTemplates: {[name: string]: gax.PathTemplate}; + operationsClient: gax.OperationsClient; + playbooksStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of PlaybooksClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new PlaybooksClient({fallback: true}, gax); + * ``` + */ + constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof PlaybooksClient; + if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) { + throw new Error('Please set either universe_domain or universeDomain, but not both.'); + } + const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined; + this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com'; + this._servicePath = 'dialogflow.' + this._universeDomain; + const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; + this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== this._servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = this._servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === this._servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + this.locationsClient = new this._gaxModule.LocationsClient( + this._gaxGrpc, + opts + ); + + + // Determine the client header string. + const clientHeader = [ + `gax/${this._gaxModule.version}`, + `gapic/${version}`, + ]; + if (typeof process === 'object' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + agentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}' + ), + agentGenerativeSettingsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/generativeSettings' + ), + agentValidationResultPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/validationResult' + ), + changelogPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/changelogs/{changelog}' + ), + continuousTestResultPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/continuousTestResults/{continuous_test_result}' + ), + deploymentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/deployments/{deployment}' + ), + entityTypePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/entityTypes/{entity_type}' + ), + environmentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}' + ), + examplePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}/examples/{example}' + ), + experimentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/experiments/{experiment}' + ), + flowPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}' + ), + flowValidationResultPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/validationResult' + ), + generatorPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/generators/{generator}' + ), + intentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/intents/{intent}' + ), + locationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}' + ), + pagePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/pages/{page}' + ), + playbookPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}' + ), + playbookVersionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}/versions/{version}' + ), + projectPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}' + ), + projectLocationAgentEnvironmentSessionEntityTypePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/sessions/{session}/entityTypes/{entity_type}' + ), + projectLocationAgentFlowTransitionRouteGroupsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/transitionRouteGroups/{transition_route_group}' + ), + projectLocationAgentSessionEntityTypePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/sessions/{session}/entityTypes/{entity_type}' + ), + projectLocationAgentTransitionRouteGroupsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/transitionRouteGroups/{transition_route_group}' + ), + securitySettingsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/securitySettings/{security_settings}' + ), + testCasePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/testCases/{test_case}' + ), + testCaseResultPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/testCases/{test_case}/results/{result}' + ), + toolPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/tools/{tool}' + ), + toolVersionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/tools/{tool}/versions/{version}' + ), + versionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/versions/{version}' + ), + webhookPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/webhooks/{webhook}' + ), + }; + + // Some of the methods on this service return "paged" results, + // (e.g. 50 results at a time, with tokens to get subsequent + // pages). Denote the keys used for pagination and results. + this.descriptors.page = { + listPlaybooks: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'playbooks'), + listPlaybookVersions: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'playbookVersions') + }; + + const protoFilesRoot = this._gaxModule.protobufFromJSON(jsonProtos); + // This API contains "long-running operations", which return a + // an Operation object that allows for tracking of the operation, + // rather than holding a request open. + const lroOptions: GrpcClientOptions = { + auth: this.auth, + grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined + }; + if (opts.fallback) { + lroOptions.protoJson = protoFilesRoot; + lroOptions.httpRules = [{selector: 'google.cloud.location.Locations.GetLocation',get: '/v3/{name=projects/*/locations/*}',},{selector: 'google.cloud.location.Locations.ListLocations',get: '/v3/{name=projects/*}/locations',},{selector: 'google.longrunning.Operations.CancelOperation',post: '/v3/{name=projects/*/operations/*}:cancel',additional_bindings: [{post: '/v3/{name=projects/*/locations/*/operations/*}:cancel',}], + },{selector: 'google.longrunning.Operations.GetOperation',get: '/v3/{name=projects/*/operations/*}',additional_bindings: [{get: '/v3/{name=projects/*/locations/*/operations/*}',}], + },{selector: 'google.longrunning.Operations.ListOperations',get: '/v3/{name=projects/*}/operations',additional_bindings: [{get: '/v3/{name=projects/*/locations/*}/operations',}], + }]; + } + this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts); + const exportPlaybookResponse = protoFilesRoot.lookup( + '.google.cloud.dialogflow.cx.v3.ExportPlaybookResponse') as gax.protobuf.Type; + const exportPlaybookMetadata = protoFilesRoot.lookup( + '.google.protobuf.Struct') as gax.protobuf.Type; + const importPlaybookResponse = protoFilesRoot.lookup( + '.google.cloud.dialogflow.cx.v3.ImportPlaybookResponse') as gax.protobuf.Type; + const importPlaybookMetadata = protoFilesRoot.lookup( + '.google.protobuf.Struct') as gax.protobuf.Type; + + this.descriptors.longrunning = { + exportPlaybook: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + exportPlaybookResponse.decode.bind(exportPlaybookResponse), + exportPlaybookMetadata.decode.bind(exportPlaybookMetadata)), + importPlaybook: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + importPlaybookResponse.decode.bind(importPlaybookResponse), + importPlaybookMetadata.decode.bind(importPlaybookMetadata)) + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.dialogflow.cx.v3.Playbooks', gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, {'x-goog-api-client': clientHeader.join(' ')}); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this.innerApiCalls = {}; + + // Add a warn function to the client constructor so it can be easily tested. + this.warn = this._gaxModule.warn; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.playbooksStub) { + return this.playbooksStub; + } + + // Put together the "service stub" for + // google.cloud.dialogflow.cx.v3.Playbooks. + this.playbooksStub = this._gaxGrpc.createStub( + this._opts.fallback ? + (this._protos as protobuf.Root).lookupService('google.cloud.dialogflow.cx.v3.Playbooks') : + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.dialogflow.cx.v3.Playbooks, + this._opts, this._providedCustomServicePath) as Promise<{[method: string]: Function}>; + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const playbooksStubMethods = + ['createPlaybook', 'deletePlaybook', 'listPlaybooks', 'getPlaybook', 'exportPlaybook', 'importPlaybook', 'updatePlaybook', 'createPlaybookVersion', 'getPlaybookVersion', 'restorePlaybookVersion', 'listPlaybookVersions', 'deletePlaybookVersion']; + for (const methodName of playbooksStubMethods) { + const callPromise = this.playbooksStub.then( + stub => (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error|null|undefined) => () => { + throw err; + }); + + const descriptor = + this.descriptors.page[methodName] || + this.descriptors.longrunning[methodName] || + undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.playbooksStub; + } + + /** + * The DNS address for this API service. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'dialogflow.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'dialogflow.googleapis.com'; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + get apiEndpoint() { + return this._servicePath; + } + + get universeDomain() { + return this._universeDomain; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/dialogflow' + ]; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId(callback?: Callback): + Promise|void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- +/** + * Creates a playbook in a specified agent. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The agent to create a playbook for. + * Format: `projects//locations//agents/`. + * @param {google.cloud.dialogflow.cx.v3.Playbook} request.playbook + * Required. The playbook to create. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.dialogflow.cx.v3.Playbook|Playbook}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v3/playbooks.create_playbook.js + * region_tag:dialogflow_v3_generated_Playbooks_CreatePlaybook_async + */ + createPlaybook( + request?: protos.google.cloud.dialogflow.cx.v3.ICreatePlaybookRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.dialogflow.cx.v3.IPlaybook, + protos.google.cloud.dialogflow.cx.v3.ICreatePlaybookRequest|undefined, {}|undefined + ]>; + createPlaybook( + request: protos.google.cloud.dialogflow.cx.v3.ICreatePlaybookRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dialogflow.cx.v3.IPlaybook, + protos.google.cloud.dialogflow.cx.v3.ICreatePlaybookRequest|null|undefined, + {}|null|undefined>): void; + createPlaybook( + request: protos.google.cloud.dialogflow.cx.v3.ICreatePlaybookRequest, + callback: Callback< + protos.google.cloud.dialogflow.cx.v3.IPlaybook, + protos.google.cloud.dialogflow.cx.v3.ICreatePlaybookRequest|null|undefined, + {}|null|undefined>): void; + createPlaybook( + request?: protos.google.cloud.dialogflow.cx.v3.ICreatePlaybookRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.dialogflow.cx.v3.IPlaybook, + protos.google.cloud.dialogflow.cx.v3.ICreatePlaybookRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.dialogflow.cx.v3.IPlaybook, + protos.google.cloud.dialogflow.cx.v3.ICreatePlaybookRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.dialogflow.cx.v3.IPlaybook, + protos.google.cloud.dialogflow.cx.v3.ICreatePlaybookRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('createPlaybook request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.dialogflow.cx.v3.IPlaybook, + protos.google.cloud.dialogflow.cx.v3.ICreatePlaybookRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('createPlaybook response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.createPlaybook(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.dialogflow.cx.v3.IPlaybook, + protos.google.cloud.dialogflow.cx.v3.ICreatePlaybookRequest|undefined, + {}|undefined + ]) => { + this._log.info('createPlaybook response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Deletes a specified playbook. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the playbook to delete. + * Format: + * `projects//locations//agents//playbooks/`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v3/playbooks.delete_playbook.js + * region_tag:dialogflow_v3_generated_Playbooks_DeletePlaybook_async + */ + deletePlaybook( + request?: protos.google.cloud.dialogflow.cx.v3.IDeletePlaybookRequest, + options?: CallOptions): + Promise<[ + protos.google.protobuf.IEmpty, + protos.google.cloud.dialogflow.cx.v3.IDeletePlaybookRequest|undefined, {}|undefined + ]>; + deletePlaybook( + request: protos.google.cloud.dialogflow.cx.v3.IDeletePlaybookRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.dialogflow.cx.v3.IDeletePlaybookRequest|null|undefined, + {}|null|undefined>): void; + deletePlaybook( + request: protos.google.cloud.dialogflow.cx.v3.IDeletePlaybookRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.dialogflow.cx.v3.IDeletePlaybookRequest|null|undefined, + {}|null|undefined>): void; + deletePlaybook( + request?: protos.google.cloud.dialogflow.cx.v3.IDeletePlaybookRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.dialogflow.cx.v3.IDeletePlaybookRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.dialogflow.cx.v3.IDeletePlaybookRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.protobuf.IEmpty, + protos.google.cloud.dialogflow.cx.v3.IDeletePlaybookRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('deletePlaybook request %j', request); + const wrappedCallback: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.dialogflow.cx.v3.IDeletePlaybookRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('deletePlaybook response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.deletePlaybook(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.protobuf.IEmpty, + protos.google.cloud.dialogflow.cx.v3.IDeletePlaybookRequest|undefined, + {}|undefined + ]) => { + this._log.info('deletePlaybook response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Retrieves the specified Playbook. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the playbook. + * Format: + * `projects//locations//agents//playbooks/`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.dialogflow.cx.v3.Playbook|Playbook}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v3/playbooks.get_playbook.js + * region_tag:dialogflow_v3_generated_Playbooks_GetPlaybook_async + */ + getPlaybook( + request?: protos.google.cloud.dialogflow.cx.v3.IGetPlaybookRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.dialogflow.cx.v3.IPlaybook, + protos.google.cloud.dialogflow.cx.v3.IGetPlaybookRequest|undefined, {}|undefined + ]>; + getPlaybook( + request: protos.google.cloud.dialogflow.cx.v3.IGetPlaybookRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dialogflow.cx.v3.IPlaybook, + protos.google.cloud.dialogflow.cx.v3.IGetPlaybookRequest|null|undefined, + {}|null|undefined>): void; + getPlaybook( + request: protos.google.cloud.dialogflow.cx.v3.IGetPlaybookRequest, + callback: Callback< + protos.google.cloud.dialogflow.cx.v3.IPlaybook, + protos.google.cloud.dialogflow.cx.v3.IGetPlaybookRequest|null|undefined, + {}|null|undefined>): void; + getPlaybook( + request?: protos.google.cloud.dialogflow.cx.v3.IGetPlaybookRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.dialogflow.cx.v3.IPlaybook, + protos.google.cloud.dialogflow.cx.v3.IGetPlaybookRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.dialogflow.cx.v3.IPlaybook, + protos.google.cloud.dialogflow.cx.v3.IGetPlaybookRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.dialogflow.cx.v3.IPlaybook, + protos.google.cloud.dialogflow.cx.v3.IGetPlaybookRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('getPlaybook request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.dialogflow.cx.v3.IPlaybook, + protos.google.cloud.dialogflow.cx.v3.IGetPlaybookRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getPlaybook response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getPlaybook(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.dialogflow.cx.v3.IPlaybook, + protos.google.cloud.dialogflow.cx.v3.IGetPlaybookRequest|undefined, + {}|undefined + ]) => { + this._log.info('getPlaybook response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Updates the specified Playbook. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.dialogflow.cx.v3.Playbook} request.playbook + * Required. The playbook to update. + * @param {google.protobuf.FieldMask} request.updateMask + * The mask to control which fields get updated. If the mask is not present, + * all fields will be updated. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.dialogflow.cx.v3.Playbook|Playbook}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v3/playbooks.update_playbook.js + * region_tag:dialogflow_v3_generated_Playbooks_UpdatePlaybook_async + */ + updatePlaybook( + request?: protos.google.cloud.dialogflow.cx.v3.IUpdatePlaybookRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.dialogflow.cx.v3.IPlaybook, + protos.google.cloud.dialogflow.cx.v3.IUpdatePlaybookRequest|undefined, {}|undefined + ]>; + updatePlaybook( + request: protos.google.cloud.dialogflow.cx.v3.IUpdatePlaybookRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dialogflow.cx.v3.IPlaybook, + protos.google.cloud.dialogflow.cx.v3.IUpdatePlaybookRequest|null|undefined, + {}|null|undefined>): void; + updatePlaybook( + request: protos.google.cloud.dialogflow.cx.v3.IUpdatePlaybookRequest, + callback: Callback< + protos.google.cloud.dialogflow.cx.v3.IPlaybook, + protos.google.cloud.dialogflow.cx.v3.IUpdatePlaybookRequest|null|undefined, + {}|null|undefined>): void; + updatePlaybook( + request?: protos.google.cloud.dialogflow.cx.v3.IUpdatePlaybookRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.dialogflow.cx.v3.IPlaybook, + protos.google.cloud.dialogflow.cx.v3.IUpdatePlaybookRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.dialogflow.cx.v3.IPlaybook, + protos.google.cloud.dialogflow.cx.v3.IUpdatePlaybookRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.dialogflow.cx.v3.IPlaybook, + protos.google.cloud.dialogflow.cx.v3.IUpdatePlaybookRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'playbook.name': request.playbook!.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('updatePlaybook request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.dialogflow.cx.v3.IPlaybook, + protos.google.cloud.dialogflow.cx.v3.IUpdatePlaybookRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('updatePlaybook response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.updatePlaybook(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.dialogflow.cx.v3.IPlaybook, + protos.google.cloud.dialogflow.cx.v3.IUpdatePlaybookRequest|undefined, + {}|undefined + ]) => { + this._log.info('updatePlaybook response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Creates a version for the specified Playbook. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The playbook to create a version for. + * Format: + * `projects//locations//agents//playbooks/`. + * @param {google.cloud.dialogflow.cx.v3.PlaybookVersion} request.playbookVersion + * Required. The playbook version to create. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.dialogflow.cx.v3.PlaybookVersion|PlaybookVersion}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v3/playbooks.create_playbook_version.js + * region_tag:dialogflow_v3_generated_Playbooks_CreatePlaybookVersion_async + */ + createPlaybookVersion( + request?: protos.google.cloud.dialogflow.cx.v3.ICreatePlaybookVersionRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.dialogflow.cx.v3.IPlaybookVersion, + protos.google.cloud.dialogflow.cx.v3.ICreatePlaybookVersionRequest|undefined, {}|undefined + ]>; + createPlaybookVersion( + request: protos.google.cloud.dialogflow.cx.v3.ICreatePlaybookVersionRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dialogflow.cx.v3.IPlaybookVersion, + protos.google.cloud.dialogflow.cx.v3.ICreatePlaybookVersionRequest|null|undefined, + {}|null|undefined>): void; + createPlaybookVersion( + request: protos.google.cloud.dialogflow.cx.v3.ICreatePlaybookVersionRequest, + callback: Callback< + protos.google.cloud.dialogflow.cx.v3.IPlaybookVersion, + protos.google.cloud.dialogflow.cx.v3.ICreatePlaybookVersionRequest|null|undefined, + {}|null|undefined>): void; + createPlaybookVersion( + request?: protos.google.cloud.dialogflow.cx.v3.ICreatePlaybookVersionRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.dialogflow.cx.v3.IPlaybookVersion, + protos.google.cloud.dialogflow.cx.v3.ICreatePlaybookVersionRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.dialogflow.cx.v3.IPlaybookVersion, + protos.google.cloud.dialogflow.cx.v3.ICreatePlaybookVersionRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.dialogflow.cx.v3.IPlaybookVersion, + protos.google.cloud.dialogflow.cx.v3.ICreatePlaybookVersionRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('createPlaybookVersion request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.dialogflow.cx.v3.IPlaybookVersion, + protos.google.cloud.dialogflow.cx.v3.ICreatePlaybookVersionRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('createPlaybookVersion response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.createPlaybookVersion(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.dialogflow.cx.v3.IPlaybookVersion, + protos.google.cloud.dialogflow.cx.v3.ICreatePlaybookVersionRequest|undefined, + {}|undefined + ]) => { + this._log.info('createPlaybookVersion response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Retrieves the specified version of the Playbook. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the playbook version. + * Format: + * `projects//locations//agents//playbooks//versions/`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.dialogflow.cx.v3.PlaybookVersion|PlaybookVersion}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v3/playbooks.get_playbook_version.js + * region_tag:dialogflow_v3_generated_Playbooks_GetPlaybookVersion_async + */ + getPlaybookVersion( + request?: protos.google.cloud.dialogflow.cx.v3.IGetPlaybookVersionRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.dialogflow.cx.v3.IPlaybookVersion, + protos.google.cloud.dialogflow.cx.v3.IGetPlaybookVersionRequest|undefined, {}|undefined + ]>; + getPlaybookVersion( + request: protos.google.cloud.dialogflow.cx.v3.IGetPlaybookVersionRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dialogflow.cx.v3.IPlaybookVersion, + protos.google.cloud.dialogflow.cx.v3.IGetPlaybookVersionRequest|null|undefined, + {}|null|undefined>): void; + getPlaybookVersion( + request: protos.google.cloud.dialogflow.cx.v3.IGetPlaybookVersionRequest, + callback: Callback< + protos.google.cloud.dialogflow.cx.v3.IPlaybookVersion, + protos.google.cloud.dialogflow.cx.v3.IGetPlaybookVersionRequest|null|undefined, + {}|null|undefined>): void; + getPlaybookVersion( + request?: protos.google.cloud.dialogflow.cx.v3.IGetPlaybookVersionRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.dialogflow.cx.v3.IPlaybookVersion, + protos.google.cloud.dialogflow.cx.v3.IGetPlaybookVersionRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.dialogflow.cx.v3.IPlaybookVersion, + protos.google.cloud.dialogflow.cx.v3.IGetPlaybookVersionRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.dialogflow.cx.v3.IPlaybookVersion, + protos.google.cloud.dialogflow.cx.v3.IGetPlaybookVersionRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('getPlaybookVersion request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.dialogflow.cx.v3.IPlaybookVersion, + protos.google.cloud.dialogflow.cx.v3.IGetPlaybookVersionRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getPlaybookVersion response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getPlaybookVersion(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.dialogflow.cx.v3.IPlaybookVersion, + protos.google.cloud.dialogflow.cx.v3.IGetPlaybookVersionRequest|undefined, + {}|undefined + ]) => { + this._log.info('getPlaybookVersion response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Retrieves the specified version of the Playbook and stores it as the + * current playbook draft, returning the playbook with resources updated. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the playbook version. + * Format: + * `projects//locations//agents//playbooks//versions/`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse|RestorePlaybookVersionResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v3/playbooks.restore_playbook_version.js + * region_tag:dialogflow_v3_generated_Playbooks_RestorePlaybookVersion_async + */ + restorePlaybookVersion( + request?: protos.google.cloud.dialogflow.cx.v3.IRestorePlaybookVersionRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.dialogflow.cx.v3.IRestorePlaybookVersionResponse, + protos.google.cloud.dialogflow.cx.v3.IRestorePlaybookVersionRequest|undefined, {}|undefined + ]>; + restorePlaybookVersion( + request: protos.google.cloud.dialogflow.cx.v3.IRestorePlaybookVersionRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dialogflow.cx.v3.IRestorePlaybookVersionResponse, + protos.google.cloud.dialogflow.cx.v3.IRestorePlaybookVersionRequest|null|undefined, + {}|null|undefined>): void; + restorePlaybookVersion( + request: protos.google.cloud.dialogflow.cx.v3.IRestorePlaybookVersionRequest, + callback: Callback< + protos.google.cloud.dialogflow.cx.v3.IRestorePlaybookVersionResponse, + protos.google.cloud.dialogflow.cx.v3.IRestorePlaybookVersionRequest|null|undefined, + {}|null|undefined>): void; + restorePlaybookVersion( + request?: protos.google.cloud.dialogflow.cx.v3.IRestorePlaybookVersionRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.dialogflow.cx.v3.IRestorePlaybookVersionResponse, + protos.google.cloud.dialogflow.cx.v3.IRestorePlaybookVersionRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.dialogflow.cx.v3.IRestorePlaybookVersionResponse, + protos.google.cloud.dialogflow.cx.v3.IRestorePlaybookVersionRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.dialogflow.cx.v3.IRestorePlaybookVersionResponse, + protos.google.cloud.dialogflow.cx.v3.IRestorePlaybookVersionRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('restorePlaybookVersion request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.dialogflow.cx.v3.IRestorePlaybookVersionResponse, + protos.google.cloud.dialogflow.cx.v3.IRestorePlaybookVersionRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('restorePlaybookVersion response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.restorePlaybookVersion(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.dialogflow.cx.v3.IRestorePlaybookVersionResponse, + protos.google.cloud.dialogflow.cx.v3.IRestorePlaybookVersionRequest|undefined, + {}|undefined + ]) => { + this._log.info('restorePlaybookVersion response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Deletes the specified version of the Playbook. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the playbook version to delete. + * Format: + * `projects//locations//agents//playbooks//versions/`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v3/playbooks.delete_playbook_version.js + * region_tag:dialogflow_v3_generated_Playbooks_DeletePlaybookVersion_async + */ + deletePlaybookVersion( + request?: protos.google.cloud.dialogflow.cx.v3.IDeletePlaybookVersionRequest, + options?: CallOptions): + Promise<[ + protos.google.protobuf.IEmpty, + protos.google.cloud.dialogflow.cx.v3.IDeletePlaybookVersionRequest|undefined, {}|undefined + ]>; + deletePlaybookVersion( + request: protos.google.cloud.dialogflow.cx.v3.IDeletePlaybookVersionRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.dialogflow.cx.v3.IDeletePlaybookVersionRequest|null|undefined, + {}|null|undefined>): void; + deletePlaybookVersion( + request: protos.google.cloud.dialogflow.cx.v3.IDeletePlaybookVersionRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.dialogflow.cx.v3.IDeletePlaybookVersionRequest|null|undefined, + {}|null|undefined>): void; + deletePlaybookVersion( + request?: protos.google.cloud.dialogflow.cx.v3.IDeletePlaybookVersionRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.dialogflow.cx.v3.IDeletePlaybookVersionRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.dialogflow.cx.v3.IDeletePlaybookVersionRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.protobuf.IEmpty, + protos.google.cloud.dialogflow.cx.v3.IDeletePlaybookVersionRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('deletePlaybookVersion request %j', request); + const wrappedCallback: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.dialogflow.cx.v3.IDeletePlaybookVersionRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('deletePlaybookVersion response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.deletePlaybookVersion(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.protobuf.IEmpty, + protos.google.cloud.dialogflow.cx.v3.IDeletePlaybookVersionRequest|undefined, + {}|undefined + ]) => { + this._log.info('deletePlaybookVersion response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } + +/** + * Exports the specified playbook to a binary file. + * + * Note that resources (e.g. examples, tools) that the playbook + * references will also be exported. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the playbook to export. + * Format: + * `projects//locations//agents//playbooks/`. + * @param {string} [request.playbookUri] + * Optional. The [Google Cloud + * Storage](https://cloud.google.com/storage/docs/) URI to export the playbook + * to. The format of this URI must be `gs:///`. If + * left unspecified, the serialized playbook is returned inline. + * + * Dialogflow performs a write operation for the Cloud Storage object + * on the caller's behalf, so your request authentication must + * have write permissions for the object. For more information, see + * [Dialogflow access + * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). + * @param {google.cloud.dialogflow.cx.v3.ExportPlaybookRequest.DataFormat} [request.dataFormat] + * Optional. The data format of the exported agent. If not specified, `BLOB` + * is assumed. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v3/playbooks.export_playbook.js + * region_tag:dialogflow_v3_generated_Playbooks_ExportPlaybook_async + */ + exportPlaybook( + request?: protos.google.cloud.dialogflow.cx.v3.IExportPlaybookRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + exportPlaybook( + request: protos.google.cloud.dialogflow.cx.v3.IExportPlaybookRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + exportPlaybook( + request: protos.google.cloud.dialogflow.cx.v3.IExportPlaybookRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + exportPlaybook( + request?: protos.google.cloud.dialogflow.cx.v3.IExportPlaybookRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('exportPlaybook response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('exportPlaybook request %j', request); + return this.innerApiCalls.exportPlaybook(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('exportPlaybook response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `exportPlaybook()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v3/playbooks.export_playbook.js + * region_tag:dialogflow_v3_generated_Playbooks_ExportPlaybook_async + */ + async checkExportPlaybookProgress(name: string): Promise>{ + this._log.info('exportPlaybook long-running'); + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.exportPlaybook, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Imports the specified playbook to the specified agent from a binary file. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The agent to import the playbook into. + * Format: `projects//locations//agents/`. + * @param {string} request.playbookUri + * [Dialogflow access + * control] + * (https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). + * @param {Buffer} request.playbookContent + * Uncompressed raw byte content for playbook. + * @param {google.cloud.dialogflow.cx.v3.PlaybookImportStrategy} [request.importStrategy] + * Optional. Specifies the import strategy used when resolving resource + * conflicts. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v3/playbooks.import_playbook.js + * region_tag:dialogflow_v3_generated_Playbooks_ImportPlaybook_async + */ + importPlaybook( + request?: protos.google.cloud.dialogflow.cx.v3.IImportPlaybookRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + importPlaybook( + request: protos.google.cloud.dialogflow.cx.v3.IImportPlaybookRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + importPlaybook( + request: protos.google.cloud.dialogflow.cx.v3.IImportPlaybookRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + importPlaybook( + request?: protos.google.cloud.dialogflow.cx.v3.IImportPlaybookRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('importPlaybook response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('importPlaybook request %j', request); + return this.innerApiCalls.importPlaybook(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('importPlaybook response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `importPlaybook()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v3/playbooks.import_playbook.js + * region_tag:dialogflow_v3_generated_Playbooks_ImportPlaybook_async + */ + async checkImportPlaybookProgress(name: string): Promise>{ + this._log.info('importPlaybook long-running'); + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.importPlaybook, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } + /** + * Returns a list of playbooks in the specified agent. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The agent to list playbooks from. + * Format: `projects//locations//agents/`. + * @param {number} request.pageSize + * The maximum number of items to return in a single page. By default 100 and + * at most 1000. + * @param {string} request.pageToken + * The next_page_token value returned from a previous list request. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.dialogflow.cx.v3.Playbook|Playbook}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listPlaybooksAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listPlaybooks( + request?: protos.google.cloud.dialogflow.cx.v3.IListPlaybooksRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.dialogflow.cx.v3.IPlaybook[], + protos.google.cloud.dialogflow.cx.v3.IListPlaybooksRequest|null, + protos.google.cloud.dialogflow.cx.v3.IListPlaybooksResponse + ]>; + listPlaybooks( + request: protos.google.cloud.dialogflow.cx.v3.IListPlaybooksRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dialogflow.cx.v3.IListPlaybooksRequest, + protos.google.cloud.dialogflow.cx.v3.IListPlaybooksResponse|null|undefined, + protos.google.cloud.dialogflow.cx.v3.IPlaybook>): void; + listPlaybooks( + request: protos.google.cloud.dialogflow.cx.v3.IListPlaybooksRequest, + callback: PaginationCallback< + protos.google.cloud.dialogflow.cx.v3.IListPlaybooksRequest, + protos.google.cloud.dialogflow.cx.v3.IListPlaybooksResponse|null|undefined, + protos.google.cloud.dialogflow.cx.v3.IPlaybook>): void; + listPlaybooks( + request?: protos.google.cloud.dialogflow.cx.v3.IListPlaybooksRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.dialogflow.cx.v3.IListPlaybooksRequest, + protos.google.cloud.dialogflow.cx.v3.IListPlaybooksResponse|null|undefined, + protos.google.cloud.dialogflow.cx.v3.IPlaybook>, + callback?: PaginationCallback< + protos.google.cloud.dialogflow.cx.v3.IListPlaybooksRequest, + protos.google.cloud.dialogflow.cx.v3.IListPlaybooksResponse|null|undefined, + protos.google.cloud.dialogflow.cx.v3.IPlaybook>): + Promise<[ + protos.google.cloud.dialogflow.cx.v3.IPlaybook[], + protos.google.cloud.dialogflow.cx.v3.IListPlaybooksRequest|null, + protos.google.cloud.dialogflow.cx.v3.IListPlaybooksResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.cloud.dialogflow.cx.v3.IListPlaybooksRequest, + protos.google.cloud.dialogflow.cx.v3.IListPlaybooksResponse|null|undefined, + protos.google.cloud.dialogflow.cx.v3.IPlaybook>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listPlaybooks values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listPlaybooks request %j', request); + return this.innerApiCalls + .listPlaybooks(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.cloud.dialogflow.cx.v3.IPlaybook[], + protos.google.cloud.dialogflow.cx.v3.IListPlaybooksRequest|null, + protos.google.cloud.dialogflow.cx.v3.IListPlaybooksResponse + ]) => { + this._log.info('listPlaybooks values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listPlaybooks`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The agent to list playbooks from. + * Format: `projects//locations//agents/`. + * @param {number} request.pageSize + * The maximum number of items to return in a single page. By default 100 and + * at most 1000. + * @param {string} request.pageToken + * The next_page_token value returned from a previous list request. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.dialogflow.cx.v3.Playbook|Playbook} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listPlaybooksAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listPlaybooksStream( + request?: protos.google.cloud.dialogflow.cx.v3.IListPlaybooksRequest, + options?: CallOptions): + Transform{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listPlaybooks']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listPlaybooks stream %j', request); + return this.descriptors.page.listPlaybooks.createStream( + this.innerApiCalls.listPlaybooks as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listPlaybooks`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The agent to list playbooks from. + * Format: `projects//locations//agents/`. + * @param {number} request.pageSize + * The maximum number of items to return in a single page. By default 100 and + * at most 1000. + * @param {string} request.pageToken + * The next_page_token value returned from a previous list request. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.dialogflow.cx.v3.Playbook|Playbook}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v3/playbooks.list_playbooks.js + * region_tag:dialogflow_v3_generated_Playbooks_ListPlaybooks_async + */ + listPlaybooksAsync( + request?: protos.google.cloud.dialogflow.cx.v3.IListPlaybooksRequest, + options?: CallOptions): + AsyncIterable{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listPlaybooks']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listPlaybooks iterate %j', request); + return this.descriptors.page.listPlaybooks.asyncIterate( + this.innerApiCalls['listPlaybooks'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists versions for the specified Playbook. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The playbook to list versions for. + * Format: + * `projects//locations//agents//playbooks/`. + * @param {number} [request.pageSize] + * Optional. The maximum number of items to return in a single page. By + * default 100 and at most 1000. + * @param {string} [request.pageToken] + * Optional. The next_page_token value returned from a previous list request. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.dialogflow.cx.v3.PlaybookVersion|PlaybookVersion}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listPlaybookVersionsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listPlaybookVersions( + request?: protos.google.cloud.dialogflow.cx.v3.IListPlaybookVersionsRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.dialogflow.cx.v3.IPlaybookVersion[], + protos.google.cloud.dialogflow.cx.v3.IListPlaybookVersionsRequest|null, + protos.google.cloud.dialogflow.cx.v3.IListPlaybookVersionsResponse + ]>; + listPlaybookVersions( + request: protos.google.cloud.dialogflow.cx.v3.IListPlaybookVersionsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dialogflow.cx.v3.IListPlaybookVersionsRequest, + protos.google.cloud.dialogflow.cx.v3.IListPlaybookVersionsResponse|null|undefined, + protos.google.cloud.dialogflow.cx.v3.IPlaybookVersion>): void; + listPlaybookVersions( + request: protos.google.cloud.dialogflow.cx.v3.IListPlaybookVersionsRequest, + callback: PaginationCallback< + protos.google.cloud.dialogflow.cx.v3.IListPlaybookVersionsRequest, + protos.google.cloud.dialogflow.cx.v3.IListPlaybookVersionsResponse|null|undefined, + protos.google.cloud.dialogflow.cx.v3.IPlaybookVersion>): void; + listPlaybookVersions( + request?: protos.google.cloud.dialogflow.cx.v3.IListPlaybookVersionsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.dialogflow.cx.v3.IListPlaybookVersionsRequest, + protos.google.cloud.dialogflow.cx.v3.IListPlaybookVersionsResponse|null|undefined, + protos.google.cloud.dialogflow.cx.v3.IPlaybookVersion>, + callback?: PaginationCallback< + protos.google.cloud.dialogflow.cx.v3.IListPlaybookVersionsRequest, + protos.google.cloud.dialogflow.cx.v3.IListPlaybookVersionsResponse|null|undefined, + protos.google.cloud.dialogflow.cx.v3.IPlaybookVersion>): + Promise<[ + protos.google.cloud.dialogflow.cx.v3.IPlaybookVersion[], + protos.google.cloud.dialogflow.cx.v3.IListPlaybookVersionsRequest|null, + protos.google.cloud.dialogflow.cx.v3.IListPlaybookVersionsResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.cloud.dialogflow.cx.v3.IListPlaybookVersionsRequest, + protos.google.cloud.dialogflow.cx.v3.IListPlaybookVersionsResponse|null|undefined, + protos.google.cloud.dialogflow.cx.v3.IPlaybookVersion>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listPlaybookVersions values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listPlaybookVersions request %j', request); + return this.innerApiCalls + .listPlaybookVersions(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.cloud.dialogflow.cx.v3.IPlaybookVersion[], + protos.google.cloud.dialogflow.cx.v3.IListPlaybookVersionsRequest|null, + protos.google.cloud.dialogflow.cx.v3.IListPlaybookVersionsResponse + ]) => { + this._log.info('listPlaybookVersions values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listPlaybookVersions`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The playbook to list versions for. + * Format: + * `projects//locations//agents//playbooks/`. + * @param {number} [request.pageSize] + * Optional. The maximum number of items to return in a single page. By + * default 100 and at most 1000. + * @param {string} [request.pageToken] + * Optional. The next_page_token value returned from a previous list request. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.dialogflow.cx.v3.PlaybookVersion|PlaybookVersion} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listPlaybookVersionsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listPlaybookVersionsStream( + request?: protos.google.cloud.dialogflow.cx.v3.IListPlaybookVersionsRequest, + options?: CallOptions): + Transform{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listPlaybookVersions']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listPlaybookVersions stream %j', request); + return this.descriptors.page.listPlaybookVersions.createStream( + this.innerApiCalls.listPlaybookVersions as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listPlaybookVersions`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The playbook to list versions for. + * Format: + * `projects//locations//agents//playbooks/`. + * @param {number} [request.pageSize] + * Optional. The maximum number of items to return in a single page. By + * default 100 and at most 1000. + * @param {string} [request.pageToken] + * Optional. The next_page_token value returned from a previous list request. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.dialogflow.cx.v3.PlaybookVersion|PlaybookVersion}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v3/playbooks.list_playbook_versions.js + * region_tag:dialogflow_v3_generated_Playbooks_ListPlaybookVersions_async + */ + listPlaybookVersionsAsync( + request?: protos.google.cloud.dialogflow.cx.v3.IListPlaybookVersionsRequest, + options?: CallOptions): + AsyncIterable{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listPlaybookVersions']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listPlaybookVersions iterate %j', request); + return this.descriptors.page.listPlaybookVersions.asyncIterate( + this.innerApiCalls['listPlaybookVersions'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } +/** + * Gets information about a location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Resource name for the location. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.cloud.location.Location | Location}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example + * ``` + * const [response] = await client.getLocation(request); + * ``` + */ + getLocation( + request: LocationProtos.google.cloud.location.IGetLocationRequest, + options?: + | gax.CallOptions + | Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + > + ): Promise { + return this.locationsClient.getLocation(request, options, callback); + } + +/** + * Lists information about the supported locations for this service. Returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The resource that owns the locations collection, if applicable. + * @param {string} request.filter + * The standard list filter. + * @param {number} request.pageSize + * The standard list page size. + * @param {string} request.pageToken + * The standard list page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example + * ``` + * const iterable = client.listLocationsAsync(request); + * for await (const response of iterable) { + * // process response + * } + * ``` + */ + listLocationsAsync( + request: LocationProtos.google.cloud.location.IListLocationsRequest, + options?: CallOptions + ): AsyncIterable { + return this.locationsClient.listLocationsAsync(request, options); + } + +/** + * Gets the latest state of a long-running operation. Clients can use this + * method to poll the operation result at intervals as recommended by the API + * service. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} + * for the details. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * const name = ''; + * const [response] = await client.getOperation({name}); + * // doThingsWith(response) + * ``` + */ + getOperation( + request: protos.google.longrunning.GetOperationRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + > + ): Promise<[protos.google.longrunning.Operation]> { + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + return this.operationsClient.getOperation(request, options, callback); + } + /** + * Lists operations that match the specified filter in the request. If the + * server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object. + * + * For-await-of syntax is used with the iterable to recursively get response element on-demand. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation collection. + * @param {string} request.filter - The standard list filter. + * @param {number=} request.pageSize - + * The maximum number of resources contained in the underlying API + * response. If page streaming is performed per-resource, this + * parameter does not affect the return value. If page streaming is + * performed per-page, this determines the maximum number of + * resources in a page. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the + * details. + * @returns {Object} + * An iterable Object that conforms to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | iteration protocols}. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * for await (const response of client.listOperationsAsync(request)); + * // doThingsWith(response) + * ``` + */ + listOperationsAsync( + request: protos.google.longrunning.ListOperationsRequest, + options?: gax.CallOptions + ): AsyncIterable { + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + return this.operationsClient.listOperationsAsync(request, options); + } + /** + * Starts asynchronous cancellation on a long-running operation. The server + * makes a best effort to cancel the operation, but success is not + * guaranteed. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. Clients can use + * {@link Operations.GetOperation} or + * other methods to check whether the cancellation succeeded or whether the + * operation completed despite cancellation. On successful cancellation, + * the operation is not deleted; instead, it becomes an operation with + * an {@link Operation.error} value with a {@link google.rpc.Status.code} of + * 1, corresponding to `Code.CANCELLED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be cancelled. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the + * details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.cancelOperation({name: ''}); + * ``` + */ + cancelOperation( + request: protos.google.longrunning.CancelOperationRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protos.google.longrunning.CancelOperationRequest, + protos.google.protobuf.Empty, + {} | undefined | null + >, + callback?: Callback< + protos.google.longrunning.CancelOperationRequest, + protos.google.protobuf.Empty, + {} | undefined | null + > + ): Promise { + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + return this.operationsClient.cancelOperation(request, options, callback); + } + + /** + * Deletes a long-running operation. This method indicates that the client is + * no longer interested in the operation result. It does not cancel the + * operation. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be deleted. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} + * for the details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.deleteOperation({name: ''}); + * ``` + */ + deleteOperation( + request: protos.google.longrunning.DeleteOperationRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + > + ): Promise { + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + return this.operationsClient.deleteOperation(request, options, callback); + } + + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified agent resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @returns {string} Resource name string. + */ + agentPath(project:string,location:string,agent:string) { + return this.pathTemplates.agentPathTemplate.render({ + project: project, + location: location, + agent: agent, + }); + } + + /** + * Parse the project from Agent resource. + * + * @param {string} agentName + * A fully-qualified path representing Agent resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAgentName(agentName: string) { + return this.pathTemplates.agentPathTemplate.match(agentName).project; + } + + /** + * Parse the location from Agent resource. + * + * @param {string} agentName + * A fully-qualified path representing Agent resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAgentName(agentName: string) { + return this.pathTemplates.agentPathTemplate.match(agentName).location; + } + + /** + * Parse the agent from Agent resource. + * + * @param {string} agentName + * A fully-qualified path representing Agent resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromAgentName(agentName: string) { + return this.pathTemplates.agentPathTemplate.match(agentName).agent; + } + + /** + * Return a fully-qualified agentGenerativeSettings resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @returns {string} Resource name string. + */ + agentGenerativeSettingsPath(project:string,location:string,agent:string) { + return this.pathTemplates.agentGenerativeSettingsPathTemplate.render({ + project: project, + location: location, + agent: agent, + }); + } + + /** + * Parse the project from AgentGenerativeSettings resource. + * + * @param {string} agentGenerativeSettingsName + * A fully-qualified path representing AgentGenerativeSettings resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAgentGenerativeSettingsName(agentGenerativeSettingsName: string) { + return this.pathTemplates.agentGenerativeSettingsPathTemplate.match(agentGenerativeSettingsName).project; + } + + /** + * Parse the location from AgentGenerativeSettings resource. + * + * @param {string} agentGenerativeSettingsName + * A fully-qualified path representing AgentGenerativeSettings resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAgentGenerativeSettingsName(agentGenerativeSettingsName: string) { + return this.pathTemplates.agentGenerativeSettingsPathTemplate.match(agentGenerativeSettingsName).location; + } + + /** + * Parse the agent from AgentGenerativeSettings resource. + * + * @param {string} agentGenerativeSettingsName + * A fully-qualified path representing AgentGenerativeSettings resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromAgentGenerativeSettingsName(agentGenerativeSettingsName: string) { + return this.pathTemplates.agentGenerativeSettingsPathTemplate.match(agentGenerativeSettingsName).agent; + } + + /** + * Return a fully-qualified agentValidationResult resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @returns {string} Resource name string. + */ + agentValidationResultPath(project:string,location:string,agent:string) { + return this.pathTemplates.agentValidationResultPathTemplate.render({ + project: project, + location: location, + agent: agent, + }); + } + + /** + * Parse the project from AgentValidationResult resource. + * + * @param {string} agentValidationResultName + * A fully-qualified path representing AgentValidationResult resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAgentValidationResultName(agentValidationResultName: string) { + return this.pathTemplates.agentValidationResultPathTemplate.match(agentValidationResultName).project; + } + + /** + * Parse the location from AgentValidationResult resource. + * + * @param {string} agentValidationResultName + * A fully-qualified path representing AgentValidationResult resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAgentValidationResultName(agentValidationResultName: string) { + return this.pathTemplates.agentValidationResultPathTemplate.match(agentValidationResultName).location; + } + + /** + * Parse the agent from AgentValidationResult resource. + * + * @param {string} agentValidationResultName + * A fully-qualified path representing AgentValidationResult resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromAgentValidationResultName(agentValidationResultName: string) { + return this.pathTemplates.agentValidationResultPathTemplate.match(agentValidationResultName).agent; + } + + /** + * Return a fully-qualified changelog resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} changelog + * @returns {string} Resource name string. + */ + changelogPath(project:string,location:string,agent:string,changelog:string) { + return this.pathTemplates.changelogPathTemplate.render({ + project: project, + location: location, + agent: agent, + changelog: changelog, + }); + } + + /** + * Parse the project from Changelog resource. + * + * @param {string} changelogName + * A fully-qualified path representing Changelog resource. + * @returns {string} A string representing the project. + */ + matchProjectFromChangelogName(changelogName: string) { + return this.pathTemplates.changelogPathTemplate.match(changelogName).project; + } + + /** + * Parse the location from Changelog resource. + * + * @param {string} changelogName + * A fully-qualified path representing Changelog resource. + * @returns {string} A string representing the location. + */ + matchLocationFromChangelogName(changelogName: string) { + return this.pathTemplates.changelogPathTemplate.match(changelogName).location; + } + + /** + * Parse the agent from Changelog resource. + * + * @param {string} changelogName + * A fully-qualified path representing Changelog resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromChangelogName(changelogName: string) { + return this.pathTemplates.changelogPathTemplate.match(changelogName).agent; + } + + /** + * Parse the changelog from Changelog resource. + * + * @param {string} changelogName + * A fully-qualified path representing Changelog resource. + * @returns {string} A string representing the changelog. + */ + matchChangelogFromChangelogName(changelogName: string) { + return this.pathTemplates.changelogPathTemplate.match(changelogName).changelog; + } + + /** + * Return a fully-qualified continuousTestResult resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} environment + * @param {string} continuous_test_result + * @returns {string} Resource name string. + */ + continuousTestResultPath(project:string,location:string,agent:string,environment:string,continuousTestResult:string) { + return this.pathTemplates.continuousTestResultPathTemplate.render({ + project: project, + location: location, + agent: agent, + environment: environment, + continuous_test_result: continuousTestResult, + }); + } + + /** + * Parse the project from ContinuousTestResult resource. + * + * @param {string} continuousTestResultName + * A fully-qualified path representing ContinuousTestResult resource. + * @returns {string} A string representing the project. + */ + matchProjectFromContinuousTestResultName(continuousTestResultName: string) { + return this.pathTemplates.continuousTestResultPathTemplate.match(continuousTestResultName).project; + } + + /** + * Parse the location from ContinuousTestResult resource. + * + * @param {string} continuousTestResultName + * A fully-qualified path representing ContinuousTestResult resource. + * @returns {string} A string representing the location. + */ + matchLocationFromContinuousTestResultName(continuousTestResultName: string) { + return this.pathTemplates.continuousTestResultPathTemplate.match(continuousTestResultName).location; + } + + /** + * Parse the agent from ContinuousTestResult resource. + * + * @param {string} continuousTestResultName + * A fully-qualified path representing ContinuousTestResult resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromContinuousTestResultName(continuousTestResultName: string) { + return this.pathTemplates.continuousTestResultPathTemplate.match(continuousTestResultName).agent; + } + + /** + * Parse the environment from ContinuousTestResult resource. + * + * @param {string} continuousTestResultName + * A fully-qualified path representing ContinuousTestResult resource. + * @returns {string} A string representing the environment. + */ + matchEnvironmentFromContinuousTestResultName(continuousTestResultName: string) { + return this.pathTemplates.continuousTestResultPathTemplate.match(continuousTestResultName).environment; + } + + /** + * Parse the continuous_test_result from ContinuousTestResult resource. + * + * @param {string} continuousTestResultName + * A fully-qualified path representing ContinuousTestResult resource. + * @returns {string} A string representing the continuous_test_result. + */ + matchContinuousTestResultFromContinuousTestResultName(continuousTestResultName: string) { + return this.pathTemplates.continuousTestResultPathTemplate.match(continuousTestResultName).continuous_test_result; + } + + /** + * Return a fully-qualified deployment resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} environment + * @param {string} deployment + * @returns {string} Resource name string. + */ + deploymentPath(project:string,location:string,agent:string,environment:string,deployment:string) { + return this.pathTemplates.deploymentPathTemplate.render({ + project: project, + location: location, + agent: agent, + environment: environment, + deployment: deployment, + }); + } + + /** + * Parse the project from Deployment resource. + * + * @param {string} deploymentName + * A fully-qualified path representing Deployment resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDeploymentName(deploymentName: string) { + return this.pathTemplates.deploymentPathTemplate.match(deploymentName).project; + } + + /** + * Parse the location from Deployment resource. + * + * @param {string} deploymentName + * A fully-qualified path representing Deployment resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDeploymentName(deploymentName: string) { + return this.pathTemplates.deploymentPathTemplate.match(deploymentName).location; + } + + /** + * Parse the agent from Deployment resource. + * + * @param {string} deploymentName + * A fully-qualified path representing Deployment resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromDeploymentName(deploymentName: string) { + return this.pathTemplates.deploymentPathTemplate.match(deploymentName).agent; + } + + /** + * Parse the environment from Deployment resource. + * + * @param {string} deploymentName + * A fully-qualified path representing Deployment resource. + * @returns {string} A string representing the environment. + */ + matchEnvironmentFromDeploymentName(deploymentName: string) { + return this.pathTemplates.deploymentPathTemplate.match(deploymentName).environment; + } + + /** + * Parse the deployment from Deployment resource. + * + * @param {string} deploymentName + * A fully-qualified path representing Deployment resource. + * @returns {string} A string representing the deployment. + */ + matchDeploymentFromDeploymentName(deploymentName: string) { + return this.pathTemplates.deploymentPathTemplate.match(deploymentName).deployment; + } + + /** + * Return a fully-qualified entityType resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} entity_type + * @returns {string} Resource name string. + */ + entityTypePath(project:string,location:string,agent:string,entityType:string) { + return this.pathTemplates.entityTypePathTemplate.render({ + project: project, + location: location, + agent: agent, + entity_type: entityType, + }); + } + + /** + * Parse the project from EntityType resource. + * + * @param {string} entityTypeName + * A fully-qualified path representing EntityType resource. + * @returns {string} A string representing the project. + */ + matchProjectFromEntityTypeName(entityTypeName: string) { + return this.pathTemplates.entityTypePathTemplate.match(entityTypeName).project; + } + + /** + * Parse the location from EntityType resource. + * + * @param {string} entityTypeName + * A fully-qualified path representing EntityType resource. + * @returns {string} A string representing the location. + */ + matchLocationFromEntityTypeName(entityTypeName: string) { + return this.pathTemplates.entityTypePathTemplate.match(entityTypeName).location; + } + + /** + * Parse the agent from EntityType resource. + * + * @param {string} entityTypeName + * A fully-qualified path representing EntityType resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromEntityTypeName(entityTypeName: string) { + return this.pathTemplates.entityTypePathTemplate.match(entityTypeName).agent; + } + + /** + * Parse the entity_type from EntityType resource. + * + * @param {string} entityTypeName + * A fully-qualified path representing EntityType resource. + * @returns {string} A string representing the entity_type. + */ + matchEntityTypeFromEntityTypeName(entityTypeName: string) { + return this.pathTemplates.entityTypePathTemplate.match(entityTypeName).entity_type; + } + + /** + * Return a fully-qualified environment resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} environment + * @returns {string} Resource name string. + */ + environmentPath(project:string,location:string,agent:string,environment:string) { + return this.pathTemplates.environmentPathTemplate.render({ + project: project, + location: location, + agent: agent, + environment: environment, + }); + } + + /** + * Parse the project from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the project. + */ + matchProjectFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName).project; + } + + /** + * Parse the location from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the location. + */ + matchLocationFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName).location; + } + + /** + * Parse the agent from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName).agent; + } + + /** + * Parse the environment from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the environment. + */ + matchEnvironmentFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName).environment; + } + + /** + * Return a fully-qualified example resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} playbook + * @param {string} example + * @returns {string} Resource name string. + */ + examplePath(project:string,location:string,agent:string,playbook:string,example:string) { + return this.pathTemplates.examplePathTemplate.render({ + project: project, + location: location, + agent: agent, + playbook: playbook, + example: example, + }); + } + + /** + * Parse the project from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the project. + */ + matchProjectFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).project; + } + + /** + * Parse the location from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the location. + */ + matchLocationFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).location; + } + + /** + * Parse the agent from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).agent; + } + + /** + * Parse the playbook from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the playbook. + */ + matchPlaybookFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).playbook; + } + + /** + * Parse the example from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the example. + */ + matchExampleFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).example; + } + + /** + * Return a fully-qualified experiment resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} environment + * @param {string} experiment + * @returns {string} Resource name string. + */ + experimentPath(project:string,location:string,agent:string,environment:string,experiment:string) { + return this.pathTemplates.experimentPathTemplate.render({ + project: project, + location: location, + agent: agent, + environment: environment, + experiment: experiment, + }); + } + + /** + * Parse the project from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the project. + */ + matchProjectFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName).project; + } + + /** + * Parse the location from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the location. + */ + matchLocationFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName).location; + } + + /** + * Parse the agent from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName).agent; + } + + /** + * Parse the environment from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the environment. + */ + matchEnvironmentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName).environment; + } + + /** + * Parse the experiment from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the experiment. + */ + matchExperimentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName).experiment; + } + + /** + * Return a fully-qualified flow resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} flow + * @returns {string} Resource name string. + */ + flowPath(project:string,location:string,agent:string,flow:string) { + return this.pathTemplates.flowPathTemplate.render({ + project: project, + location: location, + agent: agent, + flow: flow, + }); + } + + /** + * Parse the project from Flow resource. + * + * @param {string} flowName + * A fully-qualified path representing Flow resource. + * @returns {string} A string representing the project. + */ + matchProjectFromFlowName(flowName: string) { + return this.pathTemplates.flowPathTemplate.match(flowName).project; + } + + /** + * Parse the location from Flow resource. + * + * @param {string} flowName + * A fully-qualified path representing Flow resource. + * @returns {string} A string representing the location. + */ + matchLocationFromFlowName(flowName: string) { + return this.pathTemplates.flowPathTemplate.match(flowName).location; + } + + /** + * Parse the agent from Flow resource. + * + * @param {string} flowName + * A fully-qualified path representing Flow resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromFlowName(flowName: string) { + return this.pathTemplates.flowPathTemplate.match(flowName).agent; + } + + /** + * Parse the flow from Flow resource. + * + * @param {string} flowName + * A fully-qualified path representing Flow resource. + * @returns {string} A string representing the flow. + */ + matchFlowFromFlowName(flowName: string) { + return this.pathTemplates.flowPathTemplate.match(flowName).flow; + } + + /** + * Return a fully-qualified flowValidationResult resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} flow + * @returns {string} Resource name string. + */ + flowValidationResultPath(project:string,location:string,agent:string,flow:string) { + return this.pathTemplates.flowValidationResultPathTemplate.render({ + project: project, + location: location, + agent: agent, + flow: flow, + }); + } + + /** + * Parse the project from FlowValidationResult resource. + * + * @param {string} flowValidationResultName + * A fully-qualified path representing FlowValidationResult resource. + * @returns {string} A string representing the project. + */ + matchProjectFromFlowValidationResultName(flowValidationResultName: string) { + return this.pathTemplates.flowValidationResultPathTemplate.match(flowValidationResultName).project; + } + + /** + * Parse the location from FlowValidationResult resource. + * + * @param {string} flowValidationResultName + * A fully-qualified path representing FlowValidationResult resource. + * @returns {string} A string representing the location. + */ + matchLocationFromFlowValidationResultName(flowValidationResultName: string) { + return this.pathTemplates.flowValidationResultPathTemplate.match(flowValidationResultName).location; + } + + /** + * Parse the agent from FlowValidationResult resource. + * + * @param {string} flowValidationResultName + * A fully-qualified path representing FlowValidationResult resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromFlowValidationResultName(flowValidationResultName: string) { + return this.pathTemplates.flowValidationResultPathTemplate.match(flowValidationResultName).agent; + } + + /** + * Parse the flow from FlowValidationResult resource. + * + * @param {string} flowValidationResultName + * A fully-qualified path representing FlowValidationResult resource. + * @returns {string} A string representing the flow. + */ + matchFlowFromFlowValidationResultName(flowValidationResultName: string) { + return this.pathTemplates.flowValidationResultPathTemplate.match(flowValidationResultName).flow; + } + + /** + * Return a fully-qualified generator resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} generator + * @returns {string} Resource name string. + */ + generatorPath(project:string,location:string,agent:string,generator:string) { + return this.pathTemplates.generatorPathTemplate.render({ + project: project, + location: location, + agent: agent, + generator: generator, + }); + } + + /** + * Parse the project from Generator resource. + * + * @param {string} generatorName + * A fully-qualified path representing Generator resource. + * @returns {string} A string representing the project. + */ + matchProjectFromGeneratorName(generatorName: string) { + return this.pathTemplates.generatorPathTemplate.match(generatorName).project; + } + + /** + * Parse the location from Generator resource. + * + * @param {string} generatorName + * A fully-qualified path representing Generator resource. + * @returns {string} A string representing the location. + */ + matchLocationFromGeneratorName(generatorName: string) { + return this.pathTemplates.generatorPathTemplate.match(generatorName).location; + } + + /** + * Parse the agent from Generator resource. + * + * @param {string} generatorName + * A fully-qualified path representing Generator resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromGeneratorName(generatorName: string) { + return this.pathTemplates.generatorPathTemplate.match(generatorName).agent; + } + + /** + * Parse the generator from Generator resource. + * + * @param {string} generatorName + * A fully-qualified path representing Generator resource. + * @returns {string} A string representing the generator. + */ + matchGeneratorFromGeneratorName(generatorName: string) { + return this.pathTemplates.generatorPathTemplate.match(generatorName).generator; + } + + /** + * Return a fully-qualified intent resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} intent + * @returns {string} Resource name string. + */ + intentPath(project:string,location:string,agent:string,intent:string) { + return this.pathTemplates.intentPathTemplate.render({ + project: project, + location: location, + agent: agent, + intent: intent, + }); + } + + /** + * Parse the project from Intent resource. + * + * @param {string} intentName + * A fully-qualified path representing Intent resource. + * @returns {string} A string representing the project. + */ + matchProjectFromIntentName(intentName: string) { + return this.pathTemplates.intentPathTemplate.match(intentName).project; + } + + /** + * Parse the location from Intent resource. + * + * @param {string} intentName + * A fully-qualified path representing Intent resource. + * @returns {string} A string representing the location. + */ + matchLocationFromIntentName(intentName: string) { + return this.pathTemplates.intentPathTemplate.match(intentName).location; + } + + /** + * Parse the agent from Intent resource. + * + * @param {string} intentName + * A fully-qualified path representing Intent resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromIntentName(intentName: string) { + return this.pathTemplates.intentPathTemplate.match(intentName).agent; + } + + /** + * Parse the intent from Intent resource. + * + * @param {string} intentName + * A fully-qualified path representing Intent resource. + * @returns {string} A string representing the intent. + */ + matchIntentFromIntentName(intentName: string) { + return this.pathTemplates.intentPathTemplate.match(intentName).intent; + } + + /** + * Return a fully-qualified location resource name string. + * + * @param {string} project + * @param {string} location + * @returns {string} Resource name string. + */ + locationPath(project:string,location:string) { + return this.pathTemplates.locationPathTemplate.render({ + project: project, + location: location, + }); + } + + /** + * Parse the project from Location resource. + * + * @param {string} locationName + * A fully-qualified path representing Location resource. + * @returns {string} A string representing the project. + */ + matchProjectFromLocationName(locationName: string) { + return this.pathTemplates.locationPathTemplate.match(locationName).project; + } + + /** + * Parse the location from Location resource. + * + * @param {string} locationName + * A fully-qualified path representing Location resource. + * @returns {string} A string representing the location. + */ + matchLocationFromLocationName(locationName: string) { + return this.pathTemplates.locationPathTemplate.match(locationName).location; + } + + /** + * Return a fully-qualified page resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} flow + * @param {string} page + * @returns {string} Resource name string. + */ + pagePath(project:string,location:string,agent:string,flow:string,page:string) { + return this.pathTemplates.pagePathTemplate.render({ + project: project, + location: location, + agent: agent, + flow: flow, + page: page, + }); + } + + /** + * Parse the project from Page resource. + * + * @param {string} pageName + * A fully-qualified path representing Page resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPageName(pageName: string) { + return this.pathTemplates.pagePathTemplate.match(pageName).project; + } + + /** + * Parse the location from Page resource. + * + * @param {string} pageName + * A fully-qualified path representing Page resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPageName(pageName: string) { + return this.pathTemplates.pagePathTemplate.match(pageName).location; + } + + /** + * Parse the agent from Page resource. + * + * @param {string} pageName + * A fully-qualified path representing Page resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromPageName(pageName: string) { + return this.pathTemplates.pagePathTemplate.match(pageName).agent; + } + + /** + * Parse the flow from Page resource. + * + * @param {string} pageName + * A fully-qualified path representing Page resource. + * @returns {string} A string representing the flow. + */ + matchFlowFromPageName(pageName: string) { + return this.pathTemplates.pagePathTemplate.match(pageName).flow; + } + + /** + * Parse the page from Page resource. + * + * @param {string} pageName + * A fully-qualified path representing Page resource. + * @returns {string} A string representing the page. + */ + matchPageFromPageName(pageName: string) { + return this.pathTemplates.pagePathTemplate.match(pageName).page; + } + + /** + * Return a fully-qualified playbook resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} playbook + * @returns {string} Resource name string. + */ + playbookPath(project:string,location:string,agent:string,playbook:string) { + return this.pathTemplates.playbookPathTemplate.render({ + project: project, + location: location, + agent: agent, + playbook: playbook, + }); + } + + /** + * Parse the project from Playbook resource. + * + * @param {string} playbookName + * A fully-qualified path representing Playbook resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPlaybookName(playbookName: string) { + return this.pathTemplates.playbookPathTemplate.match(playbookName).project; + } + + /** + * Parse the location from Playbook resource. + * + * @param {string} playbookName + * A fully-qualified path representing Playbook resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPlaybookName(playbookName: string) { + return this.pathTemplates.playbookPathTemplate.match(playbookName).location; + } + + /** + * Parse the agent from Playbook resource. + * + * @param {string} playbookName + * A fully-qualified path representing Playbook resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromPlaybookName(playbookName: string) { + return this.pathTemplates.playbookPathTemplate.match(playbookName).agent; + } + + /** + * Parse the playbook from Playbook resource. + * + * @param {string} playbookName + * A fully-qualified path representing Playbook resource. + * @returns {string} A string representing the playbook. + */ + matchPlaybookFromPlaybookName(playbookName: string) { + return this.pathTemplates.playbookPathTemplate.match(playbookName).playbook; + } + + /** + * Return a fully-qualified playbookVersion resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} playbook + * @param {string} version + * @returns {string} Resource name string. + */ + playbookVersionPath(project:string,location:string,agent:string,playbook:string,version:string) { + return this.pathTemplates.playbookVersionPathTemplate.render({ + project: project, + location: location, + agent: agent, + playbook: playbook, + version: version, + }); + } + + /** + * Parse the project from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).project; + } + + /** + * Parse the location from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).location; + } + + /** + * Parse the agent from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).agent; + } + + /** + * Parse the playbook from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the playbook. + */ + matchPlaybookFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).playbook; + } + + /** + * Parse the version from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the version. + */ + matchVersionFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).version; + } + + /** + * Return a fully-qualified project resource name string. + * + * @param {string} project + * @returns {string} Resource name string. + */ + projectPath(project:string) { + return this.pathTemplates.projectPathTemplate.render({ + project: project, + }); + } + + /** + * Parse the project from Project resource. + * + * @param {string} projectName + * A fully-qualified path representing Project resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectName(projectName: string) { + return this.pathTemplates.projectPathTemplate.match(projectName).project; + } + + /** + * Return a fully-qualified projectLocationAgentEnvironmentSessionEntityType resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} environment + * @param {string} session + * @param {string} entity_type + * @returns {string} Resource name string. + */ + projectLocationAgentEnvironmentSessionEntityTypePath(project:string,location:string,agent:string,environment:string,session:string,entityType:string) { + return this.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.render({ + project: project, + location: location, + agent: agent, + environment: environment, + session: session, + entity_type: entityType, + }); + } + + /** + * Parse the project from ProjectLocationAgentEnvironmentSessionEntityType resource. + * + * @param {string} projectLocationAgentEnvironmentSessionEntityTypeName + * A fully-qualified path representing project_location_agent_environment_session_entity_type resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationAgentEnvironmentSessionEntityTypeName(projectLocationAgentEnvironmentSessionEntityTypeName: string) { + return this.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match(projectLocationAgentEnvironmentSessionEntityTypeName).project; + } + + /** + * Parse the location from ProjectLocationAgentEnvironmentSessionEntityType resource. + * + * @param {string} projectLocationAgentEnvironmentSessionEntityTypeName + * A fully-qualified path representing project_location_agent_environment_session_entity_type resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationAgentEnvironmentSessionEntityTypeName(projectLocationAgentEnvironmentSessionEntityTypeName: string) { + return this.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match(projectLocationAgentEnvironmentSessionEntityTypeName).location; + } + + /** + * Parse the agent from ProjectLocationAgentEnvironmentSessionEntityType resource. + * + * @param {string} projectLocationAgentEnvironmentSessionEntityTypeName + * A fully-qualified path representing project_location_agent_environment_session_entity_type resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromProjectLocationAgentEnvironmentSessionEntityTypeName(projectLocationAgentEnvironmentSessionEntityTypeName: string) { + return this.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match(projectLocationAgentEnvironmentSessionEntityTypeName).agent; + } + + /** + * Parse the environment from ProjectLocationAgentEnvironmentSessionEntityType resource. + * + * @param {string} projectLocationAgentEnvironmentSessionEntityTypeName + * A fully-qualified path representing project_location_agent_environment_session_entity_type resource. + * @returns {string} A string representing the environment. + */ + matchEnvironmentFromProjectLocationAgentEnvironmentSessionEntityTypeName(projectLocationAgentEnvironmentSessionEntityTypeName: string) { + return this.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match(projectLocationAgentEnvironmentSessionEntityTypeName).environment; + } + + /** + * Parse the session from ProjectLocationAgentEnvironmentSessionEntityType resource. + * + * @param {string} projectLocationAgentEnvironmentSessionEntityTypeName + * A fully-qualified path representing project_location_agent_environment_session_entity_type resource. + * @returns {string} A string representing the session. + */ + matchSessionFromProjectLocationAgentEnvironmentSessionEntityTypeName(projectLocationAgentEnvironmentSessionEntityTypeName: string) { + return this.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match(projectLocationAgentEnvironmentSessionEntityTypeName).session; + } + + /** + * Parse the entity_type from ProjectLocationAgentEnvironmentSessionEntityType resource. + * + * @param {string} projectLocationAgentEnvironmentSessionEntityTypeName + * A fully-qualified path representing project_location_agent_environment_session_entity_type resource. + * @returns {string} A string representing the entity_type. + */ + matchEntityTypeFromProjectLocationAgentEnvironmentSessionEntityTypeName(projectLocationAgentEnvironmentSessionEntityTypeName: string) { + return this.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match(projectLocationAgentEnvironmentSessionEntityTypeName).entity_type; + } + + /** + * Return a fully-qualified projectLocationAgentFlowTransitionRouteGroups resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} flow + * @param {string} transition_route_group + * @returns {string} Resource name string. + */ + projectLocationAgentFlowTransitionRouteGroupsPath(project:string,location:string,agent:string,flow:string,transitionRouteGroup:string) { + return this.pathTemplates.projectLocationAgentFlowTransitionRouteGroupsPathTemplate.render({ + project: project, + location: location, + agent: agent, + flow: flow, + transition_route_group: transitionRouteGroup, + }); + } + + /** + * Parse the project from ProjectLocationAgentFlowTransitionRouteGroups resource. + * + * @param {string} projectLocationAgentFlowTransitionRouteGroupsName + * A fully-qualified path representing project_location_agent_flow_transitionRouteGroups resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationAgentFlowTransitionRouteGroupsName(projectLocationAgentFlowTransitionRouteGroupsName: string) { + return this.pathTemplates.projectLocationAgentFlowTransitionRouteGroupsPathTemplate.match(projectLocationAgentFlowTransitionRouteGroupsName).project; + } + + /** + * Parse the location from ProjectLocationAgentFlowTransitionRouteGroups resource. + * + * @param {string} projectLocationAgentFlowTransitionRouteGroupsName + * A fully-qualified path representing project_location_agent_flow_transitionRouteGroups resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationAgentFlowTransitionRouteGroupsName(projectLocationAgentFlowTransitionRouteGroupsName: string) { + return this.pathTemplates.projectLocationAgentFlowTransitionRouteGroupsPathTemplate.match(projectLocationAgentFlowTransitionRouteGroupsName).location; + } + + /** + * Parse the agent from ProjectLocationAgentFlowTransitionRouteGroups resource. + * + * @param {string} projectLocationAgentFlowTransitionRouteGroupsName + * A fully-qualified path representing project_location_agent_flow_transitionRouteGroups resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromProjectLocationAgentFlowTransitionRouteGroupsName(projectLocationAgentFlowTransitionRouteGroupsName: string) { + return this.pathTemplates.projectLocationAgentFlowTransitionRouteGroupsPathTemplate.match(projectLocationAgentFlowTransitionRouteGroupsName).agent; + } + + /** + * Parse the flow from ProjectLocationAgentFlowTransitionRouteGroups resource. + * + * @param {string} projectLocationAgentFlowTransitionRouteGroupsName + * A fully-qualified path representing project_location_agent_flow_transitionRouteGroups resource. + * @returns {string} A string representing the flow. + */ + matchFlowFromProjectLocationAgentFlowTransitionRouteGroupsName(projectLocationAgentFlowTransitionRouteGroupsName: string) { + return this.pathTemplates.projectLocationAgentFlowTransitionRouteGroupsPathTemplate.match(projectLocationAgentFlowTransitionRouteGroupsName).flow; + } + + /** + * Parse the transition_route_group from ProjectLocationAgentFlowTransitionRouteGroups resource. + * + * @param {string} projectLocationAgentFlowTransitionRouteGroupsName + * A fully-qualified path representing project_location_agent_flow_transitionRouteGroups resource. + * @returns {string} A string representing the transition_route_group. + */ + matchTransitionRouteGroupFromProjectLocationAgentFlowTransitionRouteGroupsName(projectLocationAgentFlowTransitionRouteGroupsName: string) { + return this.pathTemplates.projectLocationAgentFlowTransitionRouteGroupsPathTemplate.match(projectLocationAgentFlowTransitionRouteGroupsName).transition_route_group; + } + + /** + * Return a fully-qualified projectLocationAgentSessionEntityType resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} session + * @param {string} entity_type + * @returns {string} Resource name string. + */ + projectLocationAgentSessionEntityTypePath(project:string,location:string,agent:string,session:string,entityType:string) { + return this.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render({ + project: project, + location: location, + agent: agent, + session: session, + entity_type: entityType, + }); + } + + /** + * Parse the project from ProjectLocationAgentSessionEntityType resource. + * + * @param {string} projectLocationAgentSessionEntityTypeName + * A fully-qualified path representing project_location_agent_session_entity_type resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationAgentSessionEntityTypeName(projectLocationAgentSessionEntityTypeName: string) { + return this.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match(projectLocationAgentSessionEntityTypeName).project; + } + + /** + * Parse the location from ProjectLocationAgentSessionEntityType resource. + * + * @param {string} projectLocationAgentSessionEntityTypeName + * A fully-qualified path representing project_location_agent_session_entity_type resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationAgentSessionEntityTypeName(projectLocationAgentSessionEntityTypeName: string) { + return this.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match(projectLocationAgentSessionEntityTypeName).location; + } + + /** + * Parse the agent from ProjectLocationAgentSessionEntityType resource. + * + * @param {string} projectLocationAgentSessionEntityTypeName + * A fully-qualified path representing project_location_agent_session_entity_type resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromProjectLocationAgentSessionEntityTypeName(projectLocationAgentSessionEntityTypeName: string) { + return this.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match(projectLocationAgentSessionEntityTypeName).agent; + } + + /** + * Parse the session from ProjectLocationAgentSessionEntityType resource. + * + * @param {string} projectLocationAgentSessionEntityTypeName + * A fully-qualified path representing project_location_agent_session_entity_type resource. + * @returns {string} A string representing the session. + */ + matchSessionFromProjectLocationAgentSessionEntityTypeName(projectLocationAgentSessionEntityTypeName: string) { + return this.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match(projectLocationAgentSessionEntityTypeName).session; + } + + /** + * Parse the entity_type from ProjectLocationAgentSessionEntityType resource. + * + * @param {string} projectLocationAgentSessionEntityTypeName + * A fully-qualified path representing project_location_agent_session_entity_type resource. + * @returns {string} A string representing the entity_type. + */ + matchEntityTypeFromProjectLocationAgentSessionEntityTypeName(projectLocationAgentSessionEntityTypeName: string) { + return this.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match(projectLocationAgentSessionEntityTypeName).entity_type; + } + + /** + * Return a fully-qualified projectLocationAgentTransitionRouteGroups resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} transition_route_group + * @returns {string} Resource name string. + */ + projectLocationAgentTransitionRouteGroupsPath(project:string,location:string,agent:string,transitionRouteGroup:string) { + return this.pathTemplates.projectLocationAgentTransitionRouteGroupsPathTemplate.render({ + project: project, + location: location, + agent: agent, + transition_route_group: transitionRouteGroup, + }); + } + + /** + * Parse the project from ProjectLocationAgentTransitionRouteGroups resource. + * + * @param {string} projectLocationAgentTransitionRouteGroupsName + * A fully-qualified path representing project_location_agent_transitionRouteGroups resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationAgentTransitionRouteGroupsName(projectLocationAgentTransitionRouteGroupsName: string) { + return this.pathTemplates.projectLocationAgentTransitionRouteGroupsPathTemplate.match(projectLocationAgentTransitionRouteGroupsName).project; + } + + /** + * Parse the location from ProjectLocationAgentTransitionRouteGroups resource. + * + * @param {string} projectLocationAgentTransitionRouteGroupsName + * A fully-qualified path representing project_location_agent_transitionRouteGroups resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationAgentTransitionRouteGroupsName(projectLocationAgentTransitionRouteGroupsName: string) { + return this.pathTemplates.projectLocationAgentTransitionRouteGroupsPathTemplate.match(projectLocationAgentTransitionRouteGroupsName).location; + } + + /** + * Parse the agent from ProjectLocationAgentTransitionRouteGroups resource. + * + * @param {string} projectLocationAgentTransitionRouteGroupsName + * A fully-qualified path representing project_location_agent_transitionRouteGroups resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromProjectLocationAgentTransitionRouteGroupsName(projectLocationAgentTransitionRouteGroupsName: string) { + return this.pathTemplates.projectLocationAgentTransitionRouteGroupsPathTemplate.match(projectLocationAgentTransitionRouteGroupsName).agent; + } + + /** + * Parse the transition_route_group from ProjectLocationAgentTransitionRouteGroups resource. + * + * @param {string} projectLocationAgentTransitionRouteGroupsName + * A fully-qualified path representing project_location_agent_transitionRouteGroups resource. + * @returns {string} A string representing the transition_route_group. + */ + matchTransitionRouteGroupFromProjectLocationAgentTransitionRouteGroupsName(projectLocationAgentTransitionRouteGroupsName: string) { + return this.pathTemplates.projectLocationAgentTransitionRouteGroupsPathTemplate.match(projectLocationAgentTransitionRouteGroupsName).transition_route_group; + } + + /** + * Return a fully-qualified securitySettings resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} security_settings + * @returns {string} Resource name string. + */ + securitySettingsPath(project:string,location:string,securitySettings:string) { + return this.pathTemplates.securitySettingsPathTemplate.render({ + project: project, + location: location, + security_settings: securitySettings, + }); + } + + /** + * Parse the project from SecuritySettings resource. + * + * @param {string} securitySettingsName + * A fully-qualified path representing SecuritySettings resource. + * @returns {string} A string representing the project. + */ + matchProjectFromSecuritySettingsName(securitySettingsName: string) { + return this.pathTemplates.securitySettingsPathTemplate.match(securitySettingsName).project; + } + + /** + * Parse the location from SecuritySettings resource. + * + * @param {string} securitySettingsName + * A fully-qualified path representing SecuritySettings resource. + * @returns {string} A string representing the location. + */ + matchLocationFromSecuritySettingsName(securitySettingsName: string) { + return this.pathTemplates.securitySettingsPathTemplate.match(securitySettingsName).location; + } + + /** + * Parse the security_settings from SecuritySettings resource. + * + * @param {string} securitySettingsName + * A fully-qualified path representing SecuritySettings resource. + * @returns {string} A string representing the security_settings. + */ + matchSecuritySettingsFromSecuritySettingsName(securitySettingsName: string) { + return this.pathTemplates.securitySettingsPathTemplate.match(securitySettingsName).security_settings; + } + + /** + * Return a fully-qualified testCase resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} test_case + * @returns {string} Resource name string. + */ + testCasePath(project:string,location:string,agent:string,testCase:string) { + return this.pathTemplates.testCasePathTemplate.render({ + project: project, + location: location, + agent: agent, + test_case: testCase, + }); + } + + /** + * Parse the project from TestCase resource. + * + * @param {string} testCaseName + * A fully-qualified path representing TestCase resource. + * @returns {string} A string representing the project. + */ + matchProjectFromTestCaseName(testCaseName: string) { + return this.pathTemplates.testCasePathTemplate.match(testCaseName).project; + } + + /** + * Parse the location from TestCase resource. + * + * @param {string} testCaseName + * A fully-qualified path representing TestCase resource. + * @returns {string} A string representing the location. + */ + matchLocationFromTestCaseName(testCaseName: string) { + return this.pathTemplates.testCasePathTemplate.match(testCaseName).location; + } + + /** + * Parse the agent from TestCase resource. + * + * @param {string} testCaseName + * A fully-qualified path representing TestCase resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromTestCaseName(testCaseName: string) { + return this.pathTemplates.testCasePathTemplate.match(testCaseName).agent; + } + + /** + * Parse the test_case from TestCase resource. + * + * @param {string} testCaseName + * A fully-qualified path representing TestCase resource. + * @returns {string} A string representing the test_case. + */ + matchTestCaseFromTestCaseName(testCaseName: string) { + return this.pathTemplates.testCasePathTemplate.match(testCaseName).test_case; + } + + /** + * Return a fully-qualified testCaseResult resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} test_case + * @param {string} result + * @returns {string} Resource name string. + */ + testCaseResultPath(project:string,location:string,agent:string,testCase:string,result:string) { + return this.pathTemplates.testCaseResultPathTemplate.render({ + project: project, + location: location, + agent: agent, + test_case: testCase, + result: result, + }); + } + + /** + * Parse the project from TestCaseResult resource. + * + * @param {string} testCaseResultName + * A fully-qualified path representing TestCaseResult resource. + * @returns {string} A string representing the project. + */ + matchProjectFromTestCaseResultName(testCaseResultName: string) { + return this.pathTemplates.testCaseResultPathTemplate.match(testCaseResultName).project; + } + + /** + * Parse the location from TestCaseResult resource. + * + * @param {string} testCaseResultName + * A fully-qualified path representing TestCaseResult resource. + * @returns {string} A string representing the location. + */ + matchLocationFromTestCaseResultName(testCaseResultName: string) { + return this.pathTemplates.testCaseResultPathTemplate.match(testCaseResultName).location; + } + + /** + * Parse the agent from TestCaseResult resource. + * + * @param {string} testCaseResultName + * A fully-qualified path representing TestCaseResult resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromTestCaseResultName(testCaseResultName: string) { + return this.pathTemplates.testCaseResultPathTemplate.match(testCaseResultName).agent; + } + + /** + * Parse the test_case from TestCaseResult resource. + * + * @param {string} testCaseResultName + * A fully-qualified path representing TestCaseResult resource. + * @returns {string} A string representing the test_case. + */ + matchTestCaseFromTestCaseResultName(testCaseResultName: string) { + return this.pathTemplates.testCaseResultPathTemplate.match(testCaseResultName).test_case; + } + + /** + * Parse the result from TestCaseResult resource. + * + * @param {string} testCaseResultName + * A fully-qualified path representing TestCaseResult resource. + * @returns {string} A string representing the result. + */ + matchResultFromTestCaseResultName(testCaseResultName: string) { + return this.pathTemplates.testCaseResultPathTemplate.match(testCaseResultName).result; + } + + /** + * Return a fully-qualified tool resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} tool + * @returns {string} Resource name string. + */ + toolPath(project:string,location:string,agent:string,tool:string) { + return this.pathTemplates.toolPathTemplate.render({ + project: project, + location: location, + agent: agent, + tool: tool, + }); + } + + /** + * Parse the project from Tool resource. + * + * @param {string} toolName + * A fully-qualified path representing Tool resource. + * @returns {string} A string representing the project. + */ + matchProjectFromToolName(toolName: string) { + return this.pathTemplates.toolPathTemplate.match(toolName).project; + } + + /** + * Parse the location from Tool resource. + * + * @param {string} toolName + * A fully-qualified path representing Tool resource. + * @returns {string} A string representing the location. + */ + matchLocationFromToolName(toolName: string) { + return this.pathTemplates.toolPathTemplate.match(toolName).location; + } + + /** + * Parse the agent from Tool resource. + * + * @param {string} toolName + * A fully-qualified path representing Tool resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromToolName(toolName: string) { + return this.pathTemplates.toolPathTemplate.match(toolName).agent; + } + + /** + * Parse the tool from Tool resource. + * + * @param {string} toolName + * A fully-qualified path representing Tool resource. + * @returns {string} A string representing the tool. + */ + matchToolFromToolName(toolName: string) { + return this.pathTemplates.toolPathTemplate.match(toolName).tool; + } + + /** + * Return a fully-qualified toolVersion resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} tool + * @param {string} version + * @returns {string} Resource name string. + */ + toolVersionPath(project:string,location:string,agent:string,tool:string,version:string) { + return this.pathTemplates.toolVersionPathTemplate.render({ + project: project, + location: location, + agent: agent, + tool: tool, + version: version, + }); + } + + /** + * Parse the project from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the project. + */ + matchProjectFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).project; + } + + /** + * Parse the location from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the location. + */ + matchLocationFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).location; + } + + /** + * Parse the agent from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).agent; + } + + /** + * Parse the tool from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the tool. + */ + matchToolFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).tool; + } + + /** + * Parse the version from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the version. + */ + matchVersionFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).version; + } + + /** + * Return a fully-qualified version resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} flow + * @param {string} version + * @returns {string} Resource name string. + */ + versionPath(project:string,location:string,agent:string,flow:string,version:string) { + return this.pathTemplates.versionPathTemplate.render({ + project: project, + location: location, + agent: agent, + flow: flow, + version: version, + }); + } + + /** + * Parse the project from Version resource. + * + * @param {string} versionName + * A fully-qualified path representing Version resource. + * @returns {string} A string representing the project. + */ + matchProjectFromVersionName(versionName: string) { + return this.pathTemplates.versionPathTemplate.match(versionName).project; + } + + /** + * Parse the location from Version resource. + * + * @param {string} versionName + * A fully-qualified path representing Version resource. + * @returns {string} A string representing the location. + */ + matchLocationFromVersionName(versionName: string) { + return this.pathTemplates.versionPathTemplate.match(versionName).location; + } + + /** + * Parse the agent from Version resource. + * + * @param {string} versionName + * A fully-qualified path representing Version resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromVersionName(versionName: string) { + return this.pathTemplates.versionPathTemplate.match(versionName).agent; + } + + /** + * Parse the flow from Version resource. + * + * @param {string} versionName + * A fully-qualified path representing Version resource. + * @returns {string} A string representing the flow. + */ + matchFlowFromVersionName(versionName: string) { + return this.pathTemplates.versionPathTemplate.match(versionName).flow; + } + + /** + * Parse the version from Version resource. + * + * @param {string} versionName + * A fully-qualified path representing Version resource. + * @returns {string} A string representing the version. + */ + matchVersionFromVersionName(versionName: string) { + return this.pathTemplates.versionPathTemplate.match(versionName).version; + } + + /** + * Return a fully-qualified webhook resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} webhook + * @returns {string} Resource name string. + */ + webhookPath(project:string,location:string,agent:string,webhook:string) { + return this.pathTemplates.webhookPathTemplate.render({ + project: project, + location: location, + agent: agent, + webhook: webhook, + }); + } + + /** + * Parse the project from Webhook resource. + * + * @param {string} webhookName + * A fully-qualified path representing Webhook resource. + * @returns {string} A string representing the project. + */ + matchProjectFromWebhookName(webhookName: string) { + return this.pathTemplates.webhookPathTemplate.match(webhookName).project; + } + + /** + * Parse the location from Webhook resource. + * + * @param {string} webhookName + * A fully-qualified path representing Webhook resource. + * @returns {string} A string representing the location. + */ + matchLocationFromWebhookName(webhookName: string) { + return this.pathTemplates.webhookPathTemplate.match(webhookName).location; + } + + /** + * Parse the agent from Webhook resource. + * + * @param {string} webhookName + * A fully-qualified path representing Webhook resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromWebhookName(webhookName: string) { + return this.pathTemplates.webhookPathTemplate.match(webhookName).agent; + } + + /** + * Parse the webhook from Webhook resource. + * + * @param {string} webhookName + * A fully-qualified path representing Webhook resource. + * @returns {string} A string representing the webhook. + */ + matchWebhookFromWebhookName(webhookName: string) { + return this.pathTemplates.webhookPathTemplate.match(webhookName).webhook; + } + + /** + * Terminate the gRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + if (this.playbooksStub && !this._terminated) { + return this.playbooksStub.then(stub => { + this._log.info('ending gRPC channel'); + this._terminated = true; + stub.close(); + this.locationsClient.close().catch(err => {throw err}); + void this.operationsClient.close(); + }); + } + return Promise.resolve(); + } +} \ No newline at end of file diff --git a/packages/google-cloud-dialogflow-cx/src/v3/playbooks_client_config.json b/packages/google-cloud-dialogflow-cx/src/v3/playbooks_client_config.json new file mode 100644 index 00000000000..696ca9eb5ee --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/src/v3/playbooks_client_config.json @@ -0,0 +1,89 @@ +{ + "interfaces": { + "google.cloud.dialogflow.cx.v3.Playbooks": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "unavailable": [ + "UNAVAILABLE" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "CreatePlaybook": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "default" + }, + "DeletePlaybook": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "default" + }, + "ListPlaybooks": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "default" + }, + "GetPlaybook": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "default" + }, + "ExportPlaybook": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "default" + }, + "ImportPlaybook": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "default" + }, + "UpdatePlaybook": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "default" + }, + "CreatePlaybookVersion": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "default" + }, + "GetPlaybookVersion": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "default" + }, + "RestorePlaybookVersion": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "default" + }, + "ListPlaybookVersions": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "default" + }, + "DeletePlaybookVersion": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "default" + } + } + } + } +} diff --git a/packages/google-cloud-dialogflow-cx/src/v3/playbooks_proto_list.json b/packages/google-cloud-dialogflow-cx/src/v3/playbooks_proto_list.json new file mode 100644 index 00000000000..081858680c0 --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/src/v3/playbooks_proto_list.json @@ -0,0 +1,37 @@ +[ + "../../protos/google/cloud/dialogflow/cx/v3/advanced_settings.proto", + "../../protos/google/cloud/dialogflow/cx/v3/agent.proto", + "../../protos/google/cloud/dialogflow/cx/v3/audio_config.proto", + "../../protos/google/cloud/dialogflow/cx/v3/changelog.proto", + "../../protos/google/cloud/dialogflow/cx/v3/code_block.proto", + "../../protos/google/cloud/dialogflow/cx/v3/data_store_connection.proto", + "../../protos/google/cloud/dialogflow/cx/v3/deployment.proto", + "../../protos/google/cloud/dialogflow/cx/v3/entity_type.proto", + "../../protos/google/cloud/dialogflow/cx/v3/environment.proto", + "../../protos/google/cloud/dialogflow/cx/v3/example.proto", + "../../protos/google/cloud/dialogflow/cx/v3/experiment.proto", + "../../protos/google/cloud/dialogflow/cx/v3/flow.proto", + "../../protos/google/cloud/dialogflow/cx/v3/fulfillment.proto", + "../../protos/google/cloud/dialogflow/cx/v3/gcs.proto", + "../../protos/google/cloud/dialogflow/cx/v3/generative_settings.proto", + "../../protos/google/cloud/dialogflow/cx/v3/generator.proto", + "../../protos/google/cloud/dialogflow/cx/v3/import_strategy.proto", + "../../protos/google/cloud/dialogflow/cx/v3/inline.proto", + "../../protos/google/cloud/dialogflow/cx/v3/intent.proto", + "../../protos/google/cloud/dialogflow/cx/v3/page.proto", + "../../protos/google/cloud/dialogflow/cx/v3/parameter_definition.proto", + "../../protos/google/cloud/dialogflow/cx/v3/playbook.proto", + "../../protos/google/cloud/dialogflow/cx/v3/response_message.proto", + "../../protos/google/cloud/dialogflow/cx/v3/safety_settings.proto", + "../../protos/google/cloud/dialogflow/cx/v3/security_settings.proto", + "../../protos/google/cloud/dialogflow/cx/v3/session.proto", + "../../protos/google/cloud/dialogflow/cx/v3/session_entity_type.proto", + "../../protos/google/cloud/dialogflow/cx/v3/test_case.proto", + "../../protos/google/cloud/dialogflow/cx/v3/tool.proto", + "../../protos/google/cloud/dialogflow/cx/v3/tool_call.proto", + "../../protos/google/cloud/dialogflow/cx/v3/trace.proto", + "../../protos/google/cloud/dialogflow/cx/v3/transition_route_group.proto", + "../../protos/google/cloud/dialogflow/cx/v3/validation_message.proto", + "../../protos/google/cloud/dialogflow/cx/v3/version.proto", + "../../protos/google/cloud/dialogflow/cx/v3/webhook.proto" +] diff --git a/packages/google-cloud-dialogflow-cx/src/v3/security_settings_service_client.ts b/packages/google-cloud-dialogflow-cx/src/v3/security_settings_service_client.ts index ad54f1881ac..f47b08c529b 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/security_settings_service_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3/security_settings_service_client.ts @@ -208,6 +208,9 @@ export class SecuritySettingsServiceClient { environmentPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}' ), + examplePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}/examples/{example}' + ), experimentPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/experiments/{experiment}' ), @@ -235,6 +238,12 @@ export class SecuritySettingsServiceClient { pagePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/pages/{page}' ), + playbookPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}' + ), + playbookVersionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}/versions/{version}' + ), projectPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}' ), @@ -265,6 +274,12 @@ export class SecuritySettingsServiceClient { testCaseResultPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/testCases/{test_case}/results/{result}' ), + toolPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/tools/{tool}' + ), + toolVersionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/tools/{tool}/versions/{version}' + ), versionPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/versions/{version}' ), @@ -1828,6 +1843,81 @@ export class SecuritySettingsServiceClient { return this.pathTemplates.environmentPathTemplate.match(environmentName).environment; } + /** + * Return a fully-qualified example resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} playbook + * @param {string} example + * @returns {string} Resource name string. + */ + examplePath(project:string,location:string,agent:string,playbook:string,example:string) { + return this.pathTemplates.examplePathTemplate.render({ + project: project, + location: location, + agent: agent, + playbook: playbook, + example: example, + }); + } + + /** + * Parse the project from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the project. + */ + matchProjectFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).project; + } + + /** + * Parse the location from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the location. + */ + matchLocationFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).location; + } + + /** + * Parse the agent from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).agent; + } + + /** + * Parse the playbook from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the playbook. + */ + matchPlaybookFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).playbook; + } + + /** + * Parse the example from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the example. + */ + matchExampleFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).example; + } + /** * Return a fully-qualified experiment resource name string. * @@ -2360,6 +2450,143 @@ export class SecuritySettingsServiceClient { return this.pathTemplates.pagePathTemplate.match(pageName).page; } + /** + * Return a fully-qualified playbook resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} playbook + * @returns {string} Resource name string. + */ + playbookPath(project:string,location:string,agent:string,playbook:string) { + return this.pathTemplates.playbookPathTemplate.render({ + project: project, + location: location, + agent: agent, + playbook: playbook, + }); + } + + /** + * Parse the project from Playbook resource. + * + * @param {string} playbookName + * A fully-qualified path representing Playbook resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPlaybookName(playbookName: string) { + return this.pathTemplates.playbookPathTemplate.match(playbookName).project; + } + + /** + * Parse the location from Playbook resource. + * + * @param {string} playbookName + * A fully-qualified path representing Playbook resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPlaybookName(playbookName: string) { + return this.pathTemplates.playbookPathTemplate.match(playbookName).location; + } + + /** + * Parse the agent from Playbook resource. + * + * @param {string} playbookName + * A fully-qualified path representing Playbook resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromPlaybookName(playbookName: string) { + return this.pathTemplates.playbookPathTemplate.match(playbookName).agent; + } + + /** + * Parse the playbook from Playbook resource. + * + * @param {string} playbookName + * A fully-qualified path representing Playbook resource. + * @returns {string} A string representing the playbook. + */ + matchPlaybookFromPlaybookName(playbookName: string) { + return this.pathTemplates.playbookPathTemplate.match(playbookName).playbook; + } + + /** + * Return a fully-qualified playbookVersion resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} playbook + * @param {string} version + * @returns {string} Resource name string. + */ + playbookVersionPath(project:string,location:string,agent:string,playbook:string,version:string) { + return this.pathTemplates.playbookVersionPathTemplate.render({ + project: project, + location: location, + agent: agent, + playbook: playbook, + version: version, + }); + } + + /** + * Parse the project from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).project; + } + + /** + * Parse the location from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).location; + } + + /** + * Parse the agent from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).agent; + } + + /** + * Parse the playbook from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the playbook. + */ + matchPlaybookFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).playbook; + } + + /** + * Parse the version from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the version. + */ + matchVersionFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).version; + } + /** * Return a fully-qualified project resource name string. * @@ -2967,6 +3194,143 @@ export class SecuritySettingsServiceClient { return this.pathTemplates.testCaseResultPathTemplate.match(testCaseResultName).result; } + /** + * Return a fully-qualified tool resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} tool + * @returns {string} Resource name string. + */ + toolPath(project:string,location:string,agent:string,tool:string) { + return this.pathTemplates.toolPathTemplate.render({ + project: project, + location: location, + agent: agent, + tool: tool, + }); + } + + /** + * Parse the project from Tool resource. + * + * @param {string} toolName + * A fully-qualified path representing Tool resource. + * @returns {string} A string representing the project. + */ + matchProjectFromToolName(toolName: string) { + return this.pathTemplates.toolPathTemplate.match(toolName).project; + } + + /** + * Parse the location from Tool resource. + * + * @param {string} toolName + * A fully-qualified path representing Tool resource. + * @returns {string} A string representing the location. + */ + matchLocationFromToolName(toolName: string) { + return this.pathTemplates.toolPathTemplate.match(toolName).location; + } + + /** + * Parse the agent from Tool resource. + * + * @param {string} toolName + * A fully-qualified path representing Tool resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromToolName(toolName: string) { + return this.pathTemplates.toolPathTemplate.match(toolName).agent; + } + + /** + * Parse the tool from Tool resource. + * + * @param {string} toolName + * A fully-qualified path representing Tool resource. + * @returns {string} A string representing the tool. + */ + matchToolFromToolName(toolName: string) { + return this.pathTemplates.toolPathTemplate.match(toolName).tool; + } + + /** + * Return a fully-qualified toolVersion resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} tool + * @param {string} version + * @returns {string} Resource name string. + */ + toolVersionPath(project:string,location:string,agent:string,tool:string,version:string) { + return this.pathTemplates.toolVersionPathTemplate.render({ + project: project, + location: location, + agent: agent, + tool: tool, + version: version, + }); + } + + /** + * Parse the project from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the project. + */ + matchProjectFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).project; + } + + /** + * Parse the location from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the location. + */ + matchLocationFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).location; + } + + /** + * Parse the agent from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).agent; + } + + /** + * Parse the tool from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the tool. + */ + matchToolFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).tool; + } + + /** + * Parse the version from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the version. + */ + matchVersionFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).version; + } + /** * Return a fully-qualified version resource name string. * diff --git a/packages/google-cloud-dialogflow-cx/src/v3/security_settings_service_proto_list.json b/packages/google-cloud-dialogflow-cx/src/v3/security_settings_service_proto_list.json index 81549ae03b3..081858680c0 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/security_settings_service_proto_list.json +++ b/packages/google-cloud-dialogflow-cx/src/v3/security_settings_service_proto_list.json @@ -3,10 +3,12 @@ "../../protos/google/cloud/dialogflow/cx/v3/agent.proto", "../../protos/google/cloud/dialogflow/cx/v3/audio_config.proto", "../../protos/google/cloud/dialogflow/cx/v3/changelog.proto", + "../../protos/google/cloud/dialogflow/cx/v3/code_block.proto", "../../protos/google/cloud/dialogflow/cx/v3/data_store_connection.proto", "../../protos/google/cloud/dialogflow/cx/v3/deployment.proto", "../../protos/google/cloud/dialogflow/cx/v3/entity_type.proto", "../../protos/google/cloud/dialogflow/cx/v3/environment.proto", + "../../protos/google/cloud/dialogflow/cx/v3/example.proto", "../../protos/google/cloud/dialogflow/cx/v3/experiment.proto", "../../protos/google/cloud/dialogflow/cx/v3/flow.proto", "../../protos/google/cloud/dialogflow/cx/v3/fulfillment.proto", @@ -17,12 +19,17 @@ "../../protos/google/cloud/dialogflow/cx/v3/inline.proto", "../../protos/google/cloud/dialogflow/cx/v3/intent.proto", "../../protos/google/cloud/dialogflow/cx/v3/page.proto", + "../../protos/google/cloud/dialogflow/cx/v3/parameter_definition.proto", + "../../protos/google/cloud/dialogflow/cx/v3/playbook.proto", "../../protos/google/cloud/dialogflow/cx/v3/response_message.proto", "../../protos/google/cloud/dialogflow/cx/v3/safety_settings.proto", "../../protos/google/cloud/dialogflow/cx/v3/security_settings.proto", "../../protos/google/cloud/dialogflow/cx/v3/session.proto", "../../protos/google/cloud/dialogflow/cx/v3/session_entity_type.proto", "../../protos/google/cloud/dialogflow/cx/v3/test_case.proto", + "../../protos/google/cloud/dialogflow/cx/v3/tool.proto", + "../../protos/google/cloud/dialogflow/cx/v3/tool_call.proto", + "../../protos/google/cloud/dialogflow/cx/v3/trace.proto", "../../protos/google/cloud/dialogflow/cx/v3/transition_route_group.proto", "../../protos/google/cloud/dialogflow/cx/v3/validation_message.proto", "../../protos/google/cloud/dialogflow/cx/v3/version.proto", diff --git a/packages/google-cloud-dialogflow-cx/src/v3/session_entity_types_client.ts b/packages/google-cloud-dialogflow-cx/src/v3/session_entity_types_client.ts index 846b3606102..5358475f809 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/session_entity_types_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3/session_entity_types_client.ts @@ -209,6 +209,9 @@ export class SessionEntityTypesClient { environmentPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}' ), + examplePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}/examples/{example}' + ), experimentPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/experiments/{experiment}' ), @@ -230,6 +233,12 @@ export class SessionEntityTypesClient { pagePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/pages/{page}' ), + playbookPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}' + ), + playbookVersionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}/versions/{version}' + ), projectPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}' ), @@ -257,6 +266,12 @@ export class SessionEntityTypesClient { testCaseResultPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/testCases/{test_case}/results/{result}' ), + toolPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/tools/{tool}' + ), + toolVersionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/tools/{tool}/versions/{version}' + ), versionPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/versions/{version}' ), @@ -1846,6 +1861,81 @@ export class SessionEntityTypesClient { return this.pathTemplates.environmentPathTemplate.match(environmentName).environment; } + /** + * Return a fully-qualified example resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} playbook + * @param {string} example + * @returns {string} Resource name string. + */ + examplePath(project:string,location:string,agent:string,playbook:string,example:string) { + return this.pathTemplates.examplePathTemplate.render({ + project: project, + location: location, + agent: agent, + playbook: playbook, + example: example, + }); + } + + /** + * Parse the project from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the project. + */ + matchProjectFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).project; + } + + /** + * Parse the location from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the location. + */ + matchLocationFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).location; + } + + /** + * Parse the agent from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).agent; + } + + /** + * Parse the playbook from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the playbook. + */ + matchPlaybookFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).playbook; + } + + /** + * Parse the example from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the example. + */ + matchExampleFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).example; + } + /** * Return a fully-qualified experiment resource name string. * @@ -2280,6 +2370,143 @@ export class SessionEntityTypesClient { return this.pathTemplates.pagePathTemplate.match(pageName).page; } + /** + * Return a fully-qualified playbook resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} playbook + * @returns {string} Resource name string. + */ + playbookPath(project:string,location:string,agent:string,playbook:string) { + return this.pathTemplates.playbookPathTemplate.render({ + project: project, + location: location, + agent: agent, + playbook: playbook, + }); + } + + /** + * Parse the project from Playbook resource. + * + * @param {string} playbookName + * A fully-qualified path representing Playbook resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPlaybookName(playbookName: string) { + return this.pathTemplates.playbookPathTemplate.match(playbookName).project; + } + + /** + * Parse the location from Playbook resource. + * + * @param {string} playbookName + * A fully-qualified path representing Playbook resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPlaybookName(playbookName: string) { + return this.pathTemplates.playbookPathTemplate.match(playbookName).location; + } + + /** + * Parse the agent from Playbook resource. + * + * @param {string} playbookName + * A fully-qualified path representing Playbook resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromPlaybookName(playbookName: string) { + return this.pathTemplates.playbookPathTemplate.match(playbookName).agent; + } + + /** + * Parse the playbook from Playbook resource. + * + * @param {string} playbookName + * A fully-qualified path representing Playbook resource. + * @returns {string} A string representing the playbook. + */ + matchPlaybookFromPlaybookName(playbookName: string) { + return this.pathTemplates.playbookPathTemplate.match(playbookName).playbook; + } + + /** + * Return a fully-qualified playbookVersion resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} playbook + * @param {string} version + * @returns {string} Resource name string. + */ + playbookVersionPath(project:string,location:string,agent:string,playbook:string,version:string) { + return this.pathTemplates.playbookVersionPathTemplate.render({ + project: project, + location: location, + agent: agent, + playbook: playbook, + version: version, + }); + } + + /** + * Parse the project from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).project; + } + + /** + * Parse the location from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).location; + } + + /** + * Parse the agent from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).agent; + } + + /** + * Parse the playbook from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the playbook. + */ + matchPlaybookFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).playbook; + } + + /** + * Parse the version from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the version. + */ + matchVersionFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).version; + } + /** * Return a fully-qualified project resource name string. * @@ -2851,6 +3078,143 @@ export class SessionEntityTypesClient { return this.pathTemplates.testCaseResultPathTemplate.match(testCaseResultName).result; } + /** + * Return a fully-qualified tool resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} tool + * @returns {string} Resource name string. + */ + toolPath(project:string,location:string,agent:string,tool:string) { + return this.pathTemplates.toolPathTemplate.render({ + project: project, + location: location, + agent: agent, + tool: tool, + }); + } + + /** + * Parse the project from Tool resource. + * + * @param {string} toolName + * A fully-qualified path representing Tool resource. + * @returns {string} A string representing the project. + */ + matchProjectFromToolName(toolName: string) { + return this.pathTemplates.toolPathTemplate.match(toolName).project; + } + + /** + * Parse the location from Tool resource. + * + * @param {string} toolName + * A fully-qualified path representing Tool resource. + * @returns {string} A string representing the location. + */ + matchLocationFromToolName(toolName: string) { + return this.pathTemplates.toolPathTemplate.match(toolName).location; + } + + /** + * Parse the agent from Tool resource. + * + * @param {string} toolName + * A fully-qualified path representing Tool resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromToolName(toolName: string) { + return this.pathTemplates.toolPathTemplate.match(toolName).agent; + } + + /** + * Parse the tool from Tool resource. + * + * @param {string} toolName + * A fully-qualified path representing Tool resource. + * @returns {string} A string representing the tool. + */ + matchToolFromToolName(toolName: string) { + return this.pathTemplates.toolPathTemplate.match(toolName).tool; + } + + /** + * Return a fully-qualified toolVersion resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} tool + * @param {string} version + * @returns {string} Resource name string. + */ + toolVersionPath(project:string,location:string,agent:string,tool:string,version:string) { + return this.pathTemplates.toolVersionPathTemplate.render({ + project: project, + location: location, + agent: agent, + tool: tool, + version: version, + }); + } + + /** + * Parse the project from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the project. + */ + matchProjectFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).project; + } + + /** + * Parse the location from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the location. + */ + matchLocationFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).location; + } + + /** + * Parse the agent from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).agent; + } + + /** + * Parse the tool from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the tool. + */ + matchToolFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).tool; + } + + /** + * Parse the version from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the version. + */ + matchVersionFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).version; + } + /** * Return a fully-qualified version resource name string. * diff --git a/packages/google-cloud-dialogflow-cx/src/v3/session_entity_types_proto_list.json b/packages/google-cloud-dialogflow-cx/src/v3/session_entity_types_proto_list.json index 81549ae03b3..081858680c0 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/session_entity_types_proto_list.json +++ b/packages/google-cloud-dialogflow-cx/src/v3/session_entity_types_proto_list.json @@ -3,10 +3,12 @@ "../../protos/google/cloud/dialogflow/cx/v3/agent.proto", "../../protos/google/cloud/dialogflow/cx/v3/audio_config.proto", "../../protos/google/cloud/dialogflow/cx/v3/changelog.proto", + "../../protos/google/cloud/dialogflow/cx/v3/code_block.proto", "../../protos/google/cloud/dialogflow/cx/v3/data_store_connection.proto", "../../protos/google/cloud/dialogflow/cx/v3/deployment.proto", "../../protos/google/cloud/dialogflow/cx/v3/entity_type.proto", "../../protos/google/cloud/dialogflow/cx/v3/environment.proto", + "../../protos/google/cloud/dialogflow/cx/v3/example.proto", "../../protos/google/cloud/dialogflow/cx/v3/experiment.proto", "../../protos/google/cloud/dialogflow/cx/v3/flow.proto", "../../protos/google/cloud/dialogflow/cx/v3/fulfillment.proto", @@ -17,12 +19,17 @@ "../../protos/google/cloud/dialogflow/cx/v3/inline.proto", "../../protos/google/cloud/dialogflow/cx/v3/intent.proto", "../../protos/google/cloud/dialogflow/cx/v3/page.proto", + "../../protos/google/cloud/dialogflow/cx/v3/parameter_definition.proto", + "../../protos/google/cloud/dialogflow/cx/v3/playbook.proto", "../../protos/google/cloud/dialogflow/cx/v3/response_message.proto", "../../protos/google/cloud/dialogflow/cx/v3/safety_settings.proto", "../../protos/google/cloud/dialogflow/cx/v3/security_settings.proto", "../../protos/google/cloud/dialogflow/cx/v3/session.proto", "../../protos/google/cloud/dialogflow/cx/v3/session_entity_type.proto", "../../protos/google/cloud/dialogflow/cx/v3/test_case.proto", + "../../protos/google/cloud/dialogflow/cx/v3/tool.proto", + "../../protos/google/cloud/dialogflow/cx/v3/tool_call.proto", + "../../protos/google/cloud/dialogflow/cx/v3/trace.proto", "../../protos/google/cloud/dialogflow/cx/v3/transition_route_group.proto", "../../protos/google/cloud/dialogflow/cx/v3/validation_message.proto", "../../protos/google/cloud/dialogflow/cx/v3/version.proto", diff --git a/packages/google-cloud-dialogflow-cx/src/v3/sessions_client.ts b/packages/google-cloud-dialogflow-cx/src/v3/sessions_client.ts index 62aa0fe3d14..4db4ad163b0 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/sessions_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3/sessions_client.ts @@ -211,6 +211,9 @@ export class SessionsClient { environmentPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}' ), + examplePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}/examples/{example}' + ), experimentPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/experiments/{experiment}' ), @@ -229,6 +232,12 @@ export class SessionsClient { pagePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/pages/{page}' ), + playbookPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}' + ), + playbookVersionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}/versions/{version}' + ), projectLocationAgentEnvironmentSessionPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/sessions/{session}' ), @@ -262,6 +271,12 @@ export class SessionsClient { testCaseResultPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/testCases/{test_case}/results/{result}' ), + toolPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/tools/{tool}' + ), + toolVersionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/tools/{tool}/versions/{version}' + ), versionPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/versions/{version}' ), @@ -487,6 +502,10 @@ export class SessionsClient { * Required. The input specification. * @param {google.cloud.dialogflow.cx.v3.OutputAudioConfig} request.outputAudioConfig * Instructs the speech synthesizer how to generate the output audio. + * @param {google.cloud.dialogflow.cx.v3.DetectIntentResponseView} [request.responseView] + * Optional. Specifies which fields in the + * {@link protos.google.cloud.dialogflow.cx.v3.QueryResult|QueryResult} to return. If not + * set, the default is DETECT_INTENT_RESPONSE_VIEW_FULL. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -929,6 +948,10 @@ export class SessionsClient { * Required. The input specification. * @param {google.cloud.dialogflow.cx.v3.OutputAudioConfig} request.outputAudioConfig * Instructs the speech synthesizer how to generate the output audio. + * @param {google.cloud.dialogflow.cx.v3.DetectIntentResponseView} [request.responseView] + * Optional. Specifies which fields in the + * {@link protos.google.cloud.dialogflow.cx.v3.QueryResult|QueryResult} to return. If not + * set, the default is DETECT_INTENT_RESPONSE_VIEW_FULL. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} @@ -1773,6 +1796,81 @@ export class SessionsClient { return this.pathTemplates.environmentPathTemplate.match(environmentName).environment; } + /** + * Return a fully-qualified example resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} playbook + * @param {string} example + * @returns {string} Resource name string. + */ + examplePath(project:string,location:string,agent:string,playbook:string,example:string) { + return this.pathTemplates.examplePathTemplate.render({ + project: project, + location: location, + agent: agent, + playbook: playbook, + example: example, + }); + } + + /** + * Parse the project from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the project. + */ + matchProjectFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).project; + } + + /** + * Parse the location from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the location. + */ + matchLocationFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).location; + } + + /** + * Parse the agent from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).agent; + } + + /** + * Parse the playbook from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the playbook. + */ + matchPlaybookFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).playbook; + } + + /** + * Parse the example from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the example. + */ + matchExampleFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).example; + } + /** * Return a fully-qualified experiment resource name string. * @@ -2171,6 +2269,143 @@ export class SessionsClient { return this.pathTemplates.pagePathTemplate.match(pageName).page; } + /** + * Return a fully-qualified playbook resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} playbook + * @returns {string} Resource name string. + */ + playbookPath(project:string,location:string,agent:string,playbook:string) { + return this.pathTemplates.playbookPathTemplate.render({ + project: project, + location: location, + agent: agent, + playbook: playbook, + }); + } + + /** + * Parse the project from Playbook resource. + * + * @param {string} playbookName + * A fully-qualified path representing Playbook resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPlaybookName(playbookName: string) { + return this.pathTemplates.playbookPathTemplate.match(playbookName).project; + } + + /** + * Parse the location from Playbook resource. + * + * @param {string} playbookName + * A fully-qualified path representing Playbook resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPlaybookName(playbookName: string) { + return this.pathTemplates.playbookPathTemplate.match(playbookName).location; + } + + /** + * Parse the agent from Playbook resource. + * + * @param {string} playbookName + * A fully-qualified path representing Playbook resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromPlaybookName(playbookName: string) { + return this.pathTemplates.playbookPathTemplate.match(playbookName).agent; + } + + /** + * Parse the playbook from Playbook resource. + * + * @param {string} playbookName + * A fully-qualified path representing Playbook resource. + * @returns {string} A string representing the playbook. + */ + matchPlaybookFromPlaybookName(playbookName: string) { + return this.pathTemplates.playbookPathTemplate.match(playbookName).playbook; + } + + /** + * Return a fully-qualified playbookVersion resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} playbook + * @param {string} version + * @returns {string} Resource name string. + */ + playbookVersionPath(project:string,location:string,agent:string,playbook:string,version:string) { + return this.pathTemplates.playbookVersionPathTemplate.render({ + project: project, + location: location, + agent: agent, + playbook: playbook, + version: version, + }); + } + + /** + * Parse the project from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).project; + } + + /** + * Parse the location from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).location; + } + + /** + * Parse the agent from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).agent; + } + + /** + * Parse the playbook from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the playbook. + */ + matchPlaybookFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).playbook; + } + + /** + * Parse the version from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the version. + */ + matchVersionFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).version; + } + /** * Return a fully-qualified projectLocationAgentEnvironmentSession resource name string. * @@ -2905,6 +3140,143 @@ export class SessionsClient { return this.pathTemplates.testCaseResultPathTemplate.match(testCaseResultName).result; } + /** + * Return a fully-qualified tool resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} tool + * @returns {string} Resource name string. + */ + toolPath(project:string,location:string,agent:string,tool:string) { + return this.pathTemplates.toolPathTemplate.render({ + project: project, + location: location, + agent: agent, + tool: tool, + }); + } + + /** + * Parse the project from Tool resource. + * + * @param {string} toolName + * A fully-qualified path representing Tool resource. + * @returns {string} A string representing the project. + */ + matchProjectFromToolName(toolName: string) { + return this.pathTemplates.toolPathTemplate.match(toolName).project; + } + + /** + * Parse the location from Tool resource. + * + * @param {string} toolName + * A fully-qualified path representing Tool resource. + * @returns {string} A string representing the location. + */ + matchLocationFromToolName(toolName: string) { + return this.pathTemplates.toolPathTemplate.match(toolName).location; + } + + /** + * Parse the agent from Tool resource. + * + * @param {string} toolName + * A fully-qualified path representing Tool resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromToolName(toolName: string) { + return this.pathTemplates.toolPathTemplate.match(toolName).agent; + } + + /** + * Parse the tool from Tool resource. + * + * @param {string} toolName + * A fully-qualified path representing Tool resource. + * @returns {string} A string representing the tool. + */ + matchToolFromToolName(toolName: string) { + return this.pathTemplates.toolPathTemplate.match(toolName).tool; + } + + /** + * Return a fully-qualified toolVersion resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} tool + * @param {string} version + * @returns {string} Resource name string. + */ + toolVersionPath(project:string,location:string,agent:string,tool:string,version:string) { + return this.pathTemplates.toolVersionPathTemplate.render({ + project: project, + location: location, + agent: agent, + tool: tool, + version: version, + }); + } + + /** + * Parse the project from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the project. + */ + matchProjectFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).project; + } + + /** + * Parse the location from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the location. + */ + matchLocationFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).location; + } + + /** + * Parse the agent from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).agent; + } + + /** + * Parse the tool from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the tool. + */ + matchToolFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).tool; + } + + /** + * Parse the version from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the version. + */ + matchVersionFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).version; + } + /** * Return a fully-qualified version resource name string. * diff --git a/packages/google-cloud-dialogflow-cx/src/v3/sessions_proto_list.json b/packages/google-cloud-dialogflow-cx/src/v3/sessions_proto_list.json index 81549ae03b3..081858680c0 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/sessions_proto_list.json +++ b/packages/google-cloud-dialogflow-cx/src/v3/sessions_proto_list.json @@ -3,10 +3,12 @@ "../../protos/google/cloud/dialogflow/cx/v3/agent.proto", "../../protos/google/cloud/dialogflow/cx/v3/audio_config.proto", "../../protos/google/cloud/dialogflow/cx/v3/changelog.proto", + "../../protos/google/cloud/dialogflow/cx/v3/code_block.proto", "../../protos/google/cloud/dialogflow/cx/v3/data_store_connection.proto", "../../protos/google/cloud/dialogflow/cx/v3/deployment.proto", "../../protos/google/cloud/dialogflow/cx/v3/entity_type.proto", "../../protos/google/cloud/dialogflow/cx/v3/environment.proto", + "../../protos/google/cloud/dialogflow/cx/v3/example.proto", "../../protos/google/cloud/dialogflow/cx/v3/experiment.proto", "../../protos/google/cloud/dialogflow/cx/v3/flow.proto", "../../protos/google/cloud/dialogflow/cx/v3/fulfillment.proto", @@ -17,12 +19,17 @@ "../../protos/google/cloud/dialogflow/cx/v3/inline.proto", "../../protos/google/cloud/dialogflow/cx/v3/intent.proto", "../../protos/google/cloud/dialogflow/cx/v3/page.proto", + "../../protos/google/cloud/dialogflow/cx/v3/parameter_definition.proto", + "../../protos/google/cloud/dialogflow/cx/v3/playbook.proto", "../../protos/google/cloud/dialogflow/cx/v3/response_message.proto", "../../protos/google/cloud/dialogflow/cx/v3/safety_settings.proto", "../../protos/google/cloud/dialogflow/cx/v3/security_settings.proto", "../../protos/google/cloud/dialogflow/cx/v3/session.proto", "../../protos/google/cloud/dialogflow/cx/v3/session_entity_type.proto", "../../protos/google/cloud/dialogflow/cx/v3/test_case.proto", + "../../protos/google/cloud/dialogflow/cx/v3/tool.proto", + "../../protos/google/cloud/dialogflow/cx/v3/tool_call.proto", + "../../protos/google/cloud/dialogflow/cx/v3/trace.proto", "../../protos/google/cloud/dialogflow/cx/v3/transition_route_group.proto", "../../protos/google/cloud/dialogflow/cx/v3/validation_message.proto", "../../protos/google/cloud/dialogflow/cx/v3/version.proto", 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 bd1b1f9f3b5..0acb24e45f3 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 @@ -209,6 +209,9 @@ export class TestCasesClient { environmentPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}' ), + examplePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}/examples/{example}' + ), experimentPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/experiments/{experiment}' ), @@ -230,6 +233,12 @@ export class TestCasesClient { pagePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/pages/{page}' ), + playbookPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}' + ), + playbookVersionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}/versions/{version}' + ), projectPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}' ), @@ -254,6 +263,12 @@ export class TestCasesClient { testCaseResultPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/testCases/{test_case}/results/{result}' ), + toolPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/tools/{tool}' + ), + toolVersionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/tools/{tool}/versions/{version}' + ), versionPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/versions/{version}' ), @@ -2851,6 +2866,81 @@ export class TestCasesClient { return this.pathTemplates.environmentPathTemplate.match(environmentName).environment; } + /** + * Return a fully-qualified example resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} playbook + * @param {string} example + * @returns {string} Resource name string. + */ + examplePath(project:string,location:string,agent:string,playbook:string,example:string) { + return this.pathTemplates.examplePathTemplate.render({ + project: project, + location: location, + agent: agent, + playbook: playbook, + example: example, + }); + } + + /** + * Parse the project from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the project. + */ + matchProjectFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).project; + } + + /** + * Parse the location from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the location. + */ + matchLocationFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).location; + } + + /** + * Parse the agent from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).agent; + } + + /** + * Parse the playbook from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the playbook. + */ + matchPlaybookFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).playbook; + } + + /** + * Parse the example from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the example. + */ + matchExampleFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).example; + } + /** * Return a fully-qualified experiment resource name string. * @@ -3285,6 +3375,143 @@ export class TestCasesClient { return this.pathTemplates.pagePathTemplate.match(pageName).page; } + /** + * Return a fully-qualified playbook resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} playbook + * @returns {string} Resource name string. + */ + playbookPath(project:string,location:string,agent:string,playbook:string) { + return this.pathTemplates.playbookPathTemplate.render({ + project: project, + location: location, + agent: agent, + playbook: playbook, + }); + } + + /** + * Parse the project from Playbook resource. + * + * @param {string} playbookName + * A fully-qualified path representing Playbook resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPlaybookName(playbookName: string) { + return this.pathTemplates.playbookPathTemplate.match(playbookName).project; + } + + /** + * Parse the location from Playbook resource. + * + * @param {string} playbookName + * A fully-qualified path representing Playbook resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPlaybookName(playbookName: string) { + return this.pathTemplates.playbookPathTemplate.match(playbookName).location; + } + + /** + * Parse the agent from Playbook resource. + * + * @param {string} playbookName + * A fully-qualified path representing Playbook resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromPlaybookName(playbookName: string) { + return this.pathTemplates.playbookPathTemplate.match(playbookName).agent; + } + + /** + * Parse the playbook from Playbook resource. + * + * @param {string} playbookName + * A fully-qualified path representing Playbook resource. + * @returns {string} A string representing the playbook. + */ + matchPlaybookFromPlaybookName(playbookName: string) { + return this.pathTemplates.playbookPathTemplate.match(playbookName).playbook; + } + + /** + * Return a fully-qualified playbookVersion resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} playbook + * @param {string} version + * @returns {string} Resource name string. + */ + playbookVersionPath(project:string,location:string,agent:string,playbook:string,version:string) { + return this.pathTemplates.playbookVersionPathTemplate.render({ + project: project, + location: location, + agent: agent, + playbook: playbook, + version: version, + }); + } + + /** + * Parse the project from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).project; + } + + /** + * Parse the location from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).location; + } + + /** + * Parse the agent from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).agent; + } + + /** + * Parse the playbook from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the playbook. + */ + matchPlaybookFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).playbook; + } + + /** + * Parse the version from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the version. + */ + matchVersionFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).version; + } + /** * Return a fully-qualified project resource name string. * @@ -3794,6 +4021,143 @@ export class TestCasesClient { return this.pathTemplates.testCaseResultPathTemplate.match(testCaseResultName).result; } + /** + * Return a fully-qualified tool resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} tool + * @returns {string} Resource name string. + */ + toolPath(project:string,location:string,agent:string,tool:string) { + return this.pathTemplates.toolPathTemplate.render({ + project: project, + location: location, + agent: agent, + tool: tool, + }); + } + + /** + * Parse the project from Tool resource. + * + * @param {string} toolName + * A fully-qualified path representing Tool resource. + * @returns {string} A string representing the project. + */ + matchProjectFromToolName(toolName: string) { + return this.pathTemplates.toolPathTemplate.match(toolName).project; + } + + /** + * Parse the location from Tool resource. + * + * @param {string} toolName + * A fully-qualified path representing Tool resource. + * @returns {string} A string representing the location. + */ + matchLocationFromToolName(toolName: string) { + return this.pathTemplates.toolPathTemplate.match(toolName).location; + } + + /** + * Parse the agent from Tool resource. + * + * @param {string} toolName + * A fully-qualified path representing Tool resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromToolName(toolName: string) { + return this.pathTemplates.toolPathTemplate.match(toolName).agent; + } + + /** + * Parse the tool from Tool resource. + * + * @param {string} toolName + * A fully-qualified path representing Tool resource. + * @returns {string} A string representing the tool. + */ + matchToolFromToolName(toolName: string) { + return this.pathTemplates.toolPathTemplate.match(toolName).tool; + } + + /** + * Return a fully-qualified toolVersion resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} tool + * @param {string} version + * @returns {string} Resource name string. + */ + toolVersionPath(project:string,location:string,agent:string,tool:string,version:string) { + return this.pathTemplates.toolVersionPathTemplate.render({ + project: project, + location: location, + agent: agent, + tool: tool, + version: version, + }); + } + + /** + * Parse the project from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the project. + */ + matchProjectFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).project; + } + + /** + * Parse the location from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the location. + */ + matchLocationFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).location; + } + + /** + * Parse the agent from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).agent; + } + + /** + * Parse the tool from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the tool. + */ + matchToolFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).tool; + } + + /** + * Parse the version from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the version. + */ + matchVersionFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).version; + } + /** * Return a fully-qualified version resource name string. * diff --git a/packages/google-cloud-dialogflow-cx/src/v3/test_cases_proto_list.json b/packages/google-cloud-dialogflow-cx/src/v3/test_cases_proto_list.json index 81549ae03b3..081858680c0 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/test_cases_proto_list.json +++ b/packages/google-cloud-dialogflow-cx/src/v3/test_cases_proto_list.json @@ -3,10 +3,12 @@ "../../protos/google/cloud/dialogflow/cx/v3/agent.proto", "../../protos/google/cloud/dialogflow/cx/v3/audio_config.proto", "../../protos/google/cloud/dialogflow/cx/v3/changelog.proto", + "../../protos/google/cloud/dialogflow/cx/v3/code_block.proto", "../../protos/google/cloud/dialogflow/cx/v3/data_store_connection.proto", "../../protos/google/cloud/dialogflow/cx/v3/deployment.proto", "../../protos/google/cloud/dialogflow/cx/v3/entity_type.proto", "../../protos/google/cloud/dialogflow/cx/v3/environment.proto", + "../../protos/google/cloud/dialogflow/cx/v3/example.proto", "../../protos/google/cloud/dialogflow/cx/v3/experiment.proto", "../../protos/google/cloud/dialogflow/cx/v3/flow.proto", "../../protos/google/cloud/dialogflow/cx/v3/fulfillment.proto", @@ -17,12 +19,17 @@ "../../protos/google/cloud/dialogflow/cx/v3/inline.proto", "../../protos/google/cloud/dialogflow/cx/v3/intent.proto", "../../protos/google/cloud/dialogflow/cx/v3/page.proto", + "../../protos/google/cloud/dialogflow/cx/v3/parameter_definition.proto", + "../../protos/google/cloud/dialogflow/cx/v3/playbook.proto", "../../protos/google/cloud/dialogflow/cx/v3/response_message.proto", "../../protos/google/cloud/dialogflow/cx/v3/safety_settings.proto", "../../protos/google/cloud/dialogflow/cx/v3/security_settings.proto", "../../protos/google/cloud/dialogflow/cx/v3/session.proto", "../../protos/google/cloud/dialogflow/cx/v3/session_entity_type.proto", "../../protos/google/cloud/dialogflow/cx/v3/test_case.proto", + "../../protos/google/cloud/dialogflow/cx/v3/tool.proto", + "../../protos/google/cloud/dialogflow/cx/v3/tool_call.proto", + "../../protos/google/cloud/dialogflow/cx/v3/trace.proto", "../../protos/google/cloud/dialogflow/cx/v3/transition_route_group.proto", "../../protos/google/cloud/dialogflow/cx/v3/validation_message.proto", "../../protos/google/cloud/dialogflow/cx/v3/version.proto", diff --git a/packages/google-cloud-dialogflow-cx/src/v3/tools_client.ts b/packages/google-cloud-dialogflow-cx/src/v3/tools_client.ts new file mode 100644 index 00000000000..d0465cad0ed --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/src/v3/tools_client.ts @@ -0,0 +1,3884 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type {Callback, CallOptions, Descriptors, ClientOptions, GrpcClientOptions, PaginationCallback, GaxCall, LocationsClient, LocationProtos} from 'google-gax'; +import {Transform} from 'stream'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +import {loggingUtils as logging, decodeAnyProtosInArray} from 'google-gax'; + +/** + * Client JSON configuration object, loaded from + * `src/v3/tools_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './tools_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Service for managing {@link protos.google.cloud.dialogflow.cx.v3.Tool|Tools}. + * @class + * @memberof v3 + */ +export class ToolsClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + private _universeDomain: string; + private _servicePath: string; + private _log = logging.log('dialogflow-cx'); + + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + locationsClient: LocationsClient; + pathTemplates: {[name: string]: gax.PathTemplate}; + operationsClient: gax.OperationsClient; + toolsStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of ToolsClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new ToolsClient({fallback: true}, gax); + * ``` + */ + constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof ToolsClient; + if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) { + throw new Error('Please set either universe_domain or universeDomain, but not both.'); + } + const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined; + this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com'; + this._servicePath = 'dialogflow.' + this._universeDomain; + const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; + this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== this._servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = this._servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === this._servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + this.locationsClient = new this._gaxModule.LocationsClient( + this._gaxGrpc, + opts + ); + + + // Determine the client header string. + const clientHeader = [ + `gax/${this._gaxModule.version}`, + `gapic/${version}`, + ]; + if (typeof process === 'object' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + agentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}' + ), + agentGenerativeSettingsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/generativeSettings' + ), + agentValidationResultPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/validationResult' + ), + changelogPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/changelogs/{changelog}' + ), + continuousTestResultPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/continuousTestResults/{continuous_test_result}' + ), + deploymentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/deployments/{deployment}' + ), + entityTypePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/entityTypes/{entity_type}' + ), + environmentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}' + ), + examplePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}/examples/{example}' + ), + experimentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/experiments/{experiment}' + ), + flowPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}' + ), + flowValidationResultPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/validationResult' + ), + generatorPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/generators/{generator}' + ), + intentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/intents/{intent}' + ), + locationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}' + ), + pagePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/pages/{page}' + ), + playbookPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}' + ), + playbookVersionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}/versions/{version}' + ), + projectPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}' + ), + projectLocationAgentEnvironmentSessionEntityTypePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/sessions/{session}/entityTypes/{entity_type}' + ), + projectLocationAgentFlowTransitionRouteGroupsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/transitionRouteGroups/{transition_route_group}' + ), + projectLocationAgentSessionEntityTypePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/sessions/{session}/entityTypes/{entity_type}' + ), + projectLocationAgentTransitionRouteGroupsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/transitionRouteGroups/{transition_route_group}' + ), + securitySettingsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/securitySettings/{security_settings}' + ), + testCasePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/testCases/{test_case}' + ), + testCaseResultPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/testCases/{test_case}/results/{result}' + ), + toolPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/tools/{tool}' + ), + toolVersionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/tools/{tool}/versions/{version}' + ), + versionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/versions/{version}' + ), + webhookPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/webhooks/{webhook}' + ), + }; + + // Some of the methods on this service return "paged" results, + // (e.g. 50 results at a time, with tokens to get subsequent + // pages). Denote the keys used for pagination and results. + this.descriptors.page = { + listTools: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'tools'), + listToolVersions: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'toolVersions') + }; + + const protoFilesRoot = this._gaxModule.protobufFromJSON(jsonProtos); + // This API contains "long-running operations", which return a + // an Operation object that allows for tracking of the operation, + // rather than holding a request open. + const lroOptions: GrpcClientOptions = { + auth: this.auth, + grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined + }; + if (opts.fallback) { + lroOptions.protoJson = protoFilesRoot; + lroOptions.httpRules = [{selector: 'google.cloud.location.Locations.GetLocation',get: '/v3/{name=projects/*/locations/*}',},{selector: 'google.cloud.location.Locations.ListLocations',get: '/v3/{name=projects/*}/locations',},{selector: 'google.longrunning.Operations.CancelOperation',post: '/v3/{name=projects/*/operations/*}:cancel',additional_bindings: [{post: '/v3/{name=projects/*/locations/*/operations/*}:cancel',}], + },{selector: 'google.longrunning.Operations.GetOperation',get: '/v3/{name=projects/*/operations/*}',additional_bindings: [{get: '/v3/{name=projects/*/locations/*/operations/*}',}], + },{selector: 'google.longrunning.Operations.ListOperations',get: '/v3/{name=projects/*}/operations',additional_bindings: [{get: '/v3/{name=projects/*/locations/*}/operations',}], + }]; + } + this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts); + + this.descriptors.longrunning = { + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.dialogflow.cx.v3.Tools', gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, {'x-goog-api-client': clientHeader.join(' ')}); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this.innerApiCalls = {}; + + // Add a warn function to the client constructor so it can be easily tested. + this.warn = this._gaxModule.warn; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.toolsStub) { + return this.toolsStub; + } + + // Put together the "service stub" for + // google.cloud.dialogflow.cx.v3.Tools. + this.toolsStub = this._gaxGrpc.createStub( + this._opts.fallback ? + (this._protos as protobuf.Root).lookupService('google.cloud.dialogflow.cx.v3.Tools') : + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.dialogflow.cx.v3.Tools, + this._opts, this._providedCustomServicePath) as Promise<{[method: string]: Function}>; + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const toolsStubMethods = + ['createTool', 'listTools', 'getTool', 'updateTool', 'deleteTool', 'listToolVersions', 'createToolVersion', 'getToolVersion', 'deleteToolVersion', 'restoreToolVersion']; + for (const methodName of toolsStubMethods) { + const callPromise = this.toolsStub.then( + stub => (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error|null|undefined) => () => { + throw err; + }); + + const descriptor = + this.descriptors.page[methodName] || + undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.toolsStub; + } + + /** + * The DNS address for this API service. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'dialogflow.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'dialogflow.googleapis.com'; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + get apiEndpoint() { + return this._servicePath; + } + + get universeDomain() { + return this._universeDomain; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/dialogflow' + ]; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId(callback?: Callback): + Promise|void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- +/** + * Creates a {@link protos.google.cloud.dialogflow.cx.v3.Tool|Tool} in the specified + * agent. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The agent to create a Tool for. + * Format: `projects//locations//agents/`. + * @param {google.cloud.dialogflow.cx.v3.Tool} request.tool + * Required. The Tool to be created. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.dialogflow.cx.v3.Tool|Tool}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v3/tools.create_tool.js + * region_tag:dialogflow_v3_generated_Tools_CreateTool_async + */ + createTool( + request?: protos.google.cloud.dialogflow.cx.v3.ICreateToolRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.dialogflow.cx.v3.ITool, + protos.google.cloud.dialogflow.cx.v3.ICreateToolRequest|undefined, {}|undefined + ]>; + createTool( + request: protos.google.cloud.dialogflow.cx.v3.ICreateToolRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dialogflow.cx.v3.ITool, + protos.google.cloud.dialogflow.cx.v3.ICreateToolRequest|null|undefined, + {}|null|undefined>): void; + createTool( + request: protos.google.cloud.dialogflow.cx.v3.ICreateToolRequest, + callback: Callback< + protos.google.cloud.dialogflow.cx.v3.ITool, + protos.google.cloud.dialogflow.cx.v3.ICreateToolRequest|null|undefined, + {}|null|undefined>): void; + createTool( + request?: protos.google.cloud.dialogflow.cx.v3.ICreateToolRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.dialogflow.cx.v3.ITool, + protos.google.cloud.dialogflow.cx.v3.ICreateToolRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.dialogflow.cx.v3.ITool, + protos.google.cloud.dialogflow.cx.v3.ICreateToolRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.dialogflow.cx.v3.ITool, + protos.google.cloud.dialogflow.cx.v3.ICreateToolRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('createTool request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.dialogflow.cx.v3.ITool, + protos.google.cloud.dialogflow.cx.v3.ICreateToolRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('createTool response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.createTool(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.dialogflow.cx.v3.ITool, + protos.google.cloud.dialogflow.cx.v3.ICreateToolRequest|undefined, + {}|undefined + ]) => { + this._log.info('createTool response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Retrieves the specified {@link protos.google.cloud.dialogflow.cx.v3.Tool|Tool}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the Tool. + * Format: + * `projects//locations//agents//tools/`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.dialogflow.cx.v3.Tool|Tool}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v3/tools.get_tool.js + * region_tag:dialogflow_v3_generated_Tools_GetTool_async + */ + getTool( + request?: protos.google.cloud.dialogflow.cx.v3.IGetToolRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.dialogflow.cx.v3.ITool, + protos.google.cloud.dialogflow.cx.v3.IGetToolRequest|undefined, {}|undefined + ]>; + getTool( + request: protos.google.cloud.dialogflow.cx.v3.IGetToolRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dialogflow.cx.v3.ITool, + protos.google.cloud.dialogflow.cx.v3.IGetToolRequest|null|undefined, + {}|null|undefined>): void; + getTool( + request: protos.google.cloud.dialogflow.cx.v3.IGetToolRequest, + callback: Callback< + protos.google.cloud.dialogflow.cx.v3.ITool, + protos.google.cloud.dialogflow.cx.v3.IGetToolRequest|null|undefined, + {}|null|undefined>): void; + getTool( + request?: protos.google.cloud.dialogflow.cx.v3.IGetToolRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.dialogflow.cx.v3.ITool, + protos.google.cloud.dialogflow.cx.v3.IGetToolRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.dialogflow.cx.v3.ITool, + protos.google.cloud.dialogflow.cx.v3.IGetToolRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.dialogflow.cx.v3.ITool, + protos.google.cloud.dialogflow.cx.v3.IGetToolRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('getTool request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.dialogflow.cx.v3.ITool, + protos.google.cloud.dialogflow.cx.v3.IGetToolRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getTool response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getTool(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.dialogflow.cx.v3.ITool, + protos.google.cloud.dialogflow.cx.v3.IGetToolRequest|undefined, + {}|undefined + ]) => { + this._log.info('getTool response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Update the specified {@link protos.google.cloud.dialogflow.cx.v3.Tool|Tool}. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.dialogflow.cx.v3.Tool} request.tool + * Required. The Tool to be updated. + * @param {google.protobuf.FieldMask} request.updateMask + * The mask to control which fields get updated. If the mask is not present, + * all fields will be updated. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.dialogflow.cx.v3.Tool|Tool}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v3/tools.update_tool.js + * region_tag:dialogflow_v3_generated_Tools_UpdateTool_async + */ + updateTool( + request?: protos.google.cloud.dialogflow.cx.v3.IUpdateToolRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.dialogflow.cx.v3.ITool, + protos.google.cloud.dialogflow.cx.v3.IUpdateToolRequest|undefined, {}|undefined + ]>; + updateTool( + request: protos.google.cloud.dialogflow.cx.v3.IUpdateToolRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dialogflow.cx.v3.ITool, + protos.google.cloud.dialogflow.cx.v3.IUpdateToolRequest|null|undefined, + {}|null|undefined>): void; + updateTool( + request: protos.google.cloud.dialogflow.cx.v3.IUpdateToolRequest, + callback: Callback< + protos.google.cloud.dialogflow.cx.v3.ITool, + protos.google.cloud.dialogflow.cx.v3.IUpdateToolRequest|null|undefined, + {}|null|undefined>): void; + updateTool( + request?: protos.google.cloud.dialogflow.cx.v3.IUpdateToolRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.dialogflow.cx.v3.ITool, + protos.google.cloud.dialogflow.cx.v3.IUpdateToolRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.dialogflow.cx.v3.ITool, + protos.google.cloud.dialogflow.cx.v3.IUpdateToolRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.dialogflow.cx.v3.ITool, + protos.google.cloud.dialogflow.cx.v3.IUpdateToolRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'tool.name': request.tool!.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('updateTool request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.dialogflow.cx.v3.ITool, + protos.google.cloud.dialogflow.cx.v3.IUpdateToolRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('updateTool response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.updateTool(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.dialogflow.cx.v3.ITool, + protos.google.cloud.dialogflow.cx.v3.IUpdateToolRequest|undefined, + {}|undefined + ]) => { + this._log.info('updateTool response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Deletes a specified {@link protos.google.cloud.dialogflow.cx.v3.Tool|Tool}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the Tool to be deleted. + * Format: + * `projects//locations//agents//tools/`. + * @param {boolean} request.force + * This field has no effect for Tools not being used. + * For Tools that are used: + * + * * If `force` is set to false, an error will be returned with message + * indicating the referenced resources. + * * If `force` is set to true, Dialogflow will remove the tool, as well + * as any references to the tool. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v3/tools.delete_tool.js + * region_tag:dialogflow_v3_generated_Tools_DeleteTool_async + */ + deleteTool( + request?: protos.google.cloud.dialogflow.cx.v3.IDeleteToolRequest, + options?: CallOptions): + Promise<[ + protos.google.protobuf.IEmpty, + protos.google.cloud.dialogflow.cx.v3.IDeleteToolRequest|undefined, {}|undefined + ]>; + deleteTool( + request: protos.google.cloud.dialogflow.cx.v3.IDeleteToolRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.dialogflow.cx.v3.IDeleteToolRequest|null|undefined, + {}|null|undefined>): void; + deleteTool( + request: protos.google.cloud.dialogflow.cx.v3.IDeleteToolRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.dialogflow.cx.v3.IDeleteToolRequest|null|undefined, + {}|null|undefined>): void; + deleteTool( + request?: protos.google.cloud.dialogflow.cx.v3.IDeleteToolRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.dialogflow.cx.v3.IDeleteToolRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.dialogflow.cx.v3.IDeleteToolRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.protobuf.IEmpty, + protos.google.cloud.dialogflow.cx.v3.IDeleteToolRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('deleteTool request %j', request); + const wrappedCallback: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.dialogflow.cx.v3.IDeleteToolRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('deleteTool response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.deleteTool(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.protobuf.IEmpty, + protos.google.cloud.dialogflow.cx.v3.IDeleteToolRequest|undefined, + {}|undefined + ]) => { + this._log.info('deleteTool response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Creates a version for the specified + * {@link protos.google.cloud.dialogflow.cx.v3.Tool|Tool}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The tool to create a version for. + * Format: + * `projects//locations//agents//tools/`. + * @param {google.cloud.dialogflow.cx.v3.ToolVersion} request.toolVersion + * Required. The tool version to create. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.dialogflow.cx.v3.ToolVersion|ToolVersion}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v3/tools.create_tool_version.js + * region_tag:dialogflow_v3_generated_Tools_CreateToolVersion_async + */ + createToolVersion( + request?: protos.google.cloud.dialogflow.cx.v3.ICreateToolVersionRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.dialogflow.cx.v3.IToolVersion, + protos.google.cloud.dialogflow.cx.v3.ICreateToolVersionRequest|undefined, {}|undefined + ]>; + createToolVersion( + request: protos.google.cloud.dialogflow.cx.v3.ICreateToolVersionRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dialogflow.cx.v3.IToolVersion, + protos.google.cloud.dialogflow.cx.v3.ICreateToolVersionRequest|null|undefined, + {}|null|undefined>): void; + createToolVersion( + request: protos.google.cloud.dialogflow.cx.v3.ICreateToolVersionRequest, + callback: Callback< + protos.google.cloud.dialogflow.cx.v3.IToolVersion, + protos.google.cloud.dialogflow.cx.v3.ICreateToolVersionRequest|null|undefined, + {}|null|undefined>): void; + createToolVersion( + request?: protos.google.cloud.dialogflow.cx.v3.ICreateToolVersionRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.dialogflow.cx.v3.IToolVersion, + protos.google.cloud.dialogflow.cx.v3.ICreateToolVersionRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.dialogflow.cx.v3.IToolVersion, + protos.google.cloud.dialogflow.cx.v3.ICreateToolVersionRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.dialogflow.cx.v3.IToolVersion, + protos.google.cloud.dialogflow.cx.v3.ICreateToolVersionRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('createToolVersion request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.dialogflow.cx.v3.IToolVersion, + protos.google.cloud.dialogflow.cx.v3.ICreateToolVersionRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('createToolVersion response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.createToolVersion(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.dialogflow.cx.v3.IToolVersion, + protos.google.cloud.dialogflow.cx.v3.ICreateToolVersionRequest|undefined, + {}|undefined + ]) => { + this._log.info('createToolVersion response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Retrieves the specified version of the + * {@link protos.google.cloud.dialogflow.cx.v3.Tool|Tool}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the tool version. + * Format: + * `projects//locations//agents//tools//versions/`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.dialogflow.cx.v3.ToolVersion|ToolVersion}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v3/tools.get_tool_version.js + * region_tag:dialogflow_v3_generated_Tools_GetToolVersion_async + */ + getToolVersion( + request?: protos.google.cloud.dialogflow.cx.v3.IGetToolVersionRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.dialogflow.cx.v3.IToolVersion, + protos.google.cloud.dialogflow.cx.v3.IGetToolVersionRequest|undefined, {}|undefined + ]>; + getToolVersion( + request: protos.google.cloud.dialogflow.cx.v3.IGetToolVersionRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dialogflow.cx.v3.IToolVersion, + protos.google.cloud.dialogflow.cx.v3.IGetToolVersionRequest|null|undefined, + {}|null|undefined>): void; + getToolVersion( + request: protos.google.cloud.dialogflow.cx.v3.IGetToolVersionRequest, + callback: Callback< + protos.google.cloud.dialogflow.cx.v3.IToolVersion, + protos.google.cloud.dialogflow.cx.v3.IGetToolVersionRequest|null|undefined, + {}|null|undefined>): void; + getToolVersion( + request?: protos.google.cloud.dialogflow.cx.v3.IGetToolVersionRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.dialogflow.cx.v3.IToolVersion, + protos.google.cloud.dialogflow.cx.v3.IGetToolVersionRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.dialogflow.cx.v3.IToolVersion, + protos.google.cloud.dialogflow.cx.v3.IGetToolVersionRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.dialogflow.cx.v3.IToolVersion, + protos.google.cloud.dialogflow.cx.v3.IGetToolVersionRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('getToolVersion request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.dialogflow.cx.v3.IToolVersion, + protos.google.cloud.dialogflow.cx.v3.IGetToolVersionRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getToolVersion response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getToolVersion(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.dialogflow.cx.v3.IToolVersion, + protos.google.cloud.dialogflow.cx.v3.IGetToolVersionRequest|undefined, + {}|undefined + ]) => { + this._log.info('getToolVersion response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Deletes the specified version of the + * {@link protos.google.cloud.dialogflow.cx.v3.Tool|Tool}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the tool version to delete. + * Format: + * `projects//locations//agents//tools//versions/`. + * @param {boolean} [request.force] + * Optional. This field has no effect for Tools not being used. + * For Tools that are used: + * + * * If `force` is set to false, an error will be returned with message + * indicating the referenced resources. + * * If `force` is set to true, Dialogflow will remove the tool, as well + * as any references to the tool. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v3/tools.delete_tool_version.js + * region_tag:dialogflow_v3_generated_Tools_DeleteToolVersion_async + */ + deleteToolVersion( + request?: protos.google.cloud.dialogflow.cx.v3.IDeleteToolVersionRequest, + options?: CallOptions): + Promise<[ + protos.google.protobuf.IEmpty, + protos.google.cloud.dialogflow.cx.v3.IDeleteToolVersionRequest|undefined, {}|undefined + ]>; + deleteToolVersion( + request: protos.google.cloud.dialogflow.cx.v3.IDeleteToolVersionRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.dialogflow.cx.v3.IDeleteToolVersionRequest|null|undefined, + {}|null|undefined>): void; + deleteToolVersion( + request: protos.google.cloud.dialogflow.cx.v3.IDeleteToolVersionRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.dialogflow.cx.v3.IDeleteToolVersionRequest|null|undefined, + {}|null|undefined>): void; + deleteToolVersion( + request?: protos.google.cloud.dialogflow.cx.v3.IDeleteToolVersionRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.dialogflow.cx.v3.IDeleteToolVersionRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.dialogflow.cx.v3.IDeleteToolVersionRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.protobuf.IEmpty, + protos.google.cloud.dialogflow.cx.v3.IDeleteToolVersionRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('deleteToolVersion request %j', request); + const wrappedCallback: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.dialogflow.cx.v3.IDeleteToolVersionRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('deleteToolVersion response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.deleteToolVersion(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.protobuf.IEmpty, + protos.google.cloud.dialogflow.cx.v3.IDeleteToolVersionRequest|undefined, + {}|undefined + ]) => { + this._log.info('deleteToolVersion response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Retrieves the specified version of the Tool and stores it as the + * current tool draft, returning the tool with resources updated. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the tool version. + * Format: + * `projects//locations//agents//tools//versions/`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse|RestoreToolVersionResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v3/tools.restore_tool_version.js + * region_tag:dialogflow_v3_generated_Tools_RestoreToolVersion_async + */ + restoreToolVersion( + request?: protos.google.cloud.dialogflow.cx.v3.IRestoreToolVersionRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.dialogflow.cx.v3.IRestoreToolVersionResponse, + protos.google.cloud.dialogflow.cx.v3.IRestoreToolVersionRequest|undefined, {}|undefined + ]>; + restoreToolVersion( + request: protos.google.cloud.dialogflow.cx.v3.IRestoreToolVersionRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dialogflow.cx.v3.IRestoreToolVersionResponse, + protos.google.cloud.dialogflow.cx.v3.IRestoreToolVersionRequest|null|undefined, + {}|null|undefined>): void; + restoreToolVersion( + request: protos.google.cloud.dialogflow.cx.v3.IRestoreToolVersionRequest, + callback: Callback< + protos.google.cloud.dialogflow.cx.v3.IRestoreToolVersionResponse, + protos.google.cloud.dialogflow.cx.v3.IRestoreToolVersionRequest|null|undefined, + {}|null|undefined>): void; + restoreToolVersion( + request?: protos.google.cloud.dialogflow.cx.v3.IRestoreToolVersionRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.dialogflow.cx.v3.IRestoreToolVersionResponse, + protos.google.cloud.dialogflow.cx.v3.IRestoreToolVersionRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.dialogflow.cx.v3.IRestoreToolVersionResponse, + protos.google.cloud.dialogflow.cx.v3.IRestoreToolVersionRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.dialogflow.cx.v3.IRestoreToolVersionResponse, + protos.google.cloud.dialogflow.cx.v3.IRestoreToolVersionRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('restoreToolVersion request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.dialogflow.cx.v3.IRestoreToolVersionResponse, + protos.google.cloud.dialogflow.cx.v3.IRestoreToolVersionRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('restoreToolVersion response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.restoreToolVersion(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.dialogflow.cx.v3.IRestoreToolVersionResponse, + protos.google.cloud.dialogflow.cx.v3.IRestoreToolVersionRequest|undefined, + {}|undefined + ]) => { + this._log.info('restoreToolVersion response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } + + /** + * Returns a list of {@link protos.google.cloud.dialogflow.cx.v3.Tool|Tools} in the + * specified agent. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The agent to list the Tools from. + * Format: `projects//locations//agents/`. + * @param {number} request.pageSize + * The maximum number of items to return in a single page. By default 100 and + * at most 1000. + * @param {string} request.pageToken + * The next_page_token value returned from a previous list request. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.dialogflow.cx.v3.Tool|Tool}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listToolsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listTools( + request?: protos.google.cloud.dialogflow.cx.v3.IListToolsRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.dialogflow.cx.v3.ITool[], + protos.google.cloud.dialogflow.cx.v3.IListToolsRequest|null, + protos.google.cloud.dialogflow.cx.v3.IListToolsResponse + ]>; + listTools( + request: protos.google.cloud.dialogflow.cx.v3.IListToolsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dialogflow.cx.v3.IListToolsRequest, + protos.google.cloud.dialogflow.cx.v3.IListToolsResponse|null|undefined, + protos.google.cloud.dialogflow.cx.v3.ITool>): void; + listTools( + request: protos.google.cloud.dialogflow.cx.v3.IListToolsRequest, + callback: PaginationCallback< + protos.google.cloud.dialogflow.cx.v3.IListToolsRequest, + protos.google.cloud.dialogflow.cx.v3.IListToolsResponse|null|undefined, + protos.google.cloud.dialogflow.cx.v3.ITool>): void; + listTools( + request?: protos.google.cloud.dialogflow.cx.v3.IListToolsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.dialogflow.cx.v3.IListToolsRequest, + protos.google.cloud.dialogflow.cx.v3.IListToolsResponse|null|undefined, + protos.google.cloud.dialogflow.cx.v3.ITool>, + callback?: PaginationCallback< + protos.google.cloud.dialogflow.cx.v3.IListToolsRequest, + protos.google.cloud.dialogflow.cx.v3.IListToolsResponse|null|undefined, + protos.google.cloud.dialogflow.cx.v3.ITool>): + Promise<[ + protos.google.cloud.dialogflow.cx.v3.ITool[], + protos.google.cloud.dialogflow.cx.v3.IListToolsRequest|null, + protos.google.cloud.dialogflow.cx.v3.IListToolsResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.cloud.dialogflow.cx.v3.IListToolsRequest, + protos.google.cloud.dialogflow.cx.v3.IListToolsResponse|null|undefined, + protos.google.cloud.dialogflow.cx.v3.ITool>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listTools values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listTools request %j', request); + return this.innerApiCalls + .listTools(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.cloud.dialogflow.cx.v3.ITool[], + protos.google.cloud.dialogflow.cx.v3.IListToolsRequest|null, + protos.google.cloud.dialogflow.cx.v3.IListToolsResponse + ]) => { + this._log.info('listTools values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listTools`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The agent to list the Tools from. + * Format: `projects//locations//agents/`. + * @param {number} request.pageSize + * The maximum number of items to return in a single page. By default 100 and + * at most 1000. + * @param {string} request.pageToken + * The next_page_token value returned from a previous list request. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.dialogflow.cx.v3.Tool|Tool} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listToolsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listToolsStream( + request?: protos.google.cloud.dialogflow.cx.v3.IListToolsRequest, + options?: CallOptions): + Transform{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listTools']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listTools stream %j', request); + return this.descriptors.page.listTools.createStream( + this.innerApiCalls.listTools as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listTools`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The agent to list the Tools from. + * Format: `projects//locations//agents/`. + * @param {number} request.pageSize + * The maximum number of items to return in a single page. By default 100 and + * at most 1000. + * @param {string} request.pageToken + * The next_page_token value returned from a previous list request. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.dialogflow.cx.v3.Tool|Tool}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v3/tools.list_tools.js + * region_tag:dialogflow_v3_generated_Tools_ListTools_async + */ + listToolsAsync( + request?: protos.google.cloud.dialogflow.cx.v3.IListToolsRequest, + options?: CallOptions): + AsyncIterable{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listTools']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listTools iterate %j', request); + return this.descriptors.page.listTools.asyncIterate( + this.innerApiCalls['listTools'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * List versions of the specified {@link protos.google.cloud.dialogflow.cx.v3.Tool|Tool}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent of the tool versions. + * Format: + * `projects//locations//agents//tools/`. + * @param {number} [request.pageSize] + * Optional. The maximum number of items to return in a single page. By + * default 100 and at most 1000. + * @param {string} [request.pageToken] + * Optional. The next_page_token value returned from a previous list request. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.dialogflow.cx.v3.ToolVersion|ToolVersion}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listToolVersionsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listToolVersions( + request?: protos.google.cloud.dialogflow.cx.v3.IListToolVersionsRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.dialogflow.cx.v3.IToolVersion[], + protos.google.cloud.dialogflow.cx.v3.IListToolVersionsRequest|null, + protos.google.cloud.dialogflow.cx.v3.IListToolVersionsResponse + ]>; + listToolVersions( + request: protos.google.cloud.dialogflow.cx.v3.IListToolVersionsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dialogflow.cx.v3.IListToolVersionsRequest, + protos.google.cloud.dialogflow.cx.v3.IListToolVersionsResponse|null|undefined, + protos.google.cloud.dialogflow.cx.v3.IToolVersion>): void; + listToolVersions( + request: protos.google.cloud.dialogflow.cx.v3.IListToolVersionsRequest, + callback: PaginationCallback< + protos.google.cloud.dialogflow.cx.v3.IListToolVersionsRequest, + protos.google.cloud.dialogflow.cx.v3.IListToolVersionsResponse|null|undefined, + protos.google.cloud.dialogflow.cx.v3.IToolVersion>): void; + listToolVersions( + request?: protos.google.cloud.dialogflow.cx.v3.IListToolVersionsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.dialogflow.cx.v3.IListToolVersionsRequest, + protos.google.cloud.dialogflow.cx.v3.IListToolVersionsResponse|null|undefined, + protos.google.cloud.dialogflow.cx.v3.IToolVersion>, + callback?: PaginationCallback< + protos.google.cloud.dialogflow.cx.v3.IListToolVersionsRequest, + protos.google.cloud.dialogflow.cx.v3.IListToolVersionsResponse|null|undefined, + protos.google.cloud.dialogflow.cx.v3.IToolVersion>): + Promise<[ + protos.google.cloud.dialogflow.cx.v3.IToolVersion[], + protos.google.cloud.dialogflow.cx.v3.IListToolVersionsRequest|null, + protos.google.cloud.dialogflow.cx.v3.IListToolVersionsResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.cloud.dialogflow.cx.v3.IListToolVersionsRequest, + protos.google.cloud.dialogflow.cx.v3.IListToolVersionsResponse|null|undefined, + protos.google.cloud.dialogflow.cx.v3.IToolVersion>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listToolVersions values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listToolVersions request %j', request); + return this.innerApiCalls + .listToolVersions(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.cloud.dialogflow.cx.v3.IToolVersion[], + protos.google.cloud.dialogflow.cx.v3.IListToolVersionsRequest|null, + protos.google.cloud.dialogflow.cx.v3.IListToolVersionsResponse + ]) => { + this._log.info('listToolVersions values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listToolVersions`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent of the tool versions. + * Format: + * `projects//locations//agents//tools/`. + * @param {number} [request.pageSize] + * Optional. The maximum number of items to return in a single page. By + * default 100 and at most 1000. + * @param {string} [request.pageToken] + * Optional. The next_page_token value returned from a previous list request. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.dialogflow.cx.v3.ToolVersion|ToolVersion} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listToolVersionsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listToolVersionsStream( + request?: protos.google.cloud.dialogflow.cx.v3.IListToolVersionsRequest, + options?: CallOptions): + Transform{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listToolVersions']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listToolVersions stream %j', request); + return this.descriptors.page.listToolVersions.createStream( + this.innerApiCalls.listToolVersions as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listToolVersions`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent of the tool versions. + * Format: + * `projects//locations//agents//tools/`. + * @param {number} [request.pageSize] + * Optional. The maximum number of items to return in a single page. By + * default 100 and at most 1000. + * @param {string} [request.pageToken] + * Optional. The next_page_token value returned from a previous list request. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.dialogflow.cx.v3.ToolVersion|ToolVersion}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v3/tools.list_tool_versions.js + * region_tag:dialogflow_v3_generated_Tools_ListToolVersions_async + */ + listToolVersionsAsync( + request?: protos.google.cloud.dialogflow.cx.v3.IListToolVersionsRequest, + options?: CallOptions): + AsyncIterable{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listToolVersions']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listToolVersions iterate %j', request); + return this.descriptors.page.listToolVersions.asyncIterate( + this.innerApiCalls['listToolVersions'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } +/** + * Gets information about a location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Resource name for the location. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.cloud.location.Location | Location}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example + * ``` + * const [response] = await client.getLocation(request); + * ``` + */ + getLocation( + request: LocationProtos.google.cloud.location.IGetLocationRequest, + options?: + | gax.CallOptions + | Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + > + ): Promise { + return this.locationsClient.getLocation(request, options, callback); + } + +/** + * Lists information about the supported locations for this service. Returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The resource that owns the locations collection, if applicable. + * @param {string} request.filter + * The standard list filter. + * @param {number} request.pageSize + * The standard list page size. + * @param {string} request.pageToken + * The standard list page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example + * ``` + * const iterable = client.listLocationsAsync(request); + * for await (const response of iterable) { + * // process response + * } + * ``` + */ + listLocationsAsync( + request: LocationProtos.google.cloud.location.IListLocationsRequest, + options?: CallOptions + ): AsyncIterable { + return this.locationsClient.listLocationsAsync(request, options); + } + +/** + * Gets the latest state of a long-running operation. Clients can use this + * method to poll the operation result at intervals as recommended by the API + * service. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} + * for the details. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * const name = ''; + * const [response] = await client.getOperation({name}); + * // doThingsWith(response) + * ``` + */ + getOperation( + request: protos.google.longrunning.GetOperationRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + > + ): Promise<[protos.google.longrunning.Operation]> { + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + return this.operationsClient.getOperation(request, options, callback); + } + /** + * Lists operations that match the specified filter in the request. If the + * server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object. + * + * For-await-of syntax is used with the iterable to recursively get response element on-demand. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation collection. + * @param {string} request.filter - The standard list filter. + * @param {number=} request.pageSize - + * The maximum number of resources contained in the underlying API + * response. If page streaming is performed per-resource, this + * parameter does not affect the return value. If page streaming is + * performed per-page, this determines the maximum number of + * resources in a page. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the + * details. + * @returns {Object} + * An iterable Object that conforms to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | iteration protocols}. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * for await (const response of client.listOperationsAsync(request)); + * // doThingsWith(response) + * ``` + */ + listOperationsAsync( + request: protos.google.longrunning.ListOperationsRequest, + options?: gax.CallOptions + ): AsyncIterable { + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + return this.operationsClient.listOperationsAsync(request, options); + } + /** + * Starts asynchronous cancellation on a long-running operation. The server + * makes a best effort to cancel the operation, but success is not + * guaranteed. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. Clients can use + * {@link Operations.GetOperation} or + * other methods to check whether the cancellation succeeded or whether the + * operation completed despite cancellation. On successful cancellation, + * the operation is not deleted; instead, it becomes an operation with + * an {@link Operation.error} value with a {@link google.rpc.Status.code} of + * 1, corresponding to `Code.CANCELLED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be cancelled. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the + * details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.cancelOperation({name: ''}); + * ``` + */ + cancelOperation( + request: protos.google.longrunning.CancelOperationRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protos.google.longrunning.CancelOperationRequest, + protos.google.protobuf.Empty, + {} | undefined | null + >, + callback?: Callback< + protos.google.longrunning.CancelOperationRequest, + protos.google.protobuf.Empty, + {} | undefined | null + > + ): Promise { + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + return this.operationsClient.cancelOperation(request, options, callback); + } + + /** + * Deletes a long-running operation. This method indicates that the client is + * no longer interested in the operation result. It does not cancel the + * operation. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be deleted. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} + * for the details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.deleteOperation({name: ''}); + * ``` + */ + deleteOperation( + request: protos.google.longrunning.DeleteOperationRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + > + ): Promise { + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + return this.operationsClient.deleteOperation(request, options, callback); + } + + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified agent resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @returns {string} Resource name string. + */ + agentPath(project:string,location:string,agent:string) { + return this.pathTemplates.agentPathTemplate.render({ + project: project, + location: location, + agent: agent, + }); + } + + /** + * Parse the project from Agent resource. + * + * @param {string} agentName + * A fully-qualified path representing Agent resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAgentName(agentName: string) { + return this.pathTemplates.agentPathTemplate.match(agentName).project; + } + + /** + * Parse the location from Agent resource. + * + * @param {string} agentName + * A fully-qualified path representing Agent resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAgentName(agentName: string) { + return this.pathTemplates.agentPathTemplate.match(agentName).location; + } + + /** + * Parse the agent from Agent resource. + * + * @param {string} agentName + * A fully-qualified path representing Agent resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromAgentName(agentName: string) { + return this.pathTemplates.agentPathTemplate.match(agentName).agent; + } + + /** + * Return a fully-qualified agentGenerativeSettings resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @returns {string} Resource name string. + */ + agentGenerativeSettingsPath(project:string,location:string,agent:string) { + return this.pathTemplates.agentGenerativeSettingsPathTemplate.render({ + project: project, + location: location, + agent: agent, + }); + } + + /** + * Parse the project from AgentGenerativeSettings resource. + * + * @param {string} agentGenerativeSettingsName + * A fully-qualified path representing AgentGenerativeSettings resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAgentGenerativeSettingsName(agentGenerativeSettingsName: string) { + return this.pathTemplates.agentGenerativeSettingsPathTemplate.match(agentGenerativeSettingsName).project; + } + + /** + * Parse the location from AgentGenerativeSettings resource. + * + * @param {string} agentGenerativeSettingsName + * A fully-qualified path representing AgentGenerativeSettings resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAgentGenerativeSettingsName(agentGenerativeSettingsName: string) { + return this.pathTemplates.agentGenerativeSettingsPathTemplate.match(agentGenerativeSettingsName).location; + } + + /** + * Parse the agent from AgentGenerativeSettings resource. + * + * @param {string} agentGenerativeSettingsName + * A fully-qualified path representing AgentGenerativeSettings resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromAgentGenerativeSettingsName(agentGenerativeSettingsName: string) { + return this.pathTemplates.agentGenerativeSettingsPathTemplate.match(agentGenerativeSettingsName).agent; + } + + /** + * Return a fully-qualified agentValidationResult resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @returns {string} Resource name string. + */ + agentValidationResultPath(project:string,location:string,agent:string) { + return this.pathTemplates.agentValidationResultPathTemplate.render({ + project: project, + location: location, + agent: agent, + }); + } + + /** + * Parse the project from AgentValidationResult resource. + * + * @param {string} agentValidationResultName + * A fully-qualified path representing AgentValidationResult resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAgentValidationResultName(agentValidationResultName: string) { + return this.pathTemplates.agentValidationResultPathTemplate.match(agentValidationResultName).project; + } + + /** + * Parse the location from AgentValidationResult resource. + * + * @param {string} agentValidationResultName + * A fully-qualified path representing AgentValidationResult resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAgentValidationResultName(agentValidationResultName: string) { + return this.pathTemplates.agentValidationResultPathTemplate.match(agentValidationResultName).location; + } + + /** + * Parse the agent from AgentValidationResult resource. + * + * @param {string} agentValidationResultName + * A fully-qualified path representing AgentValidationResult resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromAgentValidationResultName(agentValidationResultName: string) { + return this.pathTemplates.agentValidationResultPathTemplate.match(agentValidationResultName).agent; + } + + /** + * Return a fully-qualified changelog resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} changelog + * @returns {string} Resource name string. + */ + changelogPath(project:string,location:string,agent:string,changelog:string) { + return this.pathTemplates.changelogPathTemplate.render({ + project: project, + location: location, + agent: agent, + changelog: changelog, + }); + } + + /** + * Parse the project from Changelog resource. + * + * @param {string} changelogName + * A fully-qualified path representing Changelog resource. + * @returns {string} A string representing the project. + */ + matchProjectFromChangelogName(changelogName: string) { + return this.pathTemplates.changelogPathTemplate.match(changelogName).project; + } + + /** + * Parse the location from Changelog resource. + * + * @param {string} changelogName + * A fully-qualified path representing Changelog resource. + * @returns {string} A string representing the location. + */ + matchLocationFromChangelogName(changelogName: string) { + return this.pathTemplates.changelogPathTemplate.match(changelogName).location; + } + + /** + * Parse the agent from Changelog resource. + * + * @param {string} changelogName + * A fully-qualified path representing Changelog resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromChangelogName(changelogName: string) { + return this.pathTemplates.changelogPathTemplate.match(changelogName).agent; + } + + /** + * Parse the changelog from Changelog resource. + * + * @param {string} changelogName + * A fully-qualified path representing Changelog resource. + * @returns {string} A string representing the changelog. + */ + matchChangelogFromChangelogName(changelogName: string) { + return this.pathTemplates.changelogPathTemplate.match(changelogName).changelog; + } + + /** + * Return a fully-qualified continuousTestResult resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} environment + * @param {string} continuous_test_result + * @returns {string} Resource name string. + */ + continuousTestResultPath(project:string,location:string,agent:string,environment:string,continuousTestResult:string) { + return this.pathTemplates.continuousTestResultPathTemplate.render({ + project: project, + location: location, + agent: agent, + environment: environment, + continuous_test_result: continuousTestResult, + }); + } + + /** + * Parse the project from ContinuousTestResult resource. + * + * @param {string} continuousTestResultName + * A fully-qualified path representing ContinuousTestResult resource. + * @returns {string} A string representing the project. + */ + matchProjectFromContinuousTestResultName(continuousTestResultName: string) { + return this.pathTemplates.continuousTestResultPathTemplate.match(continuousTestResultName).project; + } + + /** + * Parse the location from ContinuousTestResult resource. + * + * @param {string} continuousTestResultName + * A fully-qualified path representing ContinuousTestResult resource. + * @returns {string} A string representing the location. + */ + matchLocationFromContinuousTestResultName(continuousTestResultName: string) { + return this.pathTemplates.continuousTestResultPathTemplate.match(continuousTestResultName).location; + } + + /** + * Parse the agent from ContinuousTestResult resource. + * + * @param {string} continuousTestResultName + * A fully-qualified path representing ContinuousTestResult resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromContinuousTestResultName(continuousTestResultName: string) { + return this.pathTemplates.continuousTestResultPathTemplate.match(continuousTestResultName).agent; + } + + /** + * Parse the environment from ContinuousTestResult resource. + * + * @param {string} continuousTestResultName + * A fully-qualified path representing ContinuousTestResult resource. + * @returns {string} A string representing the environment. + */ + matchEnvironmentFromContinuousTestResultName(continuousTestResultName: string) { + return this.pathTemplates.continuousTestResultPathTemplate.match(continuousTestResultName).environment; + } + + /** + * Parse the continuous_test_result from ContinuousTestResult resource. + * + * @param {string} continuousTestResultName + * A fully-qualified path representing ContinuousTestResult resource. + * @returns {string} A string representing the continuous_test_result. + */ + matchContinuousTestResultFromContinuousTestResultName(continuousTestResultName: string) { + return this.pathTemplates.continuousTestResultPathTemplate.match(continuousTestResultName).continuous_test_result; + } + + /** + * Return a fully-qualified deployment resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} environment + * @param {string} deployment + * @returns {string} Resource name string. + */ + deploymentPath(project:string,location:string,agent:string,environment:string,deployment:string) { + return this.pathTemplates.deploymentPathTemplate.render({ + project: project, + location: location, + agent: agent, + environment: environment, + deployment: deployment, + }); + } + + /** + * Parse the project from Deployment resource. + * + * @param {string} deploymentName + * A fully-qualified path representing Deployment resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDeploymentName(deploymentName: string) { + return this.pathTemplates.deploymentPathTemplate.match(deploymentName).project; + } + + /** + * Parse the location from Deployment resource. + * + * @param {string} deploymentName + * A fully-qualified path representing Deployment resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDeploymentName(deploymentName: string) { + return this.pathTemplates.deploymentPathTemplate.match(deploymentName).location; + } + + /** + * Parse the agent from Deployment resource. + * + * @param {string} deploymentName + * A fully-qualified path representing Deployment resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromDeploymentName(deploymentName: string) { + return this.pathTemplates.deploymentPathTemplate.match(deploymentName).agent; + } + + /** + * Parse the environment from Deployment resource. + * + * @param {string} deploymentName + * A fully-qualified path representing Deployment resource. + * @returns {string} A string representing the environment. + */ + matchEnvironmentFromDeploymentName(deploymentName: string) { + return this.pathTemplates.deploymentPathTemplate.match(deploymentName).environment; + } + + /** + * Parse the deployment from Deployment resource. + * + * @param {string} deploymentName + * A fully-qualified path representing Deployment resource. + * @returns {string} A string representing the deployment. + */ + matchDeploymentFromDeploymentName(deploymentName: string) { + return this.pathTemplates.deploymentPathTemplate.match(deploymentName).deployment; + } + + /** + * Return a fully-qualified entityType resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} entity_type + * @returns {string} Resource name string. + */ + entityTypePath(project:string,location:string,agent:string,entityType:string) { + return this.pathTemplates.entityTypePathTemplate.render({ + project: project, + location: location, + agent: agent, + entity_type: entityType, + }); + } + + /** + * Parse the project from EntityType resource. + * + * @param {string} entityTypeName + * A fully-qualified path representing EntityType resource. + * @returns {string} A string representing the project. + */ + matchProjectFromEntityTypeName(entityTypeName: string) { + return this.pathTemplates.entityTypePathTemplate.match(entityTypeName).project; + } + + /** + * Parse the location from EntityType resource. + * + * @param {string} entityTypeName + * A fully-qualified path representing EntityType resource. + * @returns {string} A string representing the location. + */ + matchLocationFromEntityTypeName(entityTypeName: string) { + return this.pathTemplates.entityTypePathTemplate.match(entityTypeName).location; + } + + /** + * Parse the agent from EntityType resource. + * + * @param {string} entityTypeName + * A fully-qualified path representing EntityType resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromEntityTypeName(entityTypeName: string) { + return this.pathTemplates.entityTypePathTemplate.match(entityTypeName).agent; + } + + /** + * Parse the entity_type from EntityType resource. + * + * @param {string} entityTypeName + * A fully-qualified path representing EntityType resource. + * @returns {string} A string representing the entity_type. + */ + matchEntityTypeFromEntityTypeName(entityTypeName: string) { + return this.pathTemplates.entityTypePathTemplate.match(entityTypeName).entity_type; + } + + /** + * Return a fully-qualified environment resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} environment + * @returns {string} Resource name string. + */ + environmentPath(project:string,location:string,agent:string,environment:string) { + return this.pathTemplates.environmentPathTemplate.render({ + project: project, + location: location, + agent: agent, + environment: environment, + }); + } + + /** + * Parse the project from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the project. + */ + matchProjectFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName).project; + } + + /** + * Parse the location from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the location. + */ + matchLocationFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName).location; + } + + /** + * Parse the agent from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName).agent; + } + + /** + * Parse the environment from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the environment. + */ + matchEnvironmentFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName).environment; + } + + /** + * Return a fully-qualified example resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} playbook + * @param {string} example + * @returns {string} Resource name string. + */ + examplePath(project:string,location:string,agent:string,playbook:string,example:string) { + return this.pathTemplates.examplePathTemplate.render({ + project: project, + location: location, + agent: agent, + playbook: playbook, + example: example, + }); + } + + /** + * Parse the project from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the project. + */ + matchProjectFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).project; + } + + /** + * Parse the location from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the location. + */ + matchLocationFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).location; + } + + /** + * Parse the agent from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).agent; + } + + /** + * Parse the playbook from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the playbook. + */ + matchPlaybookFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).playbook; + } + + /** + * Parse the example from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the example. + */ + matchExampleFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).example; + } + + /** + * Return a fully-qualified experiment resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} environment + * @param {string} experiment + * @returns {string} Resource name string. + */ + experimentPath(project:string,location:string,agent:string,environment:string,experiment:string) { + return this.pathTemplates.experimentPathTemplate.render({ + project: project, + location: location, + agent: agent, + environment: environment, + experiment: experiment, + }); + } + + /** + * Parse the project from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the project. + */ + matchProjectFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName).project; + } + + /** + * Parse the location from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the location. + */ + matchLocationFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName).location; + } + + /** + * Parse the agent from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName).agent; + } + + /** + * Parse the environment from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the environment. + */ + matchEnvironmentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName).environment; + } + + /** + * Parse the experiment from Experiment resource. + * + * @param {string} experimentName + * A fully-qualified path representing Experiment resource. + * @returns {string} A string representing the experiment. + */ + matchExperimentFromExperimentName(experimentName: string) { + return this.pathTemplates.experimentPathTemplate.match(experimentName).experiment; + } + + /** + * Return a fully-qualified flow resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} flow + * @returns {string} Resource name string. + */ + flowPath(project:string,location:string,agent:string,flow:string) { + return this.pathTemplates.flowPathTemplate.render({ + project: project, + location: location, + agent: agent, + flow: flow, + }); + } + + /** + * Parse the project from Flow resource. + * + * @param {string} flowName + * A fully-qualified path representing Flow resource. + * @returns {string} A string representing the project. + */ + matchProjectFromFlowName(flowName: string) { + return this.pathTemplates.flowPathTemplate.match(flowName).project; + } + + /** + * Parse the location from Flow resource. + * + * @param {string} flowName + * A fully-qualified path representing Flow resource. + * @returns {string} A string representing the location. + */ + matchLocationFromFlowName(flowName: string) { + return this.pathTemplates.flowPathTemplate.match(flowName).location; + } + + /** + * Parse the agent from Flow resource. + * + * @param {string} flowName + * A fully-qualified path representing Flow resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromFlowName(flowName: string) { + return this.pathTemplates.flowPathTemplate.match(flowName).agent; + } + + /** + * Parse the flow from Flow resource. + * + * @param {string} flowName + * A fully-qualified path representing Flow resource. + * @returns {string} A string representing the flow. + */ + matchFlowFromFlowName(flowName: string) { + return this.pathTemplates.flowPathTemplate.match(flowName).flow; + } + + /** + * Return a fully-qualified flowValidationResult resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} flow + * @returns {string} Resource name string. + */ + flowValidationResultPath(project:string,location:string,agent:string,flow:string) { + return this.pathTemplates.flowValidationResultPathTemplate.render({ + project: project, + location: location, + agent: agent, + flow: flow, + }); + } + + /** + * Parse the project from FlowValidationResult resource. + * + * @param {string} flowValidationResultName + * A fully-qualified path representing FlowValidationResult resource. + * @returns {string} A string representing the project. + */ + matchProjectFromFlowValidationResultName(flowValidationResultName: string) { + return this.pathTemplates.flowValidationResultPathTemplate.match(flowValidationResultName).project; + } + + /** + * Parse the location from FlowValidationResult resource. + * + * @param {string} flowValidationResultName + * A fully-qualified path representing FlowValidationResult resource. + * @returns {string} A string representing the location. + */ + matchLocationFromFlowValidationResultName(flowValidationResultName: string) { + return this.pathTemplates.flowValidationResultPathTemplate.match(flowValidationResultName).location; + } + + /** + * Parse the agent from FlowValidationResult resource. + * + * @param {string} flowValidationResultName + * A fully-qualified path representing FlowValidationResult resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromFlowValidationResultName(flowValidationResultName: string) { + return this.pathTemplates.flowValidationResultPathTemplate.match(flowValidationResultName).agent; + } + + /** + * Parse the flow from FlowValidationResult resource. + * + * @param {string} flowValidationResultName + * A fully-qualified path representing FlowValidationResult resource. + * @returns {string} A string representing the flow. + */ + matchFlowFromFlowValidationResultName(flowValidationResultName: string) { + return this.pathTemplates.flowValidationResultPathTemplate.match(flowValidationResultName).flow; + } + + /** + * Return a fully-qualified generator resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} generator + * @returns {string} Resource name string. + */ + generatorPath(project:string,location:string,agent:string,generator:string) { + return this.pathTemplates.generatorPathTemplate.render({ + project: project, + location: location, + agent: agent, + generator: generator, + }); + } + + /** + * Parse the project from Generator resource. + * + * @param {string} generatorName + * A fully-qualified path representing Generator resource. + * @returns {string} A string representing the project. + */ + matchProjectFromGeneratorName(generatorName: string) { + return this.pathTemplates.generatorPathTemplate.match(generatorName).project; + } + + /** + * Parse the location from Generator resource. + * + * @param {string} generatorName + * A fully-qualified path representing Generator resource. + * @returns {string} A string representing the location. + */ + matchLocationFromGeneratorName(generatorName: string) { + return this.pathTemplates.generatorPathTemplate.match(generatorName).location; + } + + /** + * Parse the agent from Generator resource. + * + * @param {string} generatorName + * A fully-qualified path representing Generator resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromGeneratorName(generatorName: string) { + return this.pathTemplates.generatorPathTemplate.match(generatorName).agent; + } + + /** + * Parse the generator from Generator resource. + * + * @param {string} generatorName + * A fully-qualified path representing Generator resource. + * @returns {string} A string representing the generator. + */ + matchGeneratorFromGeneratorName(generatorName: string) { + return this.pathTemplates.generatorPathTemplate.match(generatorName).generator; + } + + /** + * Return a fully-qualified intent resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} intent + * @returns {string} Resource name string. + */ + intentPath(project:string,location:string,agent:string,intent:string) { + return this.pathTemplates.intentPathTemplate.render({ + project: project, + location: location, + agent: agent, + intent: intent, + }); + } + + /** + * Parse the project from Intent resource. + * + * @param {string} intentName + * A fully-qualified path representing Intent resource. + * @returns {string} A string representing the project. + */ + matchProjectFromIntentName(intentName: string) { + return this.pathTemplates.intentPathTemplate.match(intentName).project; + } + + /** + * Parse the location from Intent resource. + * + * @param {string} intentName + * A fully-qualified path representing Intent resource. + * @returns {string} A string representing the location. + */ + matchLocationFromIntentName(intentName: string) { + return this.pathTemplates.intentPathTemplate.match(intentName).location; + } + + /** + * Parse the agent from Intent resource. + * + * @param {string} intentName + * A fully-qualified path representing Intent resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromIntentName(intentName: string) { + return this.pathTemplates.intentPathTemplate.match(intentName).agent; + } + + /** + * Parse the intent from Intent resource. + * + * @param {string} intentName + * A fully-qualified path representing Intent resource. + * @returns {string} A string representing the intent. + */ + matchIntentFromIntentName(intentName: string) { + return this.pathTemplates.intentPathTemplate.match(intentName).intent; + } + + /** + * Return a fully-qualified location resource name string. + * + * @param {string} project + * @param {string} location + * @returns {string} Resource name string. + */ + locationPath(project:string,location:string) { + return this.pathTemplates.locationPathTemplate.render({ + project: project, + location: location, + }); + } + + /** + * Parse the project from Location resource. + * + * @param {string} locationName + * A fully-qualified path representing Location resource. + * @returns {string} A string representing the project. + */ + matchProjectFromLocationName(locationName: string) { + return this.pathTemplates.locationPathTemplate.match(locationName).project; + } + + /** + * Parse the location from Location resource. + * + * @param {string} locationName + * A fully-qualified path representing Location resource. + * @returns {string} A string representing the location. + */ + matchLocationFromLocationName(locationName: string) { + return this.pathTemplates.locationPathTemplate.match(locationName).location; + } + + /** + * Return a fully-qualified page resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} flow + * @param {string} page + * @returns {string} Resource name string. + */ + pagePath(project:string,location:string,agent:string,flow:string,page:string) { + return this.pathTemplates.pagePathTemplate.render({ + project: project, + location: location, + agent: agent, + flow: flow, + page: page, + }); + } + + /** + * Parse the project from Page resource. + * + * @param {string} pageName + * A fully-qualified path representing Page resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPageName(pageName: string) { + return this.pathTemplates.pagePathTemplate.match(pageName).project; + } + + /** + * Parse the location from Page resource. + * + * @param {string} pageName + * A fully-qualified path representing Page resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPageName(pageName: string) { + return this.pathTemplates.pagePathTemplate.match(pageName).location; + } + + /** + * Parse the agent from Page resource. + * + * @param {string} pageName + * A fully-qualified path representing Page resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromPageName(pageName: string) { + return this.pathTemplates.pagePathTemplate.match(pageName).agent; + } + + /** + * Parse the flow from Page resource. + * + * @param {string} pageName + * A fully-qualified path representing Page resource. + * @returns {string} A string representing the flow. + */ + matchFlowFromPageName(pageName: string) { + return this.pathTemplates.pagePathTemplate.match(pageName).flow; + } + + /** + * Parse the page from Page resource. + * + * @param {string} pageName + * A fully-qualified path representing Page resource. + * @returns {string} A string representing the page. + */ + matchPageFromPageName(pageName: string) { + return this.pathTemplates.pagePathTemplate.match(pageName).page; + } + + /** + * Return a fully-qualified playbook resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} playbook + * @returns {string} Resource name string. + */ + playbookPath(project:string,location:string,agent:string,playbook:string) { + return this.pathTemplates.playbookPathTemplate.render({ + project: project, + location: location, + agent: agent, + playbook: playbook, + }); + } + + /** + * Parse the project from Playbook resource. + * + * @param {string} playbookName + * A fully-qualified path representing Playbook resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPlaybookName(playbookName: string) { + return this.pathTemplates.playbookPathTemplate.match(playbookName).project; + } + + /** + * Parse the location from Playbook resource. + * + * @param {string} playbookName + * A fully-qualified path representing Playbook resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPlaybookName(playbookName: string) { + return this.pathTemplates.playbookPathTemplate.match(playbookName).location; + } + + /** + * Parse the agent from Playbook resource. + * + * @param {string} playbookName + * A fully-qualified path representing Playbook resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromPlaybookName(playbookName: string) { + return this.pathTemplates.playbookPathTemplate.match(playbookName).agent; + } + + /** + * Parse the playbook from Playbook resource. + * + * @param {string} playbookName + * A fully-qualified path representing Playbook resource. + * @returns {string} A string representing the playbook. + */ + matchPlaybookFromPlaybookName(playbookName: string) { + return this.pathTemplates.playbookPathTemplate.match(playbookName).playbook; + } + + /** + * Return a fully-qualified playbookVersion resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} playbook + * @param {string} version + * @returns {string} Resource name string. + */ + playbookVersionPath(project:string,location:string,agent:string,playbook:string,version:string) { + return this.pathTemplates.playbookVersionPathTemplate.render({ + project: project, + location: location, + agent: agent, + playbook: playbook, + version: version, + }); + } + + /** + * Parse the project from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).project; + } + + /** + * Parse the location from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).location; + } + + /** + * Parse the agent from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).agent; + } + + /** + * Parse the playbook from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the playbook. + */ + matchPlaybookFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).playbook; + } + + /** + * Parse the version from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the version. + */ + matchVersionFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).version; + } + + /** + * Return a fully-qualified project resource name string. + * + * @param {string} project + * @returns {string} Resource name string. + */ + projectPath(project:string) { + return this.pathTemplates.projectPathTemplate.render({ + project: project, + }); + } + + /** + * Parse the project from Project resource. + * + * @param {string} projectName + * A fully-qualified path representing Project resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectName(projectName: string) { + return this.pathTemplates.projectPathTemplate.match(projectName).project; + } + + /** + * Return a fully-qualified projectLocationAgentEnvironmentSessionEntityType resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} environment + * @param {string} session + * @param {string} entity_type + * @returns {string} Resource name string. + */ + projectLocationAgentEnvironmentSessionEntityTypePath(project:string,location:string,agent:string,environment:string,session:string,entityType:string) { + return this.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.render({ + project: project, + location: location, + agent: agent, + environment: environment, + session: session, + entity_type: entityType, + }); + } + + /** + * Parse the project from ProjectLocationAgentEnvironmentSessionEntityType resource. + * + * @param {string} projectLocationAgentEnvironmentSessionEntityTypeName + * A fully-qualified path representing project_location_agent_environment_session_entity_type resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationAgentEnvironmentSessionEntityTypeName(projectLocationAgentEnvironmentSessionEntityTypeName: string) { + return this.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match(projectLocationAgentEnvironmentSessionEntityTypeName).project; + } + + /** + * Parse the location from ProjectLocationAgentEnvironmentSessionEntityType resource. + * + * @param {string} projectLocationAgentEnvironmentSessionEntityTypeName + * A fully-qualified path representing project_location_agent_environment_session_entity_type resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationAgentEnvironmentSessionEntityTypeName(projectLocationAgentEnvironmentSessionEntityTypeName: string) { + return this.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match(projectLocationAgentEnvironmentSessionEntityTypeName).location; + } + + /** + * Parse the agent from ProjectLocationAgentEnvironmentSessionEntityType resource. + * + * @param {string} projectLocationAgentEnvironmentSessionEntityTypeName + * A fully-qualified path representing project_location_agent_environment_session_entity_type resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromProjectLocationAgentEnvironmentSessionEntityTypeName(projectLocationAgentEnvironmentSessionEntityTypeName: string) { + return this.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match(projectLocationAgentEnvironmentSessionEntityTypeName).agent; + } + + /** + * Parse the environment from ProjectLocationAgentEnvironmentSessionEntityType resource. + * + * @param {string} projectLocationAgentEnvironmentSessionEntityTypeName + * A fully-qualified path representing project_location_agent_environment_session_entity_type resource. + * @returns {string} A string representing the environment. + */ + matchEnvironmentFromProjectLocationAgentEnvironmentSessionEntityTypeName(projectLocationAgentEnvironmentSessionEntityTypeName: string) { + return this.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match(projectLocationAgentEnvironmentSessionEntityTypeName).environment; + } + + /** + * Parse the session from ProjectLocationAgentEnvironmentSessionEntityType resource. + * + * @param {string} projectLocationAgentEnvironmentSessionEntityTypeName + * A fully-qualified path representing project_location_agent_environment_session_entity_type resource. + * @returns {string} A string representing the session. + */ + matchSessionFromProjectLocationAgentEnvironmentSessionEntityTypeName(projectLocationAgentEnvironmentSessionEntityTypeName: string) { + return this.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match(projectLocationAgentEnvironmentSessionEntityTypeName).session; + } + + /** + * Parse the entity_type from ProjectLocationAgentEnvironmentSessionEntityType resource. + * + * @param {string} projectLocationAgentEnvironmentSessionEntityTypeName + * A fully-qualified path representing project_location_agent_environment_session_entity_type resource. + * @returns {string} A string representing the entity_type. + */ + matchEntityTypeFromProjectLocationAgentEnvironmentSessionEntityTypeName(projectLocationAgentEnvironmentSessionEntityTypeName: string) { + return this.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match(projectLocationAgentEnvironmentSessionEntityTypeName).entity_type; + } + + /** + * Return a fully-qualified projectLocationAgentFlowTransitionRouteGroups resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} flow + * @param {string} transition_route_group + * @returns {string} Resource name string. + */ + projectLocationAgentFlowTransitionRouteGroupsPath(project:string,location:string,agent:string,flow:string,transitionRouteGroup:string) { + return this.pathTemplates.projectLocationAgentFlowTransitionRouteGroupsPathTemplate.render({ + project: project, + location: location, + agent: agent, + flow: flow, + transition_route_group: transitionRouteGroup, + }); + } + + /** + * Parse the project from ProjectLocationAgentFlowTransitionRouteGroups resource. + * + * @param {string} projectLocationAgentFlowTransitionRouteGroupsName + * A fully-qualified path representing project_location_agent_flow_transitionRouteGroups resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationAgentFlowTransitionRouteGroupsName(projectLocationAgentFlowTransitionRouteGroupsName: string) { + return this.pathTemplates.projectLocationAgentFlowTransitionRouteGroupsPathTemplate.match(projectLocationAgentFlowTransitionRouteGroupsName).project; + } + + /** + * Parse the location from ProjectLocationAgentFlowTransitionRouteGroups resource. + * + * @param {string} projectLocationAgentFlowTransitionRouteGroupsName + * A fully-qualified path representing project_location_agent_flow_transitionRouteGroups resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationAgentFlowTransitionRouteGroupsName(projectLocationAgentFlowTransitionRouteGroupsName: string) { + return this.pathTemplates.projectLocationAgentFlowTransitionRouteGroupsPathTemplate.match(projectLocationAgentFlowTransitionRouteGroupsName).location; + } + + /** + * Parse the agent from ProjectLocationAgentFlowTransitionRouteGroups resource. + * + * @param {string} projectLocationAgentFlowTransitionRouteGroupsName + * A fully-qualified path representing project_location_agent_flow_transitionRouteGroups resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromProjectLocationAgentFlowTransitionRouteGroupsName(projectLocationAgentFlowTransitionRouteGroupsName: string) { + return this.pathTemplates.projectLocationAgentFlowTransitionRouteGroupsPathTemplate.match(projectLocationAgentFlowTransitionRouteGroupsName).agent; + } + + /** + * Parse the flow from ProjectLocationAgentFlowTransitionRouteGroups resource. + * + * @param {string} projectLocationAgentFlowTransitionRouteGroupsName + * A fully-qualified path representing project_location_agent_flow_transitionRouteGroups resource. + * @returns {string} A string representing the flow. + */ + matchFlowFromProjectLocationAgentFlowTransitionRouteGroupsName(projectLocationAgentFlowTransitionRouteGroupsName: string) { + return this.pathTemplates.projectLocationAgentFlowTransitionRouteGroupsPathTemplate.match(projectLocationAgentFlowTransitionRouteGroupsName).flow; + } + + /** + * Parse the transition_route_group from ProjectLocationAgentFlowTransitionRouteGroups resource. + * + * @param {string} projectLocationAgentFlowTransitionRouteGroupsName + * A fully-qualified path representing project_location_agent_flow_transitionRouteGroups resource. + * @returns {string} A string representing the transition_route_group. + */ + matchTransitionRouteGroupFromProjectLocationAgentFlowTransitionRouteGroupsName(projectLocationAgentFlowTransitionRouteGroupsName: string) { + return this.pathTemplates.projectLocationAgentFlowTransitionRouteGroupsPathTemplate.match(projectLocationAgentFlowTransitionRouteGroupsName).transition_route_group; + } + + /** + * Return a fully-qualified projectLocationAgentSessionEntityType resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} session + * @param {string} entity_type + * @returns {string} Resource name string. + */ + projectLocationAgentSessionEntityTypePath(project:string,location:string,agent:string,session:string,entityType:string) { + return this.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render({ + project: project, + location: location, + agent: agent, + session: session, + entity_type: entityType, + }); + } + + /** + * Parse the project from ProjectLocationAgentSessionEntityType resource. + * + * @param {string} projectLocationAgentSessionEntityTypeName + * A fully-qualified path representing project_location_agent_session_entity_type resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationAgentSessionEntityTypeName(projectLocationAgentSessionEntityTypeName: string) { + return this.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match(projectLocationAgentSessionEntityTypeName).project; + } + + /** + * Parse the location from ProjectLocationAgentSessionEntityType resource. + * + * @param {string} projectLocationAgentSessionEntityTypeName + * A fully-qualified path representing project_location_agent_session_entity_type resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationAgentSessionEntityTypeName(projectLocationAgentSessionEntityTypeName: string) { + return this.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match(projectLocationAgentSessionEntityTypeName).location; + } + + /** + * Parse the agent from ProjectLocationAgentSessionEntityType resource. + * + * @param {string} projectLocationAgentSessionEntityTypeName + * A fully-qualified path representing project_location_agent_session_entity_type resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromProjectLocationAgentSessionEntityTypeName(projectLocationAgentSessionEntityTypeName: string) { + return this.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match(projectLocationAgentSessionEntityTypeName).agent; + } + + /** + * Parse the session from ProjectLocationAgentSessionEntityType resource. + * + * @param {string} projectLocationAgentSessionEntityTypeName + * A fully-qualified path representing project_location_agent_session_entity_type resource. + * @returns {string} A string representing the session. + */ + matchSessionFromProjectLocationAgentSessionEntityTypeName(projectLocationAgentSessionEntityTypeName: string) { + return this.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match(projectLocationAgentSessionEntityTypeName).session; + } + + /** + * Parse the entity_type from ProjectLocationAgentSessionEntityType resource. + * + * @param {string} projectLocationAgentSessionEntityTypeName + * A fully-qualified path representing project_location_agent_session_entity_type resource. + * @returns {string} A string representing the entity_type. + */ + matchEntityTypeFromProjectLocationAgentSessionEntityTypeName(projectLocationAgentSessionEntityTypeName: string) { + return this.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match(projectLocationAgentSessionEntityTypeName).entity_type; + } + + /** + * Return a fully-qualified projectLocationAgentTransitionRouteGroups resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} transition_route_group + * @returns {string} Resource name string. + */ + projectLocationAgentTransitionRouteGroupsPath(project:string,location:string,agent:string,transitionRouteGroup:string) { + return this.pathTemplates.projectLocationAgentTransitionRouteGroupsPathTemplate.render({ + project: project, + location: location, + agent: agent, + transition_route_group: transitionRouteGroup, + }); + } + + /** + * Parse the project from ProjectLocationAgentTransitionRouteGroups resource. + * + * @param {string} projectLocationAgentTransitionRouteGroupsName + * A fully-qualified path representing project_location_agent_transitionRouteGroups resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationAgentTransitionRouteGroupsName(projectLocationAgentTransitionRouteGroupsName: string) { + return this.pathTemplates.projectLocationAgentTransitionRouteGroupsPathTemplate.match(projectLocationAgentTransitionRouteGroupsName).project; + } + + /** + * Parse the location from ProjectLocationAgentTransitionRouteGroups resource. + * + * @param {string} projectLocationAgentTransitionRouteGroupsName + * A fully-qualified path representing project_location_agent_transitionRouteGroups resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationAgentTransitionRouteGroupsName(projectLocationAgentTransitionRouteGroupsName: string) { + return this.pathTemplates.projectLocationAgentTransitionRouteGroupsPathTemplate.match(projectLocationAgentTransitionRouteGroupsName).location; + } + + /** + * Parse the agent from ProjectLocationAgentTransitionRouteGroups resource. + * + * @param {string} projectLocationAgentTransitionRouteGroupsName + * A fully-qualified path representing project_location_agent_transitionRouteGroups resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromProjectLocationAgentTransitionRouteGroupsName(projectLocationAgentTransitionRouteGroupsName: string) { + return this.pathTemplates.projectLocationAgentTransitionRouteGroupsPathTemplate.match(projectLocationAgentTransitionRouteGroupsName).agent; + } + + /** + * Parse the transition_route_group from ProjectLocationAgentTransitionRouteGroups resource. + * + * @param {string} projectLocationAgentTransitionRouteGroupsName + * A fully-qualified path representing project_location_agent_transitionRouteGroups resource. + * @returns {string} A string representing the transition_route_group. + */ + matchTransitionRouteGroupFromProjectLocationAgentTransitionRouteGroupsName(projectLocationAgentTransitionRouteGroupsName: string) { + return this.pathTemplates.projectLocationAgentTransitionRouteGroupsPathTemplate.match(projectLocationAgentTransitionRouteGroupsName).transition_route_group; + } + + /** + * Return a fully-qualified securitySettings resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} security_settings + * @returns {string} Resource name string. + */ + securitySettingsPath(project:string,location:string,securitySettings:string) { + return this.pathTemplates.securitySettingsPathTemplate.render({ + project: project, + location: location, + security_settings: securitySettings, + }); + } + + /** + * Parse the project from SecuritySettings resource. + * + * @param {string} securitySettingsName + * A fully-qualified path representing SecuritySettings resource. + * @returns {string} A string representing the project. + */ + matchProjectFromSecuritySettingsName(securitySettingsName: string) { + return this.pathTemplates.securitySettingsPathTemplate.match(securitySettingsName).project; + } + + /** + * Parse the location from SecuritySettings resource. + * + * @param {string} securitySettingsName + * A fully-qualified path representing SecuritySettings resource. + * @returns {string} A string representing the location. + */ + matchLocationFromSecuritySettingsName(securitySettingsName: string) { + return this.pathTemplates.securitySettingsPathTemplate.match(securitySettingsName).location; + } + + /** + * Parse the security_settings from SecuritySettings resource. + * + * @param {string} securitySettingsName + * A fully-qualified path representing SecuritySettings resource. + * @returns {string} A string representing the security_settings. + */ + matchSecuritySettingsFromSecuritySettingsName(securitySettingsName: string) { + return this.pathTemplates.securitySettingsPathTemplate.match(securitySettingsName).security_settings; + } + + /** + * Return a fully-qualified testCase resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} test_case + * @returns {string} Resource name string. + */ + testCasePath(project:string,location:string,agent:string,testCase:string) { + return this.pathTemplates.testCasePathTemplate.render({ + project: project, + location: location, + agent: agent, + test_case: testCase, + }); + } + + /** + * Parse the project from TestCase resource. + * + * @param {string} testCaseName + * A fully-qualified path representing TestCase resource. + * @returns {string} A string representing the project. + */ + matchProjectFromTestCaseName(testCaseName: string) { + return this.pathTemplates.testCasePathTemplate.match(testCaseName).project; + } + + /** + * Parse the location from TestCase resource. + * + * @param {string} testCaseName + * A fully-qualified path representing TestCase resource. + * @returns {string} A string representing the location. + */ + matchLocationFromTestCaseName(testCaseName: string) { + return this.pathTemplates.testCasePathTemplate.match(testCaseName).location; + } + + /** + * Parse the agent from TestCase resource. + * + * @param {string} testCaseName + * A fully-qualified path representing TestCase resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromTestCaseName(testCaseName: string) { + return this.pathTemplates.testCasePathTemplate.match(testCaseName).agent; + } + + /** + * Parse the test_case from TestCase resource. + * + * @param {string} testCaseName + * A fully-qualified path representing TestCase resource. + * @returns {string} A string representing the test_case. + */ + matchTestCaseFromTestCaseName(testCaseName: string) { + return this.pathTemplates.testCasePathTemplate.match(testCaseName).test_case; + } + + /** + * Return a fully-qualified testCaseResult resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} test_case + * @param {string} result + * @returns {string} Resource name string. + */ + testCaseResultPath(project:string,location:string,agent:string,testCase:string,result:string) { + return this.pathTemplates.testCaseResultPathTemplate.render({ + project: project, + location: location, + agent: agent, + test_case: testCase, + result: result, + }); + } + + /** + * Parse the project from TestCaseResult resource. + * + * @param {string} testCaseResultName + * A fully-qualified path representing TestCaseResult resource. + * @returns {string} A string representing the project. + */ + matchProjectFromTestCaseResultName(testCaseResultName: string) { + return this.pathTemplates.testCaseResultPathTemplate.match(testCaseResultName).project; + } + + /** + * Parse the location from TestCaseResult resource. + * + * @param {string} testCaseResultName + * A fully-qualified path representing TestCaseResult resource. + * @returns {string} A string representing the location. + */ + matchLocationFromTestCaseResultName(testCaseResultName: string) { + return this.pathTemplates.testCaseResultPathTemplate.match(testCaseResultName).location; + } + + /** + * Parse the agent from TestCaseResult resource. + * + * @param {string} testCaseResultName + * A fully-qualified path representing TestCaseResult resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromTestCaseResultName(testCaseResultName: string) { + return this.pathTemplates.testCaseResultPathTemplate.match(testCaseResultName).agent; + } + + /** + * Parse the test_case from TestCaseResult resource. + * + * @param {string} testCaseResultName + * A fully-qualified path representing TestCaseResult resource. + * @returns {string} A string representing the test_case. + */ + matchTestCaseFromTestCaseResultName(testCaseResultName: string) { + return this.pathTemplates.testCaseResultPathTemplate.match(testCaseResultName).test_case; + } + + /** + * Parse the result from TestCaseResult resource. + * + * @param {string} testCaseResultName + * A fully-qualified path representing TestCaseResult resource. + * @returns {string} A string representing the result. + */ + matchResultFromTestCaseResultName(testCaseResultName: string) { + return this.pathTemplates.testCaseResultPathTemplate.match(testCaseResultName).result; + } + + /** + * Return a fully-qualified tool resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} tool + * @returns {string} Resource name string. + */ + toolPath(project:string,location:string,agent:string,tool:string) { + return this.pathTemplates.toolPathTemplate.render({ + project: project, + location: location, + agent: agent, + tool: tool, + }); + } + + /** + * Parse the project from Tool resource. + * + * @param {string} toolName + * A fully-qualified path representing Tool resource. + * @returns {string} A string representing the project. + */ + matchProjectFromToolName(toolName: string) { + return this.pathTemplates.toolPathTemplate.match(toolName).project; + } + + /** + * Parse the location from Tool resource. + * + * @param {string} toolName + * A fully-qualified path representing Tool resource. + * @returns {string} A string representing the location. + */ + matchLocationFromToolName(toolName: string) { + return this.pathTemplates.toolPathTemplate.match(toolName).location; + } + + /** + * Parse the agent from Tool resource. + * + * @param {string} toolName + * A fully-qualified path representing Tool resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromToolName(toolName: string) { + return this.pathTemplates.toolPathTemplate.match(toolName).agent; + } + + /** + * Parse the tool from Tool resource. + * + * @param {string} toolName + * A fully-qualified path representing Tool resource. + * @returns {string} A string representing the tool. + */ + matchToolFromToolName(toolName: string) { + return this.pathTemplates.toolPathTemplate.match(toolName).tool; + } + + /** + * Return a fully-qualified toolVersion resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} tool + * @param {string} version + * @returns {string} Resource name string. + */ + toolVersionPath(project:string,location:string,agent:string,tool:string,version:string) { + return this.pathTemplates.toolVersionPathTemplate.render({ + project: project, + location: location, + agent: agent, + tool: tool, + version: version, + }); + } + + /** + * Parse the project from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the project. + */ + matchProjectFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).project; + } + + /** + * Parse the location from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the location. + */ + matchLocationFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).location; + } + + /** + * Parse the agent from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).agent; + } + + /** + * Parse the tool from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the tool. + */ + matchToolFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).tool; + } + + /** + * Parse the version from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the version. + */ + matchVersionFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).version; + } + + /** + * Return a fully-qualified version resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} flow + * @param {string} version + * @returns {string} Resource name string. + */ + versionPath(project:string,location:string,agent:string,flow:string,version:string) { + return this.pathTemplates.versionPathTemplate.render({ + project: project, + location: location, + agent: agent, + flow: flow, + version: version, + }); + } + + /** + * Parse the project from Version resource. + * + * @param {string} versionName + * A fully-qualified path representing Version resource. + * @returns {string} A string representing the project. + */ + matchProjectFromVersionName(versionName: string) { + return this.pathTemplates.versionPathTemplate.match(versionName).project; + } + + /** + * Parse the location from Version resource. + * + * @param {string} versionName + * A fully-qualified path representing Version resource. + * @returns {string} A string representing the location. + */ + matchLocationFromVersionName(versionName: string) { + return this.pathTemplates.versionPathTemplate.match(versionName).location; + } + + /** + * Parse the agent from Version resource. + * + * @param {string} versionName + * A fully-qualified path representing Version resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromVersionName(versionName: string) { + return this.pathTemplates.versionPathTemplate.match(versionName).agent; + } + + /** + * Parse the flow from Version resource. + * + * @param {string} versionName + * A fully-qualified path representing Version resource. + * @returns {string} A string representing the flow. + */ + matchFlowFromVersionName(versionName: string) { + return this.pathTemplates.versionPathTemplate.match(versionName).flow; + } + + /** + * Parse the version from Version resource. + * + * @param {string} versionName + * A fully-qualified path representing Version resource. + * @returns {string} A string representing the version. + */ + matchVersionFromVersionName(versionName: string) { + return this.pathTemplates.versionPathTemplate.match(versionName).version; + } + + /** + * Return a fully-qualified webhook resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} webhook + * @returns {string} Resource name string. + */ + webhookPath(project:string,location:string,agent:string,webhook:string) { + return this.pathTemplates.webhookPathTemplate.render({ + project: project, + location: location, + agent: agent, + webhook: webhook, + }); + } + + /** + * Parse the project from Webhook resource. + * + * @param {string} webhookName + * A fully-qualified path representing Webhook resource. + * @returns {string} A string representing the project. + */ + matchProjectFromWebhookName(webhookName: string) { + return this.pathTemplates.webhookPathTemplate.match(webhookName).project; + } + + /** + * Parse the location from Webhook resource. + * + * @param {string} webhookName + * A fully-qualified path representing Webhook resource. + * @returns {string} A string representing the location. + */ + matchLocationFromWebhookName(webhookName: string) { + return this.pathTemplates.webhookPathTemplate.match(webhookName).location; + } + + /** + * Parse the agent from Webhook resource. + * + * @param {string} webhookName + * A fully-qualified path representing Webhook resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromWebhookName(webhookName: string) { + return this.pathTemplates.webhookPathTemplate.match(webhookName).agent; + } + + /** + * Parse the webhook from Webhook resource. + * + * @param {string} webhookName + * A fully-qualified path representing Webhook resource. + * @returns {string} A string representing the webhook. + */ + matchWebhookFromWebhookName(webhookName: string) { + return this.pathTemplates.webhookPathTemplate.match(webhookName).webhook; + } + + /** + * Terminate the gRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + if (this.toolsStub && !this._terminated) { + return this.toolsStub.then(stub => { + this._log.info('ending gRPC channel'); + this._terminated = true; + stub.close(); + this.locationsClient.close().catch(err => {throw err}); + void this.operationsClient.close(); + }); + } + return Promise.resolve(); + } +} \ No newline at end of file diff --git a/packages/google-cloud-dialogflow-cx/src/v3/tools_client_config.json b/packages/google-cloud-dialogflow-cx/src/v3/tools_client_config.json new file mode 100644 index 00000000000..6010136c1de --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/src/v3/tools_client_config.json @@ -0,0 +1,79 @@ +{ + "interfaces": { + "google.cloud.dialogflow.cx.v3.Tools": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "unavailable": [ + "UNAVAILABLE" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "CreateTool": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "default" + }, + "ListTools": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "default" + }, + "GetTool": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "default" + }, + "UpdateTool": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "default" + }, + "DeleteTool": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "default" + }, + "ListToolVersions": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "default" + }, + "CreateToolVersion": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "default" + }, + "GetToolVersion": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "default" + }, + "DeleteToolVersion": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "default" + }, + "RestoreToolVersion": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "default" + } + } + } + } +} diff --git a/packages/google-cloud-dialogflow-cx/src/v3/tools_proto_list.json b/packages/google-cloud-dialogflow-cx/src/v3/tools_proto_list.json new file mode 100644 index 00000000000..081858680c0 --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/src/v3/tools_proto_list.json @@ -0,0 +1,37 @@ +[ + "../../protos/google/cloud/dialogflow/cx/v3/advanced_settings.proto", + "../../protos/google/cloud/dialogflow/cx/v3/agent.proto", + "../../protos/google/cloud/dialogflow/cx/v3/audio_config.proto", + "../../protos/google/cloud/dialogflow/cx/v3/changelog.proto", + "../../protos/google/cloud/dialogflow/cx/v3/code_block.proto", + "../../protos/google/cloud/dialogflow/cx/v3/data_store_connection.proto", + "../../protos/google/cloud/dialogflow/cx/v3/deployment.proto", + "../../protos/google/cloud/dialogflow/cx/v3/entity_type.proto", + "../../protos/google/cloud/dialogflow/cx/v3/environment.proto", + "../../protos/google/cloud/dialogflow/cx/v3/example.proto", + "../../protos/google/cloud/dialogflow/cx/v3/experiment.proto", + "../../protos/google/cloud/dialogflow/cx/v3/flow.proto", + "../../protos/google/cloud/dialogflow/cx/v3/fulfillment.proto", + "../../protos/google/cloud/dialogflow/cx/v3/gcs.proto", + "../../protos/google/cloud/dialogflow/cx/v3/generative_settings.proto", + "../../protos/google/cloud/dialogflow/cx/v3/generator.proto", + "../../protos/google/cloud/dialogflow/cx/v3/import_strategy.proto", + "../../protos/google/cloud/dialogflow/cx/v3/inline.proto", + "../../protos/google/cloud/dialogflow/cx/v3/intent.proto", + "../../protos/google/cloud/dialogflow/cx/v3/page.proto", + "../../protos/google/cloud/dialogflow/cx/v3/parameter_definition.proto", + "../../protos/google/cloud/dialogflow/cx/v3/playbook.proto", + "../../protos/google/cloud/dialogflow/cx/v3/response_message.proto", + "../../protos/google/cloud/dialogflow/cx/v3/safety_settings.proto", + "../../protos/google/cloud/dialogflow/cx/v3/security_settings.proto", + "../../protos/google/cloud/dialogflow/cx/v3/session.proto", + "../../protos/google/cloud/dialogflow/cx/v3/session_entity_type.proto", + "../../protos/google/cloud/dialogflow/cx/v3/test_case.proto", + "../../protos/google/cloud/dialogflow/cx/v3/tool.proto", + "../../protos/google/cloud/dialogflow/cx/v3/tool_call.proto", + "../../protos/google/cloud/dialogflow/cx/v3/trace.proto", + "../../protos/google/cloud/dialogflow/cx/v3/transition_route_group.proto", + "../../protos/google/cloud/dialogflow/cx/v3/validation_message.proto", + "../../protos/google/cloud/dialogflow/cx/v3/version.proto", + "../../protos/google/cloud/dialogflow/cx/v3/webhook.proto" +] 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 d0c5cb1bff7..5891e81acfe 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 @@ -209,6 +209,9 @@ export class TransitionRouteGroupsClient { environmentPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}' ), + examplePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}/examples/{example}' + ), experimentPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/experiments/{experiment}' ), @@ -230,6 +233,12 @@ export class TransitionRouteGroupsClient { pagePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/pages/{page}' ), + playbookPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}' + ), + playbookVersionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}/versions/{version}' + ), projectPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}' ), @@ -254,6 +263,12 @@ export class TransitionRouteGroupsClient { testCaseResultPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/testCases/{test_case}/results/{result}' ), + toolPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/tools/{tool}' + ), + toolVersionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/tools/{tool}/versions/{version}' + ), versionPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/versions/{version}' ), @@ -1926,6 +1941,81 @@ export class TransitionRouteGroupsClient { return this.pathTemplates.environmentPathTemplate.match(environmentName).environment; } + /** + * Return a fully-qualified example resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} playbook + * @param {string} example + * @returns {string} Resource name string. + */ + examplePath(project:string,location:string,agent:string,playbook:string,example:string) { + return this.pathTemplates.examplePathTemplate.render({ + project: project, + location: location, + agent: agent, + playbook: playbook, + example: example, + }); + } + + /** + * Parse the project from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the project. + */ + matchProjectFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).project; + } + + /** + * Parse the location from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the location. + */ + matchLocationFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).location; + } + + /** + * Parse the agent from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).agent; + } + + /** + * Parse the playbook from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the playbook. + */ + matchPlaybookFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).playbook; + } + + /** + * Parse the example from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the example. + */ + matchExampleFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).example; + } + /** * Return a fully-qualified experiment resource name string. * @@ -2360,6 +2450,143 @@ export class TransitionRouteGroupsClient { return this.pathTemplates.pagePathTemplate.match(pageName).page; } + /** + * Return a fully-qualified playbook resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} playbook + * @returns {string} Resource name string. + */ + playbookPath(project:string,location:string,agent:string,playbook:string) { + return this.pathTemplates.playbookPathTemplate.render({ + project: project, + location: location, + agent: agent, + playbook: playbook, + }); + } + + /** + * Parse the project from Playbook resource. + * + * @param {string} playbookName + * A fully-qualified path representing Playbook resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPlaybookName(playbookName: string) { + return this.pathTemplates.playbookPathTemplate.match(playbookName).project; + } + + /** + * Parse the location from Playbook resource. + * + * @param {string} playbookName + * A fully-qualified path representing Playbook resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPlaybookName(playbookName: string) { + return this.pathTemplates.playbookPathTemplate.match(playbookName).location; + } + + /** + * Parse the agent from Playbook resource. + * + * @param {string} playbookName + * A fully-qualified path representing Playbook resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromPlaybookName(playbookName: string) { + return this.pathTemplates.playbookPathTemplate.match(playbookName).agent; + } + + /** + * Parse the playbook from Playbook resource. + * + * @param {string} playbookName + * A fully-qualified path representing Playbook resource. + * @returns {string} A string representing the playbook. + */ + matchPlaybookFromPlaybookName(playbookName: string) { + return this.pathTemplates.playbookPathTemplate.match(playbookName).playbook; + } + + /** + * Return a fully-qualified playbookVersion resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} playbook + * @param {string} version + * @returns {string} Resource name string. + */ + playbookVersionPath(project:string,location:string,agent:string,playbook:string,version:string) { + return this.pathTemplates.playbookVersionPathTemplate.render({ + project: project, + location: location, + agent: agent, + playbook: playbook, + version: version, + }); + } + + /** + * Parse the project from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).project; + } + + /** + * Parse the location from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).location; + } + + /** + * Parse the agent from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).agent; + } + + /** + * Parse the playbook from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the playbook. + */ + matchPlaybookFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).playbook; + } + + /** + * Parse the version from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the version. + */ + matchVersionFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).version; + } + /** * Return a fully-qualified project resource name string. * @@ -2869,6 +3096,143 @@ export class TransitionRouteGroupsClient { return this.pathTemplates.testCaseResultPathTemplate.match(testCaseResultName).result; } + /** + * Return a fully-qualified tool resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} tool + * @returns {string} Resource name string. + */ + toolPath(project:string,location:string,agent:string,tool:string) { + return this.pathTemplates.toolPathTemplate.render({ + project: project, + location: location, + agent: agent, + tool: tool, + }); + } + + /** + * Parse the project from Tool resource. + * + * @param {string} toolName + * A fully-qualified path representing Tool resource. + * @returns {string} A string representing the project. + */ + matchProjectFromToolName(toolName: string) { + return this.pathTemplates.toolPathTemplate.match(toolName).project; + } + + /** + * Parse the location from Tool resource. + * + * @param {string} toolName + * A fully-qualified path representing Tool resource. + * @returns {string} A string representing the location. + */ + matchLocationFromToolName(toolName: string) { + return this.pathTemplates.toolPathTemplate.match(toolName).location; + } + + /** + * Parse the agent from Tool resource. + * + * @param {string} toolName + * A fully-qualified path representing Tool resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromToolName(toolName: string) { + return this.pathTemplates.toolPathTemplate.match(toolName).agent; + } + + /** + * Parse the tool from Tool resource. + * + * @param {string} toolName + * A fully-qualified path representing Tool resource. + * @returns {string} A string representing the tool. + */ + matchToolFromToolName(toolName: string) { + return this.pathTemplates.toolPathTemplate.match(toolName).tool; + } + + /** + * Return a fully-qualified toolVersion resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} tool + * @param {string} version + * @returns {string} Resource name string. + */ + toolVersionPath(project:string,location:string,agent:string,tool:string,version:string) { + return this.pathTemplates.toolVersionPathTemplate.render({ + project: project, + location: location, + agent: agent, + tool: tool, + version: version, + }); + } + + /** + * Parse the project from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the project. + */ + matchProjectFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).project; + } + + /** + * Parse the location from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the location. + */ + matchLocationFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).location; + } + + /** + * Parse the agent from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).agent; + } + + /** + * Parse the tool from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the tool. + */ + matchToolFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).tool; + } + + /** + * Parse the version from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the version. + */ + matchVersionFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).version; + } + /** * Return a fully-qualified version resource name string. * diff --git a/packages/google-cloud-dialogflow-cx/src/v3/transition_route_groups_proto_list.json b/packages/google-cloud-dialogflow-cx/src/v3/transition_route_groups_proto_list.json index 81549ae03b3..081858680c0 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/transition_route_groups_proto_list.json +++ b/packages/google-cloud-dialogflow-cx/src/v3/transition_route_groups_proto_list.json @@ -3,10 +3,12 @@ "../../protos/google/cloud/dialogflow/cx/v3/agent.proto", "../../protos/google/cloud/dialogflow/cx/v3/audio_config.proto", "../../protos/google/cloud/dialogflow/cx/v3/changelog.proto", + "../../protos/google/cloud/dialogflow/cx/v3/code_block.proto", "../../protos/google/cloud/dialogflow/cx/v3/data_store_connection.proto", "../../protos/google/cloud/dialogflow/cx/v3/deployment.proto", "../../protos/google/cloud/dialogflow/cx/v3/entity_type.proto", "../../protos/google/cloud/dialogflow/cx/v3/environment.proto", + "../../protos/google/cloud/dialogflow/cx/v3/example.proto", "../../protos/google/cloud/dialogflow/cx/v3/experiment.proto", "../../protos/google/cloud/dialogflow/cx/v3/flow.proto", "../../protos/google/cloud/dialogflow/cx/v3/fulfillment.proto", @@ -17,12 +19,17 @@ "../../protos/google/cloud/dialogflow/cx/v3/inline.proto", "../../protos/google/cloud/dialogflow/cx/v3/intent.proto", "../../protos/google/cloud/dialogflow/cx/v3/page.proto", + "../../protos/google/cloud/dialogflow/cx/v3/parameter_definition.proto", + "../../protos/google/cloud/dialogflow/cx/v3/playbook.proto", "../../protos/google/cloud/dialogflow/cx/v3/response_message.proto", "../../protos/google/cloud/dialogflow/cx/v3/safety_settings.proto", "../../protos/google/cloud/dialogflow/cx/v3/security_settings.proto", "../../protos/google/cloud/dialogflow/cx/v3/session.proto", "../../protos/google/cloud/dialogflow/cx/v3/session_entity_type.proto", "../../protos/google/cloud/dialogflow/cx/v3/test_case.proto", + "../../protos/google/cloud/dialogflow/cx/v3/tool.proto", + "../../protos/google/cloud/dialogflow/cx/v3/tool_call.proto", + "../../protos/google/cloud/dialogflow/cx/v3/trace.proto", "../../protos/google/cloud/dialogflow/cx/v3/transition_route_group.proto", "../../protos/google/cloud/dialogflow/cx/v3/validation_message.proto", "../../protos/google/cloud/dialogflow/cx/v3/version.proto", diff --git a/packages/google-cloud-dialogflow-cx/src/v3/versions_client.ts b/packages/google-cloud-dialogflow-cx/src/v3/versions_client.ts index ea5ea64a7ca..bf6f7d175f7 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/versions_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3/versions_client.ts @@ -208,6 +208,9 @@ export class VersionsClient { environmentPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}' ), + examplePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}/examples/{example}' + ), experimentPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/experiments/{experiment}' ), @@ -229,6 +232,12 @@ export class VersionsClient { pagePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/pages/{page}' ), + playbookPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}' + ), + playbookVersionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}/versions/{version}' + ), projectPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}' ), @@ -253,6 +262,12 @@ export class VersionsClient { testCaseResultPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/testCases/{test_case}/results/{result}' ), + toolPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/tools/{tool}' + ), + toolVersionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/tools/{tool}/versions/{version}' + ), versionPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/versions/{version}' ), @@ -2087,6 +2102,81 @@ export class VersionsClient { return this.pathTemplates.environmentPathTemplate.match(environmentName).environment; } + /** + * Return a fully-qualified example resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} playbook + * @param {string} example + * @returns {string} Resource name string. + */ + examplePath(project:string,location:string,agent:string,playbook:string,example:string) { + return this.pathTemplates.examplePathTemplate.render({ + project: project, + location: location, + agent: agent, + playbook: playbook, + example: example, + }); + } + + /** + * Parse the project from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the project. + */ + matchProjectFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).project; + } + + /** + * Parse the location from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the location. + */ + matchLocationFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).location; + } + + /** + * Parse the agent from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).agent; + } + + /** + * Parse the playbook from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the playbook. + */ + matchPlaybookFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).playbook; + } + + /** + * Parse the example from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the example. + */ + matchExampleFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).example; + } + /** * Return a fully-qualified experiment resource name string. * @@ -2521,6 +2611,143 @@ export class VersionsClient { return this.pathTemplates.pagePathTemplate.match(pageName).page; } + /** + * Return a fully-qualified playbook resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} playbook + * @returns {string} Resource name string. + */ + playbookPath(project:string,location:string,agent:string,playbook:string) { + return this.pathTemplates.playbookPathTemplate.render({ + project: project, + location: location, + agent: agent, + playbook: playbook, + }); + } + + /** + * Parse the project from Playbook resource. + * + * @param {string} playbookName + * A fully-qualified path representing Playbook resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPlaybookName(playbookName: string) { + return this.pathTemplates.playbookPathTemplate.match(playbookName).project; + } + + /** + * Parse the location from Playbook resource. + * + * @param {string} playbookName + * A fully-qualified path representing Playbook resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPlaybookName(playbookName: string) { + return this.pathTemplates.playbookPathTemplate.match(playbookName).location; + } + + /** + * Parse the agent from Playbook resource. + * + * @param {string} playbookName + * A fully-qualified path representing Playbook resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromPlaybookName(playbookName: string) { + return this.pathTemplates.playbookPathTemplate.match(playbookName).agent; + } + + /** + * Parse the playbook from Playbook resource. + * + * @param {string} playbookName + * A fully-qualified path representing Playbook resource. + * @returns {string} A string representing the playbook. + */ + matchPlaybookFromPlaybookName(playbookName: string) { + return this.pathTemplates.playbookPathTemplate.match(playbookName).playbook; + } + + /** + * Return a fully-qualified playbookVersion resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} playbook + * @param {string} version + * @returns {string} Resource name string. + */ + playbookVersionPath(project:string,location:string,agent:string,playbook:string,version:string) { + return this.pathTemplates.playbookVersionPathTemplate.render({ + project: project, + location: location, + agent: agent, + playbook: playbook, + version: version, + }); + } + + /** + * Parse the project from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).project; + } + + /** + * Parse the location from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).location; + } + + /** + * Parse the agent from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).agent; + } + + /** + * Parse the playbook from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the playbook. + */ + matchPlaybookFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).playbook; + } + + /** + * Parse the version from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the version. + */ + matchVersionFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).version; + } + /** * Return a fully-qualified project resource name string. * @@ -3030,6 +3257,143 @@ export class VersionsClient { return this.pathTemplates.testCaseResultPathTemplate.match(testCaseResultName).result; } + /** + * Return a fully-qualified tool resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} tool + * @returns {string} Resource name string. + */ + toolPath(project:string,location:string,agent:string,tool:string) { + return this.pathTemplates.toolPathTemplate.render({ + project: project, + location: location, + agent: agent, + tool: tool, + }); + } + + /** + * Parse the project from Tool resource. + * + * @param {string} toolName + * A fully-qualified path representing Tool resource. + * @returns {string} A string representing the project. + */ + matchProjectFromToolName(toolName: string) { + return this.pathTemplates.toolPathTemplate.match(toolName).project; + } + + /** + * Parse the location from Tool resource. + * + * @param {string} toolName + * A fully-qualified path representing Tool resource. + * @returns {string} A string representing the location. + */ + matchLocationFromToolName(toolName: string) { + return this.pathTemplates.toolPathTemplate.match(toolName).location; + } + + /** + * Parse the agent from Tool resource. + * + * @param {string} toolName + * A fully-qualified path representing Tool resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromToolName(toolName: string) { + return this.pathTemplates.toolPathTemplate.match(toolName).agent; + } + + /** + * Parse the tool from Tool resource. + * + * @param {string} toolName + * A fully-qualified path representing Tool resource. + * @returns {string} A string representing the tool. + */ + matchToolFromToolName(toolName: string) { + return this.pathTemplates.toolPathTemplate.match(toolName).tool; + } + + /** + * Return a fully-qualified toolVersion resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} tool + * @param {string} version + * @returns {string} Resource name string. + */ + toolVersionPath(project:string,location:string,agent:string,tool:string,version:string) { + return this.pathTemplates.toolVersionPathTemplate.render({ + project: project, + location: location, + agent: agent, + tool: tool, + version: version, + }); + } + + /** + * Parse the project from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the project. + */ + matchProjectFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).project; + } + + /** + * Parse the location from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the location. + */ + matchLocationFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).location; + } + + /** + * Parse the agent from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).agent; + } + + /** + * Parse the tool from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the tool. + */ + matchToolFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).tool; + } + + /** + * Parse the version from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the version. + */ + matchVersionFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).version; + } + /** * Return a fully-qualified version resource name string. * diff --git a/packages/google-cloud-dialogflow-cx/src/v3/versions_proto_list.json b/packages/google-cloud-dialogflow-cx/src/v3/versions_proto_list.json index 81549ae03b3..081858680c0 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/versions_proto_list.json +++ b/packages/google-cloud-dialogflow-cx/src/v3/versions_proto_list.json @@ -3,10 +3,12 @@ "../../protos/google/cloud/dialogflow/cx/v3/agent.proto", "../../protos/google/cloud/dialogflow/cx/v3/audio_config.proto", "../../protos/google/cloud/dialogflow/cx/v3/changelog.proto", + "../../protos/google/cloud/dialogflow/cx/v3/code_block.proto", "../../protos/google/cloud/dialogflow/cx/v3/data_store_connection.proto", "../../protos/google/cloud/dialogflow/cx/v3/deployment.proto", "../../protos/google/cloud/dialogflow/cx/v3/entity_type.proto", "../../protos/google/cloud/dialogflow/cx/v3/environment.proto", + "../../protos/google/cloud/dialogflow/cx/v3/example.proto", "../../protos/google/cloud/dialogflow/cx/v3/experiment.proto", "../../protos/google/cloud/dialogflow/cx/v3/flow.proto", "../../protos/google/cloud/dialogflow/cx/v3/fulfillment.proto", @@ -17,12 +19,17 @@ "../../protos/google/cloud/dialogflow/cx/v3/inline.proto", "../../protos/google/cloud/dialogflow/cx/v3/intent.proto", "../../protos/google/cloud/dialogflow/cx/v3/page.proto", + "../../protos/google/cloud/dialogflow/cx/v3/parameter_definition.proto", + "../../protos/google/cloud/dialogflow/cx/v3/playbook.proto", "../../protos/google/cloud/dialogflow/cx/v3/response_message.proto", "../../protos/google/cloud/dialogflow/cx/v3/safety_settings.proto", "../../protos/google/cloud/dialogflow/cx/v3/security_settings.proto", "../../protos/google/cloud/dialogflow/cx/v3/session.proto", "../../protos/google/cloud/dialogflow/cx/v3/session_entity_type.proto", "../../protos/google/cloud/dialogflow/cx/v3/test_case.proto", + "../../protos/google/cloud/dialogflow/cx/v3/tool.proto", + "../../protos/google/cloud/dialogflow/cx/v3/tool_call.proto", + "../../protos/google/cloud/dialogflow/cx/v3/trace.proto", "../../protos/google/cloud/dialogflow/cx/v3/transition_route_group.proto", "../../protos/google/cloud/dialogflow/cx/v3/validation_message.proto", "../../protos/google/cloud/dialogflow/cx/v3/version.proto", diff --git a/packages/google-cloud-dialogflow-cx/src/v3/webhooks_client.ts b/packages/google-cloud-dialogflow-cx/src/v3/webhooks_client.ts index 2966f4b0ade..4c590c3e76f 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/webhooks_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3/webhooks_client.ts @@ -208,6 +208,9 @@ export class WebhooksClient { environmentPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}' ), + examplePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}/examples/{example}' + ), experimentPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/experiments/{experiment}' ), @@ -229,6 +232,12 @@ export class WebhooksClient { pagePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/pages/{page}' ), + playbookPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}' + ), + playbookVersionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}/versions/{version}' + ), projectPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}' ), @@ -259,6 +268,12 @@ export class WebhooksClient { testCaseResultPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/testCases/{test_case}/results/{result}' ), + toolPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/tools/{tool}' + ), + toolVersionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/agents/{agent}/tools/{tool}/versions/{version}' + ), versionPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/versions/{version}' ), @@ -1826,6 +1841,81 @@ export class WebhooksClient { return this.pathTemplates.environmentPathTemplate.match(environmentName).environment; } + /** + * Return a fully-qualified example resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} playbook + * @param {string} example + * @returns {string} Resource name string. + */ + examplePath(project:string,location:string,agent:string,playbook:string,example:string) { + return this.pathTemplates.examplePathTemplate.render({ + project: project, + location: location, + agent: agent, + playbook: playbook, + example: example, + }); + } + + /** + * Parse the project from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the project. + */ + matchProjectFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).project; + } + + /** + * Parse the location from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the location. + */ + matchLocationFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).location; + } + + /** + * Parse the agent from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).agent; + } + + /** + * Parse the playbook from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the playbook. + */ + matchPlaybookFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).playbook; + } + + /** + * Parse the example from Example resource. + * + * @param {string} exampleName + * A fully-qualified path representing Example resource. + * @returns {string} A string representing the example. + */ + matchExampleFromExampleName(exampleName: string) { + return this.pathTemplates.examplePathTemplate.match(exampleName).example; + } + /** * Return a fully-qualified experiment resource name string. * @@ -2260,6 +2350,143 @@ export class WebhooksClient { return this.pathTemplates.pagePathTemplate.match(pageName).page; } + /** + * Return a fully-qualified playbook resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} playbook + * @returns {string} Resource name string. + */ + playbookPath(project:string,location:string,agent:string,playbook:string) { + return this.pathTemplates.playbookPathTemplate.render({ + project: project, + location: location, + agent: agent, + playbook: playbook, + }); + } + + /** + * Parse the project from Playbook resource. + * + * @param {string} playbookName + * A fully-qualified path representing Playbook resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPlaybookName(playbookName: string) { + return this.pathTemplates.playbookPathTemplate.match(playbookName).project; + } + + /** + * Parse the location from Playbook resource. + * + * @param {string} playbookName + * A fully-qualified path representing Playbook resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPlaybookName(playbookName: string) { + return this.pathTemplates.playbookPathTemplate.match(playbookName).location; + } + + /** + * Parse the agent from Playbook resource. + * + * @param {string} playbookName + * A fully-qualified path representing Playbook resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromPlaybookName(playbookName: string) { + return this.pathTemplates.playbookPathTemplate.match(playbookName).agent; + } + + /** + * Parse the playbook from Playbook resource. + * + * @param {string} playbookName + * A fully-qualified path representing Playbook resource. + * @returns {string} A string representing the playbook. + */ + matchPlaybookFromPlaybookName(playbookName: string) { + return this.pathTemplates.playbookPathTemplate.match(playbookName).playbook; + } + + /** + * Return a fully-qualified playbookVersion resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} playbook + * @param {string} version + * @returns {string} Resource name string. + */ + playbookVersionPath(project:string,location:string,agent:string,playbook:string,version:string) { + return this.pathTemplates.playbookVersionPathTemplate.render({ + project: project, + location: location, + agent: agent, + playbook: playbook, + version: version, + }); + } + + /** + * Parse the project from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).project; + } + + /** + * Parse the location from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).location; + } + + /** + * Parse the agent from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).agent; + } + + /** + * Parse the playbook from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the playbook. + */ + matchPlaybookFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).playbook; + } + + /** + * Parse the version from PlaybookVersion resource. + * + * @param {string} playbookVersionName + * A fully-qualified path representing PlaybookVersion resource. + * @returns {string} A string representing the version. + */ + matchVersionFromPlaybookVersionName(playbookVersionName: string) { + return this.pathTemplates.playbookVersionPathTemplate.match(playbookVersionName).version; + } + /** * Return a fully-qualified project resource name string. * @@ -2906,6 +3133,143 @@ export class WebhooksClient { return this.pathTemplates.testCaseResultPathTemplate.match(testCaseResultName).result; } + /** + * Return a fully-qualified tool resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} tool + * @returns {string} Resource name string. + */ + toolPath(project:string,location:string,agent:string,tool:string) { + return this.pathTemplates.toolPathTemplate.render({ + project: project, + location: location, + agent: agent, + tool: tool, + }); + } + + /** + * Parse the project from Tool resource. + * + * @param {string} toolName + * A fully-qualified path representing Tool resource. + * @returns {string} A string representing the project. + */ + matchProjectFromToolName(toolName: string) { + return this.pathTemplates.toolPathTemplate.match(toolName).project; + } + + /** + * Parse the location from Tool resource. + * + * @param {string} toolName + * A fully-qualified path representing Tool resource. + * @returns {string} A string representing the location. + */ + matchLocationFromToolName(toolName: string) { + return this.pathTemplates.toolPathTemplate.match(toolName).location; + } + + /** + * Parse the agent from Tool resource. + * + * @param {string} toolName + * A fully-qualified path representing Tool resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromToolName(toolName: string) { + return this.pathTemplates.toolPathTemplate.match(toolName).agent; + } + + /** + * Parse the tool from Tool resource. + * + * @param {string} toolName + * A fully-qualified path representing Tool resource. + * @returns {string} A string representing the tool. + */ + matchToolFromToolName(toolName: string) { + return this.pathTemplates.toolPathTemplate.match(toolName).tool; + } + + /** + * Return a fully-qualified toolVersion resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} tool + * @param {string} version + * @returns {string} Resource name string. + */ + toolVersionPath(project:string,location:string,agent:string,tool:string,version:string) { + return this.pathTemplates.toolVersionPathTemplate.render({ + project: project, + location: location, + agent: agent, + tool: tool, + version: version, + }); + } + + /** + * Parse the project from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the project. + */ + matchProjectFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).project; + } + + /** + * Parse the location from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the location. + */ + matchLocationFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).location; + } + + /** + * Parse the agent from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).agent; + } + + /** + * Parse the tool from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the tool. + */ + matchToolFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).tool; + } + + /** + * Parse the version from ToolVersion resource. + * + * @param {string} toolVersionName + * A fully-qualified path representing ToolVersion resource. + * @returns {string} A string representing the version. + */ + matchVersionFromToolVersionName(toolVersionName: string) { + return this.pathTemplates.toolVersionPathTemplate.match(toolVersionName).version; + } + /** * Return a fully-qualified version resource name string. * diff --git a/packages/google-cloud-dialogflow-cx/src/v3/webhooks_proto_list.json b/packages/google-cloud-dialogflow-cx/src/v3/webhooks_proto_list.json index 81549ae03b3..081858680c0 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/webhooks_proto_list.json +++ b/packages/google-cloud-dialogflow-cx/src/v3/webhooks_proto_list.json @@ -3,10 +3,12 @@ "../../protos/google/cloud/dialogflow/cx/v3/agent.proto", "../../protos/google/cloud/dialogflow/cx/v3/audio_config.proto", "../../protos/google/cloud/dialogflow/cx/v3/changelog.proto", + "../../protos/google/cloud/dialogflow/cx/v3/code_block.proto", "../../protos/google/cloud/dialogflow/cx/v3/data_store_connection.proto", "../../protos/google/cloud/dialogflow/cx/v3/deployment.proto", "../../protos/google/cloud/dialogflow/cx/v3/entity_type.proto", "../../protos/google/cloud/dialogflow/cx/v3/environment.proto", + "../../protos/google/cloud/dialogflow/cx/v3/example.proto", "../../protos/google/cloud/dialogflow/cx/v3/experiment.proto", "../../protos/google/cloud/dialogflow/cx/v3/flow.proto", "../../protos/google/cloud/dialogflow/cx/v3/fulfillment.proto", @@ -17,12 +19,17 @@ "../../protos/google/cloud/dialogflow/cx/v3/inline.proto", "../../protos/google/cloud/dialogflow/cx/v3/intent.proto", "../../protos/google/cloud/dialogflow/cx/v3/page.proto", + "../../protos/google/cloud/dialogflow/cx/v3/parameter_definition.proto", + "../../protos/google/cloud/dialogflow/cx/v3/playbook.proto", "../../protos/google/cloud/dialogflow/cx/v3/response_message.proto", "../../protos/google/cloud/dialogflow/cx/v3/safety_settings.proto", "../../protos/google/cloud/dialogflow/cx/v3/security_settings.proto", "../../protos/google/cloud/dialogflow/cx/v3/session.proto", "../../protos/google/cloud/dialogflow/cx/v3/session_entity_type.proto", "../../protos/google/cloud/dialogflow/cx/v3/test_case.proto", + "../../protos/google/cloud/dialogflow/cx/v3/tool.proto", + "../../protos/google/cloud/dialogflow/cx/v3/tool_call.proto", + "../../protos/google/cloud/dialogflow/cx/v3/trace.proto", "../../protos/google/cloud/dialogflow/cx/v3/transition_route_group.proto", "../../protos/google/cloud/dialogflow/cx/v3/validation_message.proto", "../../protos/google/cloud/dialogflow/cx/v3/version.proto", diff --git a/packages/google-cloud-dialogflow-cx/system-test/fixtures/sample/src/index.js b/packages/google-cloud-dialogflow-cx/system-test/fixtures/sample/src/index.js index 399b0978f9e..0b485589046 100644 --- a/packages/google-cloud-dialogflow-cx/system-test/fixtures/sample/src/index.js +++ b/packages/google-cloud-dialogflow-cx/system-test/fixtures/sample/src/index.js @@ -26,15 +26,18 @@ function main() { const deploymentsClient = new cx.DeploymentsClient(); const entityTypesClient = new cx.EntityTypesClient(); const environmentsClient = new cx.EnvironmentsClient(); + const examplesClient = new cx.ExamplesClient(); const experimentsClient = new cx.ExperimentsClient(); const flowsClient = new cx.FlowsClient(); const generatorsClient = new cx.GeneratorsClient(); const intentsClient = new cx.IntentsClient(); const pagesClient = new cx.PagesClient(); + const playbooksClient = new cx.PlaybooksClient(); const securitySettingsServiceClient = new cx.SecuritySettingsServiceClient(); const sessionEntityTypesClient = new cx.SessionEntityTypesClient(); const sessionsClient = new cx.SessionsClient(); const testCasesClient = new cx.TestCasesClient(); + const toolsClient = new cx.ToolsClient(); const transitionRouteGroupsClient = new cx.TransitionRouteGroupsClient(); const versionsClient = new cx.VersionsClient(); const webhooksClient = new cx.WebhooksClient(); diff --git a/packages/google-cloud-dialogflow-cx/system-test/fixtures/sample/src/index.ts b/packages/google-cloud-dialogflow-cx/system-test/fixtures/sample/src/index.ts index bff177ff8ea..a21d11f9616 100644 --- a/packages/google-cloud-dialogflow-cx/system-test/fixtures/sample/src/index.ts +++ b/packages/google-cloud-dialogflow-cx/system-test/fixtures/sample/src/index.ts @@ -16,7 +16,7 @@ // ** https://github.com/googleapis/gapic-generator-typescript ** // ** All changes to this file may be overwritten. ** -import {AgentsClient, ChangelogsClient, DeploymentsClient, EntityTypesClient, EnvironmentsClient, ExperimentsClient, FlowsClient, GeneratorsClient, IntentsClient, PagesClient, SecuritySettingsServiceClient, SessionEntityTypesClient, SessionsClient, TestCasesClient, TransitionRouteGroupsClient, VersionsClient, WebhooksClient} from '@google-cloud/dialogflow-cx'; +import {AgentsClient, ChangelogsClient, DeploymentsClient, EntityTypesClient, EnvironmentsClient, ExamplesClient, ExperimentsClient, FlowsClient, GeneratorsClient, IntentsClient, PagesClient, PlaybooksClient, SecuritySettingsServiceClient, SessionEntityTypesClient, SessionsClient, TestCasesClient, ToolsClient, TransitionRouteGroupsClient, VersionsClient, WebhooksClient} from '@google-cloud/dialogflow-cx'; // check that the client class type name can be used function doStuffWithAgentsClient(client: AgentsClient) { @@ -34,6 +34,9 @@ function doStuffWithEntityTypesClient(client: EntityTypesClient) { function doStuffWithEnvironmentsClient(client: EnvironmentsClient) { client.close(); } +function doStuffWithExamplesClient(client: ExamplesClient) { + client.close(); +} function doStuffWithExperimentsClient(client: ExperimentsClient) { client.close(); } @@ -49,6 +52,9 @@ function doStuffWithIntentsClient(client: IntentsClient) { function doStuffWithPagesClient(client: PagesClient) { client.close(); } +function doStuffWithPlaybooksClient(client: PlaybooksClient) { + client.close(); +} function doStuffWithSecuritySettingsServiceClient(client: SecuritySettingsServiceClient) { client.close(); } @@ -61,6 +67,9 @@ function doStuffWithSessionsClient(client: SessionsClient) { function doStuffWithTestCasesClient(client: TestCasesClient) { client.close(); } +function doStuffWithToolsClient(client: ToolsClient) { + client.close(); +} function doStuffWithTransitionRouteGroupsClient(client: TransitionRouteGroupsClient) { client.close(); } @@ -88,6 +97,9 @@ function main() { const environmentsClient = new EnvironmentsClient(); doStuffWithEnvironmentsClient(environmentsClient); // check that the client instance can be created + const examplesClient = new ExamplesClient(); + doStuffWithExamplesClient(examplesClient); + // check that the client instance can be created const experimentsClient = new ExperimentsClient(); doStuffWithExperimentsClient(experimentsClient); // check that the client instance can be created @@ -103,6 +115,9 @@ function main() { const pagesClient = new PagesClient(); doStuffWithPagesClient(pagesClient); // check that the client instance can be created + const playbooksClient = new PlaybooksClient(); + doStuffWithPlaybooksClient(playbooksClient); + // check that the client instance can be created const securitySettingsServiceClient = new SecuritySettingsServiceClient(); doStuffWithSecuritySettingsServiceClient(securitySettingsServiceClient); // check that the client instance can be created @@ -115,6 +130,9 @@ function main() { const testCasesClient = new TestCasesClient(); doStuffWithTestCasesClient(testCasesClient); // check that the client instance can be created + const toolsClient = new ToolsClient(); + doStuffWithToolsClient(toolsClient); + // check that the client instance can be created const transitionRouteGroupsClient = new TransitionRouteGroupsClient(); doStuffWithTransitionRouteGroupsClient(transitionRouteGroupsClient); // check that the client instance can be created diff --git a/packages/google-cloud-dialogflow-cx/test/gapic_agents_v3.ts b/packages/google-cloud-dialogflow-cx/test/gapic_agents_v3.ts index dcd268af7ef..1ce73033d69 100644 --- a/packages/google-cloud-dialogflow-cx/test/gapic_agents_v3.ts +++ b/packages/google-cloud-dialogflow-cx/test/gapic_agents_v3.ts @@ -2547,6 +2547,68 @@ describe('v3.AgentsClient', () => { }); }); + describe('example', async () => { + const fakePath = "/rendered/path/example"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + playbook: "playbookValue", + example: "exampleValue", + }; + const client = new agentsModule.v3.AgentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.examplePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.examplePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('examplePath', () => { + const result = client.examplePath("projectValue", "locationValue", "agentValue", "playbookValue", "exampleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.examplePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromExampleName', () => { + const result = client.matchProjectFromExampleName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromExampleName', () => { + const result = client.matchLocationFromExampleName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromExampleName', () => { + const result = client.matchAgentFromExampleName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPlaybookFromExampleName', () => { + const result = client.matchPlaybookFromExampleName(fakePath); + assert.strictEqual(result, "playbookValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchExampleFromExampleName', () => { + const result = client.matchExampleFromExampleName(fakePath); + assert.strictEqual(result, "exampleValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('experiment', async () => { const fakePath = "/rendered/path/experiment"; const expectedParameters = { @@ -2925,6 +2987,122 @@ describe('v3.AgentsClient', () => { }); }); + describe('playbook', async () => { + const fakePath = "/rendered/path/playbook"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + playbook: "playbookValue", + }; + const client = new agentsModule.v3.AgentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.playbookPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.playbookPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('playbookPath', () => { + const result = client.playbookPath("projectValue", "locationValue", "agentValue", "playbookValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.playbookPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromPlaybookName', () => { + const result = client.matchProjectFromPlaybookName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.playbookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromPlaybookName', () => { + const result = client.matchLocationFromPlaybookName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.playbookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromPlaybookName', () => { + const result = client.matchAgentFromPlaybookName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.playbookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPlaybookFromPlaybookName', () => { + const result = client.matchPlaybookFromPlaybookName(fakePath); + assert.strictEqual(result, "playbookValue"); + assert((client.pathTemplates.playbookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('playbookVersion', async () => { + const fakePath = "/rendered/path/playbookVersion"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + playbook: "playbookValue", + version: "versionValue", + }; + const client = new agentsModule.v3.AgentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.playbookVersionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.playbookVersionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('playbookVersionPath', () => { + const result = client.playbookVersionPath("projectValue", "locationValue", "agentValue", "playbookValue", "versionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.playbookVersionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromPlaybookVersionName', () => { + const result = client.matchProjectFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromPlaybookVersionName', () => { + const result = client.matchLocationFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromPlaybookVersionName', () => { + const result = client.matchAgentFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPlaybookFromPlaybookVersionName', () => { + const result = client.matchPlaybookFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "playbookValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchVersionFromPlaybookVersionName', () => { + const result = client.matchVersionFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "versionValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('project', async () => { const fakePath = "/rendered/path/project"; const expectedParameters = { @@ -3365,6 +3543,122 @@ describe('v3.AgentsClient', () => { }); }); + describe('tool', async () => { + const fakePath = "/rendered/path/tool"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + tool: "toolValue", + }; + const client = new agentsModule.v3.AgentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.toolPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.toolPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('toolPath', () => { + const result = client.toolPath("projectValue", "locationValue", "agentValue", "toolValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.toolPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromToolName', () => { + const result = client.matchProjectFromToolName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.toolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromToolName', () => { + const result = client.matchLocationFromToolName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.toolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromToolName', () => { + const result = client.matchAgentFromToolName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.toolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchToolFromToolName', () => { + const result = client.matchToolFromToolName(fakePath); + assert.strictEqual(result, "toolValue"); + assert((client.pathTemplates.toolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('toolVersion', async () => { + const fakePath = "/rendered/path/toolVersion"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + tool: "toolValue", + version: "versionValue", + }; + const client = new agentsModule.v3.AgentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.toolVersionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.toolVersionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('toolVersionPath', () => { + const result = client.toolVersionPath("projectValue", "locationValue", "agentValue", "toolValue", "versionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.toolVersionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromToolVersionName', () => { + const result = client.matchProjectFromToolVersionName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromToolVersionName', () => { + const result = client.matchLocationFromToolVersionName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromToolVersionName', () => { + const result = client.matchAgentFromToolVersionName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchToolFromToolVersionName', () => { + const result = client.matchToolFromToolVersionName(fakePath); + assert.strictEqual(result, "toolValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchVersionFromToolVersionName', () => { + const result = client.matchVersionFromToolVersionName(fakePath); + assert.strictEqual(result, "versionValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('version', async () => { const fakePath = "/rendered/path/version"; const expectedParameters = { diff --git a/packages/google-cloud-dialogflow-cx/test/gapic_changelogs_v3.ts b/packages/google-cloud-dialogflow-cx/test/gapic_changelogs_v3.ts index 73cbd656460..b5cc4285f37 100644 --- a/packages/google-cloud-dialogflow-cx/test/gapic_changelogs_v3.ts +++ b/packages/google-cloud-dialogflow-cx/test/gapic_changelogs_v3.ts @@ -1459,6 +1459,68 @@ describe('v3.ChangelogsClient', () => { }); }); + describe('example', async () => { + const fakePath = "/rendered/path/example"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + playbook: "playbookValue", + example: "exampleValue", + }; + const client = new changelogsModule.v3.ChangelogsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.examplePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.examplePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('examplePath', () => { + const result = client.examplePath("projectValue", "locationValue", "agentValue", "playbookValue", "exampleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.examplePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromExampleName', () => { + const result = client.matchProjectFromExampleName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromExampleName', () => { + const result = client.matchLocationFromExampleName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromExampleName', () => { + const result = client.matchAgentFromExampleName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPlaybookFromExampleName', () => { + const result = client.matchPlaybookFromExampleName(fakePath); + assert.strictEqual(result, "playbookValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchExampleFromExampleName', () => { + const result = client.matchExampleFromExampleName(fakePath); + assert.strictEqual(result, "exampleValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('experiment', async () => { const fakePath = "/rendered/path/experiment"; const expectedParameters = { @@ -1837,6 +1899,122 @@ describe('v3.ChangelogsClient', () => { }); }); + describe('playbook', async () => { + const fakePath = "/rendered/path/playbook"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + playbook: "playbookValue", + }; + const client = new changelogsModule.v3.ChangelogsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.playbookPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.playbookPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('playbookPath', () => { + const result = client.playbookPath("projectValue", "locationValue", "agentValue", "playbookValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.playbookPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromPlaybookName', () => { + const result = client.matchProjectFromPlaybookName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.playbookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromPlaybookName', () => { + const result = client.matchLocationFromPlaybookName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.playbookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromPlaybookName', () => { + const result = client.matchAgentFromPlaybookName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.playbookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPlaybookFromPlaybookName', () => { + const result = client.matchPlaybookFromPlaybookName(fakePath); + assert.strictEqual(result, "playbookValue"); + assert((client.pathTemplates.playbookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('playbookVersion', async () => { + const fakePath = "/rendered/path/playbookVersion"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + playbook: "playbookValue", + version: "versionValue", + }; + const client = new changelogsModule.v3.ChangelogsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.playbookVersionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.playbookVersionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('playbookVersionPath', () => { + const result = client.playbookVersionPath("projectValue", "locationValue", "agentValue", "playbookValue", "versionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.playbookVersionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromPlaybookVersionName', () => { + const result = client.matchProjectFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromPlaybookVersionName', () => { + const result = client.matchLocationFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromPlaybookVersionName', () => { + const result = client.matchAgentFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPlaybookFromPlaybookVersionName', () => { + const result = client.matchPlaybookFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "playbookValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchVersionFromPlaybookVersionName', () => { + const result = client.matchVersionFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "versionValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('project', async () => { const fakePath = "/rendered/path/project"; const expectedParameters = { @@ -2277,6 +2455,122 @@ describe('v3.ChangelogsClient', () => { }); }); + describe('tool', async () => { + const fakePath = "/rendered/path/tool"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + tool: "toolValue", + }; + const client = new changelogsModule.v3.ChangelogsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.toolPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.toolPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('toolPath', () => { + const result = client.toolPath("projectValue", "locationValue", "agentValue", "toolValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.toolPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromToolName', () => { + const result = client.matchProjectFromToolName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.toolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromToolName', () => { + const result = client.matchLocationFromToolName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.toolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromToolName', () => { + const result = client.matchAgentFromToolName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.toolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchToolFromToolName', () => { + const result = client.matchToolFromToolName(fakePath); + assert.strictEqual(result, "toolValue"); + assert((client.pathTemplates.toolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('toolVersion', async () => { + const fakePath = "/rendered/path/toolVersion"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + tool: "toolValue", + version: "versionValue", + }; + const client = new changelogsModule.v3.ChangelogsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.toolVersionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.toolVersionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('toolVersionPath', () => { + const result = client.toolVersionPath("projectValue", "locationValue", "agentValue", "toolValue", "versionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.toolVersionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromToolVersionName', () => { + const result = client.matchProjectFromToolVersionName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromToolVersionName', () => { + const result = client.matchLocationFromToolVersionName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromToolVersionName', () => { + const result = client.matchAgentFromToolVersionName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchToolFromToolVersionName', () => { + const result = client.matchToolFromToolVersionName(fakePath); + assert.strictEqual(result, "toolValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchVersionFromToolVersionName', () => { + const result = client.matchVersionFromToolVersionName(fakePath); + assert.strictEqual(result, "versionValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('version', async () => { const fakePath = "/rendered/path/version"; const expectedParameters = { diff --git a/packages/google-cloud-dialogflow-cx/test/gapic_deployments_v3.ts b/packages/google-cloud-dialogflow-cx/test/gapic_deployments_v3.ts index 3db65a2acfb..35cb5b527c7 100644 --- a/packages/google-cloud-dialogflow-cx/test/gapic_deployments_v3.ts +++ b/packages/google-cloud-dialogflow-cx/test/gapic_deployments_v3.ts @@ -1459,6 +1459,68 @@ describe('v3.DeploymentsClient', () => { }); }); + describe('example', async () => { + const fakePath = "/rendered/path/example"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + playbook: "playbookValue", + example: "exampleValue", + }; + const client = new deploymentsModule.v3.DeploymentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.examplePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.examplePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('examplePath', () => { + const result = client.examplePath("projectValue", "locationValue", "agentValue", "playbookValue", "exampleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.examplePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromExampleName', () => { + const result = client.matchProjectFromExampleName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromExampleName', () => { + const result = client.matchLocationFromExampleName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromExampleName', () => { + const result = client.matchAgentFromExampleName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPlaybookFromExampleName', () => { + const result = client.matchPlaybookFromExampleName(fakePath); + assert.strictEqual(result, "playbookValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchExampleFromExampleName', () => { + const result = client.matchExampleFromExampleName(fakePath); + assert.strictEqual(result, "exampleValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('experiment', async () => { const fakePath = "/rendered/path/experiment"; const expectedParameters = { @@ -1837,6 +1899,122 @@ describe('v3.DeploymentsClient', () => { }); }); + describe('playbook', async () => { + const fakePath = "/rendered/path/playbook"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + playbook: "playbookValue", + }; + const client = new deploymentsModule.v3.DeploymentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.playbookPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.playbookPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('playbookPath', () => { + const result = client.playbookPath("projectValue", "locationValue", "agentValue", "playbookValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.playbookPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromPlaybookName', () => { + const result = client.matchProjectFromPlaybookName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.playbookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromPlaybookName', () => { + const result = client.matchLocationFromPlaybookName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.playbookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromPlaybookName', () => { + const result = client.matchAgentFromPlaybookName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.playbookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPlaybookFromPlaybookName', () => { + const result = client.matchPlaybookFromPlaybookName(fakePath); + assert.strictEqual(result, "playbookValue"); + assert((client.pathTemplates.playbookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('playbookVersion', async () => { + const fakePath = "/rendered/path/playbookVersion"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + playbook: "playbookValue", + version: "versionValue", + }; + const client = new deploymentsModule.v3.DeploymentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.playbookVersionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.playbookVersionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('playbookVersionPath', () => { + const result = client.playbookVersionPath("projectValue", "locationValue", "agentValue", "playbookValue", "versionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.playbookVersionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromPlaybookVersionName', () => { + const result = client.matchProjectFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromPlaybookVersionName', () => { + const result = client.matchLocationFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromPlaybookVersionName', () => { + const result = client.matchAgentFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPlaybookFromPlaybookVersionName', () => { + const result = client.matchPlaybookFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "playbookValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchVersionFromPlaybookVersionName', () => { + const result = client.matchVersionFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "versionValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('project', async () => { const fakePath = "/rendered/path/project"; const expectedParameters = { @@ -2277,6 +2455,122 @@ describe('v3.DeploymentsClient', () => { }); }); + describe('tool', async () => { + const fakePath = "/rendered/path/tool"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + tool: "toolValue", + }; + const client = new deploymentsModule.v3.DeploymentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.toolPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.toolPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('toolPath', () => { + const result = client.toolPath("projectValue", "locationValue", "agentValue", "toolValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.toolPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromToolName', () => { + const result = client.matchProjectFromToolName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.toolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromToolName', () => { + const result = client.matchLocationFromToolName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.toolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromToolName', () => { + const result = client.matchAgentFromToolName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.toolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchToolFromToolName', () => { + const result = client.matchToolFromToolName(fakePath); + assert.strictEqual(result, "toolValue"); + assert((client.pathTemplates.toolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('toolVersion', async () => { + const fakePath = "/rendered/path/toolVersion"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + tool: "toolValue", + version: "versionValue", + }; + const client = new deploymentsModule.v3.DeploymentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.toolVersionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.toolVersionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('toolVersionPath', () => { + const result = client.toolVersionPath("projectValue", "locationValue", "agentValue", "toolValue", "versionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.toolVersionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromToolVersionName', () => { + const result = client.matchProjectFromToolVersionName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromToolVersionName', () => { + const result = client.matchLocationFromToolVersionName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromToolVersionName', () => { + const result = client.matchAgentFromToolVersionName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchToolFromToolVersionName', () => { + const result = client.matchToolFromToolVersionName(fakePath); + assert.strictEqual(result, "toolValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchVersionFromToolVersionName', () => { + const result = client.matchVersionFromToolVersionName(fakePath); + assert.strictEqual(result, "versionValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('version', async () => { const fakePath = "/rendered/path/version"; const expectedParameters = { diff --git a/packages/google-cloud-dialogflow-cx/test/gapic_entity_types_v3.ts b/packages/google-cloud-dialogflow-cx/test/gapic_entity_types_v3.ts index cae4929f525..c9f50b360b3 100644 --- a/packages/google-cloud-dialogflow-cx/test/gapic_entity_types_v3.ts +++ b/packages/google-cloud-dialogflow-cx/test/gapic_entity_types_v3.ts @@ -2111,6 +2111,68 @@ describe('v3.EntityTypesClient', () => { }); }); + describe('example', async () => { + const fakePath = "/rendered/path/example"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + playbook: "playbookValue", + example: "exampleValue", + }; + const client = new entitytypesModule.v3.EntityTypesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.examplePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.examplePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('examplePath', () => { + const result = client.examplePath("projectValue", "locationValue", "agentValue", "playbookValue", "exampleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.examplePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromExampleName', () => { + const result = client.matchProjectFromExampleName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromExampleName', () => { + const result = client.matchLocationFromExampleName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromExampleName', () => { + const result = client.matchAgentFromExampleName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPlaybookFromExampleName', () => { + const result = client.matchPlaybookFromExampleName(fakePath); + assert.strictEqual(result, "playbookValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchExampleFromExampleName', () => { + const result = client.matchExampleFromExampleName(fakePath); + assert.strictEqual(result, "exampleValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('experiment', async () => { const fakePath = "/rendered/path/experiment"; const expectedParameters = { @@ -2489,6 +2551,122 @@ describe('v3.EntityTypesClient', () => { }); }); + describe('playbook', async () => { + const fakePath = "/rendered/path/playbook"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + playbook: "playbookValue", + }; + const client = new entitytypesModule.v3.EntityTypesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.playbookPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.playbookPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('playbookPath', () => { + const result = client.playbookPath("projectValue", "locationValue", "agentValue", "playbookValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.playbookPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromPlaybookName', () => { + const result = client.matchProjectFromPlaybookName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.playbookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromPlaybookName', () => { + const result = client.matchLocationFromPlaybookName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.playbookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromPlaybookName', () => { + const result = client.matchAgentFromPlaybookName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.playbookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPlaybookFromPlaybookName', () => { + const result = client.matchPlaybookFromPlaybookName(fakePath); + assert.strictEqual(result, "playbookValue"); + assert((client.pathTemplates.playbookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('playbookVersion', async () => { + const fakePath = "/rendered/path/playbookVersion"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + playbook: "playbookValue", + version: "versionValue", + }; + const client = new entitytypesModule.v3.EntityTypesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.playbookVersionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.playbookVersionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('playbookVersionPath', () => { + const result = client.playbookVersionPath("projectValue", "locationValue", "agentValue", "playbookValue", "versionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.playbookVersionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromPlaybookVersionName', () => { + const result = client.matchProjectFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromPlaybookVersionName', () => { + const result = client.matchLocationFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromPlaybookVersionName', () => { + const result = client.matchAgentFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPlaybookFromPlaybookVersionName', () => { + const result = client.matchPlaybookFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "playbookValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchVersionFromPlaybookVersionName', () => { + const result = client.matchVersionFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "versionValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('project', async () => { const fakePath = "/rendered/path/project"; const expectedParameters = { @@ -2929,6 +3107,122 @@ describe('v3.EntityTypesClient', () => { }); }); + describe('tool', async () => { + const fakePath = "/rendered/path/tool"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + tool: "toolValue", + }; + const client = new entitytypesModule.v3.EntityTypesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.toolPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.toolPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('toolPath', () => { + const result = client.toolPath("projectValue", "locationValue", "agentValue", "toolValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.toolPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromToolName', () => { + const result = client.matchProjectFromToolName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.toolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromToolName', () => { + const result = client.matchLocationFromToolName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.toolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromToolName', () => { + const result = client.matchAgentFromToolName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.toolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchToolFromToolName', () => { + const result = client.matchToolFromToolName(fakePath); + assert.strictEqual(result, "toolValue"); + assert((client.pathTemplates.toolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('toolVersion', async () => { + const fakePath = "/rendered/path/toolVersion"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + tool: "toolValue", + version: "versionValue", + }; + const client = new entitytypesModule.v3.EntityTypesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.toolVersionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.toolVersionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('toolVersionPath', () => { + const result = client.toolVersionPath("projectValue", "locationValue", "agentValue", "toolValue", "versionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.toolVersionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromToolVersionName', () => { + const result = client.matchProjectFromToolVersionName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromToolVersionName', () => { + const result = client.matchLocationFromToolVersionName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromToolVersionName', () => { + const result = client.matchAgentFromToolVersionName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchToolFromToolVersionName', () => { + const result = client.matchToolFromToolVersionName(fakePath); + assert.strictEqual(result, "toolValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchVersionFromToolVersionName', () => { + const result = client.matchVersionFromToolVersionName(fakePath); + assert.strictEqual(result, "versionValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('version', async () => { const fakePath = "/rendered/path/version"; const expectedParameters = { diff --git a/packages/google-cloud-dialogflow-cx/test/gapic_environments_v3.ts b/packages/google-cloud-dialogflow-cx/test/gapic_environments_v3.ts index 8f5aa307a97..6f4788e9bbd 100644 --- a/packages/google-cloud-dialogflow-cx/test/gapic_environments_v3.ts +++ b/packages/google-cloud-dialogflow-cx/test/gapic_environments_v3.ts @@ -2693,6 +2693,68 @@ describe('v3.EnvironmentsClient', () => { }); }); + describe('example', async () => { + const fakePath = "/rendered/path/example"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + playbook: "playbookValue", + example: "exampleValue", + }; + const client = new environmentsModule.v3.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.examplePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.examplePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('examplePath', () => { + const result = client.examplePath("projectValue", "locationValue", "agentValue", "playbookValue", "exampleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.examplePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromExampleName', () => { + const result = client.matchProjectFromExampleName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromExampleName', () => { + const result = client.matchLocationFromExampleName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromExampleName', () => { + const result = client.matchAgentFromExampleName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPlaybookFromExampleName', () => { + const result = client.matchPlaybookFromExampleName(fakePath); + assert.strictEqual(result, "playbookValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchExampleFromExampleName', () => { + const result = client.matchExampleFromExampleName(fakePath); + assert.strictEqual(result, "exampleValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('experiment', async () => { const fakePath = "/rendered/path/experiment"; const expectedParameters = { @@ -3071,6 +3133,122 @@ describe('v3.EnvironmentsClient', () => { }); }); + describe('playbook', async () => { + const fakePath = "/rendered/path/playbook"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + playbook: "playbookValue", + }; + const client = new environmentsModule.v3.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.playbookPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.playbookPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('playbookPath', () => { + const result = client.playbookPath("projectValue", "locationValue", "agentValue", "playbookValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.playbookPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromPlaybookName', () => { + const result = client.matchProjectFromPlaybookName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.playbookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromPlaybookName', () => { + const result = client.matchLocationFromPlaybookName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.playbookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromPlaybookName', () => { + const result = client.matchAgentFromPlaybookName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.playbookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPlaybookFromPlaybookName', () => { + const result = client.matchPlaybookFromPlaybookName(fakePath); + assert.strictEqual(result, "playbookValue"); + assert((client.pathTemplates.playbookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('playbookVersion', async () => { + const fakePath = "/rendered/path/playbookVersion"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + playbook: "playbookValue", + version: "versionValue", + }; + const client = new environmentsModule.v3.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.playbookVersionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.playbookVersionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('playbookVersionPath', () => { + const result = client.playbookVersionPath("projectValue", "locationValue", "agentValue", "playbookValue", "versionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.playbookVersionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromPlaybookVersionName', () => { + const result = client.matchProjectFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromPlaybookVersionName', () => { + const result = client.matchLocationFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromPlaybookVersionName', () => { + const result = client.matchAgentFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPlaybookFromPlaybookVersionName', () => { + const result = client.matchPlaybookFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "playbookValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchVersionFromPlaybookVersionName', () => { + const result = client.matchVersionFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "versionValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('project', async () => { const fakePath = "/rendered/path/project"; const expectedParameters = { @@ -3511,6 +3689,122 @@ describe('v3.EnvironmentsClient', () => { }); }); + describe('tool', async () => { + const fakePath = "/rendered/path/tool"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + tool: "toolValue", + }; + const client = new environmentsModule.v3.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.toolPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.toolPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('toolPath', () => { + const result = client.toolPath("projectValue", "locationValue", "agentValue", "toolValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.toolPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromToolName', () => { + const result = client.matchProjectFromToolName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.toolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromToolName', () => { + const result = client.matchLocationFromToolName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.toolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromToolName', () => { + const result = client.matchAgentFromToolName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.toolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchToolFromToolName', () => { + const result = client.matchToolFromToolName(fakePath); + assert.strictEqual(result, "toolValue"); + assert((client.pathTemplates.toolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('toolVersion', async () => { + const fakePath = "/rendered/path/toolVersion"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + tool: "toolValue", + version: "versionValue", + }; + const client = new environmentsModule.v3.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.toolVersionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.toolVersionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('toolVersionPath', () => { + const result = client.toolVersionPath("projectValue", "locationValue", "agentValue", "toolValue", "versionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.toolVersionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromToolVersionName', () => { + const result = client.matchProjectFromToolVersionName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromToolVersionName', () => { + const result = client.matchLocationFromToolVersionName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromToolVersionName', () => { + const result = client.matchAgentFromToolVersionName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchToolFromToolVersionName', () => { + const result = client.matchToolFromToolVersionName(fakePath); + assert.strictEqual(result, "toolValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchVersionFromToolVersionName', () => { + const result = client.matchVersionFromToolVersionName(fakePath); + assert.strictEqual(result, "versionValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('version', async () => { const fakePath = "/rendered/path/version"; const expectedParameters = { diff --git a/packages/google-cloud-dialogflow-cx/test/gapic_examples_v3.ts b/packages/google-cloud-dialogflow-cx/test/gapic_examples_v3.ts new file mode 100644 index 00000000000..0a178e89e86 --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/test/gapic_examples_v3.ts @@ -0,0 +1,3018 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it} from 'mocha'; +import * as examplesModule from '../src'; + +import {PassThrough} from 'stream'; + +import {protobuf, operationsProtos, LocationProtos} from 'google-gax'; + +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON(require('../protos/protos.json')).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + +function generateSampleMessage(instance: T) { + const filledObject = (instance.constructor as typeof protobuf.Message) + .toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject(filledObject) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error ? sinon.stub().rejects(error) : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback(response?: ResponseType, error?: Error) { + return error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); +} + +function stubPageStreamingCall(responses?: ResponseType[], error?: Error) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error ? sinon.stub().callsArgWith(2, error) : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { mockStream.write({}); }); + } + setImmediate(() => { mockStream.end(); }); + } else { + setImmediate(() => { mockStream.write({}); }); + setImmediate(() => { mockStream.end(); }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall(responses?: ResponseType[], error?: Error) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + } + }; + } + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v3.ExamplesClient', () => { + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = new examplesModule.v3.ExamplesClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'dialogflow.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new examplesModule.v3.ExamplesClient(); + const universeDomain = client.universeDomain; + assert.strictEqual(universeDomain, "googleapis.com"); + }); + + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + it('throws DeprecationWarning if static servicePath is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const servicePath = examplesModule.v3.ExamplesClient.servicePath; + assert.strictEqual(servicePath, 'dialogflow.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = examplesModule.v3.ExamplesClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'dialogflow.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new examplesModule.v3.ExamplesClient({universeDomain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'dialogflow.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new examplesModule.v3.ExamplesClient({universe_domain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'dialogflow.example.com'); + }); + + if (typeof process === 'object' && 'env' in process) { + describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { + it('sets apiEndpoint from environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new examplesModule.v3.ExamplesClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'dialogflow.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + + it('value configured in code has priority over environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new examplesModule.v3.ExamplesClient({universeDomain: 'configured.example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'dialogflow.configured.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + }); + } + it('does not allow setting both universeDomain and universe_domain', () => { + assert.throws(() => { new examplesModule.v3.ExamplesClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); + }); + + it('has port', () => { + const port = examplesModule.v3.ExamplesClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new examplesModule.v3.ExamplesClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new examplesModule.v3.ExamplesClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new examplesModule.v3.ExamplesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.examplesStub, undefined); + await client.initialize(); + assert(client.examplesStub); + }); + + it('has close method for the initialized client', done => { + const client = new examplesModule.v3.ExamplesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize().catch(err => {throw err}); + assert(client.examplesStub); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has close method for the non-initialized client', done => { + const client = new examplesModule.v3.ExamplesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.examplesStub, undefined); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new examplesModule.v3.ExamplesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); + }); + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new examplesModule.v3.ExamplesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error|null, projectId?: string|null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); + }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); + }); + }); + + describe('createExample', () => { + it('invokes createExample without error', async () => { + const client = new examplesModule.v3.ExamplesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.CreateExampleRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.CreateExampleRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.Example() + ); + client.innerApiCalls.createExample = stubSimpleCall(expectedResponse); + const [response] = await client.createExample(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createExample as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createExample as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createExample without error using callback', async () => { + const client = new examplesModule.v3.ExamplesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.CreateExampleRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.CreateExampleRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.Example() + ); + client.innerApiCalls.createExample = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createExample( + request, + (err?: Error|null, result?: protos.google.cloud.dialogflow.cx.v3.IExample|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createExample as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createExample as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createExample with error', async () => { + const client = new examplesModule.v3.ExamplesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.CreateExampleRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.CreateExampleRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createExample = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.createExample(request), expectedError); + const actualRequest = (client.innerApiCalls.createExample as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createExample as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createExample with closed client', async () => { + const client = new examplesModule.v3.ExamplesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.CreateExampleRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.CreateExampleRequest', ['parent']); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.createExample(request), expectedError); + }); + }); + + describe('deleteExample', () => { + it('invokes deleteExample without error', async () => { + const client = new examplesModule.v3.ExamplesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.DeleteExampleRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.DeleteExampleRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteExample = stubSimpleCall(expectedResponse); + const [response] = await client.deleteExample(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteExample as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteExample as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteExample without error using callback', async () => { + const client = new examplesModule.v3.ExamplesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.DeleteExampleRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.DeleteExampleRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteExample = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteExample( + request, + (err?: Error|null, result?: protos.google.protobuf.IEmpty|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteExample as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteExample as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteExample with error', async () => { + const client = new examplesModule.v3.ExamplesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.DeleteExampleRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.DeleteExampleRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteExample = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.deleteExample(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteExample as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteExample as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteExample with closed client', async () => { + const client = new examplesModule.v3.ExamplesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.DeleteExampleRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.DeleteExampleRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.deleteExample(request), expectedError); + }); + }); + + describe('getExample', () => { + it('invokes getExample without error', async () => { + const client = new examplesModule.v3.ExamplesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.GetExampleRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.GetExampleRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.Example() + ); + client.innerApiCalls.getExample = stubSimpleCall(expectedResponse); + const [response] = await client.getExample(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getExample as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getExample as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getExample without error using callback', async () => { + const client = new examplesModule.v3.ExamplesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.GetExampleRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.GetExampleRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.Example() + ); + client.innerApiCalls.getExample = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getExample( + request, + (err?: Error|null, result?: protos.google.cloud.dialogflow.cx.v3.IExample|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getExample as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getExample as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getExample with error', async () => { + const client = new examplesModule.v3.ExamplesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.GetExampleRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.GetExampleRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getExample = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getExample(request), expectedError); + const actualRequest = (client.innerApiCalls.getExample as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getExample as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getExample with closed client', async () => { + const client = new examplesModule.v3.ExamplesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.GetExampleRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.GetExampleRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getExample(request), expectedError); + }); + }); + + describe('updateExample', () => { + it('invokes updateExample without error', async () => { + const client = new examplesModule.v3.ExamplesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.UpdateExampleRequest() + ); + request.example ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.UpdateExampleRequest', ['example', 'name']); + request.example.name = defaultValue1; + const expectedHeaderRequestParams = `example.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.Example() + ); + client.innerApiCalls.updateExample = stubSimpleCall(expectedResponse); + const [response] = await client.updateExample(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateExample as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateExample as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateExample without error using callback', async () => { + const client = new examplesModule.v3.ExamplesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.UpdateExampleRequest() + ); + request.example ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.UpdateExampleRequest', ['example', 'name']); + request.example.name = defaultValue1; + const expectedHeaderRequestParams = `example.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.Example() + ); + client.innerApiCalls.updateExample = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateExample( + request, + (err?: Error|null, result?: protos.google.cloud.dialogflow.cx.v3.IExample|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateExample as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateExample as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateExample with error', async () => { + const client = new examplesModule.v3.ExamplesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.UpdateExampleRequest() + ); + request.example ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.UpdateExampleRequest', ['example', 'name']); + request.example.name = defaultValue1; + const expectedHeaderRequestParams = `example.name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateExample = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.updateExample(request), expectedError); + const actualRequest = (client.innerApiCalls.updateExample as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateExample as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateExample with closed client', async () => { + const client = new examplesModule.v3.ExamplesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.UpdateExampleRequest() + ); + request.example ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.UpdateExampleRequest', ['example', 'name']); + request.example.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.updateExample(request), expectedError); + }); + }); + + describe('listExamples', () => { + it('invokes listExamples without error', async () => { + const client = new examplesModule.v3.ExamplesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.ListExamplesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.ListExamplesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dialogflow.cx.v3.Example()), + generateSampleMessage(new protos.google.cloud.dialogflow.cx.v3.Example()), + generateSampleMessage(new protos.google.cloud.dialogflow.cx.v3.Example()), + ]; + client.innerApiCalls.listExamples = stubSimpleCall(expectedResponse); + const [response] = await client.listExamples(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listExamples as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listExamples as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listExamples without error using callback', async () => { + const client = new examplesModule.v3.ExamplesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.ListExamplesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.ListExamplesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dialogflow.cx.v3.Example()), + generateSampleMessage(new protos.google.cloud.dialogflow.cx.v3.Example()), + generateSampleMessage(new protos.google.cloud.dialogflow.cx.v3.Example()), + ]; + client.innerApiCalls.listExamples = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listExamples( + request, + (err?: Error|null, result?: protos.google.cloud.dialogflow.cx.v3.IExample[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listExamples as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listExamples as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listExamples with error', async () => { + const client = new examplesModule.v3.ExamplesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.ListExamplesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.ListExamplesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listExamples = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listExamples(request), expectedError); + const actualRequest = (client.innerApiCalls.listExamples as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listExamples as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listExamplesStream without error', async () => { + const client = new examplesModule.v3.ExamplesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.ListExamplesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.ListExamplesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dialogflow.cx.v3.Example()), + generateSampleMessage(new protos.google.cloud.dialogflow.cx.v3.Example()), + generateSampleMessage(new protos.google.cloud.dialogflow.cx.v3.Example()), + ]; + client.descriptors.page.listExamples.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listExamplesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dialogflow.cx.v3.Example[] = []; + stream.on('data', (response: protos.google.cloud.dialogflow.cx.v3.Example) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert((client.descriptors.page.listExamples.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listExamples, request)); + assert( + (client.descriptors.page.listExamples.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listExamplesStream with error', async () => { + const client = new examplesModule.v3.ExamplesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.ListExamplesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.ListExamplesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listExamples.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listExamplesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dialogflow.cx.v3.Example[] = []; + stream.on('data', (response: protos.google.cloud.dialogflow.cx.v3.Example) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listExamples.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listExamples, request)); + assert( + (client.descriptors.page.listExamples.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listExamples without error', async () => { + const client = new examplesModule.v3.ExamplesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.ListExamplesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.ListExamplesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dialogflow.cx.v3.Example()), + generateSampleMessage(new protos.google.cloud.dialogflow.cx.v3.Example()), + generateSampleMessage(new protos.google.cloud.dialogflow.cx.v3.Example()), + ]; + client.descriptors.page.listExamples.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dialogflow.cx.v3.IExample[] = []; + const iterable = client.listExamplesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listExamples.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listExamples.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listExamples with error', async () => { + const client = new examplesModule.v3.ExamplesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.ListExamplesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.ListExamplesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listExamples.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listExamplesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dialogflow.cx.v3.IExample[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listExamples.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listExamples.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + describe('getLocation', () => { + it('invokes getLocation without error', async () => { + const client = new examplesModule.v3.ExamplesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = stubSimpleCall(expectedResponse); + const response = await client.getLocation(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.locationsClient.getLocation as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + it('invokes getLocation without error using callback', async () => { + const client = new examplesModule.v3.ExamplesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getLocation( + request, + expectedOptions, + ( + err?: Error | null, + result?: LocationProtos.google.cloud.location.ILocation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.locationsClient.getLocation as SinonStub) + .getCall(0)); + }); + it('invokes getLocation with error', async () => { + const client = new examplesModule.v3.ExamplesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.locationsClient.getLocation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getLocation(request, expectedOptions), expectedError); + assert((client.locationsClient.getLocation as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + }); + describe('listLocationsAsync', () => { + it('uses async iteration with listLocations without error', async () => { + const client = new examplesModule.v3.ExamplesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + ]; + client.locationsClient.descriptors.page.listLocations.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + const iterable = client.listLocationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + it('uses async iteration with listLocations with error', async () => { + const client = new examplesModule.v3.ExamplesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.locationsClient.descriptors.page.listLocations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listLocationsAsync(request); + await assert.rejects(async () => { + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + describe('getOperation', () => { + it('invokes getOperation without error', async () => { + const client = new examplesModule.v3.ExamplesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const response = await client.getOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0).calledWith(request) + ); + }); + it('invokes getOperation without error using callback', async () => { + const client = new examplesModule.v3.ExamplesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.getOperation( + request, + undefined, + ( + err?: Error | null, + result?: operationsProtos.google.longrunning.Operation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }).catch(err => {throw err}); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + it('invokes getOperation with error', async () => { + const client = new examplesModule.v3.ExamplesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => {await client.getOperation(request)}, expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0).calledWith(request)); + }); + }); + describe('cancelOperation', () => { + it('invokes cancelOperation without error', async () => { + const client = new examplesModule.v3.ExamplesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = stubSimpleCall(expectedResponse); + const response = await client.cancelOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.operationsClient.cancelOperation as SinonStub) + .getCall(0).calledWith(request) + ); + }); + it('invokes cancelOperation without error using callback', async () => { + const client = new examplesModule.v3.ExamplesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.cancelOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }).catch(err => {throw err}); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.cancelOperation as SinonStub) + .getCall(0)); + }); + it('invokes cancelOperation with error', async () => { + const client = new examplesModule.v3.ExamplesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.cancelOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => {await client.cancelOperation(request)}, expectedError); + assert((client.operationsClient.cancelOperation as SinonStub) + .getCall(0).calledWith(request)); + }); + }); + describe('deleteOperation', () => { + it('invokes deleteOperation without error', async () => { + const client = new examplesModule.v3.ExamplesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = stubSimpleCall(expectedResponse); + const response = await client.deleteOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.operationsClient.deleteOperation as SinonStub) + .getCall(0).calledWith(request) + ); + }); + it('invokes deleteOperation without error using callback', async () => { + const client = new examplesModule.v3.ExamplesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.deleteOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }).catch(err => {throw err}); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.deleteOperation as SinonStub) + .getCall(0)); + }); + it('invokes deleteOperation with error', async () => { + const client = new examplesModule.v3.ExamplesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.deleteOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => {await client.deleteOperation(request)}, expectedError); + assert((client.operationsClient.deleteOperation as SinonStub) + .getCall(0).calledWith(request)); + }); + }); + describe('listOperationsAsync', () => { + it('uses async iteration with listOperations without error', async () => { + const client = new examplesModule.v3.ExamplesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + ]; + client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: operationsProtos.google.longrunning.IOperation[] = []; + const iterable = client.operationsClient.listOperationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.operationsClient.descriptor.listOperations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + }); + it('uses async iteration with listOperations with error', async () => { + const client = new examplesModule.v3.ExamplesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.operationsClient.listOperationsAsync(request); + await assert.rejects(async () => { + const responses: operationsProtos.google.longrunning.IOperation[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.operationsClient.descriptor.listOperations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + }); + }); + + describe('Path templates', () => { + + describe('agent', async () => { + const fakePath = "/rendered/path/agent"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + }; + const client = new examplesModule.v3.ExamplesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.agentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.agentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('agentPath', () => { + const result = client.agentPath("projectValue", "locationValue", "agentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.agentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromAgentName', () => { + const result = client.matchProjectFromAgentName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.agentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromAgentName', () => { + const result = client.matchLocationFromAgentName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.agentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromAgentName', () => { + const result = client.matchAgentFromAgentName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.agentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('agentGenerativeSettings', async () => { + const fakePath = "/rendered/path/agentGenerativeSettings"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + }; + const client = new examplesModule.v3.ExamplesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.agentGenerativeSettingsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.agentGenerativeSettingsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('agentGenerativeSettingsPath', () => { + const result = client.agentGenerativeSettingsPath("projectValue", "locationValue", "agentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.agentGenerativeSettingsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromAgentGenerativeSettingsName', () => { + const result = client.matchProjectFromAgentGenerativeSettingsName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.agentGenerativeSettingsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromAgentGenerativeSettingsName', () => { + const result = client.matchLocationFromAgentGenerativeSettingsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.agentGenerativeSettingsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromAgentGenerativeSettingsName', () => { + const result = client.matchAgentFromAgentGenerativeSettingsName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.agentGenerativeSettingsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('agentValidationResult', async () => { + const fakePath = "/rendered/path/agentValidationResult"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + }; + const client = new examplesModule.v3.ExamplesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.agentValidationResultPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.agentValidationResultPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('agentValidationResultPath', () => { + const result = client.agentValidationResultPath("projectValue", "locationValue", "agentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.agentValidationResultPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromAgentValidationResultName', () => { + const result = client.matchProjectFromAgentValidationResultName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.agentValidationResultPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromAgentValidationResultName', () => { + const result = client.matchLocationFromAgentValidationResultName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.agentValidationResultPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromAgentValidationResultName', () => { + const result = client.matchAgentFromAgentValidationResultName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.agentValidationResultPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('changelog', async () => { + const fakePath = "/rendered/path/changelog"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + changelog: "changelogValue", + }; + const client = new examplesModule.v3.ExamplesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.changelogPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.changelogPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('changelogPath', () => { + const result = client.changelogPath("projectValue", "locationValue", "agentValue", "changelogValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.changelogPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromChangelogName', () => { + const result = client.matchProjectFromChangelogName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.changelogPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromChangelogName', () => { + const result = client.matchLocationFromChangelogName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.changelogPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromChangelogName', () => { + const result = client.matchAgentFromChangelogName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.changelogPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchChangelogFromChangelogName', () => { + const result = client.matchChangelogFromChangelogName(fakePath); + assert.strictEqual(result, "changelogValue"); + assert((client.pathTemplates.changelogPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('continuousTestResult', async () => { + const fakePath = "/rendered/path/continuousTestResult"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + environment: "environmentValue", + continuous_test_result: "continuousTestResultValue", + }; + const client = new examplesModule.v3.ExamplesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.continuousTestResultPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.continuousTestResultPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('continuousTestResultPath', () => { + const result = client.continuousTestResultPath("projectValue", "locationValue", "agentValue", "environmentValue", "continuousTestResultValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.continuousTestResultPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromContinuousTestResultName', () => { + const result = client.matchProjectFromContinuousTestResultName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.continuousTestResultPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromContinuousTestResultName', () => { + const result = client.matchLocationFromContinuousTestResultName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.continuousTestResultPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromContinuousTestResultName', () => { + const result = client.matchAgentFromContinuousTestResultName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.continuousTestResultPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEnvironmentFromContinuousTestResultName', () => { + const result = client.matchEnvironmentFromContinuousTestResultName(fakePath); + assert.strictEqual(result, "environmentValue"); + assert((client.pathTemplates.continuousTestResultPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContinuousTestResultFromContinuousTestResultName', () => { + const result = client.matchContinuousTestResultFromContinuousTestResultName(fakePath); + assert.strictEqual(result, "continuousTestResultValue"); + assert((client.pathTemplates.continuousTestResultPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('deployment', async () => { + const fakePath = "/rendered/path/deployment"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + environment: "environmentValue", + deployment: "deploymentValue", + }; + const client = new examplesModule.v3.ExamplesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deploymentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deploymentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deploymentPath', () => { + const result = client.deploymentPath("projectValue", "locationValue", "agentValue", "environmentValue", "deploymentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deploymentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromDeploymentName', () => { + const result = client.matchProjectFromDeploymentName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.deploymentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromDeploymentName', () => { + const result = client.matchLocationFromDeploymentName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.deploymentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromDeploymentName', () => { + const result = client.matchAgentFromDeploymentName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.deploymentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEnvironmentFromDeploymentName', () => { + const result = client.matchEnvironmentFromDeploymentName(fakePath); + assert.strictEqual(result, "environmentValue"); + assert((client.pathTemplates.deploymentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeploymentFromDeploymentName', () => { + const result = client.matchDeploymentFromDeploymentName(fakePath); + assert.strictEqual(result, "deploymentValue"); + assert((client.pathTemplates.deploymentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('entityType', async () => { + const fakePath = "/rendered/path/entityType"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + entity_type: "entityTypeValue", + }; + const client = new examplesModule.v3.ExamplesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.entityTypePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.entityTypePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('entityTypePath', () => { + const result = client.entityTypePath("projectValue", "locationValue", "agentValue", "entityTypeValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.entityTypePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromEntityTypeName', () => { + const result = client.matchProjectFromEntityTypeName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.entityTypePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromEntityTypeName', () => { + const result = client.matchLocationFromEntityTypeName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.entityTypePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromEntityTypeName', () => { + const result = client.matchAgentFromEntityTypeName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.entityTypePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEntityTypeFromEntityTypeName', () => { + const result = client.matchEntityTypeFromEntityTypeName(fakePath); + assert.strictEqual(result, "entityTypeValue"); + assert((client.pathTemplates.entityTypePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('environment', async () => { + const fakePath = "/rendered/path/environment"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + environment: "environmentValue", + }; + const client = new examplesModule.v3.ExamplesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.environmentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.environmentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('environmentPath', () => { + const result = client.environmentPath("projectValue", "locationValue", "agentValue", "environmentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.environmentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromEnvironmentName', () => { + const result = client.matchProjectFromEnvironmentName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromEnvironmentName', () => { + const result = client.matchLocationFromEnvironmentName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromEnvironmentName', () => { + const result = client.matchAgentFromEnvironmentName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEnvironmentFromEnvironmentName', () => { + const result = client.matchEnvironmentFromEnvironmentName(fakePath); + assert.strictEqual(result, "environmentValue"); + assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('example', async () => { + const fakePath = "/rendered/path/example"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + playbook: "playbookValue", + example: "exampleValue", + }; + const client = new examplesModule.v3.ExamplesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.examplePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.examplePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('examplePath', () => { + const result = client.examplePath("projectValue", "locationValue", "agentValue", "playbookValue", "exampleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.examplePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromExampleName', () => { + const result = client.matchProjectFromExampleName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromExampleName', () => { + const result = client.matchLocationFromExampleName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromExampleName', () => { + const result = client.matchAgentFromExampleName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPlaybookFromExampleName', () => { + const result = client.matchPlaybookFromExampleName(fakePath); + assert.strictEqual(result, "playbookValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchExampleFromExampleName', () => { + const result = client.matchExampleFromExampleName(fakePath); + assert.strictEqual(result, "exampleValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('experiment', async () => { + const fakePath = "/rendered/path/experiment"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + environment: "environmentValue", + experiment: "experimentValue", + }; + const client = new examplesModule.v3.ExamplesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.experimentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.experimentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('experimentPath', () => { + const result = client.experimentPath("projectValue", "locationValue", "agentValue", "environmentValue", "experimentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.experimentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromExperimentName', () => { + const result = client.matchProjectFromExperimentName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromExperimentName', () => { + const result = client.matchLocationFromExperimentName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromExperimentName', () => { + const result = client.matchAgentFromExperimentName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEnvironmentFromExperimentName', () => { + const result = client.matchEnvironmentFromExperimentName(fakePath); + assert.strictEqual(result, "environmentValue"); + assert((client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchExperimentFromExperimentName', () => { + const result = client.matchExperimentFromExperimentName(fakePath); + assert.strictEqual(result, "experimentValue"); + assert((client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('flow', async () => { + const fakePath = "/rendered/path/flow"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + flow: "flowValue", + }; + const client = new examplesModule.v3.ExamplesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.flowPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.flowPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('flowPath', () => { + const result = client.flowPath("projectValue", "locationValue", "agentValue", "flowValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.flowPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromFlowName', () => { + const result = client.matchProjectFromFlowName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.flowPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromFlowName', () => { + const result = client.matchLocationFromFlowName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.flowPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromFlowName', () => { + const result = client.matchAgentFromFlowName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.flowPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFlowFromFlowName', () => { + const result = client.matchFlowFromFlowName(fakePath); + assert.strictEqual(result, "flowValue"); + assert((client.pathTemplates.flowPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('flowValidationResult', async () => { + const fakePath = "/rendered/path/flowValidationResult"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + flow: "flowValue", + }; + const client = new examplesModule.v3.ExamplesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.flowValidationResultPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.flowValidationResultPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('flowValidationResultPath', () => { + const result = client.flowValidationResultPath("projectValue", "locationValue", "agentValue", "flowValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.flowValidationResultPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromFlowValidationResultName', () => { + const result = client.matchProjectFromFlowValidationResultName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.flowValidationResultPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromFlowValidationResultName', () => { + const result = client.matchLocationFromFlowValidationResultName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.flowValidationResultPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromFlowValidationResultName', () => { + const result = client.matchAgentFromFlowValidationResultName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.flowValidationResultPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFlowFromFlowValidationResultName', () => { + const result = client.matchFlowFromFlowValidationResultName(fakePath); + assert.strictEqual(result, "flowValue"); + assert((client.pathTemplates.flowValidationResultPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('generator', async () => { + const fakePath = "/rendered/path/generator"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + generator: "generatorValue", + }; + const client = new examplesModule.v3.ExamplesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.generatorPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.generatorPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('generatorPath', () => { + const result = client.generatorPath("projectValue", "locationValue", "agentValue", "generatorValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.generatorPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromGeneratorName', () => { + const result = client.matchProjectFromGeneratorName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.generatorPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromGeneratorName', () => { + const result = client.matchLocationFromGeneratorName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.generatorPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromGeneratorName', () => { + const result = client.matchAgentFromGeneratorName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.generatorPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchGeneratorFromGeneratorName', () => { + const result = client.matchGeneratorFromGeneratorName(fakePath); + assert.strictEqual(result, "generatorValue"); + assert((client.pathTemplates.generatorPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('intent', async () => { + const fakePath = "/rendered/path/intent"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + intent: "intentValue", + }; + const client = new examplesModule.v3.ExamplesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.intentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.intentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('intentPath', () => { + const result = client.intentPath("projectValue", "locationValue", "agentValue", "intentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.intentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromIntentName', () => { + const result = client.matchProjectFromIntentName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.intentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromIntentName', () => { + const result = client.matchLocationFromIntentName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.intentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromIntentName', () => { + const result = client.matchAgentFromIntentName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.intentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchIntentFromIntentName', () => { + const result = client.matchIntentFromIntentName(fakePath); + assert.strictEqual(result, "intentValue"); + assert((client.pathTemplates.intentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('location', async () => { + const fakePath = "/rendered/path/location"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + }; + const client = new examplesModule.v3.ExamplesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.locationPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.locationPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('locationPath', () => { + const result = client.locationPath("projectValue", "locationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.locationPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromLocationName', () => { + const result = client.matchProjectFromLocationName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromLocationName', () => { + const result = client.matchLocationFromLocationName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('page', async () => { + const fakePath = "/rendered/path/page"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + flow: "flowValue", + page: "pageValue", + }; + const client = new examplesModule.v3.ExamplesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.pagePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.pagePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('pagePath', () => { + const result = client.pagePath("projectValue", "locationValue", "agentValue", "flowValue", "pageValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.pagePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromPageName', () => { + const result = client.matchProjectFromPageName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.pagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromPageName', () => { + const result = client.matchLocationFromPageName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.pagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromPageName', () => { + const result = client.matchAgentFromPageName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.pagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFlowFromPageName', () => { + const result = client.matchFlowFromPageName(fakePath); + assert.strictEqual(result, "flowValue"); + assert((client.pathTemplates.pagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPageFromPageName', () => { + const result = client.matchPageFromPageName(fakePath); + assert.strictEqual(result, "pageValue"); + assert((client.pathTemplates.pagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('playbook', async () => { + const fakePath = "/rendered/path/playbook"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + playbook: "playbookValue", + }; + const client = new examplesModule.v3.ExamplesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.playbookPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.playbookPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('playbookPath', () => { + const result = client.playbookPath("projectValue", "locationValue", "agentValue", "playbookValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.playbookPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromPlaybookName', () => { + const result = client.matchProjectFromPlaybookName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.playbookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromPlaybookName', () => { + const result = client.matchLocationFromPlaybookName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.playbookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromPlaybookName', () => { + const result = client.matchAgentFromPlaybookName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.playbookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPlaybookFromPlaybookName', () => { + const result = client.matchPlaybookFromPlaybookName(fakePath); + assert.strictEqual(result, "playbookValue"); + assert((client.pathTemplates.playbookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('playbookVersion', async () => { + const fakePath = "/rendered/path/playbookVersion"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + playbook: "playbookValue", + version: "versionValue", + }; + const client = new examplesModule.v3.ExamplesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.playbookVersionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.playbookVersionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('playbookVersionPath', () => { + const result = client.playbookVersionPath("projectValue", "locationValue", "agentValue", "playbookValue", "versionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.playbookVersionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromPlaybookVersionName', () => { + const result = client.matchProjectFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromPlaybookVersionName', () => { + const result = client.matchLocationFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromPlaybookVersionName', () => { + const result = client.matchAgentFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPlaybookFromPlaybookVersionName', () => { + const result = client.matchPlaybookFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "playbookValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchVersionFromPlaybookVersionName', () => { + const result = client.matchVersionFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "versionValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('project', async () => { + const fakePath = "/rendered/path/project"; + const expectedParameters = { + project: "projectValue", + }; + const client = new examplesModule.v3.ExamplesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectPath', () => { + const result = client.projectPath("projectValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectName', () => { + const result = client.matchProjectFromProjectName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationAgentEnvironmentSessionEntityType', async () => { + const fakePath = "/rendered/path/projectLocationAgentEnvironmentSessionEntityType"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + environment: "environmentValue", + session: "sessionValue", + entity_type: "entityTypeValue", + }; + const client = new examplesModule.v3.ExamplesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationAgentEnvironmentSessionEntityTypePath', () => { + const result = client.projectLocationAgentEnvironmentSessionEntityTypePath("projectValue", "locationValue", "agentValue", "environmentValue", "sessionValue", "entityTypeValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationAgentEnvironmentSessionEntityTypeName', () => { + const result = client.matchProjectFromProjectLocationAgentEnvironmentSessionEntityTypeName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationAgentEnvironmentSessionEntityTypeName', () => { + const result = client.matchLocationFromProjectLocationAgentEnvironmentSessionEntityTypeName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromProjectLocationAgentEnvironmentSessionEntityTypeName', () => { + const result = client.matchAgentFromProjectLocationAgentEnvironmentSessionEntityTypeName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEnvironmentFromProjectLocationAgentEnvironmentSessionEntityTypeName', () => { + const result = client.matchEnvironmentFromProjectLocationAgentEnvironmentSessionEntityTypeName(fakePath); + assert.strictEqual(result, "environmentValue"); + assert((client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSessionFromProjectLocationAgentEnvironmentSessionEntityTypeName', () => { + const result = client.matchSessionFromProjectLocationAgentEnvironmentSessionEntityTypeName(fakePath); + assert.strictEqual(result, "sessionValue"); + assert((client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEntityTypeFromProjectLocationAgentEnvironmentSessionEntityTypeName', () => { + const result = client.matchEntityTypeFromProjectLocationAgentEnvironmentSessionEntityTypeName(fakePath); + assert.strictEqual(result, "entityTypeValue"); + assert((client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationAgentFlowTransitionRouteGroups', async () => { + const fakePath = "/rendered/path/projectLocationAgentFlowTransitionRouteGroups"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + flow: "flowValue", + transition_route_group: "transitionRouteGroupValue", + }; + const client = new examplesModule.v3.ExamplesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationAgentFlowTransitionRouteGroupsPath', () => { + const result = client.projectLocationAgentFlowTransitionRouteGroupsPath("projectValue", "locationValue", "agentValue", "flowValue", "transitionRouteGroupValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationAgentFlowTransitionRouteGroupsName', () => { + const result = client.matchProjectFromProjectLocationAgentFlowTransitionRouteGroupsName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationAgentFlowTransitionRouteGroupsName', () => { + const result = client.matchLocationFromProjectLocationAgentFlowTransitionRouteGroupsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromProjectLocationAgentFlowTransitionRouteGroupsName', () => { + const result = client.matchAgentFromProjectLocationAgentFlowTransitionRouteGroupsName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFlowFromProjectLocationAgentFlowTransitionRouteGroupsName', () => { + const result = client.matchFlowFromProjectLocationAgentFlowTransitionRouteGroupsName(fakePath); + assert.strictEqual(result, "flowValue"); + assert((client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchTransitionRouteGroupFromProjectLocationAgentFlowTransitionRouteGroupsName', () => { + const result = client.matchTransitionRouteGroupFromProjectLocationAgentFlowTransitionRouteGroupsName(fakePath); + assert.strictEqual(result, "transitionRouteGroupValue"); + assert((client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationAgentSessionEntityType', async () => { + const fakePath = "/rendered/path/projectLocationAgentSessionEntityType"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + session: "sessionValue", + entity_type: "entityTypeValue", + }; + const client = new examplesModule.v3.ExamplesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationAgentSessionEntityTypePath', () => { + const result = client.projectLocationAgentSessionEntityTypePath("projectValue", "locationValue", "agentValue", "sessionValue", "entityTypeValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationAgentSessionEntityTypeName', () => { + const result = client.matchProjectFromProjectLocationAgentSessionEntityTypeName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationAgentSessionEntityTypeName', () => { + const result = client.matchLocationFromProjectLocationAgentSessionEntityTypeName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromProjectLocationAgentSessionEntityTypeName', () => { + const result = client.matchAgentFromProjectLocationAgentSessionEntityTypeName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSessionFromProjectLocationAgentSessionEntityTypeName', () => { + const result = client.matchSessionFromProjectLocationAgentSessionEntityTypeName(fakePath); + assert.strictEqual(result, "sessionValue"); + assert((client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEntityTypeFromProjectLocationAgentSessionEntityTypeName', () => { + const result = client.matchEntityTypeFromProjectLocationAgentSessionEntityTypeName(fakePath); + assert.strictEqual(result, "entityTypeValue"); + assert((client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationAgentTransitionRouteGroups', async () => { + const fakePath = "/rendered/path/projectLocationAgentTransitionRouteGroups"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + transition_route_group: "transitionRouteGroupValue", + }; + const client = new examplesModule.v3.ExamplesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationAgentTransitionRouteGroupsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationAgentTransitionRouteGroupsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationAgentTransitionRouteGroupsPath', () => { + const result = client.projectLocationAgentTransitionRouteGroupsPath("projectValue", "locationValue", "agentValue", "transitionRouteGroupValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationAgentTransitionRouteGroupsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationAgentTransitionRouteGroupsName', () => { + const result = client.matchProjectFromProjectLocationAgentTransitionRouteGroupsName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationAgentTransitionRouteGroupsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationAgentTransitionRouteGroupsName', () => { + const result = client.matchLocationFromProjectLocationAgentTransitionRouteGroupsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationAgentTransitionRouteGroupsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromProjectLocationAgentTransitionRouteGroupsName', () => { + const result = client.matchAgentFromProjectLocationAgentTransitionRouteGroupsName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.projectLocationAgentTransitionRouteGroupsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchTransitionRouteGroupFromProjectLocationAgentTransitionRouteGroupsName', () => { + const result = client.matchTransitionRouteGroupFromProjectLocationAgentTransitionRouteGroupsName(fakePath); + assert.strictEqual(result, "transitionRouteGroupValue"); + assert((client.pathTemplates.projectLocationAgentTransitionRouteGroupsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('securitySettings', async () => { + const fakePath = "/rendered/path/securitySettings"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + security_settings: "securitySettingsValue", + }; + const client = new examplesModule.v3.ExamplesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.securitySettingsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.securitySettingsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('securitySettingsPath', () => { + const result = client.securitySettingsPath("projectValue", "locationValue", "securitySettingsValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.securitySettingsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromSecuritySettingsName', () => { + const result = client.matchProjectFromSecuritySettingsName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.securitySettingsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromSecuritySettingsName', () => { + const result = client.matchLocationFromSecuritySettingsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.securitySettingsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSecuritySettingsFromSecuritySettingsName', () => { + const result = client.matchSecuritySettingsFromSecuritySettingsName(fakePath); + assert.strictEqual(result, "securitySettingsValue"); + assert((client.pathTemplates.securitySettingsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('testCase', async () => { + const fakePath = "/rendered/path/testCase"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + test_case: "testCaseValue", + }; + const client = new examplesModule.v3.ExamplesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.testCasePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.testCasePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('testCasePath', () => { + const result = client.testCasePath("projectValue", "locationValue", "agentValue", "testCaseValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.testCasePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromTestCaseName', () => { + const result = client.matchProjectFromTestCaseName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.testCasePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromTestCaseName', () => { + const result = client.matchLocationFromTestCaseName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.testCasePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromTestCaseName', () => { + const result = client.matchAgentFromTestCaseName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.testCasePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchTestCaseFromTestCaseName', () => { + const result = client.matchTestCaseFromTestCaseName(fakePath); + assert.strictEqual(result, "testCaseValue"); + assert((client.pathTemplates.testCasePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('testCaseResult', async () => { + const fakePath = "/rendered/path/testCaseResult"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + test_case: "testCaseValue", + result: "resultValue", + }; + const client = new examplesModule.v3.ExamplesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.testCaseResultPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.testCaseResultPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('testCaseResultPath', () => { + const result = client.testCaseResultPath("projectValue", "locationValue", "agentValue", "testCaseValue", "resultValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.testCaseResultPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromTestCaseResultName', () => { + const result = client.matchProjectFromTestCaseResultName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.testCaseResultPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromTestCaseResultName', () => { + const result = client.matchLocationFromTestCaseResultName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.testCaseResultPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromTestCaseResultName', () => { + const result = client.matchAgentFromTestCaseResultName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.testCaseResultPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchTestCaseFromTestCaseResultName', () => { + const result = client.matchTestCaseFromTestCaseResultName(fakePath); + assert.strictEqual(result, "testCaseValue"); + assert((client.pathTemplates.testCaseResultPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchResultFromTestCaseResultName', () => { + const result = client.matchResultFromTestCaseResultName(fakePath); + assert.strictEqual(result, "resultValue"); + assert((client.pathTemplates.testCaseResultPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('tool', async () => { + const fakePath = "/rendered/path/tool"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + tool: "toolValue", + }; + const client = new examplesModule.v3.ExamplesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.toolPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.toolPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('toolPath', () => { + const result = client.toolPath("projectValue", "locationValue", "agentValue", "toolValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.toolPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromToolName', () => { + const result = client.matchProjectFromToolName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.toolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromToolName', () => { + const result = client.matchLocationFromToolName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.toolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromToolName', () => { + const result = client.matchAgentFromToolName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.toolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchToolFromToolName', () => { + const result = client.matchToolFromToolName(fakePath); + assert.strictEqual(result, "toolValue"); + assert((client.pathTemplates.toolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('toolVersion', async () => { + const fakePath = "/rendered/path/toolVersion"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + tool: "toolValue", + version: "versionValue", + }; + const client = new examplesModule.v3.ExamplesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.toolVersionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.toolVersionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('toolVersionPath', () => { + const result = client.toolVersionPath("projectValue", "locationValue", "agentValue", "toolValue", "versionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.toolVersionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromToolVersionName', () => { + const result = client.matchProjectFromToolVersionName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromToolVersionName', () => { + const result = client.matchLocationFromToolVersionName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromToolVersionName', () => { + const result = client.matchAgentFromToolVersionName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchToolFromToolVersionName', () => { + const result = client.matchToolFromToolVersionName(fakePath); + assert.strictEqual(result, "toolValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchVersionFromToolVersionName', () => { + const result = client.matchVersionFromToolVersionName(fakePath); + assert.strictEqual(result, "versionValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('version', async () => { + const fakePath = "/rendered/path/version"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + flow: "flowValue", + version: "versionValue", + }; + const client = new examplesModule.v3.ExamplesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.versionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.versionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('versionPath', () => { + const result = client.versionPath("projectValue", "locationValue", "agentValue", "flowValue", "versionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.versionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromVersionName', () => { + const result = client.matchProjectFromVersionName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.versionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromVersionName', () => { + const result = client.matchLocationFromVersionName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.versionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromVersionName', () => { + const result = client.matchAgentFromVersionName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.versionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFlowFromVersionName', () => { + const result = client.matchFlowFromVersionName(fakePath); + assert.strictEqual(result, "flowValue"); + assert((client.pathTemplates.versionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchVersionFromVersionName', () => { + const result = client.matchVersionFromVersionName(fakePath); + assert.strictEqual(result, "versionValue"); + assert((client.pathTemplates.versionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('webhook', async () => { + const fakePath = "/rendered/path/webhook"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + webhook: "webhookValue", + }; + const client = new examplesModule.v3.ExamplesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.webhookPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.webhookPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('webhookPath', () => { + const result = client.webhookPath("projectValue", "locationValue", "agentValue", "webhookValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.webhookPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromWebhookName', () => { + const result = client.matchProjectFromWebhookName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.webhookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromWebhookName', () => { + const result = client.matchLocationFromWebhookName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.webhookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromWebhookName', () => { + const result = client.matchAgentFromWebhookName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.webhookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWebhookFromWebhookName', () => { + const result = client.matchWebhookFromWebhookName(fakePath); + assert.strictEqual(result, "webhookValue"); + assert((client.pathTemplates.webhookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + }); +}); diff --git a/packages/google-cloud-dialogflow-cx/test/gapic_experiments_v3.ts b/packages/google-cloud-dialogflow-cx/test/gapic_experiments_v3.ts index a1199903f35..544310fb229 100644 --- a/packages/google-cloud-dialogflow-cx/test/gapic_experiments_v3.ts +++ b/packages/google-cloud-dialogflow-cx/test/gapic_experiments_v3.ts @@ -2003,6 +2003,68 @@ describe('v3.ExperimentsClient', () => { }); }); + describe('example', async () => { + const fakePath = "/rendered/path/example"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + playbook: "playbookValue", + example: "exampleValue", + }; + const client = new experimentsModule.v3.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.examplePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.examplePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('examplePath', () => { + const result = client.examplePath("projectValue", "locationValue", "agentValue", "playbookValue", "exampleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.examplePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromExampleName', () => { + const result = client.matchProjectFromExampleName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromExampleName', () => { + const result = client.matchLocationFromExampleName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromExampleName', () => { + const result = client.matchAgentFromExampleName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPlaybookFromExampleName', () => { + const result = client.matchPlaybookFromExampleName(fakePath); + assert.strictEqual(result, "playbookValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchExampleFromExampleName', () => { + const result = client.matchExampleFromExampleName(fakePath); + assert.strictEqual(result, "exampleValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('experiment', async () => { const fakePath = "/rendered/path/experiment"; const expectedParameters = { @@ -2381,6 +2443,122 @@ describe('v3.ExperimentsClient', () => { }); }); + describe('playbook', async () => { + const fakePath = "/rendered/path/playbook"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + playbook: "playbookValue", + }; + const client = new experimentsModule.v3.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.playbookPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.playbookPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('playbookPath', () => { + const result = client.playbookPath("projectValue", "locationValue", "agentValue", "playbookValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.playbookPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromPlaybookName', () => { + const result = client.matchProjectFromPlaybookName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.playbookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromPlaybookName', () => { + const result = client.matchLocationFromPlaybookName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.playbookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromPlaybookName', () => { + const result = client.matchAgentFromPlaybookName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.playbookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPlaybookFromPlaybookName', () => { + const result = client.matchPlaybookFromPlaybookName(fakePath); + assert.strictEqual(result, "playbookValue"); + assert((client.pathTemplates.playbookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('playbookVersion', async () => { + const fakePath = "/rendered/path/playbookVersion"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + playbook: "playbookValue", + version: "versionValue", + }; + const client = new experimentsModule.v3.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.playbookVersionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.playbookVersionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('playbookVersionPath', () => { + const result = client.playbookVersionPath("projectValue", "locationValue", "agentValue", "playbookValue", "versionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.playbookVersionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromPlaybookVersionName', () => { + const result = client.matchProjectFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromPlaybookVersionName', () => { + const result = client.matchLocationFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromPlaybookVersionName', () => { + const result = client.matchAgentFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPlaybookFromPlaybookVersionName', () => { + const result = client.matchPlaybookFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "playbookValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchVersionFromPlaybookVersionName', () => { + const result = client.matchVersionFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "versionValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('project', async () => { const fakePath = "/rendered/path/project"; const expectedParameters = { @@ -2821,6 +2999,122 @@ describe('v3.ExperimentsClient', () => { }); }); + describe('tool', async () => { + const fakePath = "/rendered/path/tool"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + tool: "toolValue", + }; + const client = new experimentsModule.v3.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.toolPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.toolPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('toolPath', () => { + const result = client.toolPath("projectValue", "locationValue", "agentValue", "toolValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.toolPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromToolName', () => { + const result = client.matchProjectFromToolName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.toolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromToolName', () => { + const result = client.matchLocationFromToolName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.toolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromToolName', () => { + const result = client.matchAgentFromToolName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.toolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchToolFromToolName', () => { + const result = client.matchToolFromToolName(fakePath); + assert.strictEqual(result, "toolValue"); + assert((client.pathTemplates.toolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('toolVersion', async () => { + const fakePath = "/rendered/path/toolVersion"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + tool: "toolValue", + version: "versionValue", + }; + const client = new experimentsModule.v3.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.toolVersionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.toolVersionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('toolVersionPath', () => { + const result = client.toolVersionPath("projectValue", "locationValue", "agentValue", "toolValue", "versionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.toolVersionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromToolVersionName', () => { + const result = client.matchProjectFromToolVersionName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromToolVersionName', () => { + const result = client.matchLocationFromToolVersionName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromToolVersionName', () => { + const result = client.matchAgentFromToolVersionName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchToolFromToolVersionName', () => { + const result = client.matchToolFromToolVersionName(fakePath); + assert.strictEqual(result, "toolValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchVersionFromToolVersionName', () => { + const result = client.matchVersionFromToolVersionName(fakePath); + assert.strictEqual(result, "versionValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('version', async () => { const fakePath = "/rendered/path/version"; const expectedParameters = { diff --git a/packages/google-cloud-dialogflow-cx/test/gapic_flows_v3.ts b/packages/google-cloud-dialogflow-cx/test/gapic_flows_v3.ts index 782437bc44c..414b62437e1 100644 --- a/packages/google-cloud-dialogflow-cx/test/gapic_flows_v3.ts +++ b/packages/google-cloud-dialogflow-cx/test/gapic_flows_v3.ts @@ -2481,6 +2481,68 @@ describe('v3.FlowsClient', () => { }); }); + describe('example', async () => { + const fakePath = "/rendered/path/example"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + playbook: "playbookValue", + example: "exampleValue", + }; + const client = new flowsModule.v3.FlowsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.examplePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.examplePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('examplePath', () => { + const result = client.examplePath("projectValue", "locationValue", "agentValue", "playbookValue", "exampleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.examplePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromExampleName', () => { + const result = client.matchProjectFromExampleName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromExampleName', () => { + const result = client.matchLocationFromExampleName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromExampleName', () => { + const result = client.matchAgentFromExampleName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPlaybookFromExampleName', () => { + const result = client.matchPlaybookFromExampleName(fakePath); + assert.strictEqual(result, "playbookValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchExampleFromExampleName', () => { + const result = client.matchExampleFromExampleName(fakePath); + assert.strictEqual(result, "exampleValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('experiment', async () => { const fakePath = "/rendered/path/experiment"; const expectedParameters = { @@ -2859,6 +2921,122 @@ describe('v3.FlowsClient', () => { }); }); + describe('playbook', async () => { + const fakePath = "/rendered/path/playbook"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + playbook: "playbookValue", + }; + const client = new flowsModule.v3.FlowsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.playbookPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.playbookPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('playbookPath', () => { + const result = client.playbookPath("projectValue", "locationValue", "agentValue", "playbookValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.playbookPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromPlaybookName', () => { + const result = client.matchProjectFromPlaybookName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.playbookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromPlaybookName', () => { + const result = client.matchLocationFromPlaybookName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.playbookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromPlaybookName', () => { + const result = client.matchAgentFromPlaybookName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.playbookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPlaybookFromPlaybookName', () => { + const result = client.matchPlaybookFromPlaybookName(fakePath); + assert.strictEqual(result, "playbookValue"); + assert((client.pathTemplates.playbookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('playbookVersion', async () => { + const fakePath = "/rendered/path/playbookVersion"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + playbook: "playbookValue", + version: "versionValue", + }; + const client = new flowsModule.v3.FlowsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.playbookVersionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.playbookVersionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('playbookVersionPath', () => { + const result = client.playbookVersionPath("projectValue", "locationValue", "agentValue", "playbookValue", "versionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.playbookVersionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromPlaybookVersionName', () => { + const result = client.matchProjectFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromPlaybookVersionName', () => { + const result = client.matchLocationFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromPlaybookVersionName', () => { + const result = client.matchAgentFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPlaybookFromPlaybookVersionName', () => { + const result = client.matchPlaybookFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "playbookValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchVersionFromPlaybookVersionName', () => { + const result = client.matchVersionFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "versionValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('project', async () => { const fakePath = "/rendered/path/project"; const expectedParameters = { @@ -3299,6 +3477,122 @@ describe('v3.FlowsClient', () => { }); }); + describe('tool', async () => { + const fakePath = "/rendered/path/tool"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + tool: "toolValue", + }; + const client = new flowsModule.v3.FlowsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.toolPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.toolPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('toolPath', () => { + const result = client.toolPath("projectValue", "locationValue", "agentValue", "toolValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.toolPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromToolName', () => { + const result = client.matchProjectFromToolName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.toolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromToolName', () => { + const result = client.matchLocationFromToolName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.toolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromToolName', () => { + const result = client.matchAgentFromToolName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.toolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchToolFromToolName', () => { + const result = client.matchToolFromToolName(fakePath); + assert.strictEqual(result, "toolValue"); + assert((client.pathTemplates.toolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('toolVersion', async () => { + const fakePath = "/rendered/path/toolVersion"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + tool: "toolValue", + version: "versionValue", + }; + const client = new flowsModule.v3.FlowsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.toolVersionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.toolVersionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('toolVersionPath', () => { + const result = client.toolVersionPath("projectValue", "locationValue", "agentValue", "toolValue", "versionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.toolVersionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromToolVersionName', () => { + const result = client.matchProjectFromToolVersionName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromToolVersionName', () => { + const result = client.matchLocationFromToolVersionName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromToolVersionName', () => { + const result = client.matchAgentFromToolVersionName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchToolFromToolVersionName', () => { + const result = client.matchToolFromToolVersionName(fakePath); + assert.strictEqual(result, "toolValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchVersionFromToolVersionName', () => { + const result = client.matchVersionFromToolVersionName(fakePath); + assert.strictEqual(result, "versionValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('version', async () => { const fakePath = "/rendered/path/version"; const expectedParameters = { diff --git a/packages/google-cloud-dialogflow-cx/test/gapic_generators_v3.ts b/packages/google-cloud-dialogflow-cx/test/gapic_generators_v3.ts index f02e3348dc9..5937ee2e7dd 100644 --- a/packages/google-cloud-dialogflow-cx/test/gapic_generators_v3.ts +++ b/packages/google-cloud-dialogflow-cx/test/gapic_generators_v3.ts @@ -1787,6 +1787,68 @@ describe('v3.GeneratorsClient', () => { }); }); + describe('example', async () => { + const fakePath = "/rendered/path/example"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + playbook: "playbookValue", + example: "exampleValue", + }; + const client = new generatorsModule.v3.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.examplePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.examplePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('examplePath', () => { + const result = client.examplePath("projectValue", "locationValue", "agentValue", "playbookValue", "exampleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.examplePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromExampleName', () => { + const result = client.matchProjectFromExampleName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromExampleName', () => { + const result = client.matchLocationFromExampleName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromExampleName', () => { + const result = client.matchAgentFromExampleName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPlaybookFromExampleName', () => { + const result = client.matchPlaybookFromExampleName(fakePath); + assert.strictEqual(result, "playbookValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchExampleFromExampleName', () => { + const result = client.matchExampleFromExampleName(fakePath); + assert.strictEqual(result, "exampleValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('experiment', async () => { const fakePath = "/rendered/path/experiment"; const expectedParameters = { @@ -2165,6 +2227,122 @@ describe('v3.GeneratorsClient', () => { }); }); + describe('playbook', async () => { + const fakePath = "/rendered/path/playbook"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + playbook: "playbookValue", + }; + const client = new generatorsModule.v3.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.playbookPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.playbookPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('playbookPath', () => { + const result = client.playbookPath("projectValue", "locationValue", "agentValue", "playbookValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.playbookPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromPlaybookName', () => { + const result = client.matchProjectFromPlaybookName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.playbookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromPlaybookName', () => { + const result = client.matchLocationFromPlaybookName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.playbookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromPlaybookName', () => { + const result = client.matchAgentFromPlaybookName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.playbookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPlaybookFromPlaybookName', () => { + const result = client.matchPlaybookFromPlaybookName(fakePath); + assert.strictEqual(result, "playbookValue"); + assert((client.pathTemplates.playbookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('playbookVersion', async () => { + const fakePath = "/rendered/path/playbookVersion"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + playbook: "playbookValue", + version: "versionValue", + }; + const client = new generatorsModule.v3.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.playbookVersionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.playbookVersionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('playbookVersionPath', () => { + const result = client.playbookVersionPath("projectValue", "locationValue", "agentValue", "playbookValue", "versionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.playbookVersionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromPlaybookVersionName', () => { + const result = client.matchProjectFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromPlaybookVersionName', () => { + const result = client.matchLocationFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromPlaybookVersionName', () => { + const result = client.matchAgentFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPlaybookFromPlaybookVersionName', () => { + const result = client.matchPlaybookFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "playbookValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchVersionFromPlaybookVersionName', () => { + const result = client.matchVersionFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "versionValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('project', async () => { const fakePath = "/rendered/path/project"; const expectedParameters = { @@ -2605,6 +2783,122 @@ describe('v3.GeneratorsClient', () => { }); }); + describe('tool', async () => { + const fakePath = "/rendered/path/tool"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + tool: "toolValue", + }; + const client = new generatorsModule.v3.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.toolPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.toolPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('toolPath', () => { + const result = client.toolPath("projectValue", "locationValue", "agentValue", "toolValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.toolPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromToolName', () => { + const result = client.matchProjectFromToolName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.toolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromToolName', () => { + const result = client.matchLocationFromToolName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.toolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromToolName', () => { + const result = client.matchAgentFromToolName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.toolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchToolFromToolName', () => { + const result = client.matchToolFromToolName(fakePath); + assert.strictEqual(result, "toolValue"); + assert((client.pathTemplates.toolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('toolVersion', async () => { + const fakePath = "/rendered/path/toolVersion"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + tool: "toolValue", + version: "versionValue", + }; + const client = new generatorsModule.v3.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.toolVersionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.toolVersionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('toolVersionPath', () => { + const result = client.toolVersionPath("projectValue", "locationValue", "agentValue", "toolValue", "versionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.toolVersionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromToolVersionName', () => { + const result = client.matchProjectFromToolVersionName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromToolVersionName', () => { + const result = client.matchLocationFromToolVersionName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromToolVersionName', () => { + const result = client.matchAgentFromToolVersionName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchToolFromToolVersionName', () => { + const result = client.matchToolFromToolVersionName(fakePath); + assert.strictEqual(result, "toolValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchVersionFromToolVersionName', () => { + const result = client.matchVersionFromToolVersionName(fakePath); + assert.strictEqual(result, "versionValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('version', async () => { const fakePath = "/rendered/path/version"; const expectedParameters = { diff --git a/packages/google-cloud-dialogflow-cx/test/gapic_intents_v3.ts b/packages/google-cloud-dialogflow-cx/test/gapic_intents_v3.ts index 16c514bd9b0..191f3957eec 100644 --- a/packages/google-cloud-dialogflow-cx/test/gapic_intents_v3.ts +++ b/packages/google-cloud-dialogflow-cx/test/gapic_intents_v3.ts @@ -2111,6 +2111,68 @@ describe('v3.IntentsClient', () => { }); }); + describe('example', async () => { + const fakePath = "/rendered/path/example"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + playbook: "playbookValue", + example: "exampleValue", + }; + const client = new intentsModule.v3.IntentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.examplePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.examplePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('examplePath', () => { + const result = client.examplePath("projectValue", "locationValue", "agentValue", "playbookValue", "exampleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.examplePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromExampleName', () => { + const result = client.matchProjectFromExampleName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromExampleName', () => { + const result = client.matchLocationFromExampleName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromExampleName', () => { + const result = client.matchAgentFromExampleName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPlaybookFromExampleName', () => { + const result = client.matchPlaybookFromExampleName(fakePath); + assert.strictEqual(result, "playbookValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchExampleFromExampleName', () => { + const result = client.matchExampleFromExampleName(fakePath); + assert.strictEqual(result, "exampleValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('experiment', async () => { const fakePath = "/rendered/path/experiment"; const expectedParameters = { @@ -2489,6 +2551,122 @@ describe('v3.IntentsClient', () => { }); }); + describe('playbook', async () => { + const fakePath = "/rendered/path/playbook"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + playbook: "playbookValue", + }; + const client = new intentsModule.v3.IntentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.playbookPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.playbookPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('playbookPath', () => { + const result = client.playbookPath("projectValue", "locationValue", "agentValue", "playbookValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.playbookPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromPlaybookName', () => { + const result = client.matchProjectFromPlaybookName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.playbookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromPlaybookName', () => { + const result = client.matchLocationFromPlaybookName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.playbookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromPlaybookName', () => { + const result = client.matchAgentFromPlaybookName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.playbookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPlaybookFromPlaybookName', () => { + const result = client.matchPlaybookFromPlaybookName(fakePath); + assert.strictEqual(result, "playbookValue"); + assert((client.pathTemplates.playbookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('playbookVersion', async () => { + const fakePath = "/rendered/path/playbookVersion"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + playbook: "playbookValue", + version: "versionValue", + }; + const client = new intentsModule.v3.IntentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.playbookVersionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.playbookVersionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('playbookVersionPath', () => { + const result = client.playbookVersionPath("projectValue", "locationValue", "agentValue", "playbookValue", "versionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.playbookVersionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromPlaybookVersionName', () => { + const result = client.matchProjectFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromPlaybookVersionName', () => { + const result = client.matchLocationFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromPlaybookVersionName', () => { + const result = client.matchAgentFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPlaybookFromPlaybookVersionName', () => { + const result = client.matchPlaybookFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "playbookValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchVersionFromPlaybookVersionName', () => { + const result = client.matchVersionFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "versionValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('project', async () => { const fakePath = "/rendered/path/project"; const expectedParameters = { @@ -2929,6 +3107,122 @@ describe('v3.IntentsClient', () => { }); }); + describe('tool', async () => { + const fakePath = "/rendered/path/tool"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + tool: "toolValue", + }; + const client = new intentsModule.v3.IntentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.toolPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.toolPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('toolPath', () => { + const result = client.toolPath("projectValue", "locationValue", "agentValue", "toolValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.toolPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromToolName', () => { + const result = client.matchProjectFromToolName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.toolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromToolName', () => { + const result = client.matchLocationFromToolName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.toolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromToolName', () => { + const result = client.matchAgentFromToolName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.toolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchToolFromToolName', () => { + const result = client.matchToolFromToolName(fakePath); + assert.strictEqual(result, "toolValue"); + assert((client.pathTemplates.toolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('toolVersion', async () => { + const fakePath = "/rendered/path/toolVersion"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + tool: "toolValue", + version: "versionValue", + }; + const client = new intentsModule.v3.IntentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.toolVersionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.toolVersionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('toolVersionPath', () => { + const result = client.toolVersionPath("projectValue", "locationValue", "agentValue", "toolValue", "versionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.toolVersionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromToolVersionName', () => { + const result = client.matchProjectFromToolVersionName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromToolVersionName', () => { + const result = client.matchLocationFromToolVersionName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromToolVersionName', () => { + const result = client.matchAgentFromToolVersionName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchToolFromToolVersionName', () => { + const result = client.matchToolFromToolVersionName(fakePath); + assert.strictEqual(result, "toolValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchVersionFromToolVersionName', () => { + const result = client.matchVersionFromToolVersionName(fakePath); + assert.strictEqual(result, "versionValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('version', async () => { const fakePath = "/rendered/path/version"; const expectedParameters = { diff --git a/packages/google-cloud-dialogflow-cx/test/gapic_pages_v3.ts b/packages/google-cloud-dialogflow-cx/test/gapic_pages_v3.ts index f6357f88f60..e6589b78043 100644 --- a/packages/google-cloud-dialogflow-cx/test/gapic_pages_v3.ts +++ b/packages/google-cloud-dialogflow-cx/test/gapic_pages_v3.ts @@ -1787,6 +1787,68 @@ describe('v3.PagesClient', () => { }); }); + describe('example', async () => { + const fakePath = "/rendered/path/example"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + playbook: "playbookValue", + example: "exampleValue", + }; + const client = new pagesModule.v3.PagesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.examplePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.examplePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('examplePath', () => { + const result = client.examplePath("projectValue", "locationValue", "agentValue", "playbookValue", "exampleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.examplePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromExampleName', () => { + const result = client.matchProjectFromExampleName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromExampleName', () => { + const result = client.matchLocationFromExampleName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromExampleName', () => { + const result = client.matchAgentFromExampleName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPlaybookFromExampleName', () => { + const result = client.matchPlaybookFromExampleName(fakePath); + assert.strictEqual(result, "playbookValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchExampleFromExampleName', () => { + const result = client.matchExampleFromExampleName(fakePath); + assert.strictEqual(result, "exampleValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('experiment', async () => { const fakePath = "/rendered/path/experiment"; const expectedParameters = { @@ -2165,6 +2227,122 @@ describe('v3.PagesClient', () => { }); }); + describe('playbook', async () => { + const fakePath = "/rendered/path/playbook"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + playbook: "playbookValue", + }; + const client = new pagesModule.v3.PagesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.playbookPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.playbookPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('playbookPath', () => { + const result = client.playbookPath("projectValue", "locationValue", "agentValue", "playbookValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.playbookPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromPlaybookName', () => { + const result = client.matchProjectFromPlaybookName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.playbookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromPlaybookName', () => { + const result = client.matchLocationFromPlaybookName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.playbookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromPlaybookName', () => { + const result = client.matchAgentFromPlaybookName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.playbookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPlaybookFromPlaybookName', () => { + const result = client.matchPlaybookFromPlaybookName(fakePath); + assert.strictEqual(result, "playbookValue"); + assert((client.pathTemplates.playbookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('playbookVersion', async () => { + const fakePath = "/rendered/path/playbookVersion"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + playbook: "playbookValue", + version: "versionValue", + }; + const client = new pagesModule.v3.PagesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.playbookVersionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.playbookVersionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('playbookVersionPath', () => { + const result = client.playbookVersionPath("projectValue", "locationValue", "agentValue", "playbookValue", "versionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.playbookVersionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromPlaybookVersionName', () => { + const result = client.matchProjectFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromPlaybookVersionName', () => { + const result = client.matchLocationFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromPlaybookVersionName', () => { + const result = client.matchAgentFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPlaybookFromPlaybookVersionName', () => { + const result = client.matchPlaybookFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "playbookValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchVersionFromPlaybookVersionName', () => { + const result = client.matchVersionFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "versionValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('project', async () => { const fakePath = "/rendered/path/project"; const expectedParameters = { @@ -2605,6 +2783,122 @@ describe('v3.PagesClient', () => { }); }); + describe('tool', async () => { + const fakePath = "/rendered/path/tool"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + tool: "toolValue", + }; + const client = new pagesModule.v3.PagesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.toolPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.toolPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('toolPath', () => { + const result = client.toolPath("projectValue", "locationValue", "agentValue", "toolValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.toolPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromToolName', () => { + const result = client.matchProjectFromToolName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.toolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromToolName', () => { + const result = client.matchLocationFromToolName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.toolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromToolName', () => { + const result = client.matchAgentFromToolName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.toolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchToolFromToolName', () => { + const result = client.matchToolFromToolName(fakePath); + assert.strictEqual(result, "toolValue"); + assert((client.pathTemplates.toolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('toolVersion', async () => { + const fakePath = "/rendered/path/toolVersion"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + tool: "toolValue", + version: "versionValue", + }; + const client = new pagesModule.v3.PagesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.toolVersionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.toolVersionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('toolVersionPath', () => { + const result = client.toolVersionPath("projectValue", "locationValue", "agentValue", "toolValue", "versionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.toolVersionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromToolVersionName', () => { + const result = client.matchProjectFromToolVersionName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromToolVersionName', () => { + const result = client.matchLocationFromToolVersionName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromToolVersionName', () => { + const result = client.matchAgentFromToolVersionName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchToolFromToolVersionName', () => { + const result = client.matchToolFromToolVersionName(fakePath); + assert.strictEqual(result, "toolValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchVersionFromToolVersionName', () => { + const result = client.matchVersionFromToolVersionName(fakePath); + assert.strictEqual(result, "versionValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('version', async () => { const fakePath = "/rendered/path/version"; const expectedParameters = { diff --git a/packages/google-cloud-dialogflow-cx/test/gapic_playbooks_v3.ts b/packages/google-cloud-dialogflow-cx/test/gapic_playbooks_v3.ts new file mode 100644 index 00000000000..0046dffc7fb --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/test/gapic_playbooks_v3.ts @@ -0,0 +1,4019 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it} from 'mocha'; +import * as playbooksModule from '../src'; + +import {PassThrough} from 'stream'; + +import {protobuf, LROperation, operationsProtos, LocationProtos} from 'google-gax'; + +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON(require('../protos/protos.json')).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + +function generateSampleMessage(instance: T) { + const filledObject = (instance.constructor as typeof protobuf.Message) + .toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject(filledObject) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error ? sinon.stub().rejects(error) : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback(response?: ResponseType, error?: Error) { + return error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); +} + +function stubLongRunningCall(response?: ResponseType, callError?: Error, lroError?: Error) { + const innerStub = lroError ? sinon.stub().rejects(lroError) : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError ? sinon.stub().rejects(callError) : sinon.stub().resolves([mockOperation]); +} + +function stubLongRunningCallWithCallback(response?: ResponseType, callError?: Error, lroError?: Error) { + const innerStub = lroError ? sinon.stub().rejects(lroError) : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError ? sinon.stub().callsArgWith(2, callError) : sinon.stub().callsArgWith(2, null, mockOperation); +} + +function stubPageStreamingCall(responses?: ResponseType[], error?: Error) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error ? sinon.stub().callsArgWith(2, error) : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { mockStream.write({}); }); + } + setImmediate(() => { mockStream.end(); }); + } else { + setImmediate(() => { mockStream.write({}); }); + setImmediate(() => { mockStream.end(); }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall(responses?: ResponseType[], error?: Error) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + } + }; + } + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v3.PlaybooksClient', () => { + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = new playbooksModule.v3.PlaybooksClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'dialogflow.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new playbooksModule.v3.PlaybooksClient(); + const universeDomain = client.universeDomain; + assert.strictEqual(universeDomain, "googleapis.com"); + }); + + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + it('throws DeprecationWarning if static servicePath is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const servicePath = playbooksModule.v3.PlaybooksClient.servicePath; + assert.strictEqual(servicePath, 'dialogflow.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = playbooksModule.v3.PlaybooksClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'dialogflow.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new playbooksModule.v3.PlaybooksClient({universeDomain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'dialogflow.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new playbooksModule.v3.PlaybooksClient({universe_domain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'dialogflow.example.com'); + }); + + if (typeof process === 'object' && 'env' in process) { + describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { + it('sets apiEndpoint from environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new playbooksModule.v3.PlaybooksClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'dialogflow.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + + it('value configured in code has priority over environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new playbooksModule.v3.PlaybooksClient({universeDomain: 'configured.example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'dialogflow.configured.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + }); + } + it('does not allow setting both universeDomain and universe_domain', () => { + assert.throws(() => { new playbooksModule.v3.PlaybooksClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); + }); + + it('has port', () => { + const port = playbooksModule.v3.PlaybooksClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new playbooksModule.v3.PlaybooksClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new playbooksModule.v3.PlaybooksClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.playbooksStub, undefined); + await client.initialize(); + assert(client.playbooksStub); + }); + + it('has close method for the initialized client', done => { + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize().catch(err => {throw err}); + assert(client.playbooksStub); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has close method for the non-initialized client', done => { + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.playbooksStub, undefined); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); + }); + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error|null, projectId?: string|null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); + }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); + }); + }); + + describe('createPlaybook', () => { + it('invokes createPlaybook without error', async () => { + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.CreatePlaybookRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.CreatePlaybookRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.Playbook() + ); + client.innerApiCalls.createPlaybook = stubSimpleCall(expectedResponse); + const [response] = await client.createPlaybook(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createPlaybook as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createPlaybook as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createPlaybook without error using callback', async () => { + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.CreatePlaybookRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.CreatePlaybookRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.Playbook() + ); + client.innerApiCalls.createPlaybook = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createPlaybook( + request, + (err?: Error|null, result?: protos.google.cloud.dialogflow.cx.v3.IPlaybook|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createPlaybook as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createPlaybook as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createPlaybook with error', async () => { + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.CreatePlaybookRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.CreatePlaybookRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createPlaybook = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.createPlaybook(request), expectedError); + const actualRequest = (client.innerApiCalls.createPlaybook as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createPlaybook as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createPlaybook with closed client', async () => { + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.CreatePlaybookRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.CreatePlaybookRequest', ['parent']); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.createPlaybook(request), expectedError); + }); + }); + + describe('deletePlaybook', () => { + it('invokes deletePlaybook without error', async () => { + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.DeletePlaybookRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.DeletePlaybookRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deletePlaybook = stubSimpleCall(expectedResponse); + const [response] = await client.deletePlaybook(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deletePlaybook as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deletePlaybook as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deletePlaybook without error using callback', async () => { + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.DeletePlaybookRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.DeletePlaybookRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deletePlaybook = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deletePlaybook( + request, + (err?: Error|null, result?: protos.google.protobuf.IEmpty|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deletePlaybook as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deletePlaybook as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deletePlaybook with error', async () => { + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.DeletePlaybookRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.DeletePlaybookRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deletePlaybook = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.deletePlaybook(request), expectedError); + const actualRequest = (client.innerApiCalls.deletePlaybook as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deletePlaybook as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deletePlaybook with closed client', async () => { + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.DeletePlaybookRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.DeletePlaybookRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.deletePlaybook(request), expectedError); + }); + }); + + describe('getPlaybook', () => { + it('invokes getPlaybook without error', async () => { + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.GetPlaybookRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.GetPlaybookRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.Playbook() + ); + client.innerApiCalls.getPlaybook = stubSimpleCall(expectedResponse); + const [response] = await client.getPlaybook(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getPlaybook as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getPlaybook as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getPlaybook without error using callback', async () => { + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.GetPlaybookRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.GetPlaybookRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.Playbook() + ); + client.innerApiCalls.getPlaybook = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getPlaybook( + request, + (err?: Error|null, result?: protos.google.cloud.dialogflow.cx.v3.IPlaybook|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getPlaybook as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getPlaybook as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getPlaybook with error', async () => { + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.GetPlaybookRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.GetPlaybookRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getPlaybook = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getPlaybook(request), expectedError); + const actualRequest = (client.innerApiCalls.getPlaybook as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getPlaybook as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getPlaybook with closed client', async () => { + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.GetPlaybookRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.GetPlaybookRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getPlaybook(request), expectedError); + }); + }); + + describe('updatePlaybook', () => { + it('invokes updatePlaybook without error', async () => { + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest() + ); + request.playbook ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest', ['playbook', 'name']); + request.playbook.name = defaultValue1; + const expectedHeaderRequestParams = `playbook.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.Playbook() + ); + client.innerApiCalls.updatePlaybook = stubSimpleCall(expectedResponse); + const [response] = await client.updatePlaybook(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updatePlaybook as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updatePlaybook as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updatePlaybook without error using callback', async () => { + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest() + ); + request.playbook ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest', ['playbook', 'name']); + request.playbook.name = defaultValue1; + const expectedHeaderRequestParams = `playbook.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.Playbook() + ); + client.innerApiCalls.updatePlaybook = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updatePlaybook( + request, + (err?: Error|null, result?: protos.google.cloud.dialogflow.cx.v3.IPlaybook|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updatePlaybook as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updatePlaybook as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updatePlaybook with error', async () => { + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest() + ); + request.playbook ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest', ['playbook', 'name']); + request.playbook.name = defaultValue1; + const expectedHeaderRequestParams = `playbook.name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.updatePlaybook = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.updatePlaybook(request), expectedError); + const actualRequest = (client.innerApiCalls.updatePlaybook as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updatePlaybook as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updatePlaybook with closed client', async () => { + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest() + ); + request.playbook ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.UpdatePlaybookRequest', ['playbook', 'name']); + request.playbook.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.updatePlaybook(request), expectedError); + }); + }); + + describe('createPlaybookVersion', () => { + it('invokes createPlaybookVersion without error', async () => { + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.PlaybookVersion() + ); + client.innerApiCalls.createPlaybookVersion = stubSimpleCall(expectedResponse); + const [response] = await client.createPlaybookVersion(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createPlaybookVersion as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createPlaybookVersion as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createPlaybookVersion without error using callback', async () => { + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.PlaybookVersion() + ); + client.innerApiCalls.createPlaybookVersion = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createPlaybookVersion( + request, + (err?: Error|null, result?: protos.google.cloud.dialogflow.cx.v3.IPlaybookVersion|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createPlaybookVersion as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createPlaybookVersion as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createPlaybookVersion with error', async () => { + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createPlaybookVersion = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.createPlaybookVersion(request), expectedError); + const actualRequest = (client.innerApiCalls.createPlaybookVersion as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createPlaybookVersion as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createPlaybookVersion with closed client', async () => { + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.CreatePlaybookVersionRequest', ['parent']); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.createPlaybookVersion(request), expectedError); + }); + }); + + describe('getPlaybookVersion', () => { + it('invokes getPlaybookVersion without error', async () => { + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.PlaybookVersion() + ); + client.innerApiCalls.getPlaybookVersion = stubSimpleCall(expectedResponse); + const [response] = await client.getPlaybookVersion(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getPlaybookVersion as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getPlaybookVersion as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getPlaybookVersion without error using callback', async () => { + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.PlaybookVersion() + ); + client.innerApiCalls.getPlaybookVersion = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getPlaybookVersion( + request, + (err?: Error|null, result?: protos.google.cloud.dialogflow.cx.v3.IPlaybookVersion|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getPlaybookVersion as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getPlaybookVersion as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getPlaybookVersion with error', async () => { + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getPlaybookVersion = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getPlaybookVersion(request), expectedError); + const actualRequest = (client.innerApiCalls.getPlaybookVersion as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getPlaybookVersion as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getPlaybookVersion with closed client', async () => { + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.GetPlaybookVersionRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getPlaybookVersion(request), expectedError); + }); + }); + + describe('restorePlaybookVersion', () => { + it('invokes restorePlaybookVersion without error', async () => { + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse() + ); + client.innerApiCalls.restorePlaybookVersion = stubSimpleCall(expectedResponse); + const [response] = await client.restorePlaybookVersion(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.restorePlaybookVersion as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.restorePlaybookVersion as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes restorePlaybookVersion without error using callback', async () => { + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionResponse() + ); + client.innerApiCalls.restorePlaybookVersion = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.restorePlaybookVersion( + request, + (err?: Error|null, result?: protos.google.cloud.dialogflow.cx.v3.IRestorePlaybookVersionResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.restorePlaybookVersion as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.restorePlaybookVersion as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes restorePlaybookVersion with error', async () => { + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.restorePlaybookVersion = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.restorePlaybookVersion(request), expectedError); + const actualRequest = (client.innerApiCalls.restorePlaybookVersion as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.restorePlaybookVersion as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes restorePlaybookVersion with closed client', async () => { + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.RestorePlaybookVersionRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.restorePlaybookVersion(request), expectedError); + }); + }); + + describe('deletePlaybookVersion', () => { + it('invokes deletePlaybookVersion without error', async () => { + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deletePlaybookVersion = stubSimpleCall(expectedResponse); + const [response] = await client.deletePlaybookVersion(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deletePlaybookVersion as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deletePlaybookVersion as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deletePlaybookVersion without error using callback', async () => { + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deletePlaybookVersion = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deletePlaybookVersion( + request, + (err?: Error|null, result?: protos.google.protobuf.IEmpty|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deletePlaybookVersion as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deletePlaybookVersion as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deletePlaybookVersion with error', async () => { + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deletePlaybookVersion = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.deletePlaybookVersion(request), expectedError); + const actualRequest = (client.innerApiCalls.deletePlaybookVersion as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deletePlaybookVersion as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deletePlaybookVersion with closed client', async () => { + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.DeletePlaybookVersionRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.deletePlaybookVersion(request), expectedError); + }); + }); + + describe('exportPlaybook', () => { + it('invokes exportPlaybook without error', async () => { + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.ExportPlaybookRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.ExportPlaybookRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.exportPlaybook = stubLongRunningCall(expectedResponse); + const [operation] = await client.exportPlaybook(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.exportPlaybook as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.exportPlaybook as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes exportPlaybook without error using callback', async () => { + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.ExportPlaybookRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.ExportPlaybookRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.exportPlaybook = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.exportPlaybook( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.exportPlaybook as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.exportPlaybook as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes exportPlaybook with call error', async () => { + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.ExportPlaybookRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.ExportPlaybookRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.exportPlaybook = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.exportPlaybook(request), expectedError); + const actualRequest = (client.innerApiCalls.exportPlaybook as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.exportPlaybook as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes exportPlaybook with LRO error', async () => { + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.ExportPlaybookRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.ExportPlaybookRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.exportPlaybook = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.exportPlaybook(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.exportPlaybook as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.exportPlaybook as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkExportPlaybookProgress without error', async () => { + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkExportPlaybookProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkExportPlaybookProgress with error', async () => { + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkExportPlaybookProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('importPlaybook', () => { + it('invokes importPlaybook without error', async () => { + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.ImportPlaybookRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.ImportPlaybookRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.importPlaybook = stubLongRunningCall(expectedResponse); + const [operation] = await client.importPlaybook(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.importPlaybook as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.importPlaybook as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes importPlaybook without error using callback', async () => { + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.ImportPlaybookRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.ImportPlaybookRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.importPlaybook = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.importPlaybook( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.importPlaybook as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.importPlaybook as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes importPlaybook with call error', async () => { + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.ImportPlaybookRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.ImportPlaybookRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.importPlaybook = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.importPlaybook(request), expectedError); + const actualRequest = (client.innerApiCalls.importPlaybook as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.importPlaybook as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes importPlaybook with LRO error', async () => { + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.ImportPlaybookRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.ImportPlaybookRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.importPlaybook = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.importPlaybook(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.importPlaybook as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.importPlaybook as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkImportPlaybookProgress without error', async () => { + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkImportPlaybookProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkImportPlaybookProgress with error', async () => { + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkImportPlaybookProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('listPlaybooks', () => { + it('invokes listPlaybooks without error', async () => { + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.ListPlaybooksRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.ListPlaybooksRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dialogflow.cx.v3.Playbook()), + generateSampleMessage(new protos.google.cloud.dialogflow.cx.v3.Playbook()), + generateSampleMessage(new protos.google.cloud.dialogflow.cx.v3.Playbook()), + ]; + client.innerApiCalls.listPlaybooks = stubSimpleCall(expectedResponse); + const [response] = await client.listPlaybooks(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listPlaybooks as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listPlaybooks as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listPlaybooks without error using callback', async () => { + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.ListPlaybooksRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.ListPlaybooksRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dialogflow.cx.v3.Playbook()), + generateSampleMessage(new protos.google.cloud.dialogflow.cx.v3.Playbook()), + generateSampleMessage(new protos.google.cloud.dialogflow.cx.v3.Playbook()), + ]; + client.innerApiCalls.listPlaybooks = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listPlaybooks( + request, + (err?: Error|null, result?: protos.google.cloud.dialogflow.cx.v3.IPlaybook[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listPlaybooks as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listPlaybooks as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listPlaybooks with error', async () => { + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.ListPlaybooksRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.ListPlaybooksRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listPlaybooks = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listPlaybooks(request), expectedError); + const actualRequest = (client.innerApiCalls.listPlaybooks as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listPlaybooks as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listPlaybooksStream without error', async () => { + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.ListPlaybooksRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.ListPlaybooksRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dialogflow.cx.v3.Playbook()), + generateSampleMessage(new protos.google.cloud.dialogflow.cx.v3.Playbook()), + generateSampleMessage(new protos.google.cloud.dialogflow.cx.v3.Playbook()), + ]; + client.descriptors.page.listPlaybooks.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listPlaybooksStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dialogflow.cx.v3.Playbook[] = []; + stream.on('data', (response: protos.google.cloud.dialogflow.cx.v3.Playbook) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert((client.descriptors.page.listPlaybooks.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listPlaybooks, request)); + assert( + (client.descriptors.page.listPlaybooks.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listPlaybooksStream with error', async () => { + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.ListPlaybooksRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.ListPlaybooksRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listPlaybooks.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listPlaybooksStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dialogflow.cx.v3.Playbook[] = []; + stream.on('data', (response: protos.google.cloud.dialogflow.cx.v3.Playbook) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listPlaybooks.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listPlaybooks, request)); + assert( + (client.descriptors.page.listPlaybooks.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listPlaybooks without error', async () => { + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.ListPlaybooksRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.ListPlaybooksRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dialogflow.cx.v3.Playbook()), + generateSampleMessage(new protos.google.cloud.dialogflow.cx.v3.Playbook()), + generateSampleMessage(new protos.google.cloud.dialogflow.cx.v3.Playbook()), + ]; + client.descriptors.page.listPlaybooks.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dialogflow.cx.v3.IPlaybook[] = []; + const iterable = client.listPlaybooksAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listPlaybooks.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listPlaybooks.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listPlaybooks with error', async () => { + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.ListPlaybooksRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.ListPlaybooksRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listPlaybooks.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listPlaybooksAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dialogflow.cx.v3.IPlaybook[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listPlaybooks.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listPlaybooks.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listPlaybookVersions', () => { + it('invokes listPlaybookVersions without error', async () => { + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dialogflow.cx.v3.PlaybookVersion()), + generateSampleMessage(new protos.google.cloud.dialogflow.cx.v3.PlaybookVersion()), + generateSampleMessage(new protos.google.cloud.dialogflow.cx.v3.PlaybookVersion()), + ]; + client.innerApiCalls.listPlaybookVersions = stubSimpleCall(expectedResponse); + const [response] = await client.listPlaybookVersions(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listPlaybookVersions as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listPlaybookVersions as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listPlaybookVersions without error using callback', async () => { + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dialogflow.cx.v3.PlaybookVersion()), + generateSampleMessage(new protos.google.cloud.dialogflow.cx.v3.PlaybookVersion()), + generateSampleMessage(new protos.google.cloud.dialogflow.cx.v3.PlaybookVersion()), + ]; + client.innerApiCalls.listPlaybookVersions = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listPlaybookVersions( + request, + (err?: Error|null, result?: protos.google.cloud.dialogflow.cx.v3.IPlaybookVersion[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listPlaybookVersions as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listPlaybookVersions as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listPlaybookVersions with error', async () => { + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listPlaybookVersions = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listPlaybookVersions(request), expectedError); + const actualRequest = (client.innerApiCalls.listPlaybookVersions as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listPlaybookVersions as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listPlaybookVersionsStream without error', async () => { + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dialogflow.cx.v3.PlaybookVersion()), + generateSampleMessage(new protos.google.cloud.dialogflow.cx.v3.PlaybookVersion()), + generateSampleMessage(new protos.google.cloud.dialogflow.cx.v3.PlaybookVersion()), + ]; + client.descriptors.page.listPlaybookVersions.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listPlaybookVersionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dialogflow.cx.v3.PlaybookVersion[] = []; + stream.on('data', (response: protos.google.cloud.dialogflow.cx.v3.PlaybookVersion) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert((client.descriptors.page.listPlaybookVersions.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listPlaybookVersions, request)); + assert( + (client.descriptors.page.listPlaybookVersions.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listPlaybookVersionsStream with error', async () => { + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listPlaybookVersions.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listPlaybookVersionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dialogflow.cx.v3.PlaybookVersion[] = []; + stream.on('data', (response: protos.google.cloud.dialogflow.cx.v3.PlaybookVersion) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listPlaybookVersions.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listPlaybookVersions, request)); + assert( + (client.descriptors.page.listPlaybookVersions.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listPlaybookVersions without error', async () => { + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dialogflow.cx.v3.PlaybookVersion()), + generateSampleMessage(new protos.google.cloud.dialogflow.cx.v3.PlaybookVersion()), + generateSampleMessage(new protos.google.cloud.dialogflow.cx.v3.PlaybookVersion()), + ]; + client.descriptors.page.listPlaybookVersions.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dialogflow.cx.v3.IPlaybookVersion[] = []; + const iterable = client.listPlaybookVersionsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listPlaybookVersions.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listPlaybookVersions.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listPlaybookVersions with error', async () => { + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.ListPlaybookVersionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listPlaybookVersions.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listPlaybookVersionsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dialogflow.cx.v3.IPlaybookVersion[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listPlaybookVersions.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listPlaybookVersions.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + describe('getLocation', () => { + it('invokes getLocation without error', async () => { + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = stubSimpleCall(expectedResponse); + const response = await client.getLocation(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.locationsClient.getLocation as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + it('invokes getLocation without error using callback', async () => { + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getLocation( + request, + expectedOptions, + ( + err?: Error | null, + result?: LocationProtos.google.cloud.location.ILocation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.locationsClient.getLocation as SinonStub) + .getCall(0)); + }); + it('invokes getLocation with error', async () => { + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.locationsClient.getLocation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getLocation(request, expectedOptions), expectedError); + assert((client.locationsClient.getLocation as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + }); + describe('listLocationsAsync', () => { + it('uses async iteration with listLocations without error', async () => { + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + ]; + client.locationsClient.descriptors.page.listLocations.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + const iterable = client.listLocationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + it('uses async iteration with listLocations with error', async () => { + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.locationsClient.descriptors.page.listLocations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listLocationsAsync(request); + await assert.rejects(async () => { + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + describe('getOperation', () => { + it('invokes getOperation without error', async () => { + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const response = await client.getOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0).calledWith(request) + ); + }); + it('invokes getOperation without error using callback', async () => { + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.getOperation( + request, + undefined, + ( + err?: Error | null, + result?: operationsProtos.google.longrunning.Operation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }).catch(err => {throw err}); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + it('invokes getOperation with error', async () => { + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => {await client.getOperation(request)}, expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0).calledWith(request)); + }); + }); + describe('cancelOperation', () => { + it('invokes cancelOperation without error', async () => { + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = stubSimpleCall(expectedResponse); + const response = await client.cancelOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.operationsClient.cancelOperation as SinonStub) + .getCall(0).calledWith(request) + ); + }); + it('invokes cancelOperation without error using callback', async () => { + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.cancelOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }).catch(err => {throw err}); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.cancelOperation as SinonStub) + .getCall(0)); + }); + it('invokes cancelOperation with error', async () => { + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.cancelOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => {await client.cancelOperation(request)}, expectedError); + assert((client.operationsClient.cancelOperation as SinonStub) + .getCall(0).calledWith(request)); + }); + }); + describe('deleteOperation', () => { + it('invokes deleteOperation without error', async () => { + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = stubSimpleCall(expectedResponse); + const response = await client.deleteOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.operationsClient.deleteOperation as SinonStub) + .getCall(0).calledWith(request) + ); + }); + it('invokes deleteOperation without error using callback', async () => { + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.deleteOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }).catch(err => {throw err}); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.deleteOperation as SinonStub) + .getCall(0)); + }); + it('invokes deleteOperation with error', async () => { + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.deleteOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => {await client.deleteOperation(request)}, expectedError); + assert((client.operationsClient.deleteOperation as SinonStub) + .getCall(0).calledWith(request)); + }); + }); + describe('listOperationsAsync', () => { + it('uses async iteration with listOperations without error', async () => { + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + ]; + client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: operationsProtos.google.longrunning.IOperation[] = []; + const iterable = client.operationsClient.listOperationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.operationsClient.descriptor.listOperations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + }); + it('uses async iteration with listOperations with error', async () => { + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.operationsClient.listOperationsAsync(request); + await assert.rejects(async () => { + const responses: operationsProtos.google.longrunning.IOperation[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.operationsClient.descriptor.listOperations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + }); + }); + + describe('Path templates', () => { + + describe('agent', async () => { + const fakePath = "/rendered/path/agent"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + }; + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.agentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.agentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('agentPath', () => { + const result = client.agentPath("projectValue", "locationValue", "agentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.agentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromAgentName', () => { + const result = client.matchProjectFromAgentName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.agentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromAgentName', () => { + const result = client.matchLocationFromAgentName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.agentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromAgentName', () => { + const result = client.matchAgentFromAgentName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.agentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('agentGenerativeSettings', async () => { + const fakePath = "/rendered/path/agentGenerativeSettings"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + }; + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.agentGenerativeSettingsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.agentGenerativeSettingsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('agentGenerativeSettingsPath', () => { + const result = client.agentGenerativeSettingsPath("projectValue", "locationValue", "agentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.agentGenerativeSettingsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromAgentGenerativeSettingsName', () => { + const result = client.matchProjectFromAgentGenerativeSettingsName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.agentGenerativeSettingsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromAgentGenerativeSettingsName', () => { + const result = client.matchLocationFromAgentGenerativeSettingsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.agentGenerativeSettingsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromAgentGenerativeSettingsName', () => { + const result = client.matchAgentFromAgentGenerativeSettingsName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.agentGenerativeSettingsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('agentValidationResult', async () => { + const fakePath = "/rendered/path/agentValidationResult"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + }; + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.agentValidationResultPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.agentValidationResultPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('agentValidationResultPath', () => { + const result = client.agentValidationResultPath("projectValue", "locationValue", "agentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.agentValidationResultPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromAgentValidationResultName', () => { + const result = client.matchProjectFromAgentValidationResultName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.agentValidationResultPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromAgentValidationResultName', () => { + const result = client.matchLocationFromAgentValidationResultName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.agentValidationResultPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromAgentValidationResultName', () => { + const result = client.matchAgentFromAgentValidationResultName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.agentValidationResultPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('changelog', async () => { + const fakePath = "/rendered/path/changelog"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + changelog: "changelogValue", + }; + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.changelogPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.changelogPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('changelogPath', () => { + const result = client.changelogPath("projectValue", "locationValue", "agentValue", "changelogValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.changelogPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromChangelogName', () => { + const result = client.matchProjectFromChangelogName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.changelogPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromChangelogName', () => { + const result = client.matchLocationFromChangelogName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.changelogPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromChangelogName', () => { + const result = client.matchAgentFromChangelogName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.changelogPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchChangelogFromChangelogName', () => { + const result = client.matchChangelogFromChangelogName(fakePath); + assert.strictEqual(result, "changelogValue"); + assert((client.pathTemplates.changelogPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('continuousTestResult', async () => { + const fakePath = "/rendered/path/continuousTestResult"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + environment: "environmentValue", + continuous_test_result: "continuousTestResultValue", + }; + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.continuousTestResultPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.continuousTestResultPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('continuousTestResultPath', () => { + const result = client.continuousTestResultPath("projectValue", "locationValue", "agentValue", "environmentValue", "continuousTestResultValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.continuousTestResultPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromContinuousTestResultName', () => { + const result = client.matchProjectFromContinuousTestResultName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.continuousTestResultPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromContinuousTestResultName', () => { + const result = client.matchLocationFromContinuousTestResultName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.continuousTestResultPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromContinuousTestResultName', () => { + const result = client.matchAgentFromContinuousTestResultName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.continuousTestResultPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEnvironmentFromContinuousTestResultName', () => { + const result = client.matchEnvironmentFromContinuousTestResultName(fakePath); + assert.strictEqual(result, "environmentValue"); + assert((client.pathTemplates.continuousTestResultPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContinuousTestResultFromContinuousTestResultName', () => { + const result = client.matchContinuousTestResultFromContinuousTestResultName(fakePath); + assert.strictEqual(result, "continuousTestResultValue"); + assert((client.pathTemplates.continuousTestResultPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('deployment', async () => { + const fakePath = "/rendered/path/deployment"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + environment: "environmentValue", + deployment: "deploymentValue", + }; + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deploymentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deploymentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deploymentPath', () => { + const result = client.deploymentPath("projectValue", "locationValue", "agentValue", "environmentValue", "deploymentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deploymentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromDeploymentName', () => { + const result = client.matchProjectFromDeploymentName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.deploymentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromDeploymentName', () => { + const result = client.matchLocationFromDeploymentName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.deploymentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromDeploymentName', () => { + const result = client.matchAgentFromDeploymentName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.deploymentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEnvironmentFromDeploymentName', () => { + const result = client.matchEnvironmentFromDeploymentName(fakePath); + assert.strictEqual(result, "environmentValue"); + assert((client.pathTemplates.deploymentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeploymentFromDeploymentName', () => { + const result = client.matchDeploymentFromDeploymentName(fakePath); + assert.strictEqual(result, "deploymentValue"); + assert((client.pathTemplates.deploymentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('entityType', async () => { + const fakePath = "/rendered/path/entityType"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + entity_type: "entityTypeValue", + }; + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.entityTypePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.entityTypePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('entityTypePath', () => { + const result = client.entityTypePath("projectValue", "locationValue", "agentValue", "entityTypeValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.entityTypePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromEntityTypeName', () => { + const result = client.matchProjectFromEntityTypeName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.entityTypePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromEntityTypeName', () => { + const result = client.matchLocationFromEntityTypeName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.entityTypePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromEntityTypeName', () => { + const result = client.matchAgentFromEntityTypeName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.entityTypePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEntityTypeFromEntityTypeName', () => { + const result = client.matchEntityTypeFromEntityTypeName(fakePath); + assert.strictEqual(result, "entityTypeValue"); + assert((client.pathTemplates.entityTypePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('environment', async () => { + const fakePath = "/rendered/path/environment"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + environment: "environmentValue", + }; + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.environmentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.environmentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('environmentPath', () => { + const result = client.environmentPath("projectValue", "locationValue", "agentValue", "environmentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.environmentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromEnvironmentName', () => { + const result = client.matchProjectFromEnvironmentName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromEnvironmentName', () => { + const result = client.matchLocationFromEnvironmentName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromEnvironmentName', () => { + const result = client.matchAgentFromEnvironmentName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEnvironmentFromEnvironmentName', () => { + const result = client.matchEnvironmentFromEnvironmentName(fakePath); + assert.strictEqual(result, "environmentValue"); + assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('example', async () => { + const fakePath = "/rendered/path/example"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + playbook: "playbookValue", + example: "exampleValue", + }; + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.examplePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.examplePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('examplePath', () => { + const result = client.examplePath("projectValue", "locationValue", "agentValue", "playbookValue", "exampleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.examplePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromExampleName', () => { + const result = client.matchProjectFromExampleName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromExampleName', () => { + const result = client.matchLocationFromExampleName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromExampleName', () => { + const result = client.matchAgentFromExampleName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPlaybookFromExampleName', () => { + const result = client.matchPlaybookFromExampleName(fakePath); + assert.strictEqual(result, "playbookValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchExampleFromExampleName', () => { + const result = client.matchExampleFromExampleName(fakePath); + assert.strictEqual(result, "exampleValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('experiment', async () => { + const fakePath = "/rendered/path/experiment"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + environment: "environmentValue", + experiment: "experimentValue", + }; + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.experimentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.experimentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('experimentPath', () => { + const result = client.experimentPath("projectValue", "locationValue", "agentValue", "environmentValue", "experimentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.experimentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromExperimentName', () => { + const result = client.matchProjectFromExperimentName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromExperimentName', () => { + const result = client.matchLocationFromExperimentName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromExperimentName', () => { + const result = client.matchAgentFromExperimentName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEnvironmentFromExperimentName', () => { + const result = client.matchEnvironmentFromExperimentName(fakePath); + assert.strictEqual(result, "environmentValue"); + assert((client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchExperimentFromExperimentName', () => { + const result = client.matchExperimentFromExperimentName(fakePath); + assert.strictEqual(result, "experimentValue"); + assert((client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('flow', async () => { + const fakePath = "/rendered/path/flow"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + flow: "flowValue", + }; + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.flowPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.flowPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('flowPath', () => { + const result = client.flowPath("projectValue", "locationValue", "agentValue", "flowValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.flowPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromFlowName', () => { + const result = client.matchProjectFromFlowName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.flowPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromFlowName', () => { + const result = client.matchLocationFromFlowName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.flowPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromFlowName', () => { + const result = client.matchAgentFromFlowName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.flowPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFlowFromFlowName', () => { + const result = client.matchFlowFromFlowName(fakePath); + assert.strictEqual(result, "flowValue"); + assert((client.pathTemplates.flowPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('flowValidationResult', async () => { + const fakePath = "/rendered/path/flowValidationResult"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + flow: "flowValue", + }; + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.flowValidationResultPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.flowValidationResultPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('flowValidationResultPath', () => { + const result = client.flowValidationResultPath("projectValue", "locationValue", "agentValue", "flowValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.flowValidationResultPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromFlowValidationResultName', () => { + const result = client.matchProjectFromFlowValidationResultName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.flowValidationResultPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromFlowValidationResultName', () => { + const result = client.matchLocationFromFlowValidationResultName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.flowValidationResultPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromFlowValidationResultName', () => { + const result = client.matchAgentFromFlowValidationResultName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.flowValidationResultPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFlowFromFlowValidationResultName', () => { + const result = client.matchFlowFromFlowValidationResultName(fakePath); + assert.strictEqual(result, "flowValue"); + assert((client.pathTemplates.flowValidationResultPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('generator', async () => { + const fakePath = "/rendered/path/generator"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + generator: "generatorValue", + }; + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.generatorPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.generatorPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('generatorPath', () => { + const result = client.generatorPath("projectValue", "locationValue", "agentValue", "generatorValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.generatorPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromGeneratorName', () => { + const result = client.matchProjectFromGeneratorName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.generatorPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromGeneratorName', () => { + const result = client.matchLocationFromGeneratorName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.generatorPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromGeneratorName', () => { + const result = client.matchAgentFromGeneratorName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.generatorPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchGeneratorFromGeneratorName', () => { + const result = client.matchGeneratorFromGeneratorName(fakePath); + assert.strictEqual(result, "generatorValue"); + assert((client.pathTemplates.generatorPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('intent', async () => { + const fakePath = "/rendered/path/intent"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + intent: "intentValue", + }; + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.intentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.intentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('intentPath', () => { + const result = client.intentPath("projectValue", "locationValue", "agentValue", "intentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.intentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromIntentName', () => { + const result = client.matchProjectFromIntentName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.intentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromIntentName', () => { + const result = client.matchLocationFromIntentName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.intentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromIntentName', () => { + const result = client.matchAgentFromIntentName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.intentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchIntentFromIntentName', () => { + const result = client.matchIntentFromIntentName(fakePath); + assert.strictEqual(result, "intentValue"); + assert((client.pathTemplates.intentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('location', async () => { + const fakePath = "/rendered/path/location"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + }; + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.locationPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.locationPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('locationPath', () => { + const result = client.locationPath("projectValue", "locationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.locationPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromLocationName', () => { + const result = client.matchProjectFromLocationName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromLocationName', () => { + const result = client.matchLocationFromLocationName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('page', async () => { + const fakePath = "/rendered/path/page"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + flow: "flowValue", + page: "pageValue", + }; + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.pagePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.pagePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('pagePath', () => { + const result = client.pagePath("projectValue", "locationValue", "agentValue", "flowValue", "pageValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.pagePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromPageName', () => { + const result = client.matchProjectFromPageName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.pagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromPageName', () => { + const result = client.matchLocationFromPageName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.pagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromPageName', () => { + const result = client.matchAgentFromPageName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.pagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFlowFromPageName', () => { + const result = client.matchFlowFromPageName(fakePath); + assert.strictEqual(result, "flowValue"); + assert((client.pathTemplates.pagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPageFromPageName', () => { + const result = client.matchPageFromPageName(fakePath); + assert.strictEqual(result, "pageValue"); + assert((client.pathTemplates.pagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('playbook', async () => { + const fakePath = "/rendered/path/playbook"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + playbook: "playbookValue", + }; + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.playbookPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.playbookPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('playbookPath', () => { + const result = client.playbookPath("projectValue", "locationValue", "agentValue", "playbookValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.playbookPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromPlaybookName', () => { + const result = client.matchProjectFromPlaybookName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.playbookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromPlaybookName', () => { + const result = client.matchLocationFromPlaybookName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.playbookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromPlaybookName', () => { + const result = client.matchAgentFromPlaybookName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.playbookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPlaybookFromPlaybookName', () => { + const result = client.matchPlaybookFromPlaybookName(fakePath); + assert.strictEqual(result, "playbookValue"); + assert((client.pathTemplates.playbookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('playbookVersion', async () => { + const fakePath = "/rendered/path/playbookVersion"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + playbook: "playbookValue", + version: "versionValue", + }; + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.playbookVersionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.playbookVersionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('playbookVersionPath', () => { + const result = client.playbookVersionPath("projectValue", "locationValue", "agentValue", "playbookValue", "versionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.playbookVersionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromPlaybookVersionName', () => { + const result = client.matchProjectFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromPlaybookVersionName', () => { + const result = client.matchLocationFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromPlaybookVersionName', () => { + const result = client.matchAgentFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPlaybookFromPlaybookVersionName', () => { + const result = client.matchPlaybookFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "playbookValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchVersionFromPlaybookVersionName', () => { + const result = client.matchVersionFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "versionValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('project', async () => { + const fakePath = "/rendered/path/project"; + const expectedParameters = { + project: "projectValue", + }; + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectPath', () => { + const result = client.projectPath("projectValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectName', () => { + const result = client.matchProjectFromProjectName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationAgentEnvironmentSessionEntityType', async () => { + const fakePath = "/rendered/path/projectLocationAgentEnvironmentSessionEntityType"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + environment: "environmentValue", + session: "sessionValue", + entity_type: "entityTypeValue", + }; + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationAgentEnvironmentSessionEntityTypePath', () => { + const result = client.projectLocationAgentEnvironmentSessionEntityTypePath("projectValue", "locationValue", "agentValue", "environmentValue", "sessionValue", "entityTypeValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationAgentEnvironmentSessionEntityTypeName', () => { + const result = client.matchProjectFromProjectLocationAgentEnvironmentSessionEntityTypeName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationAgentEnvironmentSessionEntityTypeName', () => { + const result = client.matchLocationFromProjectLocationAgentEnvironmentSessionEntityTypeName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromProjectLocationAgentEnvironmentSessionEntityTypeName', () => { + const result = client.matchAgentFromProjectLocationAgentEnvironmentSessionEntityTypeName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEnvironmentFromProjectLocationAgentEnvironmentSessionEntityTypeName', () => { + const result = client.matchEnvironmentFromProjectLocationAgentEnvironmentSessionEntityTypeName(fakePath); + assert.strictEqual(result, "environmentValue"); + assert((client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSessionFromProjectLocationAgentEnvironmentSessionEntityTypeName', () => { + const result = client.matchSessionFromProjectLocationAgentEnvironmentSessionEntityTypeName(fakePath); + assert.strictEqual(result, "sessionValue"); + assert((client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEntityTypeFromProjectLocationAgentEnvironmentSessionEntityTypeName', () => { + const result = client.matchEntityTypeFromProjectLocationAgentEnvironmentSessionEntityTypeName(fakePath); + assert.strictEqual(result, "entityTypeValue"); + assert((client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationAgentFlowTransitionRouteGroups', async () => { + const fakePath = "/rendered/path/projectLocationAgentFlowTransitionRouteGroups"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + flow: "flowValue", + transition_route_group: "transitionRouteGroupValue", + }; + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationAgentFlowTransitionRouteGroupsPath', () => { + const result = client.projectLocationAgentFlowTransitionRouteGroupsPath("projectValue", "locationValue", "agentValue", "flowValue", "transitionRouteGroupValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationAgentFlowTransitionRouteGroupsName', () => { + const result = client.matchProjectFromProjectLocationAgentFlowTransitionRouteGroupsName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationAgentFlowTransitionRouteGroupsName', () => { + const result = client.matchLocationFromProjectLocationAgentFlowTransitionRouteGroupsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromProjectLocationAgentFlowTransitionRouteGroupsName', () => { + const result = client.matchAgentFromProjectLocationAgentFlowTransitionRouteGroupsName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFlowFromProjectLocationAgentFlowTransitionRouteGroupsName', () => { + const result = client.matchFlowFromProjectLocationAgentFlowTransitionRouteGroupsName(fakePath); + assert.strictEqual(result, "flowValue"); + assert((client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchTransitionRouteGroupFromProjectLocationAgentFlowTransitionRouteGroupsName', () => { + const result = client.matchTransitionRouteGroupFromProjectLocationAgentFlowTransitionRouteGroupsName(fakePath); + assert.strictEqual(result, "transitionRouteGroupValue"); + assert((client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationAgentSessionEntityType', async () => { + const fakePath = "/rendered/path/projectLocationAgentSessionEntityType"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + session: "sessionValue", + entity_type: "entityTypeValue", + }; + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationAgentSessionEntityTypePath', () => { + const result = client.projectLocationAgentSessionEntityTypePath("projectValue", "locationValue", "agentValue", "sessionValue", "entityTypeValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationAgentSessionEntityTypeName', () => { + const result = client.matchProjectFromProjectLocationAgentSessionEntityTypeName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationAgentSessionEntityTypeName', () => { + const result = client.matchLocationFromProjectLocationAgentSessionEntityTypeName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromProjectLocationAgentSessionEntityTypeName', () => { + const result = client.matchAgentFromProjectLocationAgentSessionEntityTypeName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSessionFromProjectLocationAgentSessionEntityTypeName', () => { + const result = client.matchSessionFromProjectLocationAgentSessionEntityTypeName(fakePath); + assert.strictEqual(result, "sessionValue"); + assert((client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEntityTypeFromProjectLocationAgentSessionEntityTypeName', () => { + const result = client.matchEntityTypeFromProjectLocationAgentSessionEntityTypeName(fakePath); + assert.strictEqual(result, "entityTypeValue"); + assert((client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationAgentTransitionRouteGroups', async () => { + const fakePath = "/rendered/path/projectLocationAgentTransitionRouteGroups"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + transition_route_group: "transitionRouteGroupValue", + }; + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationAgentTransitionRouteGroupsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationAgentTransitionRouteGroupsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationAgentTransitionRouteGroupsPath', () => { + const result = client.projectLocationAgentTransitionRouteGroupsPath("projectValue", "locationValue", "agentValue", "transitionRouteGroupValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationAgentTransitionRouteGroupsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationAgentTransitionRouteGroupsName', () => { + const result = client.matchProjectFromProjectLocationAgentTransitionRouteGroupsName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationAgentTransitionRouteGroupsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationAgentTransitionRouteGroupsName', () => { + const result = client.matchLocationFromProjectLocationAgentTransitionRouteGroupsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationAgentTransitionRouteGroupsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromProjectLocationAgentTransitionRouteGroupsName', () => { + const result = client.matchAgentFromProjectLocationAgentTransitionRouteGroupsName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.projectLocationAgentTransitionRouteGroupsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchTransitionRouteGroupFromProjectLocationAgentTransitionRouteGroupsName', () => { + const result = client.matchTransitionRouteGroupFromProjectLocationAgentTransitionRouteGroupsName(fakePath); + assert.strictEqual(result, "transitionRouteGroupValue"); + assert((client.pathTemplates.projectLocationAgentTransitionRouteGroupsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('securitySettings', async () => { + const fakePath = "/rendered/path/securitySettings"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + security_settings: "securitySettingsValue", + }; + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.securitySettingsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.securitySettingsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('securitySettingsPath', () => { + const result = client.securitySettingsPath("projectValue", "locationValue", "securitySettingsValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.securitySettingsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromSecuritySettingsName', () => { + const result = client.matchProjectFromSecuritySettingsName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.securitySettingsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromSecuritySettingsName', () => { + const result = client.matchLocationFromSecuritySettingsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.securitySettingsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSecuritySettingsFromSecuritySettingsName', () => { + const result = client.matchSecuritySettingsFromSecuritySettingsName(fakePath); + assert.strictEqual(result, "securitySettingsValue"); + assert((client.pathTemplates.securitySettingsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('testCase', async () => { + const fakePath = "/rendered/path/testCase"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + test_case: "testCaseValue", + }; + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.testCasePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.testCasePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('testCasePath', () => { + const result = client.testCasePath("projectValue", "locationValue", "agentValue", "testCaseValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.testCasePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromTestCaseName', () => { + const result = client.matchProjectFromTestCaseName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.testCasePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromTestCaseName', () => { + const result = client.matchLocationFromTestCaseName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.testCasePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromTestCaseName', () => { + const result = client.matchAgentFromTestCaseName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.testCasePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchTestCaseFromTestCaseName', () => { + const result = client.matchTestCaseFromTestCaseName(fakePath); + assert.strictEqual(result, "testCaseValue"); + assert((client.pathTemplates.testCasePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('testCaseResult', async () => { + const fakePath = "/rendered/path/testCaseResult"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + test_case: "testCaseValue", + result: "resultValue", + }; + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.testCaseResultPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.testCaseResultPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('testCaseResultPath', () => { + const result = client.testCaseResultPath("projectValue", "locationValue", "agentValue", "testCaseValue", "resultValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.testCaseResultPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromTestCaseResultName', () => { + const result = client.matchProjectFromTestCaseResultName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.testCaseResultPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromTestCaseResultName', () => { + const result = client.matchLocationFromTestCaseResultName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.testCaseResultPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromTestCaseResultName', () => { + const result = client.matchAgentFromTestCaseResultName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.testCaseResultPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchTestCaseFromTestCaseResultName', () => { + const result = client.matchTestCaseFromTestCaseResultName(fakePath); + assert.strictEqual(result, "testCaseValue"); + assert((client.pathTemplates.testCaseResultPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchResultFromTestCaseResultName', () => { + const result = client.matchResultFromTestCaseResultName(fakePath); + assert.strictEqual(result, "resultValue"); + assert((client.pathTemplates.testCaseResultPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('tool', async () => { + const fakePath = "/rendered/path/tool"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + tool: "toolValue", + }; + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.toolPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.toolPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('toolPath', () => { + const result = client.toolPath("projectValue", "locationValue", "agentValue", "toolValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.toolPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromToolName', () => { + const result = client.matchProjectFromToolName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.toolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromToolName', () => { + const result = client.matchLocationFromToolName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.toolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromToolName', () => { + const result = client.matchAgentFromToolName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.toolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchToolFromToolName', () => { + const result = client.matchToolFromToolName(fakePath); + assert.strictEqual(result, "toolValue"); + assert((client.pathTemplates.toolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('toolVersion', async () => { + const fakePath = "/rendered/path/toolVersion"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + tool: "toolValue", + version: "versionValue", + }; + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.toolVersionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.toolVersionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('toolVersionPath', () => { + const result = client.toolVersionPath("projectValue", "locationValue", "agentValue", "toolValue", "versionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.toolVersionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromToolVersionName', () => { + const result = client.matchProjectFromToolVersionName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromToolVersionName', () => { + const result = client.matchLocationFromToolVersionName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromToolVersionName', () => { + const result = client.matchAgentFromToolVersionName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchToolFromToolVersionName', () => { + const result = client.matchToolFromToolVersionName(fakePath); + assert.strictEqual(result, "toolValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchVersionFromToolVersionName', () => { + const result = client.matchVersionFromToolVersionName(fakePath); + assert.strictEqual(result, "versionValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('version', async () => { + const fakePath = "/rendered/path/version"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + flow: "flowValue", + version: "versionValue", + }; + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.versionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.versionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('versionPath', () => { + const result = client.versionPath("projectValue", "locationValue", "agentValue", "flowValue", "versionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.versionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromVersionName', () => { + const result = client.matchProjectFromVersionName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.versionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromVersionName', () => { + const result = client.matchLocationFromVersionName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.versionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromVersionName', () => { + const result = client.matchAgentFromVersionName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.versionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFlowFromVersionName', () => { + const result = client.matchFlowFromVersionName(fakePath); + assert.strictEqual(result, "flowValue"); + assert((client.pathTemplates.versionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchVersionFromVersionName', () => { + const result = client.matchVersionFromVersionName(fakePath); + assert.strictEqual(result, "versionValue"); + assert((client.pathTemplates.versionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('webhook', async () => { + const fakePath = "/rendered/path/webhook"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + webhook: "webhookValue", + }; + const client = new playbooksModule.v3.PlaybooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.webhookPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.webhookPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('webhookPath', () => { + const result = client.webhookPath("projectValue", "locationValue", "agentValue", "webhookValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.webhookPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromWebhookName', () => { + const result = client.matchProjectFromWebhookName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.webhookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromWebhookName', () => { + const result = client.matchLocationFromWebhookName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.webhookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromWebhookName', () => { + const result = client.matchAgentFromWebhookName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.webhookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWebhookFromWebhookName', () => { + const result = client.matchWebhookFromWebhookName(fakePath); + assert.strictEqual(result, "webhookValue"); + assert((client.pathTemplates.webhookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + }); +}); diff --git a/packages/google-cloud-dialogflow-cx/test/gapic_security_settings_service_v3.ts b/packages/google-cloud-dialogflow-cx/test/gapic_security_settings_service_v3.ts index 5136ed0d1e8..2db972c6028 100644 --- a/packages/google-cloud-dialogflow-cx/test/gapic_security_settings_service_v3.ts +++ b/packages/google-cloud-dialogflow-cx/test/gapic_security_settings_service_v3.ts @@ -1787,6 +1787,68 @@ describe('v3.SecuritySettingsServiceClient', () => { }); }); + describe('example', async () => { + const fakePath = "/rendered/path/example"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + playbook: "playbookValue", + example: "exampleValue", + }; + const client = new securitysettingsserviceModule.v3.SecuritySettingsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.examplePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.examplePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('examplePath', () => { + const result = client.examplePath("projectValue", "locationValue", "agentValue", "playbookValue", "exampleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.examplePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromExampleName', () => { + const result = client.matchProjectFromExampleName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromExampleName', () => { + const result = client.matchLocationFromExampleName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromExampleName', () => { + const result = client.matchAgentFromExampleName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPlaybookFromExampleName', () => { + const result = client.matchPlaybookFromExampleName(fakePath); + assert.strictEqual(result, "playbookValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchExampleFromExampleName', () => { + const result = client.matchExampleFromExampleName(fakePath); + assert.strictEqual(result, "exampleValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('experiment', async () => { const fakePath = "/rendered/path/experiment"; const expectedParameters = { @@ -2257,6 +2319,122 @@ describe('v3.SecuritySettingsServiceClient', () => { }); }); + describe('playbook', async () => { + const fakePath = "/rendered/path/playbook"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + playbook: "playbookValue", + }; + const client = new securitysettingsserviceModule.v3.SecuritySettingsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.playbookPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.playbookPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('playbookPath', () => { + const result = client.playbookPath("projectValue", "locationValue", "agentValue", "playbookValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.playbookPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromPlaybookName', () => { + const result = client.matchProjectFromPlaybookName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.playbookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromPlaybookName', () => { + const result = client.matchLocationFromPlaybookName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.playbookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromPlaybookName', () => { + const result = client.matchAgentFromPlaybookName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.playbookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPlaybookFromPlaybookName', () => { + const result = client.matchPlaybookFromPlaybookName(fakePath); + assert.strictEqual(result, "playbookValue"); + assert((client.pathTemplates.playbookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('playbookVersion', async () => { + const fakePath = "/rendered/path/playbookVersion"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + playbook: "playbookValue", + version: "versionValue", + }; + const client = new securitysettingsserviceModule.v3.SecuritySettingsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.playbookVersionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.playbookVersionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('playbookVersionPath', () => { + const result = client.playbookVersionPath("projectValue", "locationValue", "agentValue", "playbookValue", "versionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.playbookVersionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromPlaybookVersionName', () => { + const result = client.matchProjectFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromPlaybookVersionName', () => { + const result = client.matchLocationFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromPlaybookVersionName', () => { + const result = client.matchAgentFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPlaybookFromPlaybookVersionName', () => { + const result = client.matchPlaybookFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "playbookValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchVersionFromPlaybookVersionName', () => { + const result = client.matchVersionFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "versionValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('project', async () => { const fakePath = "/rendered/path/project"; const expectedParameters = { @@ -2789,6 +2967,122 @@ describe('v3.SecuritySettingsServiceClient', () => { }); }); + describe('tool', async () => { + const fakePath = "/rendered/path/tool"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + tool: "toolValue", + }; + const client = new securitysettingsserviceModule.v3.SecuritySettingsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.toolPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.toolPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('toolPath', () => { + const result = client.toolPath("projectValue", "locationValue", "agentValue", "toolValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.toolPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromToolName', () => { + const result = client.matchProjectFromToolName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.toolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromToolName', () => { + const result = client.matchLocationFromToolName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.toolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromToolName', () => { + const result = client.matchAgentFromToolName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.toolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchToolFromToolName', () => { + const result = client.matchToolFromToolName(fakePath); + assert.strictEqual(result, "toolValue"); + assert((client.pathTemplates.toolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('toolVersion', async () => { + const fakePath = "/rendered/path/toolVersion"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + tool: "toolValue", + version: "versionValue", + }; + const client = new securitysettingsserviceModule.v3.SecuritySettingsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.toolVersionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.toolVersionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('toolVersionPath', () => { + const result = client.toolVersionPath("projectValue", "locationValue", "agentValue", "toolValue", "versionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.toolVersionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromToolVersionName', () => { + const result = client.matchProjectFromToolVersionName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromToolVersionName', () => { + const result = client.matchLocationFromToolVersionName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromToolVersionName', () => { + const result = client.matchAgentFromToolVersionName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchToolFromToolVersionName', () => { + const result = client.matchToolFromToolVersionName(fakePath); + assert.strictEqual(result, "toolValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchVersionFromToolVersionName', () => { + const result = client.matchVersionFromToolVersionName(fakePath); + assert.strictEqual(result, "versionValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('version', async () => { const fakePath = "/rendered/path/version"; const expectedParameters = { diff --git a/packages/google-cloud-dialogflow-cx/test/gapic_session_entity_types_v3.ts b/packages/google-cloud-dialogflow-cx/test/gapic_session_entity_types_v3.ts index 2398bf2658a..b4cb5954f79 100644 --- a/packages/google-cloud-dialogflow-cx/test/gapic_session_entity_types_v3.ts +++ b/packages/google-cloud-dialogflow-cx/test/gapic_session_entity_types_v3.ts @@ -1787,6 +1787,68 @@ describe('v3.SessionEntityTypesClient', () => { }); }); + describe('example', async () => { + const fakePath = "/rendered/path/example"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + playbook: "playbookValue", + example: "exampleValue", + }; + const client = new sessionentitytypesModule.v3.SessionEntityTypesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.examplePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.examplePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('examplePath', () => { + const result = client.examplePath("projectValue", "locationValue", "agentValue", "playbookValue", "exampleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.examplePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromExampleName', () => { + const result = client.matchProjectFromExampleName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromExampleName', () => { + const result = client.matchLocationFromExampleName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromExampleName', () => { + const result = client.matchAgentFromExampleName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPlaybookFromExampleName', () => { + const result = client.matchPlaybookFromExampleName(fakePath); + assert.strictEqual(result, "playbookValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchExampleFromExampleName', () => { + const result = client.matchExampleFromExampleName(fakePath); + assert.strictEqual(result, "exampleValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('experiment', async () => { const fakePath = "/rendered/path/experiment"; const expectedParameters = { @@ -2165,6 +2227,122 @@ describe('v3.SessionEntityTypesClient', () => { }); }); + describe('playbook', async () => { + const fakePath = "/rendered/path/playbook"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + playbook: "playbookValue", + }; + const client = new sessionentitytypesModule.v3.SessionEntityTypesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.playbookPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.playbookPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('playbookPath', () => { + const result = client.playbookPath("projectValue", "locationValue", "agentValue", "playbookValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.playbookPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromPlaybookName', () => { + const result = client.matchProjectFromPlaybookName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.playbookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromPlaybookName', () => { + const result = client.matchLocationFromPlaybookName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.playbookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromPlaybookName', () => { + const result = client.matchAgentFromPlaybookName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.playbookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPlaybookFromPlaybookName', () => { + const result = client.matchPlaybookFromPlaybookName(fakePath); + assert.strictEqual(result, "playbookValue"); + assert((client.pathTemplates.playbookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('playbookVersion', async () => { + const fakePath = "/rendered/path/playbookVersion"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + playbook: "playbookValue", + version: "versionValue", + }; + const client = new sessionentitytypesModule.v3.SessionEntityTypesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.playbookVersionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.playbookVersionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('playbookVersionPath', () => { + const result = client.playbookVersionPath("projectValue", "locationValue", "agentValue", "playbookValue", "versionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.playbookVersionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromPlaybookVersionName', () => { + const result = client.matchProjectFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromPlaybookVersionName', () => { + const result = client.matchLocationFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromPlaybookVersionName', () => { + const result = client.matchAgentFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPlaybookFromPlaybookVersionName', () => { + const result = client.matchPlaybookFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "playbookValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchVersionFromPlaybookVersionName', () => { + const result = client.matchVersionFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "versionValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('project', async () => { const fakePath = "/rendered/path/project"; const expectedParameters = { @@ -2659,6 +2837,122 @@ describe('v3.SessionEntityTypesClient', () => { }); }); + describe('tool', async () => { + const fakePath = "/rendered/path/tool"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + tool: "toolValue", + }; + const client = new sessionentitytypesModule.v3.SessionEntityTypesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.toolPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.toolPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('toolPath', () => { + const result = client.toolPath("projectValue", "locationValue", "agentValue", "toolValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.toolPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromToolName', () => { + const result = client.matchProjectFromToolName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.toolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromToolName', () => { + const result = client.matchLocationFromToolName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.toolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromToolName', () => { + const result = client.matchAgentFromToolName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.toolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchToolFromToolName', () => { + const result = client.matchToolFromToolName(fakePath); + assert.strictEqual(result, "toolValue"); + assert((client.pathTemplates.toolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('toolVersion', async () => { + const fakePath = "/rendered/path/toolVersion"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + tool: "toolValue", + version: "versionValue", + }; + const client = new sessionentitytypesModule.v3.SessionEntityTypesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.toolVersionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.toolVersionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('toolVersionPath', () => { + const result = client.toolVersionPath("projectValue", "locationValue", "agentValue", "toolValue", "versionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.toolVersionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromToolVersionName', () => { + const result = client.matchProjectFromToolVersionName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromToolVersionName', () => { + const result = client.matchLocationFromToolVersionName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromToolVersionName', () => { + const result = client.matchAgentFromToolVersionName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchToolFromToolVersionName', () => { + const result = client.matchToolFromToolVersionName(fakePath); + assert.strictEqual(result, "toolValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchVersionFromToolVersionName', () => { + const result = client.matchVersionFromToolVersionName(fakePath); + assert.strictEqual(result, "versionValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('version', async () => { const fakePath = "/rendered/path/version"; const expectedParameters = { diff --git a/packages/google-cloud-dialogflow-cx/test/gapic_sessions_v3.ts b/packages/google-cloud-dialogflow-cx/test/gapic_sessions_v3.ts index c594cd580a9..b063193e3f5 100644 --- a/packages/google-cloud-dialogflow-cx/test/gapic_sessions_v3.ts +++ b/packages/google-cloud-dialogflow-cx/test/gapic_sessions_v3.ts @@ -1742,6 +1742,68 @@ describe('v3.SessionsClient', () => { }); }); + describe('example', async () => { + const fakePath = "/rendered/path/example"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + playbook: "playbookValue", + example: "exampleValue", + }; + const client = new sessionsModule.v3.SessionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.examplePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.examplePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('examplePath', () => { + const result = client.examplePath("projectValue", "locationValue", "agentValue", "playbookValue", "exampleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.examplePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromExampleName', () => { + const result = client.matchProjectFromExampleName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromExampleName', () => { + const result = client.matchLocationFromExampleName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromExampleName', () => { + const result = client.matchAgentFromExampleName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPlaybookFromExampleName', () => { + const result = client.matchPlaybookFromExampleName(fakePath); + assert.strictEqual(result, "playbookValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchExampleFromExampleName', () => { + const result = client.matchExampleFromExampleName(fakePath); + assert.strictEqual(result, "exampleValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('experiment', async () => { const fakePath = "/rendered/path/experiment"; const expectedParameters = { @@ -2082,6 +2144,122 @@ describe('v3.SessionsClient', () => { }); }); + describe('playbook', async () => { + const fakePath = "/rendered/path/playbook"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + playbook: "playbookValue", + }; + const client = new sessionsModule.v3.SessionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.playbookPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.playbookPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('playbookPath', () => { + const result = client.playbookPath("projectValue", "locationValue", "agentValue", "playbookValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.playbookPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromPlaybookName', () => { + const result = client.matchProjectFromPlaybookName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.playbookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromPlaybookName', () => { + const result = client.matchLocationFromPlaybookName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.playbookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromPlaybookName', () => { + const result = client.matchAgentFromPlaybookName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.playbookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPlaybookFromPlaybookName', () => { + const result = client.matchPlaybookFromPlaybookName(fakePath); + assert.strictEqual(result, "playbookValue"); + assert((client.pathTemplates.playbookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('playbookVersion', async () => { + const fakePath = "/rendered/path/playbookVersion"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + playbook: "playbookValue", + version: "versionValue", + }; + const client = new sessionsModule.v3.SessionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.playbookVersionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.playbookVersionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('playbookVersionPath', () => { + const result = client.playbookVersionPath("projectValue", "locationValue", "agentValue", "playbookValue", "versionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.playbookVersionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromPlaybookVersionName', () => { + const result = client.matchProjectFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromPlaybookVersionName', () => { + const result = client.matchLocationFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromPlaybookVersionName', () => { + const result = client.matchAgentFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPlaybookFromPlaybookVersionName', () => { + const result = client.matchPlaybookFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "playbookValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchVersionFromPlaybookVersionName', () => { + const result = client.matchVersionFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "versionValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('projectLocationAgentEnvironmentSession', async () => { const fakePath = "/rendered/path/projectLocationAgentEnvironmentSession"; const expectedParameters = { @@ -2708,6 +2886,122 @@ describe('v3.SessionsClient', () => { }); }); + describe('tool', async () => { + const fakePath = "/rendered/path/tool"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + tool: "toolValue", + }; + const client = new sessionsModule.v3.SessionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.toolPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.toolPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('toolPath', () => { + const result = client.toolPath("projectValue", "locationValue", "agentValue", "toolValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.toolPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromToolName', () => { + const result = client.matchProjectFromToolName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.toolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromToolName', () => { + const result = client.matchLocationFromToolName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.toolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromToolName', () => { + const result = client.matchAgentFromToolName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.toolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchToolFromToolName', () => { + const result = client.matchToolFromToolName(fakePath); + assert.strictEqual(result, "toolValue"); + assert((client.pathTemplates.toolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('toolVersion', async () => { + const fakePath = "/rendered/path/toolVersion"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + tool: "toolValue", + version: "versionValue", + }; + const client = new sessionsModule.v3.SessionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.toolVersionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.toolVersionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('toolVersionPath', () => { + const result = client.toolVersionPath("projectValue", "locationValue", "agentValue", "toolValue", "versionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.toolVersionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromToolVersionName', () => { + const result = client.matchProjectFromToolVersionName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromToolVersionName', () => { + const result = client.matchLocationFromToolVersionName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromToolVersionName', () => { + const result = client.matchAgentFromToolVersionName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchToolFromToolVersionName', () => { + const result = client.matchToolFromToolVersionName(fakePath); + assert.strictEqual(result, "toolValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchVersionFromToolVersionName', () => { + const result = client.matchVersionFromToolVersionName(fakePath); + assert.strictEqual(result, "versionValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('version', async () => { const fakePath = "/rendered/path/version"; const expectedParameters = { 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 b4f2b3873d5..f03197da84d 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 @@ -2880,6 +2880,68 @@ describe('v3.TestCasesClient', () => { }); }); + describe('example', async () => { + const fakePath = "/rendered/path/example"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + playbook: "playbookValue", + example: "exampleValue", + }; + const client = new testcasesModule.v3.TestCasesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.examplePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.examplePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('examplePath', () => { + const result = client.examplePath("projectValue", "locationValue", "agentValue", "playbookValue", "exampleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.examplePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromExampleName', () => { + const result = client.matchProjectFromExampleName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromExampleName', () => { + const result = client.matchLocationFromExampleName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromExampleName', () => { + const result = client.matchAgentFromExampleName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPlaybookFromExampleName', () => { + const result = client.matchPlaybookFromExampleName(fakePath); + assert.strictEqual(result, "playbookValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchExampleFromExampleName', () => { + const result = client.matchExampleFromExampleName(fakePath); + assert.strictEqual(result, "exampleValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('experiment', async () => { const fakePath = "/rendered/path/experiment"; const expectedParameters = { @@ -3258,6 +3320,122 @@ describe('v3.TestCasesClient', () => { }); }); + describe('playbook', async () => { + const fakePath = "/rendered/path/playbook"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + playbook: "playbookValue", + }; + const client = new testcasesModule.v3.TestCasesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.playbookPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.playbookPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('playbookPath', () => { + const result = client.playbookPath("projectValue", "locationValue", "agentValue", "playbookValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.playbookPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromPlaybookName', () => { + const result = client.matchProjectFromPlaybookName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.playbookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromPlaybookName', () => { + const result = client.matchLocationFromPlaybookName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.playbookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromPlaybookName', () => { + const result = client.matchAgentFromPlaybookName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.playbookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPlaybookFromPlaybookName', () => { + const result = client.matchPlaybookFromPlaybookName(fakePath); + assert.strictEqual(result, "playbookValue"); + assert((client.pathTemplates.playbookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('playbookVersion', async () => { + const fakePath = "/rendered/path/playbookVersion"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + playbook: "playbookValue", + version: "versionValue", + }; + const client = new testcasesModule.v3.TestCasesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.playbookVersionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.playbookVersionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('playbookVersionPath', () => { + const result = client.playbookVersionPath("projectValue", "locationValue", "agentValue", "playbookValue", "versionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.playbookVersionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromPlaybookVersionName', () => { + const result = client.matchProjectFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromPlaybookVersionName', () => { + const result = client.matchLocationFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromPlaybookVersionName', () => { + const result = client.matchAgentFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPlaybookFromPlaybookVersionName', () => { + const result = client.matchPlaybookFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "playbookValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchVersionFromPlaybookVersionName', () => { + const result = client.matchVersionFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "versionValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('project', async () => { const fakePath = "/rendered/path/project"; const expectedParameters = { @@ -3698,6 +3876,122 @@ describe('v3.TestCasesClient', () => { }); }); + describe('tool', async () => { + const fakePath = "/rendered/path/tool"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + tool: "toolValue", + }; + const client = new testcasesModule.v3.TestCasesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.toolPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.toolPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('toolPath', () => { + const result = client.toolPath("projectValue", "locationValue", "agentValue", "toolValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.toolPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromToolName', () => { + const result = client.matchProjectFromToolName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.toolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromToolName', () => { + const result = client.matchLocationFromToolName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.toolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromToolName', () => { + const result = client.matchAgentFromToolName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.toolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchToolFromToolName', () => { + const result = client.matchToolFromToolName(fakePath); + assert.strictEqual(result, "toolValue"); + assert((client.pathTemplates.toolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('toolVersion', async () => { + const fakePath = "/rendered/path/toolVersion"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + tool: "toolValue", + version: "versionValue", + }; + const client = new testcasesModule.v3.TestCasesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.toolVersionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.toolVersionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('toolVersionPath', () => { + const result = client.toolVersionPath("projectValue", "locationValue", "agentValue", "toolValue", "versionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.toolVersionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromToolVersionName', () => { + const result = client.matchProjectFromToolVersionName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromToolVersionName', () => { + const result = client.matchLocationFromToolVersionName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromToolVersionName', () => { + const result = client.matchAgentFromToolVersionName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchToolFromToolVersionName', () => { + const result = client.matchToolFromToolVersionName(fakePath); + assert.strictEqual(result, "toolValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchVersionFromToolVersionName', () => { + const result = client.matchVersionFromToolVersionName(fakePath); + assert.strictEqual(result, "versionValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('version', async () => { const fakePath = "/rendered/path/version"; const expectedParameters = { diff --git a/packages/google-cloud-dialogflow-cx/test/gapic_tools_v3.ts b/packages/google-cloud-dialogflow-cx/test/gapic_tools_v3.ts new file mode 100644 index 00000000000..8f29b3827c2 --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/test/gapic_tools_v3.ts @@ -0,0 +1,3695 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it} from 'mocha'; +import * as toolsModule from '../src'; + +import {PassThrough} from 'stream'; + +import {protobuf, operationsProtos, LocationProtos} from 'google-gax'; + +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON(require('../protos/protos.json')).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + +function generateSampleMessage(instance: T) { + const filledObject = (instance.constructor as typeof protobuf.Message) + .toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject(filledObject) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error ? sinon.stub().rejects(error) : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback(response?: ResponseType, error?: Error) { + return error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); +} + +function stubPageStreamingCall(responses?: ResponseType[], error?: Error) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error ? sinon.stub().callsArgWith(2, error) : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { mockStream.write({}); }); + } + setImmediate(() => { mockStream.end(); }); + } else { + setImmediate(() => { mockStream.write({}); }); + setImmediate(() => { mockStream.end(); }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall(responses?: ResponseType[], error?: Error) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + } + }; + } + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v3.ToolsClient', () => { + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = new toolsModule.v3.ToolsClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'dialogflow.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new toolsModule.v3.ToolsClient(); + const universeDomain = client.universeDomain; + assert.strictEqual(universeDomain, "googleapis.com"); + }); + + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + it('throws DeprecationWarning if static servicePath is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const servicePath = toolsModule.v3.ToolsClient.servicePath; + assert.strictEqual(servicePath, 'dialogflow.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = toolsModule.v3.ToolsClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'dialogflow.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new toolsModule.v3.ToolsClient({universeDomain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'dialogflow.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new toolsModule.v3.ToolsClient({universe_domain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'dialogflow.example.com'); + }); + + if (typeof process === 'object' && 'env' in process) { + describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { + it('sets apiEndpoint from environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new toolsModule.v3.ToolsClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'dialogflow.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + + it('value configured in code has priority over environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new toolsModule.v3.ToolsClient({universeDomain: 'configured.example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'dialogflow.configured.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + }); + } + it('does not allow setting both universeDomain and universe_domain', () => { + assert.throws(() => { new toolsModule.v3.ToolsClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); + }); + + it('has port', () => { + const port = toolsModule.v3.ToolsClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new toolsModule.v3.ToolsClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new toolsModule.v3.ToolsClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.toolsStub, undefined); + await client.initialize(); + assert(client.toolsStub); + }); + + it('has close method for the initialized client', done => { + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize().catch(err => {throw err}); + assert(client.toolsStub); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has close method for the non-initialized client', done => { + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.toolsStub, undefined); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); + }); + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error|null, projectId?: string|null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); + }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); + }); + }); + + describe('createTool', () => { + it('invokes createTool without error', async () => { + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.CreateToolRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.CreateToolRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.Tool() + ); + client.innerApiCalls.createTool = stubSimpleCall(expectedResponse); + const [response] = await client.createTool(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createTool as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createTool as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createTool without error using callback', async () => { + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.CreateToolRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.CreateToolRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.Tool() + ); + client.innerApiCalls.createTool = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createTool( + request, + (err?: Error|null, result?: protos.google.cloud.dialogflow.cx.v3.ITool|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createTool as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createTool as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createTool with error', async () => { + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.CreateToolRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.CreateToolRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createTool = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.createTool(request), expectedError); + const actualRequest = (client.innerApiCalls.createTool as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createTool as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createTool with closed client', async () => { + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.CreateToolRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.CreateToolRequest', ['parent']); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.createTool(request), expectedError); + }); + }); + + describe('getTool', () => { + it('invokes getTool without error', async () => { + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.GetToolRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.GetToolRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.Tool() + ); + client.innerApiCalls.getTool = stubSimpleCall(expectedResponse); + const [response] = await client.getTool(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getTool as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getTool as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getTool without error using callback', async () => { + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.GetToolRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.GetToolRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.Tool() + ); + client.innerApiCalls.getTool = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getTool( + request, + (err?: Error|null, result?: protos.google.cloud.dialogflow.cx.v3.ITool|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getTool as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getTool as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getTool with error', async () => { + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.GetToolRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.GetToolRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getTool = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getTool(request), expectedError); + const actualRequest = (client.innerApiCalls.getTool as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getTool as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getTool with closed client', async () => { + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.GetToolRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.GetToolRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getTool(request), expectedError); + }); + }); + + describe('updateTool', () => { + it('invokes updateTool without error', async () => { + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.UpdateToolRequest() + ); + request.tool ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.UpdateToolRequest', ['tool', 'name']); + request.tool.name = defaultValue1; + const expectedHeaderRequestParams = `tool.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.Tool() + ); + client.innerApiCalls.updateTool = stubSimpleCall(expectedResponse); + const [response] = await client.updateTool(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateTool as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateTool as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateTool without error using callback', async () => { + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.UpdateToolRequest() + ); + request.tool ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.UpdateToolRequest', ['tool', 'name']); + request.tool.name = defaultValue1; + const expectedHeaderRequestParams = `tool.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.Tool() + ); + client.innerApiCalls.updateTool = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateTool( + request, + (err?: Error|null, result?: protos.google.cloud.dialogflow.cx.v3.ITool|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateTool as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateTool as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateTool with error', async () => { + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.UpdateToolRequest() + ); + request.tool ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.UpdateToolRequest', ['tool', 'name']); + request.tool.name = defaultValue1; + const expectedHeaderRequestParams = `tool.name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateTool = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.updateTool(request), expectedError); + const actualRequest = (client.innerApiCalls.updateTool as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateTool as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateTool with closed client', async () => { + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.UpdateToolRequest() + ); + request.tool ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.UpdateToolRequest', ['tool', 'name']); + request.tool.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.updateTool(request), expectedError); + }); + }); + + describe('deleteTool', () => { + it('invokes deleteTool without error', async () => { + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.DeleteToolRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.DeleteToolRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteTool = stubSimpleCall(expectedResponse); + const [response] = await client.deleteTool(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteTool as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteTool as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteTool without error using callback', async () => { + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.DeleteToolRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.DeleteToolRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteTool = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteTool( + request, + (err?: Error|null, result?: protos.google.protobuf.IEmpty|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteTool as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteTool as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteTool with error', async () => { + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.DeleteToolRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.DeleteToolRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteTool = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.deleteTool(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteTool as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteTool as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteTool with closed client', async () => { + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.DeleteToolRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.DeleteToolRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.deleteTool(request), expectedError); + }); + }); + + describe('createToolVersion', () => { + it('invokes createToolVersion without error', async () => { + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.CreateToolVersionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.CreateToolVersionRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.ToolVersion() + ); + client.innerApiCalls.createToolVersion = stubSimpleCall(expectedResponse); + const [response] = await client.createToolVersion(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createToolVersion as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createToolVersion as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createToolVersion without error using callback', async () => { + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.CreateToolVersionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.CreateToolVersionRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.ToolVersion() + ); + client.innerApiCalls.createToolVersion = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createToolVersion( + request, + (err?: Error|null, result?: protos.google.cloud.dialogflow.cx.v3.IToolVersion|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createToolVersion as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createToolVersion as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createToolVersion with error', async () => { + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.CreateToolVersionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.CreateToolVersionRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createToolVersion = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.createToolVersion(request), expectedError); + const actualRequest = (client.innerApiCalls.createToolVersion as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createToolVersion as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createToolVersion with closed client', async () => { + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.CreateToolVersionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.CreateToolVersionRequest', ['parent']); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.createToolVersion(request), expectedError); + }); + }); + + describe('getToolVersion', () => { + it('invokes getToolVersion without error', async () => { + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.GetToolVersionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.GetToolVersionRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.ToolVersion() + ); + client.innerApiCalls.getToolVersion = stubSimpleCall(expectedResponse); + const [response] = await client.getToolVersion(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getToolVersion as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getToolVersion as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getToolVersion without error using callback', async () => { + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.GetToolVersionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.GetToolVersionRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.ToolVersion() + ); + client.innerApiCalls.getToolVersion = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getToolVersion( + request, + (err?: Error|null, result?: protos.google.cloud.dialogflow.cx.v3.IToolVersion|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getToolVersion as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getToolVersion as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getToolVersion with error', async () => { + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.GetToolVersionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.GetToolVersionRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getToolVersion = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getToolVersion(request), expectedError); + const actualRequest = (client.innerApiCalls.getToolVersion as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getToolVersion as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getToolVersion with closed client', async () => { + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.GetToolVersionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.GetToolVersionRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getToolVersion(request), expectedError); + }); + }); + + describe('deleteToolVersion', () => { + it('invokes deleteToolVersion without error', async () => { + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteToolVersion = stubSimpleCall(expectedResponse); + const [response] = await client.deleteToolVersion(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteToolVersion as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteToolVersion as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteToolVersion without error using callback', async () => { + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteToolVersion = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteToolVersion( + request, + (err?: Error|null, result?: protos.google.protobuf.IEmpty|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteToolVersion as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteToolVersion as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteToolVersion with error', async () => { + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteToolVersion = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.deleteToolVersion(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteToolVersion as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteToolVersion as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteToolVersion with closed client', async () => { + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.DeleteToolVersionRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.deleteToolVersion(request), expectedError); + }); + }); + + describe('restoreToolVersion', () => { + it('invokes restoreToolVersion without error', async () => { + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse() + ); + client.innerApiCalls.restoreToolVersion = stubSimpleCall(expectedResponse); + const [response] = await client.restoreToolVersion(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.restoreToolVersion as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.restoreToolVersion as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes restoreToolVersion without error using callback', async () => { + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.RestoreToolVersionResponse() + ); + client.innerApiCalls.restoreToolVersion = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.restoreToolVersion( + request, + (err?: Error|null, result?: protos.google.cloud.dialogflow.cx.v3.IRestoreToolVersionResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.restoreToolVersion as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.restoreToolVersion as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes restoreToolVersion with error', async () => { + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.restoreToolVersion = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.restoreToolVersion(request), expectedError); + const actualRequest = (client.innerApiCalls.restoreToolVersion as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.restoreToolVersion as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes restoreToolVersion with closed client', async () => { + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.RestoreToolVersionRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.restoreToolVersion(request), expectedError); + }); + }); + + describe('listTools', () => { + it('invokes listTools without error', async () => { + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.ListToolsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.ListToolsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dialogflow.cx.v3.Tool()), + generateSampleMessage(new protos.google.cloud.dialogflow.cx.v3.Tool()), + generateSampleMessage(new protos.google.cloud.dialogflow.cx.v3.Tool()), + ]; + client.innerApiCalls.listTools = stubSimpleCall(expectedResponse); + const [response] = await client.listTools(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listTools as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listTools as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listTools without error using callback', async () => { + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.ListToolsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.ListToolsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dialogflow.cx.v3.Tool()), + generateSampleMessage(new protos.google.cloud.dialogflow.cx.v3.Tool()), + generateSampleMessage(new protos.google.cloud.dialogflow.cx.v3.Tool()), + ]; + client.innerApiCalls.listTools = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listTools( + request, + (err?: Error|null, result?: protos.google.cloud.dialogflow.cx.v3.ITool[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listTools as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listTools as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listTools with error', async () => { + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.ListToolsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.ListToolsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listTools = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listTools(request), expectedError); + const actualRequest = (client.innerApiCalls.listTools as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listTools as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listToolsStream without error', async () => { + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.ListToolsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.ListToolsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dialogflow.cx.v3.Tool()), + generateSampleMessage(new protos.google.cloud.dialogflow.cx.v3.Tool()), + generateSampleMessage(new protos.google.cloud.dialogflow.cx.v3.Tool()), + ]; + client.descriptors.page.listTools.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listToolsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dialogflow.cx.v3.Tool[] = []; + stream.on('data', (response: protos.google.cloud.dialogflow.cx.v3.Tool) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert((client.descriptors.page.listTools.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listTools, request)); + assert( + (client.descriptors.page.listTools.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listToolsStream with error', async () => { + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.ListToolsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.ListToolsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listTools.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listToolsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dialogflow.cx.v3.Tool[] = []; + stream.on('data', (response: protos.google.cloud.dialogflow.cx.v3.Tool) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listTools.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listTools, request)); + assert( + (client.descriptors.page.listTools.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listTools without error', async () => { + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.ListToolsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.ListToolsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dialogflow.cx.v3.Tool()), + generateSampleMessage(new protos.google.cloud.dialogflow.cx.v3.Tool()), + generateSampleMessage(new protos.google.cloud.dialogflow.cx.v3.Tool()), + ]; + client.descriptors.page.listTools.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dialogflow.cx.v3.ITool[] = []; + const iterable = client.listToolsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listTools.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listTools.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listTools with error', async () => { + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.ListToolsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.ListToolsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listTools.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listToolsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dialogflow.cx.v3.ITool[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listTools.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listTools.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listToolVersions', () => { + it('invokes listToolVersions without error', async () => { + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.ListToolVersionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.ListToolVersionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dialogflow.cx.v3.ToolVersion()), + generateSampleMessage(new protos.google.cloud.dialogflow.cx.v3.ToolVersion()), + generateSampleMessage(new protos.google.cloud.dialogflow.cx.v3.ToolVersion()), + ]; + client.innerApiCalls.listToolVersions = stubSimpleCall(expectedResponse); + const [response] = await client.listToolVersions(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listToolVersions as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listToolVersions as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listToolVersions without error using callback', async () => { + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.ListToolVersionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.ListToolVersionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dialogflow.cx.v3.ToolVersion()), + generateSampleMessage(new protos.google.cloud.dialogflow.cx.v3.ToolVersion()), + generateSampleMessage(new protos.google.cloud.dialogflow.cx.v3.ToolVersion()), + ]; + client.innerApiCalls.listToolVersions = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listToolVersions( + request, + (err?: Error|null, result?: protos.google.cloud.dialogflow.cx.v3.IToolVersion[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listToolVersions as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listToolVersions as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listToolVersions with error', async () => { + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.ListToolVersionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.ListToolVersionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listToolVersions = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listToolVersions(request), expectedError); + const actualRequest = (client.innerApiCalls.listToolVersions as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listToolVersions as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listToolVersionsStream without error', async () => { + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.ListToolVersionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.ListToolVersionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dialogflow.cx.v3.ToolVersion()), + generateSampleMessage(new protos.google.cloud.dialogflow.cx.v3.ToolVersion()), + generateSampleMessage(new protos.google.cloud.dialogflow.cx.v3.ToolVersion()), + ]; + client.descriptors.page.listToolVersions.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listToolVersionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dialogflow.cx.v3.ToolVersion[] = []; + stream.on('data', (response: protos.google.cloud.dialogflow.cx.v3.ToolVersion) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert((client.descriptors.page.listToolVersions.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listToolVersions, request)); + assert( + (client.descriptors.page.listToolVersions.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listToolVersionsStream with error', async () => { + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.ListToolVersionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.ListToolVersionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listToolVersions.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listToolVersionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dialogflow.cx.v3.ToolVersion[] = []; + stream.on('data', (response: protos.google.cloud.dialogflow.cx.v3.ToolVersion) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listToolVersions.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listToolVersions, request)); + assert( + (client.descriptors.page.listToolVersions.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listToolVersions without error', async () => { + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.ListToolVersionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.ListToolVersionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dialogflow.cx.v3.ToolVersion()), + generateSampleMessage(new protos.google.cloud.dialogflow.cx.v3.ToolVersion()), + generateSampleMessage(new protos.google.cloud.dialogflow.cx.v3.ToolVersion()), + ]; + client.descriptors.page.listToolVersions.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dialogflow.cx.v3.IToolVersion[] = []; + const iterable = client.listToolVersionsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listToolVersions.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listToolVersions.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listToolVersions with error', async () => { + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.ListToolVersionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dialogflow.cx.v3.ListToolVersionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listToolVersions.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listToolVersionsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dialogflow.cx.v3.IToolVersion[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listToolVersions.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listToolVersions.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + describe('getLocation', () => { + it('invokes getLocation without error', async () => { + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = stubSimpleCall(expectedResponse); + const response = await client.getLocation(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.locationsClient.getLocation as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + it('invokes getLocation without error using callback', async () => { + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getLocation( + request, + expectedOptions, + ( + err?: Error | null, + result?: LocationProtos.google.cloud.location.ILocation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.locationsClient.getLocation as SinonStub) + .getCall(0)); + }); + it('invokes getLocation with error', async () => { + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.locationsClient.getLocation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getLocation(request, expectedOptions), expectedError); + assert((client.locationsClient.getLocation as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + }); + describe('listLocationsAsync', () => { + it('uses async iteration with listLocations without error', async () => { + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + ]; + client.locationsClient.descriptors.page.listLocations.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + const iterable = client.listLocationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + it('uses async iteration with listLocations with error', async () => { + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.locationsClient.descriptors.page.listLocations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listLocationsAsync(request); + await assert.rejects(async () => { + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + describe('getOperation', () => { + it('invokes getOperation without error', async () => { + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const response = await client.getOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0).calledWith(request) + ); + }); + it('invokes getOperation without error using callback', async () => { + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.getOperation( + request, + undefined, + ( + err?: Error | null, + result?: operationsProtos.google.longrunning.Operation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }).catch(err => {throw err}); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + it('invokes getOperation with error', async () => { + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => {await client.getOperation(request)}, expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0).calledWith(request)); + }); + }); + describe('cancelOperation', () => { + it('invokes cancelOperation without error', async () => { + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = stubSimpleCall(expectedResponse); + const response = await client.cancelOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.operationsClient.cancelOperation as SinonStub) + .getCall(0).calledWith(request) + ); + }); + it('invokes cancelOperation without error using callback', async () => { + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.cancelOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }).catch(err => {throw err}); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.cancelOperation as SinonStub) + .getCall(0)); + }); + it('invokes cancelOperation with error', async () => { + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.cancelOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => {await client.cancelOperation(request)}, expectedError); + assert((client.operationsClient.cancelOperation as SinonStub) + .getCall(0).calledWith(request)); + }); + }); + describe('deleteOperation', () => { + it('invokes deleteOperation without error', async () => { + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = stubSimpleCall(expectedResponse); + const response = await client.deleteOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.operationsClient.deleteOperation as SinonStub) + .getCall(0).calledWith(request) + ); + }); + it('invokes deleteOperation without error using callback', async () => { + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.deleteOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }).catch(err => {throw err}); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.deleteOperation as SinonStub) + .getCall(0)); + }); + it('invokes deleteOperation with error', async () => { + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.deleteOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => {await client.deleteOperation(request)}, expectedError); + assert((client.operationsClient.deleteOperation as SinonStub) + .getCall(0).calledWith(request)); + }); + }); + describe('listOperationsAsync', () => { + it('uses async iteration with listOperations without error', async () => { + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + ]; + client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: operationsProtos.google.longrunning.IOperation[] = []; + const iterable = client.operationsClient.listOperationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.operationsClient.descriptor.listOperations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + }); + it('uses async iteration with listOperations with error', async () => { + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.operationsClient.listOperationsAsync(request); + await assert.rejects(async () => { + const responses: operationsProtos.google.longrunning.IOperation[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.operationsClient.descriptor.listOperations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + }); + }); + + describe('Path templates', () => { + + describe('agent', async () => { + const fakePath = "/rendered/path/agent"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + }; + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.agentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.agentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('agentPath', () => { + const result = client.agentPath("projectValue", "locationValue", "agentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.agentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromAgentName', () => { + const result = client.matchProjectFromAgentName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.agentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromAgentName', () => { + const result = client.matchLocationFromAgentName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.agentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromAgentName', () => { + const result = client.matchAgentFromAgentName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.agentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('agentGenerativeSettings', async () => { + const fakePath = "/rendered/path/agentGenerativeSettings"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + }; + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.agentGenerativeSettingsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.agentGenerativeSettingsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('agentGenerativeSettingsPath', () => { + const result = client.agentGenerativeSettingsPath("projectValue", "locationValue", "agentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.agentGenerativeSettingsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromAgentGenerativeSettingsName', () => { + const result = client.matchProjectFromAgentGenerativeSettingsName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.agentGenerativeSettingsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromAgentGenerativeSettingsName', () => { + const result = client.matchLocationFromAgentGenerativeSettingsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.agentGenerativeSettingsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromAgentGenerativeSettingsName', () => { + const result = client.matchAgentFromAgentGenerativeSettingsName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.agentGenerativeSettingsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('agentValidationResult', async () => { + const fakePath = "/rendered/path/agentValidationResult"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + }; + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.agentValidationResultPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.agentValidationResultPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('agentValidationResultPath', () => { + const result = client.agentValidationResultPath("projectValue", "locationValue", "agentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.agentValidationResultPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromAgentValidationResultName', () => { + const result = client.matchProjectFromAgentValidationResultName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.agentValidationResultPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromAgentValidationResultName', () => { + const result = client.matchLocationFromAgentValidationResultName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.agentValidationResultPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromAgentValidationResultName', () => { + const result = client.matchAgentFromAgentValidationResultName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.agentValidationResultPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('changelog', async () => { + const fakePath = "/rendered/path/changelog"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + changelog: "changelogValue", + }; + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.changelogPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.changelogPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('changelogPath', () => { + const result = client.changelogPath("projectValue", "locationValue", "agentValue", "changelogValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.changelogPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromChangelogName', () => { + const result = client.matchProjectFromChangelogName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.changelogPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromChangelogName', () => { + const result = client.matchLocationFromChangelogName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.changelogPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromChangelogName', () => { + const result = client.matchAgentFromChangelogName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.changelogPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchChangelogFromChangelogName', () => { + const result = client.matchChangelogFromChangelogName(fakePath); + assert.strictEqual(result, "changelogValue"); + assert((client.pathTemplates.changelogPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('continuousTestResult', async () => { + const fakePath = "/rendered/path/continuousTestResult"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + environment: "environmentValue", + continuous_test_result: "continuousTestResultValue", + }; + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.continuousTestResultPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.continuousTestResultPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('continuousTestResultPath', () => { + const result = client.continuousTestResultPath("projectValue", "locationValue", "agentValue", "environmentValue", "continuousTestResultValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.continuousTestResultPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromContinuousTestResultName', () => { + const result = client.matchProjectFromContinuousTestResultName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.continuousTestResultPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromContinuousTestResultName', () => { + const result = client.matchLocationFromContinuousTestResultName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.continuousTestResultPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromContinuousTestResultName', () => { + const result = client.matchAgentFromContinuousTestResultName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.continuousTestResultPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEnvironmentFromContinuousTestResultName', () => { + const result = client.matchEnvironmentFromContinuousTestResultName(fakePath); + assert.strictEqual(result, "environmentValue"); + assert((client.pathTemplates.continuousTestResultPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContinuousTestResultFromContinuousTestResultName', () => { + const result = client.matchContinuousTestResultFromContinuousTestResultName(fakePath); + assert.strictEqual(result, "continuousTestResultValue"); + assert((client.pathTemplates.continuousTestResultPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('deployment', async () => { + const fakePath = "/rendered/path/deployment"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + environment: "environmentValue", + deployment: "deploymentValue", + }; + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.deploymentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deploymentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deploymentPath', () => { + const result = client.deploymentPath("projectValue", "locationValue", "agentValue", "environmentValue", "deploymentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deploymentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromDeploymentName', () => { + const result = client.matchProjectFromDeploymentName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.deploymentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromDeploymentName', () => { + const result = client.matchLocationFromDeploymentName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.deploymentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromDeploymentName', () => { + const result = client.matchAgentFromDeploymentName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.deploymentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEnvironmentFromDeploymentName', () => { + const result = client.matchEnvironmentFromDeploymentName(fakePath); + assert.strictEqual(result, "environmentValue"); + assert((client.pathTemplates.deploymentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeploymentFromDeploymentName', () => { + const result = client.matchDeploymentFromDeploymentName(fakePath); + assert.strictEqual(result, "deploymentValue"); + assert((client.pathTemplates.deploymentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('entityType', async () => { + const fakePath = "/rendered/path/entityType"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + entity_type: "entityTypeValue", + }; + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.entityTypePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.entityTypePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('entityTypePath', () => { + const result = client.entityTypePath("projectValue", "locationValue", "agentValue", "entityTypeValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.entityTypePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromEntityTypeName', () => { + const result = client.matchProjectFromEntityTypeName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.entityTypePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromEntityTypeName', () => { + const result = client.matchLocationFromEntityTypeName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.entityTypePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromEntityTypeName', () => { + const result = client.matchAgentFromEntityTypeName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.entityTypePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEntityTypeFromEntityTypeName', () => { + const result = client.matchEntityTypeFromEntityTypeName(fakePath); + assert.strictEqual(result, "entityTypeValue"); + assert((client.pathTemplates.entityTypePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('environment', async () => { + const fakePath = "/rendered/path/environment"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + environment: "environmentValue", + }; + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.environmentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.environmentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('environmentPath', () => { + const result = client.environmentPath("projectValue", "locationValue", "agentValue", "environmentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.environmentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromEnvironmentName', () => { + const result = client.matchProjectFromEnvironmentName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromEnvironmentName', () => { + const result = client.matchLocationFromEnvironmentName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromEnvironmentName', () => { + const result = client.matchAgentFromEnvironmentName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEnvironmentFromEnvironmentName', () => { + const result = client.matchEnvironmentFromEnvironmentName(fakePath); + assert.strictEqual(result, "environmentValue"); + assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('example', async () => { + const fakePath = "/rendered/path/example"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + playbook: "playbookValue", + example: "exampleValue", + }; + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.examplePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.examplePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('examplePath', () => { + const result = client.examplePath("projectValue", "locationValue", "agentValue", "playbookValue", "exampleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.examplePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromExampleName', () => { + const result = client.matchProjectFromExampleName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromExampleName', () => { + const result = client.matchLocationFromExampleName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromExampleName', () => { + const result = client.matchAgentFromExampleName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPlaybookFromExampleName', () => { + const result = client.matchPlaybookFromExampleName(fakePath); + assert.strictEqual(result, "playbookValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchExampleFromExampleName', () => { + const result = client.matchExampleFromExampleName(fakePath); + assert.strictEqual(result, "exampleValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('experiment', async () => { + const fakePath = "/rendered/path/experiment"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + environment: "environmentValue", + experiment: "experimentValue", + }; + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.experimentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.experimentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('experimentPath', () => { + const result = client.experimentPath("projectValue", "locationValue", "agentValue", "environmentValue", "experimentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.experimentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromExperimentName', () => { + const result = client.matchProjectFromExperimentName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromExperimentName', () => { + const result = client.matchLocationFromExperimentName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromExperimentName', () => { + const result = client.matchAgentFromExperimentName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEnvironmentFromExperimentName', () => { + const result = client.matchEnvironmentFromExperimentName(fakePath); + assert.strictEqual(result, "environmentValue"); + assert((client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchExperimentFromExperimentName', () => { + const result = client.matchExperimentFromExperimentName(fakePath); + assert.strictEqual(result, "experimentValue"); + assert((client.pathTemplates.experimentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('flow', async () => { + const fakePath = "/rendered/path/flow"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + flow: "flowValue", + }; + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.flowPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.flowPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('flowPath', () => { + const result = client.flowPath("projectValue", "locationValue", "agentValue", "flowValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.flowPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromFlowName', () => { + const result = client.matchProjectFromFlowName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.flowPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromFlowName', () => { + const result = client.matchLocationFromFlowName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.flowPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromFlowName', () => { + const result = client.matchAgentFromFlowName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.flowPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFlowFromFlowName', () => { + const result = client.matchFlowFromFlowName(fakePath); + assert.strictEqual(result, "flowValue"); + assert((client.pathTemplates.flowPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('flowValidationResult', async () => { + const fakePath = "/rendered/path/flowValidationResult"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + flow: "flowValue", + }; + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.flowValidationResultPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.flowValidationResultPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('flowValidationResultPath', () => { + const result = client.flowValidationResultPath("projectValue", "locationValue", "agentValue", "flowValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.flowValidationResultPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromFlowValidationResultName', () => { + const result = client.matchProjectFromFlowValidationResultName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.flowValidationResultPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromFlowValidationResultName', () => { + const result = client.matchLocationFromFlowValidationResultName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.flowValidationResultPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromFlowValidationResultName', () => { + const result = client.matchAgentFromFlowValidationResultName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.flowValidationResultPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFlowFromFlowValidationResultName', () => { + const result = client.matchFlowFromFlowValidationResultName(fakePath); + assert.strictEqual(result, "flowValue"); + assert((client.pathTemplates.flowValidationResultPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('generator', async () => { + const fakePath = "/rendered/path/generator"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + generator: "generatorValue", + }; + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.generatorPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.generatorPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('generatorPath', () => { + const result = client.generatorPath("projectValue", "locationValue", "agentValue", "generatorValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.generatorPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromGeneratorName', () => { + const result = client.matchProjectFromGeneratorName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.generatorPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromGeneratorName', () => { + const result = client.matchLocationFromGeneratorName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.generatorPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromGeneratorName', () => { + const result = client.matchAgentFromGeneratorName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.generatorPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchGeneratorFromGeneratorName', () => { + const result = client.matchGeneratorFromGeneratorName(fakePath); + assert.strictEqual(result, "generatorValue"); + assert((client.pathTemplates.generatorPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('intent', async () => { + const fakePath = "/rendered/path/intent"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + intent: "intentValue", + }; + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.intentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.intentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('intentPath', () => { + const result = client.intentPath("projectValue", "locationValue", "agentValue", "intentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.intentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromIntentName', () => { + const result = client.matchProjectFromIntentName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.intentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromIntentName', () => { + const result = client.matchLocationFromIntentName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.intentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromIntentName', () => { + const result = client.matchAgentFromIntentName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.intentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchIntentFromIntentName', () => { + const result = client.matchIntentFromIntentName(fakePath); + assert.strictEqual(result, "intentValue"); + assert((client.pathTemplates.intentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('location', async () => { + const fakePath = "/rendered/path/location"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + }; + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.locationPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.locationPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('locationPath', () => { + const result = client.locationPath("projectValue", "locationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.locationPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromLocationName', () => { + const result = client.matchProjectFromLocationName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromLocationName', () => { + const result = client.matchLocationFromLocationName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('page', async () => { + const fakePath = "/rendered/path/page"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + flow: "flowValue", + page: "pageValue", + }; + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.pagePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.pagePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('pagePath', () => { + const result = client.pagePath("projectValue", "locationValue", "agentValue", "flowValue", "pageValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.pagePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromPageName', () => { + const result = client.matchProjectFromPageName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.pagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromPageName', () => { + const result = client.matchLocationFromPageName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.pagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromPageName', () => { + const result = client.matchAgentFromPageName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.pagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFlowFromPageName', () => { + const result = client.matchFlowFromPageName(fakePath); + assert.strictEqual(result, "flowValue"); + assert((client.pathTemplates.pagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPageFromPageName', () => { + const result = client.matchPageFromPageName(fakePath); + assert.strictEqual(result, "pageValue"); + assert((client.pathTemplates.pagePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('playbook', async () => { + const fakePath = "/rendered/path/playbook"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + playbook: "playbookValue", + }; + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.playbookPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.playbookPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('playbookPath', () => { + const result = client.playbookPath("projectValue", "locationValue", "agentValue", "playbookValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.playbookPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromPlaybookName', () => { + const result = client.matchProjectFromPlaybookName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.playbookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromPlaybookName', () => { + const result = client.matchLocationFromPlaybookName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.playbookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromPlaybookName', () => { + const result = client.matchAgentFromPlaybookName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.playbookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPlaybookFromPlaybookName', () => { + const result = client.matchPlaybookFromPlaybookName(fakePath); + assert.strictEqual(result, "playbookValue"); + assert((client.pathTemplates.playbookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('playbookVersion', async () => { + const fakePath = "/rendered/path/playbookVersion"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + playbook: "playbookValue", + version: "versionValue", + }; + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.playbookVersionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.playbookVersionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('playbookVersionPath', () => { + const result = client.playbookVersionPath("projectValue", "locationValue", "agentValue", "playbookValue", "versionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.playbookVersionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromPlaybookVersionName', () => { + const result = client.matchProjectFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromPlaybookVersionName', () => { + const result = client.matchLocationFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromPlaybookVersionName', () => { + const result = client.matchAgentFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPlaybookFromPlaybookVersionName', () => { + const result = client.matchPlaybookFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "playbookValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchVersionFromPlaybookVersionName', () => { + const result = client.matchVersionFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "versionValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('project', async () => { + const fakePath = "/rendered/path/project"; + const expectedParameters = { + project: "projectValue", + }; + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectPath', () => { + const result = client.projectPath("projectValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectName', () => { + const result = client.matchProjectFromProjectName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationAgentEnvironmentSessionEntityType', async () => { + const fakePath = "/rendered/path/projectLocationAgentEnvironmentSessionEntityType"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + environment: "environmentValue", + session: "sessionValue", + entity_type: "entityTypeValue", + }; + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationAgentEnvironmentSessionEntityTypePath', () => { + const result = client.projectLocationAgentEnvironmentSessionEntityTypePath("projectValue", "locationValue", "agentValue", "environmentValue", "sessionValue", "entityTypeValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationAgentEnvironmentSessionEntityTypeName', () => { + const result = client.matchProjectFromProjectLocationAgentEnvironmentSessionEntityTypeName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationAgentEnvironmentSessionEntityTypeName', () => { + const result = client.matchLocationFromProjectLocationAgentEnvironmentSessionEntityTypeName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromProjectLocationAgentEnvironmentSessionEntityTypeName', () => { + const result = client.matchAgentFromProjectLocationAgentEnvironmentSessionEntityTypeName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEnvironmentFromProjectLocationAgentEnvironmentSessionEntityTypeName', () => { + const result = client.matchEnvironmentFromProjectLocationAgentEnvironmentSessionEntityTypeName(fakePath); + assert.strictEqual(result, "environmentValue"); + assert((client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSessionFromProjectLocationAgentEnvironmentSessionEntityTypeName', () => { + const result = client.matchSessionFromProjectLocationAgentEnvironmentSessionEntityTypeName(fakePath); + assert.strictEqual(result, "sessionValue"); + assert((client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEntityTypeFromProjectLocationAgentEnvironmentSessionEntityTypeName', () => { + const result = client.matchEntityTypeFromProjectLocationAgentEnvironmentSessionEntityTypeName(fakePath); + assert.strictEqual(result, "entityTypeValue"); + assert((client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationAgentFlowTransitionRouteGroups', async () => { + const fakePath = "/rendered/path/projectLocationAgentFlowTransitionRouteGroups"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + flow: "flowValue", + transition_route_group: "transitionRouteGroupValue", + }; + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationAgentFlowTransitionRouteGroupsPath', () => { + const result = client.projectLocationAgentFlowTransitionRouteGroupsPath("projectValue", "locationValue", "agentValue", "flowValue", "transitionRouteGroupValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationAgentFlowTransitionRouteGroupsName', () => { + const result = client.matchProjectFromProjectLocationAgentFlowTransitionRouteGroupsName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationAgentFlowTransitionRouteGroupsName', () => { + const result = client.matchLocationFromProjectLocationAgentFlowTransitionRouteGroupsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromProjectLocationAgentFlowTransitionRouteGroupsName', () => { + const result = client.matchAgentFromProjectLocationAgentFlowTransitionRouteGroupsName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFlowFromProjectLocationAgentFlowTransitionRouteGroupsName', () => { + const result = client.matchFlowFromProjectLocationAgentFlowTransitionRouteGroupsName(fakePath); + assert.strictEqual(result, "flowValue"); + assert((client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchTransitionRouteGroupFromProjectLocationAgentFlowTransitionRouteGroupsName', () => { + const result = client.matchTransitionRouteGroupFromProjectLocationAgentFlowTransitionRouteGroupsName(fakePath); + assert.strictEqual(result, "transitionRouteGroupValue"); + assert((client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationAgentSessionEntityType', async () => { + const fakePath = "/rendered/path/projectLocationAgentSessionEntityType"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + session: "sessionValue", + entity_type: "entityTypeValue", + }; + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationAgentSessionEntityTypePath', () => { + const result = client.projectLocationAgentSessionEntityTypePath("projectValue", "locationValue", "agentValue", "sessionValue", "entityTypeValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationAgentSessionEntityTypeName', () => { + const result = client.matchProjectFromProjectLocationAgentSessionEntityTypeName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationAgentSessionEntityTypeName', () => { + const result = client.matchLocationFromProjectLocationAgentSessionEntityTypeName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromProjectLocationAgentSessionEntityTypeName', () => { + const result = client.matchAgentFromProjectLocationAgentSessionEntityTypeName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSessionFromProjectLocationAgentSessionEntityTypeName', () => { + const result = client.matchSessionFromProjectLocationAgentSessionEntityTypeName(fakePath); + assert.strictEqual(result, "sessionValue"); + assert((client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEntityTypeFromProjectLocationAgentSessionEntityTypeName', () => { + const result = client.matchEntityTypeFromProjectLocationAgentSessionEntityTypeName(fakePath); + assert.strictEqual(result, "entityTypeValue"); + assert((client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationAgentTransitionRouteGroups', async () => { + const fakePath = "/rendered/path/projectLocationAgentTransitionRouteGroups"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + transition_route_group: "transitionRouteGroupValue", + }; + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationAgentTransitionRouteGroupsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationAgentTransitionRouteGroupsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationAgentTransitionRouteGroupsPath', () => { + const result = client.projectLocationAgentTransitionRouteGroupsPath("projectValue", "locationValue", "agentValue", "transitionRouteGroupValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationAgentTransitionRouteGroupsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationAgentTransitionRouteGroupsName', () => { + const result = client.matchProjectFromProjectLocationAgentTransitionRouteGroupsName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationAgentTransitionRouteGroupsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationAgentTransitionRouteGroupsName', () => { + const result = client.matchLocationFromProjectLocationAgentTransitionRouteGroupsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationAgentTransitionRouteGroupsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromProjectLocationAgentTransitionRouteGroupsName', () => { + const result = client.matchAgentFromProjectLocationAgentTransitionRouteGroupsName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.projectLocationAgentTransitionRouteGroupsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchTransitionRouteGroupFromProjectLocationAgentTransitionRouteGroupsName', () => { + const result = client.matchTransitionRouteGroupFromProjectLocationAgentTransitionRouteGroupsName(fakePath); + assert.strictEqual(result, "transitionRouteGroupValue"); + assert((client.pathTemplates.projectLocationAgentTransitionRouteGroupsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('securitySettings', async () => { + const fakePath = "/rendered/path/securitySettings"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + security_settings: "securitySettingsValue", + }; + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.securitySettingsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.securitySettingsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('securitySettingsPath', () => { + const result = client.securitySettingsPath("projectValue", "locationValue", "securitySettingsValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.securitySettingsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromSecuritySettingsName', () => { + const result = client.matchProjectFromSecuritySettingsName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.securitySettingsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromSecuritySettingsName', () => { + const result = client.matchLocationFromSecuritySettingsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.securitySettingsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSecuritySettingsFromSecuritySettingsName', () => { + const result = client.matchSecuritySettingsFromSecuritySettingsName(fakePath); + assert.strictEqual(result, "securitySettingsValue"); + assert((client.pathTemplates.securitySettingsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('testCase', async () => { + const fakePath = "/rendered/path/testCase"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + test_case: "testCaseValue", + }; + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.testCasePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.testCasePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('testCasePath', () => { + const result = client.testCasePath("projectValue", "locationValue", "agentValue", "testCaseValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.testCasePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromTestCaseName', () => { + const result = client.matchProjectFromTestCaseName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.testCasePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromTestCaseName', () => { + const result = client.matchLocationFromTestCaseName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.testCasePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromTestCaseName', () => { + const result = client.matchAgentFromTestCaseName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.testCasePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchTestCaseFromTestCaseName', () => { + const result = client.matchTestCaseFromTestCaseName(fakePath); + assert.strictEqual(result, "testCaseValue"); + assert((client.pathTemplates.testCasePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('testCaseResult', async () => { + const fakePath = "/rendered/path/testCaseResult"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + test_case: "testCaseValue", + result: "resultValue", + }; + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.testCaseResultPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.testCaseResultPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('testCaseResultPath', () => { + const result = client.testCaseResultPath("projectValue", "locationValue", "agentValue", "testCaseValue", "resultValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.testCaseResultPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromTestCaseResultName', () => { + const result = client.matchProjectFromTestCaseResultName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.testCaseResultPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromTestCaseResultName', () => { + const result = client.matchLocationFromTestCaseResultName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.testCaseResultPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromTestCaseResultName', () => { + const result = client.matchAgentFromTestCaseResultName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.testCaseResultPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchTestCaseFromTestCaseResultName', () => { + const result = client.matchTestCaseFromTestCaseResultName(fakePath); + assert.strictEqual(result, "testCaseValue"); + assert((client.pathTemplates.testCaseResultPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchResultFromTestCaseResultName', () => { + const result = client.matchResultFromTestCaseResultName(fakePath); + assert.strictEqual(result, "resultValue"); + assert((client.pathTemplates.testCaseResultPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('tool', async () => { + const fakePath = "/rendered/path/tool"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + tool: "toolValue", + }; + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.toolPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.toolPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('toolPath', () => { + const result = client.toolPath("projectValue", "locationValue", "agentValue", "toolValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.toolPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromToolName', () => { + const result = client.matchProjectFromToolName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.toolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromToolName', () => { + const result = client.matchLocationFromToolName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.toolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromToolName', () => { + const result = client.matchAgentFromToolName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.toolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchToolFromToolName', () => { + const result = client.matchToolFromToolName(fakePath); + assert.strictEqual(result, "toolValue"); + assert((client.pathTemplates.toolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('toolVersion', async () => { + const fakePath = "/rendered/path/toolVersion"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + tool: "toolValue", + version: "versionValue", + }; + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.toolVersionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.toolVersionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('toolVersionPath', () => { + const result = client.toolVersionPath("projectValue", "locationValue", "agentValue", "toolValue", "versionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.toolVersionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromToolVersionName', () => { + const result = client.matchProjectFromToolVersionName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromToolVersionName', () => { + const result = client.matchLocationFromToolVersionName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromToolVersionName', () => { + const result = client.matchAgentFromToolVersionName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchToolFromToolVersionName', () => { + const result = client.matchToolFromToolVersionName(fakePath); + assert.strictEqual(result, "toolValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchVersionFromToolVersionName', () => { + const result = client.matchVersionFromToolVersionName(fakePath); + assert.strictEqual(result, "versionValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('version', async () => { + const fakePath = "/rendered/path/version"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + flow: "flowValue", + version: "versionValue", + }; + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.versionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.versionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('versionPath', () => { + const result = client.versionPath("projectValue", "locationValue", "agentValue", "flowValue", "versionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.versionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromVersionName', () => { + const result = client.matchProjectFromVersionName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.versionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromVersionName', () => { + const result = client.matchLocationFromVersionName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.versionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromVersionName', () => { + const result = client.matchAgentFromVersionName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.versionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFlowFromVersionName', () => { + const result = client.matchFlowFromVersionName(fakePath); + assert.strictEqual(result, "flowValue"); + assert((client.pathTemplates.versionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchVersionFromVersionName', () => { + const result = client.matchVersionFromVersionName(fakePath); + assert.strictEqual(result, "versionValue"); + assert((client.pathTemplates.versionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('webhook', async () => { + const fakePath = "/rendered/path/webhook"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + webhook: "webhookValue", + }; + const client = new toolsModule.v3.ToolsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.webhookPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.webhookPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('webhookPath', () => { + const result = client.webhookPath("projectValue", "locationValue", "agentValue", "webhookValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.webhookPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromWebhookName', () => { + const result = client.matchProjectFromWebhookName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.webhookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromWebhookName', () => { + const result = client.matchLocationFromWebhookName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.webhookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromWebhookName', () => { + const result = client.matchAgentFromWebhookName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.webhookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchWebhookFromWebhookName', () => { + const result = client.matchWebhookFromWebhookName(fakePath); + assert.strictEqual(result, "webhookValue"); + assert((client.pathTemplates.webhookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + }); +}); diff --git a/packages/google-cloud-dialogflow-cx/test/gapic_transition_route_groups_v3.ts b/packages/google-cloud-dialogflow-cx/test/gapic_transition_route_groups_v3.ts index 21749d01b94..c718f0fcecb 100644 --- a/packages/google-cloud-dialogflow-cx/test/gapic_transition_route_groups_v3.ts +++ b/packages/google-cloud-dialogflow-cx/test/gapic_transition_route_groups_v3.ts @@ -1787,6 +1787,68 @@ describe('v3.TransitionRouteGroupsClient', () => { }); }); + describe('example', async () => { + const fakePath = "/rendered/path/example"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + playbook: "playbookValue", + example: "exampleValue", + }; + const client = new transitionroutegroupsModule.v3.TransitionRouteGroupsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.examplePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.examplePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('examplePath', () => { + const result = client.examplePath("projectValue", "locationValue", "agentValue", "playbookValue", "exampleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.examplePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromExampleName', () => { + const result = client.matchProjectFromExampleName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromExampleName', () => { + const result = client.matchLocationFromExampleName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromExampleName', () => { + const result = client.matchAgentFromExampleName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPlaybookFromExampleName', () => { + const result = client.matchPlaybookFromExampleName(fakePath); + assert.strictEqual(result, "playbookValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchExampleFromExampleName', () => { + const result = client.matchExampleFromExampleName(fakePath); + assert.strictEqual(result, "exampleValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('experiment', async () => { const fakePath = "/rendered/path/experiment"; const expectedParameters = { @@ -2165,6 +2227,122 @@ describe('v3.TransitionRouteGroupsClient', () => { }); }); + describe('playbook', async () => { + const fakePath = "/rendered/path/playbook"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + playbook: "playbookValue", + }; + const client = new transitionroutegroupsModule.v3.TransitionRouteGroupsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.playbookPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.playbookPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('playbookPath', () => { + const result = client.playbookPath("projectValue", "locationValue", "agentValue", "playbookValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.playbookPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromPlaybookName', () => { + const result = client.matchProjectFromPlaybookName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.playbookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromPlaybookName', () => { + const result = client.matchLocationFromPlaybookName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.playbookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromPlaybookName', () => { + const result = client.matchAgentFromPlaybookName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.playbookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPlaybookFromPlaybookName', () => { + const result = client.matchPlaybookFromPlaybookName(fakePath); + assert.strictEqual(result, "playbookValue"); + assert((client.pathTemplates.playbookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('playbookVersion', async () => { + const fakePath = "/rendered/path/playbookVersion"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + playbook: "playbookValue", + version: "versionValue", + }; + const client = new transitionroutegroupsModule.v3.TransitionRouteGroupsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.playbookVersionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.playbookVersionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('playbookVersionPath', () => { + const result = client.playbookVersionPath("projectValue", "locationValue", "agentValue", "playbookValue", "versionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.playbookVersionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromPlaybookVersionName', () => { + const result = client.matchProjectFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromPlaybookVersionName', () => { + const result = client.matchLocationFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromPlaybookVersionName', () => { + const result = client.matchAgentFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPlaybookFromPlaybookVersionName', () => { + const result = client.matchPlaybookFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "playbookValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchVersionFromPlaybookVersionName', () => { + const result = client.matchVersionFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "versionValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('project', async () => { const fakePath = "/rendered/path/project"; const expectedParameters = { @@ -2605,6 +2783,122 @@ describe('v3.TransitionRouteGroupsClient', () => { }); }); + describe('tool', async () => { + const fakePath = "/rendered/path/tool"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + tool: "toolValue", + }; + const client = new transitionroutegroupsModule.v3.TransitionRouteGroupsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.toolPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.toolPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('toolPath', () => { + const result = client.toolPath("projectValue", "locationValue", "agentValue", "toolValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.toolPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromToolName', () => { + const result = client.matchProjectFromToolName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.toolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromToolName', () => { + const result = client.matchLocationFromToolName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.toolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromToolName', () => { + const result = client.matchAgentFromToolName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.toolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchToolFromToolName', () => { + const result = client.matchToolFromToolName(fakePath); + assert.strictEqual(result, "toolValue"); + assert((client.pathTemplates.toolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('toolVersion', async () => { + const fakePath = "/rendered/path/toolVersion"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + tool: "toolValue", + version: "versionValue", + }; + const client = new transitionroutegroupsModule.v3.TransitionRouteGroupsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.toolVersionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.toolVersionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('toolVersionPath', () => { + const result = client.toolVersionPath("projectValue", "locationValue", "agentValue", "toolValue", "versionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.toolVersionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromToolVersionName', () => { + const result = client.matchProjectFromToolVersionName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromToolVersionName', () => { + const result = client.matchLocationFromToolVersionName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromToolVersionName', () => { + const result = client.matchAgentFromToolVersionName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchToolFromToolVersionName', () => { + const result = client.matchToolFromToolVersionName(fakePath); + assert.strictEqual(result, "toolValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchVersionFromToolVersionName', () => { + const result = client.matchVersionFromToolVersionName(fakePath); + assert.strictEqual(result, "versionValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('version', async () => { const fakePath = "/rendered/path/version"; const expectedParameters = { diff --git a/packages/google-cloud-dialogflow-cx/test/gapic_versions_v3.ts b/packages/google-cloud-dialogflow-cx/test/gapic_versions_v3.ts index 6c7eb9f41a0..feebd6e7d93 100644 --- a/packages/google-cloud-dialogflow-cx/test/gapic_versions_v3.ts +++ b/packages/google-cloud-dialogflow-cx/test/gapic_versions_v3.ts @@ -2111,6 +2111,68 @@ describe('v3.VersionsClient', () => { }); }); + describe('example', async () => { + const fakePath = "/rendered/path/example"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + playbook: "playbookValue", + example: "exampleValue", + }; + const client = new versionsModule.v3.VersionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.examplePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.examplePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('examplePath', () => { + const result = client.examplePath("projectValue", "locationValue", "agentValue", "playbookValue", "exampleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.examplePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromExampleName', () => { + const result = client.matchProjectFromExampleName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromExampleName', () => { + const result = client.matchLocationFromExampleName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromExampleName', () => { + const result = client.matchAgentFromExampleName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPlaybookFromExampleName', () => { + const result = client.matchPlaybookFromExampleName(fakePath); + assert.strictEqual(result, "playbookValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchExampleFromExampleName', () => { + const result = client.matchExampleFromExampleName(fakePath); + assert.strictEqual(result, "exampleValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('experiment', async () => { const fakePath = "/rendered/path/experiment"; const expectedParameters = { @@ -2489,6 +2551,122 @@ describe('v3.VersionsClient', () => { }); }); + describe('playbook', async () => { + const fakePath = "/rendered/path/playbook"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + playbook: "playbookValue", + }; + const client = new versionsModule.v3.VersionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.playbookPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.playbookPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('playbookPath', () => { + const result = client.playbookPath("projectValue", "locationValue", "agentValue", "playbookValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.playbookPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromPlaybookName', () => { + const result = client.matchProjectFromPlaybookName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.playbookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromPlaybookName', () => { + const result = client.matchLocationFromPlaybookName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.playbookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromPlaybookName', () => { + const result = client.matchAgentFromPlaybookName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.playbookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPlaybookFromPlaybookName', () => { + const result = client.matchPlaybookFromPlaybookName(fakePath); + assert.strictEqual(result, "playbookValue"); + assert((client.pathTemplates.playbookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('playbookVersion', async () => { + const fakePath = "/rendered/path/playbookVersion"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + playbook: "playbookValue", + version: "versionValue", + }; + const client = new versionsModule.v3.VersionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.playbookVersionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.playbookVersionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('playbookVersionPath', () => { + const result = client.playbookVersionPath("projectValue", "locationValue", "agentValue", "playbookValue", "versionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.playbookVersionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromPlaybookVersionName', () => { + const result = client.matchProjectFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromPlaybookVersionName', () => { + const result = client.matchLocationFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromPlaybookVersionName', () => { + const result = client.matchAgentFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPlaybookFromPlaybookVersionName', () => { + const result = client.matchPlaybookFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "playbookValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchVersionFromPlaybookVersionName', () => { + const result = client.matchVersionFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "versionValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('project', async () => { const fakePath = "/rendered/path/project"; const expectedParameters = { @@ -2929,6 +3107,122 @@ describe('v3.VersionsClient', () => { }); }); + describe('tool', async () => { + const fakePath = "/rendered/path/tool"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + tool: "toolValue", + }; + const client = new versionsModule.v3.VersionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.toolPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.toolPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('toolPath', () => { + const result = client.toolPath("projectValue", "locationValue", "agentValue", "toolValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.toolPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromToolName', () => { + const result = client.matchProjectFromToolName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.toolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromToolName', () => { + const result = client.matchLocationFromToolName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.toolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromToolName', () => { + const result = client.matchAgentFromToolName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.toolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchToolFromToolName', () => { + const result = client.matchToolFromToolName(fakePath); + assert.strictEqual(result, "toolValue"); + assert((client.pathTemplates.toolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('toolVersion', async () => { + const fakePath = "/rendered/path/toolVersion"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + tool: "toolValue", + version: "versionValue", + }; + const client = new versionsModule.v3.VersionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.toolVersionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.toolVersionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('toolVersionPath', () => { + const result = client.toolVersionPath("projectValue", "locationValue", "agentValue", "toolValue", "versionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.toolVersionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromToolVersionName', () => { + const result = client.matchProjectFromToolVersionName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromToolVersionName', () => { + const result = client.matchLocationFromToolVersionName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromToolVersionName', () => { + const result = client.matchAgentFromToolVersionName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchToolFromToolVersionName', () => { + const result = client.matchToolFromToolVersionName(fakePath); + assert.strictEqual(result, "toolValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchVersionFromToolVersionName', () => { + const result = client.matchVersionFromToolVersionName(fakePath); + assert.strictEqual(result, "versionValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('version', async () => { const fakePath = "/rendered/path/version"; const expectedParameters = { diff --git a/packages/google-cloud-dialogflow-cx/test/gapic_webhooks_v3.ts b/packages/google-cloud-dialogflow-cx/test/gapic_webhooks_v3.ts index 6d7ce8ddc7c..3003d34f567 100644 --- a/packages/google-cloud-dialogflow-cx/test/gapic_webhooks_v3.ts +++ b/packages/google-cloud-dialogflow-cx/test/gapic_webhooks_v3.ts @@ -1787,6 +1787,68 @@ describe('v3.WebhooksClient', () => { }); }); + describe('example', async () => { + const fakePath = "/rendered/path/example"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + playbook: "playbookValue", + example: "exampleValue", + }; + const client = new webhooksModule.v3.WebhooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.examplePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.examplePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('examplePath', () => { + const result = client.examplePath("projectValue", "locationValue", "agentValue", "playbookValue", "exampleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.examplePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromExampleName', () => { + const result = client.matchProjectFromExampleName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromExampleName', () => { + const result = client.matchLocationFromExampleName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromExampleName', () => { + const result = client.matchAgentFromExampleName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPlaybookFromExampleName', () => { + const result = client.matchPlaybookFromExampleName(fakePath); + assert.strictEqual(result, "playbookValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchExampleFromExampleName', () => { + const result = client.matchExampleFromExampleName(fakePath); + assert.strictEqual(result, "exampleValue"); + assert((client.pathTemplates.examplePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('experiment', async () => { const fakePath = "/rendered/path/experiment"; const expectedParameters = { @@ -2165,6 +2227,122 @@ describe('v3.WebhooksClient', () => { }); }); + describe('playbook', async () => { + const fakePath = "/rendered/path/playbook"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + playbook: "playbookValue", + }; + const client = new webhooksModule.v3.WebhooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.playbookPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.playbookPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('playbookPath', () => { + const result = client.playbookPath("projectValue", "locationValue", "agentValue", "playbookValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.playbookPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromPlaybookName', () => { + const result = client.matchProjectFromPlaybookName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.playbookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromPlaybookName', () => { + const result = client.matchLocationFromPlaybookName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.playbookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromPlaybookName', () => { + const result = client.matchAgentFromPlaybookName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.playbookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPlaybookFromPlaybookName', () => { + const result = client.matchPlaybookFromPlaybookName(fakePath); + assert.strictEqual(result, "playbookValue"); + assert((client.pathTemplates.playbookPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('playbookVersion', async () => { + const fakePath = "/rendered/path/playbookVersion"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + playbook: "playbookValue", + version: "versionValue", + }; + const client = new webhooksModule.v3.WebhooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.playbookVersionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.playbookVersionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('playbookVersionPath', () => { + const result = client.playbookVersionPath("projectValue", "locationValue", "agentValue", "playbookValue", "versionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.playbookVersionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromPlaybookVersionName', () => { + const result = client.matchProjectFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromPlaybookVersionName', () => { + const result = client.matchLocationFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromPlaybookVersionName', () => { + const result = client.matchAgentFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPlaybookFromPlaybookVersionName', () => { + const result = client.matchPlaybookFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "playbookValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchVersionFromPlaybookVersionName', () => { + const result = client.matchVersionFromPlaybookVersionName(fakePath); + assert.strictEqual(result, "versionValue"); + assert((client.pathTemplates.playbookVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('project', async () => { const fakePath = "/rendered/path/project"; const expectedParameters = { @@ -2721,6 +2899,122 @@ describe('v3.WebhooksClient', () => { }); }); + describe('tool', async () => { + const fakePath = "/rendered/path/tool"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + tool: "toolValue", + }; + const client = new webhooksModule.v3.WebhooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.toolPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.toolPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('toolPath', () => { + const result = client.toolPath("projectValue", "locationValue", "agentValue", "toolValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.toolPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromToolName', () => { + const result = client.matchProjectFromToolName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.toolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromToolName', () => { + const result = client.matchLocationFromToolName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.toolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromToolName', () => { + const result = client.matchAgentFromToolName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.toolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchToolFromToolName', () => { + const result = client.matchToolFromToolName(fakePath); + assert.strictEqual(result, "toolValue"); + assert((client.pathTemplates.toolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('toolVersion', async () => { + const fakePath = "/rendered/path/toolVersion"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + agent: "agentValue", + tool: "toolValue", + version: "versionValue", + }; + const client = new webhooksModule.v3.WebhooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.toolVersionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.toolVersionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('toolVersionPath', () => { + const result = client.toolVersionPath("projectValue", "locationValue", "agentValue", "toolValue", "versionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.toolVersionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromToolVersionName', () => { + const result = client.matchProjectFromToolVersionName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromToolVersionName', () => { + const result = client.matchLocationFromToolVersionName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAgentFromToolVersionName', () => { + const result = client.matchAgentFromToolVersionName(fakePath); + assert.strictEqual(result, "agentValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchToolFromToolVersionName', () => { + const result = client.matchToolFromToolVersionName(fakePath); + assert.strictEqual(result, "toolValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchVersionFromToolVersionName', () => { + const result = client.matchVersionFromToolVersionName(fakePath); + assert.strictEqual(result, "versionValue"); + assert((client.pathTemplates.toolVersionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('version', async () => { const fakePath = "/rendered/path/version"; const expectedParameters = {